From afcae9b7a0a6009d33581fac78416fc9623a8a18 Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Tue, 8 Sep 2015 22:24:27 +0900 Subject: [PATCH] tizen 2.3.1 release --- .gitignore | 2 + .mailmap | 7 + CMakeLists.txt | 253 + ChangeLog | 6629 ++++---- ChangeLog.21 | 2 +- ChangeLog.23 | 2 +- ChangeLog.24 | 6360 ++++++++ Jamfile | 12 +- LICENSE | 169 + LICENSE.GPL-2.0 | 340 + README | 60 +- README.git | 6 +- TC/_export_env.sh | 9 - TC/_export_target_env.sh | 7 - TC/build.sh | 16 - TC/clean.sh | 11 - TC/config | 2 - TC/execute.sh | 15 - TC/testcase/Makefile | 24 - TC/testcase/tslist | 9 - TC/testcase/utc_ft_bench.c | 36 - TC/testcase/utc_ft_diff.c | 36 - TC/testcase/utc_ft_dump.c | 36 - TC/testcase/utc_ft_gamma.c | 36 - TC/testcase/utc_ft_grid.c | 36 - TC/testcase/utc_ft_lint.c | 36 - TC/testcase/utc_ft_multi.c | 36 - TC/testcase/utc_ft_string.c | 36 - TC/testcase/utc_ft_view.c | 36 - TC/tet_scen | 7 - TC/tetbuild.cfg | 5 - TC/tetclean.cfg | 5 - TC/tetexec.cfg | 5 - autogen.sh | 8 +- builds/amiga/README | 13 +- .../amiga/include/{freetype => }/config/ftconfig.h | 8 +- .../amiga/include/{freetype => }/config/ftmodule.h | 0 builds/amiga/makefile | 4 +- builds/amiga/makefile.os4 | 4 +- builds/amiga/smakefile | 4 +- builds/amiga/src/base/ftdebug.c | 50 +- builds/amiga/src/base/ftsystem.c | 14 +- builds/atari/deflinejoiner.awk | 6 +- builds/cmake/iOS.cmake | 275 + builds/compiler/bcc-dev.mk | 2 +- builds/detect.mk | 10 +- builds/dos/detect.mk | 8 +- builds/exports.mk | 2 +- builds/freetype.mk | 42 +- builds/mac/README | 20 +- builds/mac/freetype-Info.plist | 36 + builds/mac/ftmac.c | 92 +- builds/modules.mk | 4 +- builds/symbian/bld.inf | 92 +- builds/toplevel.mk | 15 +- builds/unix/.gitignore | 1 + builds/unix/aclocal.m4 | 87 +- builds/unix/config.guess | 184 +- builds/unix/config.sub | 106 +- builds/unix/configure | 15424 ++++++++++--------- builds/unix/configure.ac | 450 +- builds/unix/configure.raw | 448 +- builds/unix/detect.mk | 7 +- builds/unix/freetype-config.in | 49 +- builds/unix/freetype2.in | 16 +- builds/unix/freetype2.m4 | 6 +- builds/unix/ft2unix.h | 61 - builds/unix/ftconfig.in | 292 +- builds/unix/ftsystem.c | 17 +- builds/unix/install-sh | 14 +- builds/unix/install.mk | 60 +- builds/unix/ltmain.sh | 32 +- builds/unix/pkg.m4 | 199 + builds/unix/unix-def.in | 91 +- builds/vms/ftconfig.h | 169 +- builds/vms/ftsystem.c | 8 +- builds/win32/vc2010/freetype.vcxproj | 832 - builds/win32/vc2010/index.html | 37 - builds/wince/ftdebug.c | 33 +- builds/wince/vc2005-ce/freetype.vcproj | 86 +- builds/wince/vc2005-ce/index.html | 10 +- builds/wince/vc2008-ce/freetype.vcproj | 86 +- builds/wince/vc2008-ce/index.html | 10 +- builds/windows/.gitignore | 5 + builds/{win32 => windows}/detect.mk | 13 +- builds/{win32 => windows}/ftdebug.c | 39 +- builds/{win32 => windows}/vc2005/freetype.sln | 0 builds/{win32 => windows}/vc2005/freetype.vcproj | 22 +- builds/{win32 => windows}/vc2005/index.html | 10 +- builds/{win32 => windows}/vc2008/freetype.sln | 0 builds/{win32 => windows}/vc2008/freetype.vcproj | 22 +- builds/{win32 => windows}/vc2008/index.html | 10 +- builds/{win32 => windows}/vc2010/freetype.sln | 32 +- builds/windows/vc2010/freetype.user.props | 68 + builds/windows/vc2010/freetype.vcxproj | 1718 +++ .../vc2010/freetype.vcxproj.filters | 10 +- builds/windows/vc2010/index.html | 52 + builds/{win32 => windows}/visualc/freetype.dsp | 48 +- .../visualce => windows/visualc}/freetype.dsw | 0 builds/{win32 => windows}/visualc/freetype.sln | 0 builds/{win32 => windows}/visualc/freetype.vcproj | 22 +- builds/{win32 => windows}/visualc/index.html | 10 +- builds/{win32 => windows}/visualce/freetype.dsp | 48 +- .../visualc => windows/visualce}/freetype.dsw | 0 builds/{win32 => windows}/visualce/freetype.vcproj | 94 +- builds/{win32 => windows}/visualce/index.html | 10 +- builds/{win32 => windows}/w32-bcc.mk | 4 +- builds/{win32 => windows}/w32-bccd.mk | 4 +- builds/{win32 => windows}/w32-dev.mk | 4 +- builds/{win32 => windows}/w32-gcc.mk | 4 +- builds/{win32 => windows}/w32-icc.mk | 4 +- builds/{win32 => windows}/w32-intl.mk | 4 +- builds/{win32 => windows}/w32-lcc.mk | 4 +- builds/{win32 => windows}/w32-mingw32.mk | 4 +- builds/{win32 => windows}/w32-vcc.mk | 4 +- builds/{win32 => windows}/w32-wat.mk | 4 +- builds/{win32 => windows}/win32-def.mk | 6 +- configure | 34 +- debian/changelog | 104 - debian/compat | 1 - debian/control | 68 - debian/copyright | 22 - debian/dirs | 2 - debian/docs | 6 - debian/libfreetype6-dev.install.in | 7 - debian/libfreetype6.install.in | 1 - debian/rules | 119 - devel/ft2build.h | 29 +- devel/ftoption.h | 172 +- docs/CHANGES | 538 +- docs/CMAKE | 2 + docs/CUSTOMIZE | 47 +- docs/DEBUG | 182 +- docs/INSTALL | 9 +- docs/INSTALL.ANY | 34 +- docs/INSTALL.CROSS | 96 +- docs/INSTALL.GNU | 26 +- docs/INSTALL.UNIX | 27 +- docs/LICENSE.TXT | 3 + docs/VERSION.DLL | 64 +- docs/formats.txt | 2 +- docs/freetype-config.1 | 108 + docs/reference/ft2-base_interface.html | 3608 ----- docs/reference/ft2-basic_types.html | 1173 -- docs/reference/ft2-bdf_fonts.html | 260 - docs/reference/ft2-bitmap_handling.html | 302 - docs/reference/ft2-cache_subsystem.html | 1170 -- docs/reference/ft2-cid_fonts.html | 204 - docs/reference/ft2-computations.html | 832 - docs/reference/ft2-font_formats.html | 84 - docs/reference/ft2-gasp_table.html | 142 - docs/reference/ft2-glyph_management.html | 673 - docs/reference/ft2-glyph_stroker.html | 938 -- docs/reference/ft2-glyph_variants.html | 267 - docs/reference/ft2-gx_validation.html | 356 - docs/reference/ft2-gzip.html | 94 - docs/reference/ft2-header_file_macros.html | 853 - docs/reference/ft2-incremental.html | 401 - docs/reference/ft2-index.html | 294 - docs/reference/ft2-lcd_filtering.html | 192 - docs/reference/ft2-list_processing.html | 486 - docs/reference/ft2-lzw.html | 94 - docs/reference/ft2-mac_specific.html | 368 - docs/reference/ft2-module_management.html | 667 - docs/reference/ft2-multiple_masters.html | 511 - docs/reference/ft2-ot_validation.html | 208 - docs/reference/ft2-outline_processing.html | 1125 -- docs/reference/ft2-pfr_fonts.html | 206 - docs/reference/ft2-quick_advance.html | 185 - docs/reference/ft2-raster.html | 606 - docs/reference/ft2-sfnt_names.html | 232 - docs/reference/ft2-sizes_management.html | 164 - docs/reference/ft2-system_interface.html | 415 - docs/reference/ft2-toc.html | 219 - docs/reference/ft2-truetype_engine.html | 132 - docs/reference/ft2-truetype_tables.html | 1223 -- docs/reference/ft2-type1_tables.html | 689 - docs/reference/ft2-user_allocation.html | 47 - docs/reference/ft2-version.html | 219 - docs/reference/ft2-winfnt_fonts.html | 278 - docs/release | 47 +- ft2demos/ftbench | Bin 46956 -> 0 bytes ft2demos/ftdiff | Bin 277845 -> 0 bytes ft2demos/ftdump | Bin 49731 -> 0 bytes ft2demos/ftgamma | Bin 252489 -> 0 bytes ft2demos/ftgrid | Bin 283609 -> 0 bytes ft2demos/ftlint | Bin 29199 -> 0 bytes ft2demos/ftmulti | Bin 229917 -> 0 bytes ft2demos/ftstring | Bin 265571 -> 0 bytes ft2demos/ftview | Bin 279965 -> 0 bytes include/{freetype => }/config/ftconfig.h | 231 +- include/{freetype => }/config/ftheader.h | 153 +- include/{freetype => }/config/ftmodule.h | 0 include/{freetype => }/config/ftoption.h | 172 +- include/{freetype => }/config/ftstdlib.h | 4 +- include/{freetype => }/freetype.h | 519 +- include/freetype/internal/internal.h | 51 - include/ft2build.h | 23 +- include/{freetype => }/ftadvanc.h | 32 +- include/ftautoh.h | 402 + include/{freetype => }/ftbbox.h | 7 +- include/{freetype => }/ftbdf.h | 9 +- include/{freetype => }/ftbitmap.h | 15 +- include/{freetype => }/ftbzip2.h | 2 +- include/{freetype => }/ftcache.h | 95 +- include/ftcffdrv.h | 262 + include/{freetype => }/ftchapters.h | 19 +- include/{freetype => }/ftcid.h | 3 +- include/{freetype => }/fterrdef.h | 184 +- include/{freetype => }/fterrors.h | 23 +- include/{freetype => }/ftgasp.h | 3 +- include/{freetype => }/ftglyph.h | 31 +- include/{freetype => }/ftgxval.h | 35 +- include/{freetype => }/ftgzip.h | 50 +- include/{freetype => }/ftimage.h | 235 +- include/{freetype => }/ftincrem.h | 5 +- include/{freetype => }/ftlcdfil.h | 44 +- include/{freetype => }/ftlist.h | 15 +- include/{freetype => }/ftlzw.h | 2 +- include/{freetype => }/ftmac.h | 6 +- include/{freetype => }/ftmm.h | 11 +- include/{freetype => }/ftmodapi.h | 202 +- include/{freetype => }/ftmoderr.h | 64 +- include/{freetype => }/ftotval.h | 19 +- include/{freetype => }/ftoutln.h | 66 +- include/{freetype => }/ftpfr.h | 2 +- include/{freetype => }/ftrender.h | 1 - include/{freetype => }/ftsizes.h | 4 +- include/{freetype => }/ftsnames.h | 6 +- include/{freetype => }/ftstroke.h | 56 +- include/{freetype => }/ftsynth.h | 10 +- include/{freetype => }/ftsystem.h | 12 +- include/{freetype => }/fttrigon.h | 14 +- include/ftttdrv.h | 170 + include/{freetype => }/fttypes.h | 40 +- include/{freetype => }/ftwinfnt.h | 9 +- include/{freetype => }/ftxf86.h | 7 +- include/{freetype => }/internal/autohint.h | 71 +- include/{freetype => }/internal/ftcalc.h | 323 +- include/{freetype => }/internal/ftdebug.h | 29 +- include/{freetype => }/internal/ftdriver.h | 398 +- include/{freetype => }/internal/ftgloadr.h | 30 +- include/{freetype => }/internal/ftmemory.h | 176 +- include/{freetype => }/internal/ftobjs.h | 832 +- include/{freetype => }/internal/ftpic.h | 32 +- include/{freetype => }/internal/ftrfork.h | 49 +- include/{freetype => }/internal/ftserv.h | 143 +- include/{freetype => }/internal/ftstream.h | 87 +- include/{freetype => }/internal/fttrace.h | 12 +- include/{freetype => }/internal/ftvalid.h | 37 +- include/internal/internal.h | 63 + include/{freetype => }/internal/psaux.h | 10 +- include/{freetype => }/internal/pshints.h | 44 +- include/{freetype => }/internal/services/svbdf.h | 0 include/{freetype => }/internal/services/svcid.h | 0 .../{freetype => }/internal/services/svgldict.h | 0 include/{freetype => }/internal/services/svgxval.h | 0 include/{freetype => }/internal/services/svkern.h | 0 include/{freetype => }/internal/services/svmm.h | 0 include/{freetype => }/internal/services/svotval.h | 0 include/{freetype => }/internal/services/svpfr.h | 0 .../{freetype => }/internal/services/svpostnm.h | 0 include/internal/services/svprop.h | 81 + .../{freetype => }/internal/services/svpscmap.h | 0 .../{freetype => }/internal/services/svpsinfo.h | 0 include/{freetype => }/internal/services/svsfnt.h | 0 .../{freetype => }/internal/services/svttcmap.h | 4 +- include/{freetype => }/internal/services/svtteng.h | 0 .../{freetype => }/internal/services/svttglyf.h | 0 .../{freetype => }/internal/services/svwinfnt.h | 0 .../{freetype => }/internal/services/svxf86nm.h | 0 include/{freetype => }/internal/sfnt.h | 468 +- include/{freetype => }/internal/t1types.h | 6 +- include/{freetype => }/internal/tttypes.h | 229 +- include/{freetype => }/t1tables.h | 120 +- include/{freetype => }/ttnameid.h | 250 +- include/{freetype => }/tttables.h | 114 +- include/{freetype => }/tttags.h | 6 +- include/{freetype => }/ttunpat.h | 3 +- modules.cfg | 50 +- objs/.gitignore | 6 + packaging/freetype.manifest | 5 + packaging/freetype.spec | 21 +- src/Jamfile | 4 +- src/autofit/afangles.c | 125 +- src/autofit/afblue.c | 177 + src/autofit/afblue.cin | 39 + src/autofit/afblue.dat | 337 + src/autofit/afblue.h | 203 + src/autofit/afblue.hin | 142 + src/autofit/afcjk.c | 752 +- src/autofit/afcjk.h | 67 +- src/autofit/afcover.h | 105 + src/autofit/afdummy.c | 46 +- src/autofit/afdummy.h | 8 +- src/autofit/afglobal.c | 399 +- src/autofit/afglobal.h | 97 +- src/autofit/afhints.c | 561 +- src/autofit/afhints.h | 140 +- src/autofit/afindic.c | 61 +- src/autofit/afindic.h | 9 +- src/autofit/aflatin.c | 1063 +- src/autofit/aflatin.h | 77 +- src/autofit/aflatin2.c | 227 +- src/autofit/aflatin2.h | 10 +- src/autofit/afloader.c | 111 +- src/autofit/afloader.h | 34 +- src/autofit/afmodule.c | 264 +- src/autofit/afmodule.h | 24 +- src/autofit/afpic.c | 120 +- src/autofit/afpic.h | 69 +- src/autofit/afranges.c | 220 + src/autofit/afranges.h | 41 + src/autofit/afscript.h | 139 + src/autofit/afstyles.h | 164 + src/autofit/aftypes.h | 471 +- src/autofit/afwrtsys.h | 52 + src/autofit/autofit.c | 7 +- src/autofit/hbshim.c | 545 + src/autofit/hbshim.h | 56 + src/autofit/rules.mk | 13 +- src/base/basepic.c | 49 +- src/base/basepic.h | 45 +- src/base/ftadvanc.c | 26 +- src/base/ftbbox.c | 512 +- src/base/ftbdf.c | 43 +- src/base/ftbitmap.c | 269 +- src/base/ftcalc.c | 537 +- src/base/ftcid.c | 8 +- src/base/ftdbgmem.c | 105 +- src/base/ftdebug.c | 30 +- src/base/ftfstype.c | 4 +- src/base/ftgloadr.c | 12 +- src/base/ftglyph.c | 100 +- src/base/ftgxval.c | 20 +- src/base/ftinit.c | 32 +- src/base/ftlcdfil.c | 56 +- src/base/ftmac.c | 98 +- src/base/ftmm.c | 50 +- src/base/ftobjs.c | 814 +- src/base/ftotval.c | 10 +- src/base/ftoutln.c | 356 +- src/base/ftpfr.c | 23 +- src/base/ftpic.c | 5 +- src/base/ftrfork.c | 76 +- src/base/ftsnames.c | 2 +- src/base/ftstream.c | 60 +- src/base/ftstroke.c | 106 +- src/base/ftsynth.c | 37 +- src/base/ftsystem.c | 8 +- src/base/fttrigon.c | 368 +- src/base/fttype1.c | 45 +- src/base/ftutil.c | 142 +- src/base/ftwinfnt.c | 22 +- src/base/md5.c | 296 + src/base/md5.h | 45 + src/base/rules.mk | 16 +- src/bdf/bdfdrivr.c | 67 +- src/bdf/bdflib.c | 226 +- src/bzip2/ftbzip2.c | 38 +- src/cache/Jamfile | 4 +- src/cache/ftcbasic.c | 354 +- src/cache/ftccache.c | 11 +- src/cache/ftccache.h | 13 +- src/cache/ftccback.h | 5 +- src/cache/ftccmap.c | 120 +- src/cache/ftcmanag.c | 101 +- src/cache/ftcmanag.h | 6 +- src/cache/ftcmru.h | 4 +- src/cache/ftcsbits.c | 16 +- src/cff/cf2arrst.c | 241 + src/cff/cf2arrst.h | 100 + src/cff/cf2blues.c | 579 + src/cff/cf2blues.h | 185 + src/cff/cf2error.c | 52 + src/cff/cf2error.h | 119 + src/cff/cf2fixed.h | 95 + src/cff/cf2font.c | 512 + src/cff/cf2font.h | 116 + src/cff/cf2ft.c | 691 + src/cff/cf2ft.h | 147 + src/cff/cf2glue.h | 144 + src/cff/cf2hints.c | 1847 +++ src/cff/cf2hints.h | 289 + src/cff/cf2intrp.c | 1545 ++ src/cff/cf2intrp.h | 83 + src/cff/cf2read.c | 112 + src/cff/cf2read.h | 68 + src/cff/cf2stack.c | 205 + src/cff/cf2stack.h | 106 + src/cff/cf2types.h | 78 + src/cff/cff.c | 13 +- src/cff/cffcmap.c | 16 +- src/cff/cffdrivr.c | 229 +- src/cff/cffgload.c | 259 +- src/cff/cffgload.h | 41 +- src/cff/cffload.c | 115 +- src/cff/cffobjs.c | 106 +- src/cff/cffobjs.h | 14 +- src/cff/cffparse.c | 163 +- src/cff/cffpic.c | 72 +- src/cff/cffpic.h | 81 +- src/cff/cfftypes.h | 5 +- src/cff/rules.mk | 19 +- src/cid/cidgload.c | 12 +- src/cid/cidload.c | 57 +- src/cid/cidobjs.c | 19 +- src/cid/cidparse.c | 14 +- src/cid/cidparse.h | 22 +- src/cid/cidriver.c | 17 +- src/gxvalid/gxvbsln.c | 56 +- src/gxvalid/gxvcommn.c | 284 +- src/gxvalid/gxvcommn.h | 80 +- src/gxvalid/gxverror.h | 6 +- src/gxvalid/gxvfeat.c | 38 +- src/gxvalid/gxvjust.c | 188 +- src/gxvalid/gxvkern.c | 156 +- src/gxvalid/gxvlcar.c | 36 +- src/gxvalid/gxvmod.c | 10 +- src/gxvalid/gxvmort.c | 53 +- src/gxvalid/gxvmort.h | 14 +- src/gxvalid/gxvmort0.c | 16 +- src/gxvalid/gxvmort1.c | 54 +- src/gxvalid/gxvmort2.c | 46 +- src/gxvalid/gxvmort4.c | 18 +- src/gxvalid/gxvmort5.c | 30 +- src/gxvalid/gxvmorx.c | 36 +- src/gxvalid/gxvmorx.h | 10 +- src/gxvalid/gxvmorx0.c | 16 +- src/gxvalid/gxvmorx1.c | 50 +- src/gxvalid/gxvmorx2.c | 52 +- src/gxvalid/gxvmorx4.c | 4 +- src/gxvalid/gxvmorx5.c | 34 +- src/gxvalid/gxvopbd.c | 32 +- src/gxvalid/gxvprop.c | 38 +- src/gxvalid/gxvtrak.c | 46 +- src/gzip/ftgzip.c | 136 +- src/gzip/inftrees.c | 10 +- src/gzip/rules.mk | 57 +- src/lzw/ftlzw.c | 30 +- src/lzw/ftzopen.h | 2 +- src/otvalid/otvbase.c | 50 +- src/otvalid/otvcommn.c | 170 +- src/otvalid/otvcommn.h | 158 +- src/otvalid/otverror.h | 4 +- src/otvalid/otvgdef.c | 36 +- src/otvalid/otvgpos.c | 186 +- src/otvalid/otvgsub.c | 108 +- src/otvalid/otvjstf.c | 83 +- src/otvalid/otvmath.c | 72 +- src/otvalid/otvmod.c | 8 +- src/pcf/README | 2 +- src/pcf/pcfdrivr.c | 88 +- src/pcf/pcfread.c | 252 +- src/pcf/pcfutil.c | 12 +- src/pfr/pfrcmap.c | 23 +- src/pfr/pfrdrivr.c | 18 +- src/pfr/pfrgload.c | 18 +- src/pfr/pfrload.c | 31 +- src/pfr/pfrobjs.c | 22 +- src/pfr/pfrsbit.c | 22 +- src/psaux/afmparse.c | 45 +- src/psaux/psconv.c | 215 +- src/psaux/psconv.h | 10 +- src/psaux/psobjs.c | 155 +- src/psaux/t1cmap.c | 22 +- src/psaux/t1decode.c | 80 +- src/pshinter/pshalgo.c | 20 +- src/pshinter/pshalgo.h | 11 +- src/pshinter/pshglob.c | 57 +- src/pshinter/pshglob.h | 4 +- src/pshinter/pshmod.c | 17 +- src/pshinter/pshpic.c | 17 +- src/pshinter/pshpic.h | 16 +- src/pshinter/pshrec.c | 54 +- src/pshinter/pshrec.h | 4 +- src/psnames/psmodule.c | 58 +- src/psnames/pspic.c | 19 +- src/psnames/pspic.h | 23 +- src/psnames/rules.mk | 4 +- src/raster/ftmisc.h | 21 + src/raster/ftraster.c | 155 +- src/raster/ftrend1.c | 21 +- src/raster/rastpic.c | 32 +- src/raster/rastpic.h | 18 +- src/sfnt/pngshim.c | 377 + src/sfnt/pngshim.h | 49 + src/sfnt/rules.mk | 10 +- src/sfnt/sfdriver.c | 342 +- src/sfnt/sferrors.h | 4 +- src/sfnt/sfnt.c | 3 +- src/sfnt/sfntpic.c | 37 +- src/sfnt/sfntpic.h | 81 +- src/sfnt/sfobjs.c | 545 +- src/sfnt/ttbdf.c | 16 +- src/sfnt/ttcmap.c | 505 +- src/sfnt/ttcmap.h | 99 +- src/sfnt/ttcmapc.h | 19 +- src/sfnt/ttkern.c | 10 +- src/sfnt/ttload.c | 118 +- src/sfnt/ttmtx.c | 216 +- src/sfnt/ttmtx.h | 4 +- src/sfnt/ttpost.c | 32 +- src/sfnt/ttsbit.c | 2262 ++- src/sfnt/ttsbit.h | 22 +- src/sfnt/ttsbit0.c | 1011 -- src/smooth/ftgrays.c | 265 +- src/smooth/ftsmooth.c | 177 +- src/smooth/ftspic.c | 37 +- src/smooth/ftspic.h | 17 +- src/tools/afblue.pl | 548 + src/tools/apinames.c | 28 +- src/tools/chktrcmp.py | 4 +- src/tools/cordic.py | 62 +- src/tools/docmaker/content.py | 229 +- src/tools/docmaker/docmaker.py | 39 +- src/tools/docmaker/formatter.py | 73 +- src/tools/docmaker/sources.py | 236 +- src/tools/docmaker/tohtml.py | 478 +- src/tools/docmaker/utils.py | 81 +- src/tools/ftrandom/README | 2 +- src/tools/ftrandom/ftrandom.c | 38 +- src/tools/test_afm.c | 2 +- src/tools/test_bbox.c | 34 +- src/tools/test_trig.c | 98 +- src/truetype/rules.mk | 5 +- src/truetype/truetype.c | 3 +- src/truetype/ttdriver.c | 137 +- src/truetype/ttgload.c | 734 +- src/truetype/ttgload.h | 1 + src/truetype/ttgxvar.c | 109 +- src/truetype/ttinterp.c | 1938 ++- src/truetype/ttinterp.h | 102 +- src/truetype/ttobjs.c | 258 +- src/truetype/ttobjs.h | 35 +- src/truetype/ttpic.c | 21 +- src/truetype/ttpic.h | 39 +- src/truetype/ttpload.c | 38 +- src/truetype/ttsubpix.c | 1011 ++ src/truetype/ttsubpix.h | 110 + src/type1/t1afm.c | 22 +- src/type1/t1driver.c | 45 +- src/type1/t1gload.c | 16 +- src/type1/t1load.c | 236 +- src/type1/t1objs.c | 25 +- src/type1/t1parse.c | 68 +- src/type42/t42drivr.c | 21 +- src/type42/t42objs.c | 44 +- src/type42/t42parse.c | 137 +- src/winfonts/winfnt.c | 105 +- vms_make.com | 4 +- 551 files changed, 55965 insertions(+), 47322 deletions(-) create mode 100644 .gitignore create mode 100644 .mailmap create mode 100644 CMakeLists.txt create mode 100644 ChangeLog.24 create mode 100644 LICENSE create mode 100644 LICENSE.GPL-2.0 delete mode 100755 TC/_export_env.sh delete mode 100755 TC/_export_target_env.sh delete mode 100755 TC/build.sh delete mode 100755 TC/clean.sh delete mode 100755 TC/config delete mode 100755 TC/execute.sh delete mode 100755 TC/testcase/Makefile delete mode 100755 TC/testcase/tslist delete mode 100755 TC/testcase/utc_ft_bench.c delete mode 100755 TC/testcase/utc_ft_diff.c delete mode 100755 TC/testcase/utc_ft_dump.c delete mode 100755 TC/testcase/utc_ft_gamma.c delete mode 100755 TC/testcase/utc_ft_grid.c delete mode 100755 TC/testcase/utc_ft_lint.c delete mode 100755 TC/testcase/utc_ft_multi.c delete mode 100755 TC/testcase/utc_ft_string.c delete mode 100755 TC/testcase/utc_ft_view.c delete mode 100755 TC/tet_scen delete mode 100755 TC/tetbuild.cfg delete mode 100755 TC/tetclean.cfg delete mode 100755 TC/tetexec.cfg mode change 100644 => 100755 autogen.sh rename builds/amiga/include/{freetype => }/config/ftconfig.h (90%) rename builds/amiga/include/{freetype => }/config/ftmodule.h (100%) create mode 100644 builds/cmake/iOS.cmake create mode 100644 builds/mac/freetype-Info.plist delete mode 100644 builds/unix/ft2unix.h mode change 100755 => 100644 builds/unix/ltmain.sh create mode 100644 builds/unix/pkg.m4 delete mode 100644 builds/win32/vc2010/freetype.vcxproj delete mode 100644 builds/win32/vc2010/index.html create mode 100644 builds/windows/.gitignore rename builds/{win32 => windows}/detect.mk (95%) rename builds/{win32 => windows}/ftdebug.c (90%) rename builds/{win32 => windows}/vc2005/freetype.sln (100%) rename builds/{win32 => windows}/vc2005/freetype.vcproj (97%) rename builds/{win32 => windows}/vc2005/index.html (76%) rename builds/{win32 => windows}/vc2008/freetype.sln (100%) rename builds/{win32 => windows}/vc2008/freetype.vcproj (94%) rename builds/{win32 => windows}/vc2008/index.html (76%) rename builds/{win32 => windows}/vc2010/freetype.sln (56%) create mode 100644 builds/windows/vc2010/freetype.user.props create mode 100644 builds/windows/vc2010/freetype.vcxproj rename builds/{win32 => windows}/vc2010/freetype.vcxproj.filters (91%) create mode 100644 builds/windows/vc2010/index.html rename builds/{win32 => windows}/visualc/freetype.dsp (86%) rename builds/{win32/visualce => windows/visualc}/freetype.dsw (100%) rename builds/{win32 => windows}/visualc/freetype.sln (100%) rename builds/{win32 => windows}/visualc/freetype.vcproj (94%) rename builds/{win32 => windows}/visualc/index.html (77%) rename builds/{win32 => windows}/visualce/freetype.dsp (86%) rename builds/{win32/visualc => windows/visualce}/freetype.dsw (100%) rename builds/{win32 => windows}/visualce/freetype.vcproj (95%) rename builds/{win32 => windows}/visualce/index.html (80%) rename builds/{win32 => windows}/w32-bcc.mk (88%) rename builds/{win32 => windows}/w32-bccd.mk (86%) rename builds/{win32 => windows}/w32-dev.mk (88%) rename builds/{win32 => windows}/w32-gcc.mk (89%) rename builds/{win32 => windows}/w32-icc.mk (89%) rename builds/{win32 => windows}/w32-intl.mk (88%) rename builds/{win32 => windows}/w32-lcc.mk (87%) rename builds/{win32 => windows}/w32-mingw32.mk (89%) rename builds/{win32 => windows}/w32-vcc.mk (88%) rename builds/{win32 => windows}/w32-wat.mk (88%) rename builds/{win32 => windows}/win32-def.mk (89%) delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/dirs delete mode 100644 debian/docs delete mode 100644 debian/libfreetype6-dev.install.in delete mode 100644 debian/libfreetype6.install.in delete mode 100755 debian/rules create mode 100644 docs/CMAKE create mode 100644 docs/freetype-config.1 delete mode 100644 docs/reference/ft2-base_interface.html delete mode 100644 docs/reference/ft2-basic_types.html delete mode 100644 docs/reference/ft2-bdf_fonts.html delete mode 100644 docs/reference/ft2-bitmap_handling.html delete mode 100644 docs/reference/ft2-cache_subsystem.html delete mode 100644 docs/reference/ft2-cid_fonts.html delete mode 100644 docs/reference/ft2-computations.html delete mode 100644 docs/reference/ft2-font_formats.html delete mode 100644 docs/reference/ft2-gasp_table.html delete mode 100644 docs/reference/ft2-glyph_management.html delete mode 100644 docs/reference/ft2-glyph_stroker.html delete mode 100644 docs/reference/ft2-glyph_variants.html delete mode 100644 docs/reference/ft2-gx_validation.html delete mode 100644 docs/reference/ft2-gzip.html delete mode 100644 docs/reference/ft2-header_file_macros.html delete mode 100644 docs/reference/ft2-incremental.html delete mode 100644 docs/reference/ft2-index.html delete mode 100644 docs/reference/ft2-lcd_filtering.html delete mode 100644 docs/reference/ft2-list_processing.html delete mode 100644 docs/reference/ft2-lzw.html delete mode 100644 docs/reference/ft2-mac_specific.html delete mode 100644 docs/reference/ft2-module_management.html delete mode 100644 docs/reference/ft2-multiple_masters.html delete mode 100644 docs/reference/ft2-ot_validation.html delete mode 100644 docs/reference/ft2-outline_processing.html delete mode 100644 docs/reference/ft2-pfr_fonts.html delete mode 100644 docs/reference/ft2-quick_advance.html delete mode 100644 docs/reference/ft2-raster.html delete mode 100644 docs/reference/ft2-sfnt_names.html delete mode 100644 docs/reference/ft2-sizes_management.html delete mode 100644 docs/reference/ft2-system_interface.html delete mode 100644 docs/reference/ft2-toc.html delete mode 100644 docs/reference/ft2-truetype_engine.html delete mode 100644 docs/reference/ft2-truetype_tables.html delete mode 100644 docs/reference/ft2-type1_tables.html delete mode 100644 docs/reference/ft2-user_allocation.html delete mode 100644 docs/reference/ft2-version.html delete mode 100644 docs/reference/ft2-winfnt_fonts.html delete mode 100755 ft2demos/ftbench delete mode 100755 ft2demos/ftdiff delete mode 100755 ft2demos/ftdump delete mode 100755 ft2demos/ftgamma delete mode 100755 ft2demos/ftgrid delete mode 100755 ft2demos/ftlint delete mode 100755 ft2demos/ftmulti delete mode 100755 ft2demos/ftstring delete mode 100755 ft2demos/ftview rename include/{freetype => }/config/ftconfig.h (77%) rename include/{freetype => }/config/ftheader.h (87%) rename include/{freetype => }/config/ftmodule.h (100%) rename include/{freetype => }/config/ftoption.h (86%) rename include/{freetype => }/config/ftstdlib.h (98%) rename include/{freetype => }/freetype.h (93%) delete mode 100644 include/freetype/internal/internal.h rename include/{freetype => }/ftadvanc.h (89%) create mode 100644 include/ftautoh.h rename include/{freetype => }/ftbbox.h (97%) rename include/{freetype => }/ftbdf.h (96%) rename include/{freetype => }/ftbitmap.h (94%) rename include/{freetype => }/ftbzip2.h (99%) rename include/{freetype => }/ftcache.h (94%) create mode 100644 include/ftcffdrv.h rename include/{freetype => }/ftchapters.h (85%) rename include/{freetype => }/ftcid.h (99%) rename include/{freetype => }/fterrdef.h (95%) rename include/{freetype => }/fterrors.h (93%) rename include/{freetype => }/ftgasp.h (99%) rename include/{freetype => }/ftglyph.h (95%) rename include/{freetype => }/ftgxval.h (91%) rename include/{freetype => }/ftgzip.h (74%) rename include/{freetype => }/ftimage.h (88%) rename include/{freetype => }/ftincrem.h (99%) rename include/{freetype => }/ftlcdfil.h (80%) rename include/{freetype => }/ftlist.h (96%) rename include/{freetype => }/ftlzw.h (99%) rename include/{freetype => }/ftmac.h (98%) rename include/{freetype => }/ftmm.h (98%) rename include/{freetype => }/ftmodapi.h (75%) rename include/{freetype => }/ftmoderr.h (63%) rename include/{freetype => }/ftotval.h (91%) rename include/{freetype => }/ftoutln.h (90%) rename include/{freetype => }/ftpfr.h (99%) rename include/{freetype => }/ftrender.h (99%) rename include/{freetype => }/ftsizes.h (98%) rename include/{freetype => }/ftsnames.h (98%) rename include/{freetype => }/ftstroke.h (93%) rename include/{freetype => }/ftsynth.h (91%) rename include/{freetype => }/ftsystem.h (95%) rename include/{freetype => }/fttrigon.h (95%) create mode 100644 include/ftttdrv.h rename include/{freetype => }/fttypes.h (96%) rename include/{freetype => }/ftwinfnt.h (97%) rename include/{freetype => }/ftxf86.h (96%) rename include/{freetype => }/internal/autohint.h (84%) rename include/{freetype => }/internal/ftcalc.h (51%) rename include/{freetype => }/internal/ftdebug.h (93%) rename include/{freetype => }/internal/ftdriver.h (54%) rename include/{freetype => }/internal/ftgloadr.h (88%) rename include/{freetype => }/internal/ftmemory.h (71%) rename include/{freetype => }/internal/ftobjs.h (72%) rename include/{freetype => }/internal/ftpic.h (80%) rename include/{freetype => }/internal/ftrfork.h (89%) rename include/{freetype => }/internal/ftserv.h (82%) rename include/{freetype => }/internal/ftstream.h (88%) rename include/{freetype => }/internal/fttrace.h (94%) rename include/{freetype => }/internal/ftvalid.h (88%) create mode 100644 include/internal/internal.h rename include/{freetype => }/internal/psaux.h (98%) rename include/{freetype => }/internal/pshints.h (93%) rename include/{freetype => }/internal/services/svbdf.h (100%) rename include/{freetype => }/internal/services/svcid.h (100%) rename include/{freetype => }/internal/services/svgldict.h (100%) rename include/{freetype => }/internal/services/svgxval.h (100%) rename include/{freetype => }/internal/services/svkern.h (100%) rename include/{freetype => }/internal/services/svmm.h (100%) rename include/{freetype => }/internal/services/svotval.h (100%) rename include/{freetype => }/internal/services/svpfr.h (100%) rename include/{freetype => }/internal/services/svpostnm.h (100%) create mode 100644 include/internal/services/svprop.h rename include/{freetype => }/internal/services/svpscmap.h (100%) rename include/{freetype => }/internal/services/svpsinfo.h (100%) rename include/{freetype => }/internal/services/svsfnt.h (100%) rename include/{freetype => }/internal/services/svttcmap.h (97%) rename include/{freetype => }/internal/services/svtteng.h (100%) rename include/{freetype => }/internal/services/svttglyf.h (100%) rename include/{freetype => }/internal/services/svwinfnt.h (100%) rename include/{freetype => }/internal/services/svxf86nm.h (100%) rename include/{freetype => }/internal/sfnt.h (66%) rename include/{freetype => }/internal/t1types.h (98%) rename include/{freetype => }/internal/tttypes.h (94%) rename include/{freetype => }/t1tables.h (76%) rename include/{freetype => }/ttnameid.h (86%) rename include/{freetype => }/tttables.h (87%) rename include/{freetype => }/tttags.h (94%) rename include/{freetype => }/ttunpat.h (99%) create mode 100644 packaging/freetype.manifest create mode 100644 src/autofit/afblue.c create mode 100644 src/autofit/afblue.cin create mode 100644 src/autofit/afblue.dat create mode 100644 src/autofit/afblue.h create mode 100644 src/autofit/afblue.hin create mode 100644 src/autofit/afcover.h create mode 100644 src/autofit/afranges.c create mode 100644 src/autofit/afranges.h create mode 100644 src/autofit/afscript.h create mode 100644 src/autofit/afstyles.h create mode 100644 src/autofit/afwrtsys.h create mode 100644 src/autofit/hbshim.c create mode 100644 src/autofit/hbshim.h create mode 100644 src/base/md5.c create mode 100644 src/base/md5.h create mode 100644 src/cff/cf2arrst.c create mode 100644 src/cff/cf2arrst.h create mode 100644 src/cff/cf2blues.c create mode 100644 src/cff/cf2blues.h create mode 100644 src/cff/cf2error.c create mode 100644 src/cff/cf2error.h create mode 100644 src/cff/cf2fixed.h create mode 100644 src/cff/cf2font.c create mode 100644 src/cff/cf2font.h create mode 100644 src/cff/cf2ft.c create mode 100644 src/cff/cf2ft.h create mode 100644 src/cff/cf2glue.h create mode 100644 src/cff/cf2hints.c create mode 100644 src/cff/cf2hints.h create mode 100644 src/cff/cf2intrp.c create mode 100644 src/cff/cf2intrp.h create mode 100644 src/cff/cf2read.c create mode 100644 src/cff/cf2read.h create mode 100644 src/cff/cf2stack.c create mode 100644 src/cff/cf2stack.h create mode 100644 src/cff/cf2types.h create mode 100644 src/sfnt/pngshim.c create mode 100644 src/sfnt/pngshim.h delete mode 100644 src/sfnt/ttsbit0.c create mode 100644 src/tools/afblue.pl create mode 100644 src/truetype/ttsubpix.c create mode 100644 src/truetype/ttsubpix.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b5db9d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +config.mk +objs/vc2010/ diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..a3c5f94 --- /dev/null +++ b/.mailmap @@ -0,0 +1,7 @@ +Alexei Podtelezhnikov (Алексей Подтележников) +Behdad Esfahbod +Bram Tassyns bram tassyns +Bram Tassyns +Suzuki, Toshiya (鈴木俊哉) +Suzuki, Toshiya (鈴木俊哉) sssa +Suzuki, Toshiya (鈴木俊哉) suzuki toshiya diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..8b859a5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,253 @@ +# CMakeLists.txt +# +# Copyright 2013, 2014 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# Written by John Cary +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. +# +# +# Say +# +# cmake CMakeLists.txt +# +# to create a Makefile that builds a static version of the library. +# +# For a dynamic library, use +# +# cmake CMakeLists.txt -DBUILD_SHARED_LIBS:BOOL=true +# +# For a framework on OS X, use +# +# cmake CMakeLists.txt -DBUILD_FRAMEWORK:BOOL=true -G Xcode +# +# instead. +# +# For an iOS static library, use +# +# cmake CMakeLists.txt -DIOS_PLATFORM=OS -G Xcode +# +# or +# +# cmake CMakeLists.txt -DIOS_PLATFORM=SIMULATOR -G Xcode +# +# Please refer to the cmake manual for further options, in particular, how +# to modify compilation and linking parameters. +# +# Some notes. +# +# . `cmake' will overwrite FreeType's original (top-level) `Makefile' file. +# +# . You can use `cmake' directly on a freshly cloned FreeType git +# repository. +# +# . `CMakeLists.txt' is provided as-is since it is not used by the +# developer team. + + +cmake_minimum_required(VERSION 2.6) + +# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which +# configures the base build environment and references the toolchain file +if (APPLE) + if (DEFINED IOS_PLATFORM) + if (NOT "${IOS_PLATFORM}" STREQUAL "OS" + AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR") + message(FATAL_ERROR + "IOS_PLATFORM must be set to either OS or SIMULATOR") + endif () + if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") + message(AUTHOR_WARNING + "You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.") + endif () + if (BUILD_SHARED_LIBS) + message(FATAL_ERROR + "BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled") + endif () + if (BUILD_FRAMEWORK) + message(FATAL_ERROR + "BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled") + endif () + + # iOS only uses static libraries + set(BUILD_SHARED_LIBS OFF) + + set(CMAKE_TOOLCHAIN_FILE + ${PROJECT_SOURCE_DIR}/builds/cmake/iOS.cmake) + endif () +else () + if (DEFINED IOS_PLATFORM) + message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform") + endif () +endif () + +project(freetype) + +if (BUILD_FRAMEWORK) + if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") + message(FATAL_ERROR + "You should use Xcode generator with BUILD_FRAMEWORK enabled") + endif () + set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)") + set(BUILD_SHARED_LIBS ON) +endif () + +set(VERSION_MAJOR "2") +set(VERSION_MINOR "5") +set(VERSION_PATCH "5") +set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) + +# Compiler definitions for building the library +add_definitions(-DFT2_BUILD_LIBRARY) + +# Specify library include directories +include_directories("${PROJECT_SOURCE_DIR}/include") + +# Create the configuration file +message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include/freetype2.") +file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/freetype2) + +# For the auto-generated ftconfig.h file +include_directories(BEFORE "${PROJECT_BINARY_DIR}/include/freetype2") +message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h.") +execute_process( + COMMAND sed -e "s/FT_CONFIG_OPTIONS_H//" -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/freetype2/ftconfig.h +) + +file(GLOB PUBLIC_HEADERS "include/*.h") +file(GLOB PUBLIC_CONFIG_HEADERS "include/config/*.h") +file(GLOB PRIVATE_HEADERS "include/internal/*.h") + +set(BASE_SRCS + src/autofit/autofit.c + src/base/ftadvanc.c + src/base/ftbbox.c + src/base/ftbdf.c + src/base/ftbitmap.c + src/base/ftcalc.c + src/base/ftcid.c + src/base/ftdbgmem.c + src/base/ftdebug.c + src/base/ftfstype.c + src/base/ftgasp.c + src/base/ftgloadr.c + src/base/ftglyph.c + src/base/ftgxval.c + src/base/ftinit.c + src/base/ftlcdfil.c + src/base/ftmm.c + src/base/ftobjs.c + src/base/ftotval.c + src/base/ftoutln.c + src/base/ftpatent.c + src/base/ftpfr.c + src/base/ftrfork.c + src/base/ftsnames.c + src/base/ftstream.c + src/base/ftstroke.c + src/base/ftsynth.c + src/base/ftsystem.c + src/base/fttrigon.c + src/base/fttype1.c + src/base/ftutil.c + src/base/ftwinfnt.c + src/base/ftxf86.c + src/bdf/bdf.c + src/bzip2/ftbzip2.c + src/cache/ftcache.c + src/cff/cff.c + src/cid/type1cid.c + src/gzip/ftgzip.c + src/lzw/ftlzw.c + src/pcf/pcf.c + src/pfr/pfr.c + src/psaux/psaux.c + src/pshinter/pshinter.c + src/psnames/psmodule.c + src/raster/raster.c + src/sfnt/sfnt.c + src/smooth/smooth.c + src/truetype/truetype.c + src/type1/type1.c + src/type42/type42.c + src/winfonts/winfnt.c +) + +include_directories("src/truetype") +include_directories("src/sfnt") +include_directories("src/autofit") +include_directories("src/smooth") +include_directories("src/raster") +include_directories("src/psaux") +include_directories("src/psnames") + +if (BUILD_FRAMEWORK) + set(BASE_SRCS + ${BASE_SRCS} + builds/mac/freetype-Info.plist + ) +endif () + +add_library(freetype + ${PUBLIC_HEADERS} + ${PUBLIC_CONFIG_HEADERS} + ${PRIVATE_HEADERS} + ${BASE_SRCS} +) + +if (BUILD_FRAMEWORK) + set_property(SOURCE ${PUBLIC_CONFIG_HEADERS} + PROPERTY MACOSX_PACKAGE_LOCATION Headers/config + ) + set_target_properties(freetype PROPERTIES + FRAMEWORK TRUE + MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist + PUBLIC_HEADER "${PUBLIC_HEADERS}" + XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" + ) +endif () + +# Installations +# Note the trailing slash in the argument to the `DIRECTORY' directive +install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION include/freetype2 + PATTERN "internal" EXCLUDE +) +install(TARGETS freetype + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + FRAMEWORK DESTINATION Library/Frameworks +) + +# Packaging +# CPack version numbers for release tarball name. +set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}}) +if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}") +endif () +if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME) + set(CPACK_SOURCE_PACKAGE_FILE_NAME + "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}" + CACHE INTERNAL "tarball basename" + ) +endif () +set(CPACK_SOURCE_GENERATOR TGZ) +set(CPACK_SOURCE_IGNORE_FILES + "/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config") +set(CPACK_GENERATOR TGZ) +include(CPack) + +# add make dist target +add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) + +# eof diff --git a/ChangeLog b/ChangeLog index 9afc1aa..5a857ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4066 +1,5151 @@ -2012-03-08 Werner Lemberg +2014-12-30 Werner Lemberg - * Version 2.4.9 released. + * Version 2.5.5 released. ========================= - Tag sources with `VER-2-4-9'. - - * docs/CHANGES: Updated. + Tag sources with `VER-2-5-5'. * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.9. - - * README, Jamfile (RefDoc), - builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, - builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, - builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, - builds/win32/visualc/freetype.dsp, - builds/win32/visualc/freetype.vcproj, - builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, - builds/win32/visualce/freetype.vcproj, - builds/win32/visualce/index.html, + 2.5.5. + + * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, + builds/windows/vc2005/index.html, + builds/windows/vc2008/freetype.vcproj, + builds/windows/vc2008/index.html, + builds/windows/vc2010/freetype.vcxproj, + builds/windows/vc2010/index.html, + builds/windows/visualc/freetype.dsp, + builds/windows/visualc/freetype.vcproj, + builds/windows/visualc/index.html, + builds/windows/visualce/freetype.dsp, + builds/windows/visualce/freetype.vcproj, + builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.4.8/2.4.9/, s/248/249/. + builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/. - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9. + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. - * builds/unix/configure.raw (version_info): Set to 14:1:8. + * builds/unix/configure.raw (version_info): Set to 17:4:11. + * CMakeLists.txt (VERSION_PATCH): Set to 5. + * docs/CHANGES: Updated. -2012-03-08 Werner Lemberg + * builds/toplevel.mk (dist): Fix typos. - [bdf] Add missing overflow check. +2014-12-24 Alexei Podtelezhnikov - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Add threshold for - `glyph->bpr'. + [base] Formatting and nanooptimizations. -2012-03-07 Vinnie Falco + * src/base/ftcalc.c, + * src/base/fttrigon.c: Revise sign restoration. - Prepare source code for amalgamation. +2014-12-13 Werner Lemberg - * 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. + * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08. -2012-03-03 Werner Lemberg +2014-12-11 Werner Lemberg - Fix Savannah bug #35660. + * builds/toplevel.mk (dist): Use older POSIX standard for `tar'. - For some divisions, we use casts to 32bit entities. Always guard - against division by zero with these casts also. + Apparently, BSD tar isn't capable yet of handling POSIX-1.2001 + (contrary to GNU tar), so force the POSIX-1.1988 format. - * 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). + Problem reported by Stephen Fisher . -2012-03-03 Werner Lemberg +2014-12-11 Werner Lemberg - [psaux] Fix handling of track kerning. + * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size. - * 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. +2014-12-11 Werner Lemberg -2012-03-02 Werner Lemberg + * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check. - [truetype] Fix Savannah bug #35689. + Problem reported by Dennis Felsing . - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline - point. +2014-12-11 Werner Lemberg -2012-03-01 Werner Lemberg + * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'. - [bdf] Fix Savannah bug #35656. + Problem reported by Dennis Felsing . - * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity - of nibble characters instead of accessing `a2i' array. +2014-12-09 suzuki toshiya -2012-03-01 Werner Lemberg + [gxvalid] Fix a naming convention conflicting with ftvalid. - [winfonts] Fix Savannah bug #35659. + See previous changeset for otvalid. - * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs. + * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace + `valid' by `gxvalid'. + * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c, + gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c, + gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c, + gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c, + gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if + it is typed as GXV_Validator. -2012-03-01 Werner Lemberg +2014-12-09 suzuki toshiya - [bdf] Fix Savannah bug #35658. + [otvalid] Fix a naming convention conflicting with ftvalid. - * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements - properly. + Some prototypes in ftvalid.h use `valid' for the variables + typed as FT_Validator. Their implementations in src/base/ + ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar. -2012-03-01 Werner Lemberg + Some macros in otvcommn.h assume the exist of the variable + `valid' typed as OTV_Validator in the caller. - [psaux] Fix Savannah bug #35657. + 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'. - 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/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. - * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed, - PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking. +2014-12-09 suzuki toshiya -2012-03-01 Werner Lemberg + [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros. - [truetype] Fix Savannah bug #35646. + 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 - * 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. + * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_(). + * src/gxvalid/gxvcommn.h: Ditto. + * src/otvalid/otvcommn.h: Ditto. -2012-03-01 Werner Lemberg +2014-12-08 Werner Lemberg - [bdf] Fix Savannah bug #35643. + [pcf] Fix Savannah bug #43774. - * 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. + 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. -2012-03-01 Werner Lemberg + The problem was unveiled with a patch from 2014-11-06, fixing issue + #43547. - [bdf] Fix Savannah bug #35641. + * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last + element. Instead, assign real size. - * 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. +2014-12-07 Werner Lemberg -2012-03-01 Werner Lemberg + Work around a bug in Borland's C++ compiler. - [truetype] Fix Savannah bug #35640. + See - * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check - for NPUSHB and NPUSHW instructions. + http://qc.embarcadero.com/wc/qcmain.aspx?d=118998 -2012-02-29 Werner Lemberg + for Borland's bug tracker entry. - [truetype] Fix Savannah bug #35601. + Reported by Yuliana Zigangirova , + http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html. - * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of - last point for loop. - Also remove redundant boundary check. + * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c + (gray_TWorker_): Move `ft_jmp_buf' field to be the first element. -2012-02-29 Werner Lemberg +2014-12-07 Werner Lemberg - [truetype] Remove redundant check. + */*: Decorate hex constants with `U' and `L' where appropriate. - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant - second check for ordered contour start points. +2014-12-07 Werner Lemberg -2012-02-29 Werner Lemberg + [truetype] Prevent memory leak for buggy fonts. - [truetype] Make SHC instruction behave similar to MS rasterizer. + * src/truetype/ttobjs.c (tt_size_done): Unconditionally call + `tt_size_done_bytecode'. - * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in - twilight zone. +2014-12-06 Werner Lemberg -2012-02-29 Alexei Podtelezhnikov + * Version 2.5.4 released. + ========================= - 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. + Tag sources with `VER-2-5-4'. -2012-02-29 Werner Lemberg + * 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/. - [autofit] Don't synchronize digit widths for light rendering mode. + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. - We don't hint horizontally in this mode. + * builds/unix/configure.raw (version_info): Set to 17:3:11. + * CMakeLists.txt (VERSION_PATCH): Set to 4. + * docs/CHANGES: Updated. - * src/autofit/afloader.c (af_loader_load_g) : - Implement it. +2014-12-04 Werner Lemberg -2012-02-26 Alexei Podtelezhnikov + docs/CHANGES: Updated, formatted. - [type42] Minor code optimization (again). +2014-12-04 Dave Arnold - * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change. + [cff] Modify an FT_ASSERT. -2012-02-26 Mateusz Jurczyk - Werner Lemberg + * 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. - [smooth] Fix Savannah bug #35604. +2014-12-04 Dave Arnold - * 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. + [cff] Fix Savannah bug #43661. -2012-02-26 Alexei Podtelezhnikov + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Don't append to stem arrays after + hintmask is constructed. - [type42] Minor code optimization. + * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to + avoid reading past end of hintmask. - * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of - modulo operator. +2014-12-03 Werner Lemberg -2012-02-26 Werner Lemberg + docs/CHANGES: Updated. - * docs/CHANGES: Updated. +2014-12-03 Werner Lemberg -2012-02-26 Werner Lemberg + [autofit] Better fix for conversion specifiers in debug messages. - [type1] Fix Savannah bug #35608. + 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. - * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short - dictionaries. + This patch improves the change from 2014-11-28. -2012-02-26 Werner Lemberg + * 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'. - [bdf] Support `ENCODING -1 ' format. +2014-12-03 Werner Lemberg - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Implement it. + FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality. -2012-02-26 Werner Lemberg + All public FreeType enumeration and flag values are uppercase... - [bdf] Fix Savannah bug #35607. + * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards + compatilibity, retain the old values as macros. - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Normalize - negative encoding values. + * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c + (get_sfnt_table): Updated. -2012-02-26 Werner Lemberg +2014-12-02 Werner Lemberg - [type1] Fix Savannah bug #35606. + * include/*: Improve structure of documentation. - * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'. + . Add and update many `' tags. + . Apply various documentation fixes. + . Remove details to deprecated (or never implemented) data. - * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message - only if cur < limit. +2014-12-02 Werner Lemberg -2012-02-25 Werner Lemberg + [docmaker] Always handle `' section elements. - [pcf] Fix Savannah bug #35603. + Previously, those elements were handled only for sections present in + a `' chapter element. - * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in - `strings' array. + * src/tools/docmaker/content.py (ContentProcessor::finish): + Implement it. -2012-02-25 Werner Lemberg +2014-12-02 Werner Lemberg - [type42] Fix Savannah bug #35602. + [docmaker] Properly handle empty rows in Synopsis. - * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more - thoroughly. + * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit + ` ' for empty fields. -2012-02-25 Werner Lemberg +2014-12-02 Werner Lemberg - [bdf] Fix Savannah bugs #35599 and #35600. + [docmaker] Thinko. - * src/bdf/bdflib.c (ACMSG16): New warning message. - (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length. + * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): + Emit `/empty/' string for first element also. -2012-02-24 Werner Lemberg +2014-12-02 Werner Lemberg - [bdf] Fix Savannah bugs #35597 and #35598. + [docmaker] Honour empty lines in `' section element. - * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value. + This greatly improves the readability of the `Synopsis' links. -2012-02-24  Vinnie Falco + * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): + Insert string `/empty/' between items. - Prepare source code for amalgamation (6/6). + * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it + robust against nonexistent keys. - * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/. + * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit + empty elements for `/empty/'. - * 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/. +2014-12-02 Werner Lemberg - * src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/. + [docmaker] Ensure Python 3 compatibility. - * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/. + * src/tools/docmaker/content.py (ContentProcessor::set_section, + ContentProcessor::finish): Replace `has_key' function with `in' + keyword. - * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/. + * src/tools/docmaker/formatter.py (Formatter::__init__): Replace + sorting function with a key generator. + (Formatter::add_identifier): Replace `has_key' function with `in' + keyword. -2012-02-24  Vinnie Falco + * 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/<>/>/. - Prepare source code for amalgamation (5/6). + * src/tools/docmaker/utils.py: Import `itertools'. + (index_sort): Replaced by... + (index_key): ... this new key generator (doing exactly the same). - * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after - using it. +2014-11-29 Werner Lemberg -2012-02-22  Vinnie Falco + [docmaker] Don't output a block multiple times. - Prepare source code for amalgamation (4/6). + This bug was hidden by not processing all lines of `' blocks. - * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG, - RAS_ARGS, RAS_VAR, and RAS_VARS before defining it. + * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter + out field names. - * src/smooth/ftgrays.c: s/TRaster/black_TRaster/, - s/PRaster/black_PRaster/. - * src/raster/ftraster.c: s/TRaster/gray_TRaster/, - s/PRaster/gray_PRaster/. +2014-11-29 Werner Lemberg -2012-02-20  Vinnie Falco + [docmaker] Use field values as HTML link targets where possible. - Prepare source code for amalgamation (3/6). + * 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. - * src/smooth/ftgrays.c: s/TWorker/black_TWorker/, - s/PWorker/black_PWorker/. - * src/raster/ftraster.c: s/TWorker/gray_TWorker/, - s/PWorker/gray_PWorker/. +2014-11-29 Werner Lemberg -2012-02-20  Vinnie Falco + [docmaker] Allow empty lines in `' blocks. - Prepare source code for amalgamation (2/6). + Before this patch, the suggested order of entries stopped at the + first empty line. - * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR, - CEILING, TRUNC, and SCALED before defining it. + 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... -2012-02-20  Vinnie Falco + * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): + New function to iterate over all items. + (DocSection::process): Use it. - Prepare source code for amalgamation (1/6). +2014-11-29 Werner Lemberg - See discussion starting at + * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp. - http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html + After the single asterisk there must be no other immediately following + asterisk. - * src/smooth/ftgrays.c: s/TBand/gray_TBand/. - * src/raster/ftraster.c: s/TBand/black_TBand/. +2014-11-29 Werner Lemberg -2012-02-17 Alexei Podtelezhnikov + * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing. - [autofit] Fix outline flags. +2014-11-29 Werner Lemberg - * src/autofit/afloader.c (af_loader_load_g): Don't reassign - `outline.flags' so that this information is preserved. See - discussion starting at + [docmaker] Improve HTML code for table of contents. - http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html + * src/tools/docmaker/tohtml.py: Introduce a new table class `toc', + together with proper CSS. -2012-02-11 Werner Lemberg +2014-11-29 Werner Lemberg - [truetype] Fix Savannah bug #35466. + [docmaker] Provide higher-level markup and simplify HTML. - Jump instructions are now bound to the current function. The MS - Windows rasterizer behaves the same, as confirmed by Greg Hitchcock. + * src/tools/docmaker/tohtml.py: Instead of using extraneous `
' + elements, use CSS descendants (of class `section') to format the + data. - * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element. - * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element. + Also remove reduntant

and
elements, replacing them with + proper CSS. - * 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. + Globally reduce page width to 75%. -2012-02-11 Werner Lemberg + (block_header): Rename

class to `section'. - We don't use `extensions'. +2014-11-29 Werner Lemberg - * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove - `extensions' field. + [docmaker] Add `top' links after blocks. -2012-02-11 Werner Lemberg + * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it. - Clean up `generic' fields. +2014-11-29 Werner Lemberg - * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec): - Remove `generic' field since users can't access it. + * src/tools/docmaker/tohtml.py: Improve CSS for fields. - * 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'. + Make fields align horizontally relative to full line width. -2012-02-07 Werner Lemberg +2014-11-29 Werner Lemberg - [autofit] Harmonize function arguments. + * src/tools/docmaker/tohtml.py: Fix index and TOC templates. - * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for - `load_flags'. + This thinko was introduced 2014-11-27. -2012-02-07 Werner Lemberg +2014-11-28 Werner Lemberg - * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts. + [docmaker] Format field lists with CSS. -2012-01-17 suzuki toshiya + This also simplifies the inserted HTML code. - [gxvalid] Fix Savannah bug #35286. + * src/tools/docmaker/tohtml.py + (HtmlFormatter::print_html_field_list): Do it. - Patch submitted by anonymous reporter. +2014-11-28 suzuki toshiya - * 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. + Fix compiler warning to the comparison between signed and + unsigned variable. -2012-01-17 suzuki toshiya + * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison + between `ypos + ysize' and FT_INT_{MAX,MIN}. - [raccess] Modify for PIC build. +2014-11-28 Werner Lemberg - Based on the patch provided by Erik Dahlstrom , - http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html + [docmaker] Replace empty `' with CSS. - Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()' - are renamed with `ft_' suffixes. + * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do + it. - * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed - to `ft_raccess_rule_by_darwin_vfs()'. - * src/base/ftobjs.c: Ditto. +2014-11-28 Werner Lemberg - * src/base/ftrfork.c: Declarations of FT_RFork_Rule, - raccess_guess_rec, are moved to... - * include/freetype/internal/ftrfork.h: Here. + [docmaker] Replace some `' tags with `

' and `
'. - * include/freetype/internal/ftrfork.h: - FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined - to replace raccess_guess_table[] in both of PIC and non-PIC - modes. - * src/base/ftrfork.c: raccess_guess_table[] array is rewritten - by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}. + * src/tools/docmaker/tohtml.py (marker_*): Use `

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

/

/. - * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table' - storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve - the function pointer from `ft_raccess_guess_table' storage in - `BasePIC' structure. - * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with - FT_RACCESS_GUESS_TABLE_GET. - (raccess_get_rule_type_from_rule_index): Add `library' as the - first argument to the function, to retrieve the storage of - `ft_raccess_guess_table' from it. Also `raccess_guess_table' - is replaced by FT_RACCESS_GUESS_TABLE_GET. - (ft_raccess_rule_by_darwin_vfs): Ditto. +2014-11-28 suzuki toshiya -2012-01-16 suzuki toshiya + Fix compiler warning to conversion specifiers in debug messages. - Remove trailing spaces. + * 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. -2012-01-16 suzuki toshiya +2014-11-27 Werner Lemberg - Formatting PIC related sources. + * src/tools/docmaker/tohtml.py: Use more CSS for index. - * 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. +2014-11-27 Werner Lemberg -2012-01-16 suzuki toshiya + [docmaker] Replace `name' attribute of `' with `id'. - [autofit] Fix the inclusion of `aflatin2.h' in PIC file. + * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it. - * 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. +2014-11-27 Werner Lemberg -2012-01-16 suzuki toshiya + * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes. - [cff] Remove redundant declarations of cff_cmap_XXX_class_rec. + 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. - * 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. + The change also enforces the same (smaller) size for all index and + TOC links. -2012-01-15 suzuki toshiya +2014-11-27 suzuki toshiya - Fix redundant declaration warning in PIC mode. + * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(), + cf2font.c could not find it under `make multi' build. - Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were - designed to declare xxx_pic_{free,init} by themselves. - Because these macros are used at the end of the module - interface (e.g. ttdriver.c) and the wrapper source to build - a module as a single object (e.g. truetype.c) includes - the PIC file (e.g. ttpic.c) before the module interface, - these macros are expanded AFTER xxx_pic_{free,init} body - when the modules are built as single object. - The declaration after the implementation causes the redundant - declaration warnings, so the declarations are moved to module - PIC headers (e.g. ttpic.h). Separating to other header files - are needed for multi build. +2014-11-27 suzuki toshiya - * 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/smooth/ftsmooth.c (ft_smooth_render_generic): Remove + unrequired negative value check for `width' and `height'. - * src/base/basepic.h: Insert a comment and fix coding style. - * src/autofit/afpic.h: Declare autofit_module_class_pic_{free, - init}. - * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}. - * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free, - init}. - * src/psnames/pspic.h: Declare psnames_module_class_pic_{free, - init}. - * src/raster/rastpic.h: Declare - ft_raster{1,5}_renderer_class_pic_{free,init} - * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}. - * src/smooth/ftspic.h: Declare - ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}. - * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}. +2014-11-27 Werner Lemberg -2012-01-15 suzuki toshiya + * src/tools/docmaker/tohtml.py: More HTML table refactoring. - Make pspic.c to include module error header to fix multi build. + Replace some `' tags with `
' to simplify structure. - * src/psnames/pspic.c: Include `psnamerr.h'. + Move `bgcolor' attribute to CSS. -2012-01-14 suzuki toshiya + Replace most `width' attributes with CSS. The remaining instances + (providing a similar effect as LaTeX's `\hfill' command) are removed + in a later patch. - [base] Fix a dereference of uninitialized variable in PIC mode. +2014-11-27 Werner Lemberg - * 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. + * src/tools/docmaker/tohtml.py: Replace with CSS. -2012-01-14 suzuki toshiya +2014-11-27 Werner Lemberg - [base] Insert explicit cast for GCC 4.6 in PIC mode. + * src/tools/docmaker/tohtml.py: Center
with CSS. - * 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. +2014-11-27 Werner Lemberg -2012-01-13 suzuki toshiya + * src/tools/docmaker/tohtml.py: Replace `
' with `
'. - Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6. +2014-11-27 Werner Lemberg - Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET - take no arguments but derefer the variable named `library' - internally. + * src/tools/docmaker/tohtml.py: Remove redundant `
' tags. - * 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. + This starts a series of commits into the direction of generating + valid HTML 5 code, especially using much more CSS. - * 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. +2014-11-27 suzuki toshiya -2012-01-13 suzuki toshiya + Prevent too negative values (< FT_INT_MIN) in bitmap metrics, + suggested by Alexei. - Make PIC files include module error headers, to use the error codes - with per-module prefix. + * 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. - * src/autofit/afpic.c: Include `aferrors.h'. - * src/cff/cffpic.c: Include `cfferrs.h'. - * src/pshinter/pshpic.c: Include `pshnterr.h'. - * src/raster/rastpic.c: Include `rasterrs.h'. - * src/sfnt/sfntpic.c: Include `sferrors.h'. - * src/smooth/ftspic.c: Include `ftsmerrs.h'. - * src/truetype/ttpic.c: Include `tterrors.h'. +2014-11-27 Werner Lemberg -2012-01-04 Tobias Ringström + [docmaker] Produce better HTML code. - [truetype] Fix IP instruction if x_ppem != y_ppem. + * src/tools/docmaker/tohtml.py: Always use double quotes for + attribute values. + (source_footer): Close `td' and `tr' groups. - * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates - properly. +2014-11-27 Werner Lemberg -2012-01-02 Werner Lemberg + Use better way to disable creation of .pyc files for `make refdoc'. - Fix tracing message for `loca' table. + Python 2.6 was released in 2008... - * src/truetype/ttpload.c (tt_face_get_location): Don't emit a - warning message if the last `loca' entry references an empty glyph. + * builds/freetype.mk (refdoc): Use python's `-B' option. -2011-12-10 Werner Lemberg + * builds/detect.mk (std_setup, dos_setup): Mention required python + version for `refdoc' target. - Add some variable initializations. - Reported by Richard COOK . +2014-11-27 Werner Lemberg - * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'. - * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels' - earlier. + * src/tools/docmaker/sources.py (re_bold, re_italic): Use + non-grouping parentheses. + * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): + Updated. -2011-12-08 Werner Lemberg +2014-11-27 Werner Lemberg - Fix serious scaling bug in `FT_Get_Advances'. + * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning. - * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by - `FT_Load_Glyph' must be simply multiplied by 1024. + Introdruced in previous change. Reported by Alexei. -2011-12-08 Werner Lemberg +2014-11-26 Werner Lemberg - * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing. + * src/*: Add checks for parameters of API functions where missing. -2011-12-02 suzuki toshiya + `API functions' are functions tagged with `FT_EXPORT_DEF'. - [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH. + Besides trivial fixes, the following changes are included, too. - 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). + * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set + error code if no service is available. - * 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/ftinit.c (FT_Done_FreeType): Change return value for + invalid `library' parameter to `Invalid_Library_Handle'. - * 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/ftobjs.c (FT_New_Size): Change return value for invalid + `asize' parameter to `Invalid_Argument'. - * 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. + * 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'. - * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH. - * builds/mac/FreeType.m68k_far.make.txt: Ditto. - * builds/mac/FreeType.ppc_classic.make.txt: Ditto. - * builds/mac/FreeType.ppc_carbon.make.txt: Ditto. +2014-11-26 Werner Lemberg -2011-11-30 suzuki toshiya + * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'. - Fix Savannah bug #34728 (`make devel' on Mac OS X). +2014-11-26 suzuki toshiya - * 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. + * src/base/ftobj.c (Mac_Read_POST_Resource): Additional + overflow check in the summation of POST fragment lengths, + suggested by Mateusz Jurczyk . -2011-11-30 suzuki toshiya +2014-11-26 suzuki toshiya - [apinames] Fix the overflow of signed integer hash. + * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments + and fold too long tracing messages. - * src/tools/apinames.c (names_add): Change the type of `h' from - int to unsigned int, to prevent undefined behaviour in the - overflow of signed integers (overflow of unsigned int is defined - to be wrap around). Found by clang test suggested by Sean - McBride. +2014-11-26 suzuki toshiya -2011-11-30 Werner Lemberg + Fix Savannah bug #43540. - [winfonts] Remove casts. + * src/base/ftmac.c (parse_fond): Prevent a buffer overrun + caused by a font including too many (> 63) strings to store + names[] table. - * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and - update affected functions. - (FNT_Size_Select): Fix number of arguments. +2014-11-26 suzuki toshiya -2011-11-30 Werner Lemberg + * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long + variables to read the lengths in POST fragments. Suggested by + Mateusz Jurczyk . - [type42] Remove casts. +2014-11-26 suzuki toshiya - * src/type42/t42driver.c (t42_driver_class): Remove all casts and - update affected functions. + Fix Savannah bug #43539. - * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver - changes. + * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow + by a broken POST table in resource-fork. -2011-11-30 Werner Lemberg +2014-11-26 suzuki toshiya - [type1] Remove casts. + Fix Savannah bug #43538. - * src/type1/t1driver.c (t1_driver_class): Remove all casts and - update affected functions. + * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow + by a broken POST table in resource-fork. - * 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. +2014-11-26 suzuki toshiya -2011-11-27 Werner Lemberg + * 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. - [bdf] Fix Savannah bug #34896. +2014-11-25 Werner Lemberg - ENCODING now covers the whole Unicode range. + */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate. - 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). +2014-11-25 Werner Lemberg - * 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. + */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate. -2011-11-27 Werner Lemberg +2014-11-25 Werner Lemberg - [bdf] Improve tracing. + */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate. - * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros. - (_bdf_parse_glyphs): Use them. +2014-11-25 Werner Lemberg -2011-11-26 Werner Lemberg + */*: s/Invalid_Argument/Invalid_Outline/ where appropriate. - Improve tracing. +2014-11-25 Werner Lemberg - * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c - (PCF_Face_Done): Remove tracing message. + */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate. - * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c - (cff_face_init), src/cid/cidobjs.c (cid_face_init), - src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c - (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init), - src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c - (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add - `greeting' message. +2014-11-24 Werner Lemberg - * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c - (T42_Open_Face): Improve tracing. + [Savannah bug #43682] Adjust some renderer callbacks. -2011-11-26 Werner Lemberg + * src/raster/ftraster.c (ft_black_set_mode): Change return type to + `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype. - [cid] Fix error code. + * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function + for orthogonality. + (ft_grays_raster): Use it. - * src/cid/cidparse.c (cid_parser_new): Do it. +2014-11-25 Werner Lemberg -2011-11-26 Werner Lemberg + [Savannah bug #43682] Properly handle missing return errors. - [cff] Fix error code. + The functions in this patch *do* return non-trivial errors that must + be taken care of. - * src/cff/cffload.c (cff_font_load): Do it. + * 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. -2011-11-26 Werner Lemberg +2014-11-25 Werner Lemberg - Add new error code FT_Err_Missing_Module. + [Savannah bug #43682] Add/remove `void' casts to some functions. - Previously, FreeType misleadingly returned - FT_Err_Unknown_File_Format if a module was missing (or a test was - missing completely). + 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. - * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define. + * 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. - * 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. +2014-11-25 Werner Lemberg - * 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'. + [Savannah bug #43682] Change some signatures to `void' return type. -2011-11-25 Werner Lemberg + * 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. - [bdf] Add more error messages. + * 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. - * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property): - Add line number argument. - Update all callers. - (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros. - (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property, - _bdf_parse_glyphs, _bdf_parse_start): Add error messages. +2014-11-24 Werner Lemberg -2011-11-24 Werner Lemberg + Remove all code related to FT_MAX_CHARMAP_CACHEABLE. - * include/freetype/fterrors.h: Remove dead code. + This is no longer used. -2011-11-15 Werner Lemberg + * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c, + src/sfnt/ttcmap.c: Do it. - * docs/releases: Updated. +2014-11-24 Werner Lemberg -2011-11-15 Werner Lemberg + [sfnt] Fix Savannah bug #43680. - * Version 2.4.8 released. - ========================= + 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'. - Tag sources with `VER-2-4-8'. +2014-11-24 Werner Lemberg - * docs/CHANGES: Updated. + [truetype] Fix Savannah bug #43679. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.8. + * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of + `record_size'. - * README, Jamfile (RefDoc), - builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, - builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, - builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, - builds/win32/visualc/freetype.dsp, - builds/win32/visualc/freetype.vcproj, - builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, - builds/win32/visualce/freetype.vcproj, - builds/win32/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.4.7/2.4.8/, s/247/248/. +2014-11-24 Jarkko Pöyry - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8. + [cff, pfr, psaux, winfonts] Fix Savannah bug #43676. - * builds/unix/configure.raw (version_info): Set to 14:0:8. + Don't cast cmap init function pointers to an incompatible type. -2011-11-13 Chris Liddell + Without this patch, the number of parameters between declaration and + the real signature differs. Calling such a function results in + undefined behavior. - Add FT_Get_PS_Font_Value() API. + 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. - 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). + 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. - * include/freetype/internal/services/svpsinfo.h - (PS_GetFontValueFunc): New typedef. - (PSInfo): Add `ps_get_font_value'. - (FT_DEFINE_SERVICE_PSINFOREC): Updated. + * 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. - * 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. +2014-11-24 Werner Lemberg - * src/base/fttype1.c (FT_Get_PS_Font_Value): New function. + [sfnt] Fix Savannah bug #43672. - * src/type1/t1driver.c (t1_ps_get_font_value): This new function - does the real job. - (t1_service_ps_info): Add it. + * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for + minimum table length test. - * 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. +2014-11-24 Werner Lemberg -2011-11-08 Braden Thomas + [type1, type42] Another fix for Savannah bug #43655. - [cid] Various loading fixes. + * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c + (t42_parse_charstrings): Add another boundary testing. - * 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. +2014-11-24 Werner Lemberg -2011-11-05 Werner Lemberg + [docmaker] Formatting, copyright, improved documentation. - * README: We use copyright ranges also. + * src/tools/docmaker/*: No code changes besides trivial + modifications. - According to +2014-11-22 Werner Lemberg - http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html + [bdf] Fix Savannah bug #43660. - this should be mentioned explicitly. + * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check + `_BDF_GLYPH_BITS'. -2011-10-30 suzuki toshiya +2014-11-22 Werner Lemberg - [raccess] Supplement for previous fix. + [type42] Allow only embedded TrueType fonts. - * 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. + This is a follow-up to Savannah bug #43659. -2011-10-30 suzuki toshiya + * src/type42/t42objs.c (T42_Face_Init): Exclusively use the + `truetype' font driver for loading the font contained in the `sfnts' + array. - [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X. +2014-11-22 Werner Lemberg - * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not - compile on native Mac OS X because it is not used. + [type42] Fix Savannah bug #43659. -2011-10-25 Werner Lemberg + * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'. - [truetype] Fix MD instruction for twilight zone. + * 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. - * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD - instruction applied to original coordinates of twilight points - always returns zero. +2014-11-22 Werner Lemberg -2011-10-18 Werner Lemberg + [cff] Fix Savannah bug #43658. - * Version 2.4.7 released. - ========================= + * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle + return values of point allocation routines. +2014-11-22 Werner Lemberg - Tag sources with `VER-2-4-7'. + [sfnt] Fix Savannah bug #43656. - * docs/CHANGES: Updated. + * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity + tests. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.7. +2014-11-21 Werner Lemberg - * 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/. + [type1, type42] Fix Savannah bug #43655. - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7. + * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c + (t42_parse_charstrings): Fix boundary testing. - * builds/unix/configure.raw (version_info): Set to 13:2:7. +2014-11-21 Werner Lemberg -2011-10-15 Kal Conley + * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics. - Fix handling of transformations if no renderer is present. +2014-11-21 Werner Lemberg - * src/base/ftobjs.c (FT_Load_Glyph): Thinko. + [ftlcdfil] Obey flow direction. -2011-10-15 Kal Conley + * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy): + Handle `up' flow. - Fix conditions for autohinting. +2014-11-21 Werner Lemberg - * src/base/ftobjs.c (FT_Load_Glyph): Handle - FT_LOAD_IGNORE_TRANSFORM. + * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve. -2011-10-07 suzuki toshiya + This commit completes argument checks and adds support for different + flow directions. - [gxvalid] Fix a bug to detect too large offset in morx table. +2014-11-21 Werner Lemberg - * src/gxvalid/gxvmorx2.c - (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug - that too large positive offset cannot be detected. + * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve. -2011-10-01 Braden Thomas + This commit adds argument checks and support for different flow + directions. - Handle some border cases. +2014-11-20 Werner Lemberg - * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro. + * src/base/ftbitmap.c (FT_Bitmap_New): Check argument. - * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid - value of `target->rows'. +2014-11-19 Werner Lemberg - * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for - flex start. + Change some fields in `FT_Bitmap' to unsigned type. - * src/raster/ftrend1.c (ft_raster1_render): Check `width' and - `height'. + This doesn't break ABI. - * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against - invalid values in `localpoints' array. + * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays', + `pixel_mode', and `palette_mode' unsigned types. -2011-10-01 Werner Lemberg + * src/base/ftbitmap.c: Updated. + (FT_Bitmap_Copy): Fix casts. - [psnames] Handle zapfdingbats. - Problem reported by Nicolas Rougier . + * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c: + Updated. - * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's - `zapfdingbats.txt' file. +2014-11-19 Werner Lemberg - * src/psnames/pstables.h: Regenerated. + Make `FT_Bitmap_Convert' correctly handle negative `pitch' values. -2011-09-27 Simon Bünzli + * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value + for the pitch while copying data. + Correctly set pitch sign in target bitmap. - Fix Savannah bug #34189. +2014-11-19 Werner Lemberg - * src/type1/t1load.c (T1_Open_Face): Initialize - `face->len_buildchar'. + Minor code improvement in `FT_Bitmap_Embolden'. -2011-09-26 Werner Lemberg + * src/base/ftbitmap.c (FT_Bitmap_Embolden) : + Fix thinko. - [cff] Dump SIDs while tracing. +2014-11-19 Alexei Podtelezhnikov - * src/cff/cffobjs.c (cff_face_init): Do it. + * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table. - * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE] - : Identify as SID. +2014-11-19 Behdad Esfahbod -2011-09-17 Werner Lemberg + Avoid compiler warnings on x86-64 for `FT_MulFix'. - Remove unused FT_ALIGNMENT macro. + `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. - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h: Do it. + * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add + casts. -2011-09-17 Alexei Podtelezhnikov +2014-11-15 Werner Lemberg - [smooth] Slightly optimize conic and cubic flatterners. + [sfnt] Fix Savannah bug #43597. - * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move - out some code from the main loop to speed it up. + * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large + bitmaps. -2011-09-11 Tomas Hoger +2014-11-12 Werner Lemberg - Slightly improve LZW_CLEAR handling. + [sfnt] Fix Savannah bug #43591. - * 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. + * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition + and multiplication overflow. -2011-09-11 Tomas Hoger +2014-11-12 Werner Lemberg - Add explicit LZW decompression stack size limit. + [sfnt] Fix Savannah bug #43590. - Stack larger than 1< - This patch adds explicit stack size limit, enforced when stack is - realloced. + [sfnt] Fix Savannah bug #43589. - An alternative is to ensure that code < state->prefix[code - 256] - when traversing prefix table. Such check is less efficient and - should not be required if prefix table is constructed correctly in - the first place. + * src/sfnt/sfobjs.c (woff_open_font): Protect against addition + overflow. - * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it. +2014-11-12 Werner Lemberg -2011-09-11 Tomas Hoger + [sfnt] Fix Savannah bug #43588. - Protect against loops in the prefix table. + * 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. - 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. +2014-11-10 Alexei Podtelezhnikov - * 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. + [base] CORDIC improvements. -2011-09-09 Werner Lemberg + 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. - Better tracing of metrics. + * src/base/fttrigon.c (ft_trig_downscale): Borrow code from + ./ftcalc.c (ft_multo64), change linear intercept. + (ft_trig_pseudo_polarize): Decrease `theta' padding. - * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with - FT_TRACE. +2014-11-09 Werner Lemberg -2011-09-07 Werner Lemberg + * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections. - Fix Savannah bug #33816. + One more place to check whether `radius' is zero. - * 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. + Problem reported by Marco Wertz . -2011-08-30 Werner Lemberg +2014-11-07 Werner Lemberg - Better tracing of metrics. + [bdf] Fix Savannah bug #43535. - * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): - Decorate with FT_TRACE. + * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one + character more than `strncmp'. + s/ft_strncmp/_bdf_strncmp/ everywhere. -2011-08-25 Werner Lemberg +2014-11-06 Werner Lemberg - [cff] Better tracing of the parsing process. + [pcf] Fix Savannah bug #43548. - * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with - FT_TRACE. + * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row + and column values. - * 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. +2014-11-06 Werner Lemberg - * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add - `id' member. + [pcf] Fix Savannah bug #43547. - * src/cff/cfftoken.h: Add IDs to all fields. + * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset' + values. -2011-08-16 Werner Lemberg +2014-11-06 Werner Lemberg - Fix Savannah bug #34022. + * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak. - * README, docs/INSTALL: Remove references to UPGRADE.UNIX. +2014-11-03 Infinality -2011-08-15 Werner Lemberg + * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated. - Fix Savannah bug #34018. + The previous commit deteriorates rendering of DejaVu and similar + fonts; this gets compensated with this rule. - * docs/UPGRADE.UNIX: Removed. Obsolete. +2014-11-03 Werner Lemberg -2011-08-15 David Bevan + * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting. - Fix Savannah bug #33992. + Before this patch, it was impossible to ever call DELTAP[123] in + subpixel hinting mode as described in the ClearType whitepaper; it + only worked if in `compatibility mode'. However, compatibility mode + essentially disables SHPIX, completely ruining hinting of + ttfautohint output, for example. - * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case. + We now follow the whitepaper more closely so that DELTAP[123] + instructions for touched points in the non-subpixel direction are + executed. -2011-08-12 Werner Lemberg - [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes. + [smooth] Improve code readability. - * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially. - (Ins_SDPVTL): Handle v1 == v2 specially. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code. -2011-08-09 Werner Lemberg +2014-10-31 Alexei Podtelezhnikov - Fix Savannah bug #33975. + [smooth] Reduce outline translations during rendering. - * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin + virtually by modifying cbox, actually translate outline if cumulative + shift is not zero. -2011-07-29 Werner Lemberg +2014-10-30 Alexei Podtelezhnikov - * Version 2.4.6 released. - ========================= + [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. - Tag sources with `VER-2-4-6'. +2014-10-29 Alexei Podtelezhnikov - * docs/CHANGES: Updated. + [smooth] Improve code readability. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.6. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code. - * 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/. +2014-10-29 Alexei Podtelezhnikov - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6. + Unify hypotenuse approximations. - * builds/unix/configure.raw (version_info): Set to 13:1:7. + * 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. -2011-07-29 Werner Lemberg +2014-10-25 Werner Lemberg - [cff] Add some more tracing infos. + [cff] Test valid darkening parameter macros in `ftoption.h'. - * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox, - cff_parse_cid_ros): Add tracing. + We no longer need an otherwise unused typedef that can cause a gcc + warning. + Problem reported by Alexei. -2011-07-22 Dirk Müller + * 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 ... - [psaux, type1] Fix null pointer dereferences. + * devel/ftoption.h, include/config/ftoption.h: ... here. - Found with font fuzzying. +2014-10-25 Alexei Podtelezhnikov - * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check - `decoder->buildchar'. + Improve flat corner definition. - * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'. + * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean + distance with the alpha max plus beta min algorithm. + * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab + metric. -2011-07-20 Chris Morgan +2014-10-23 David Weiß - Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT. + [build] Improve property file for vc2010. - Useful for embedded systems which don't need file stream support. + User-defined properties should be empty by default to prevent linker + failures. - * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement - it. + * builds/windows/vc2010/freetype.user.props, + builds/windows/vc2010/freetype.vcxproj: + s/OptionsDirectory/UserOptionDirectory/. + Comment out all user options. -2011-07-20 Elton Chung +2014-10-23 Werner Lemberg - * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo. + [cff] Work around bug in preprocessor of MSVC 2010. -2011-07-16 Steven Chu + We have been hit by - [truetype] Fix metrics on size request for scalable fonts. + https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr - * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics - from TT_Size to FT_Size if scalable font. + * 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}'. - See + * 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. - http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html +2014-10-20 Werner Lemberg - for some comparison images. + [sbit] Minor fixes. -2011-07-14 Matthias Drochner . + * 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. - [psaux] Fix potential sign extension problems. +2014-10-19 Alexei Podtelezhnikov - 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. + [truetype] Clean up bytecode rounding. - * src/psaux/t1decode.c (Fix2Int): New macro. - Use it where appropriate. + Zero distance does not have to be treated specially if you follow + specifications and check the sign as the very last step of rounding. -2011-07-14 Werner Lemberg + * 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. - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Better handling of subroutine index 0. - From Matthias Drochner . +2014-10-18 Alexei Podtelezhnikov -2011-07-10 Алексей Подтележников + [truetype] Unwrap engine compensation settings. - [psaux] Optimize previous commit. + * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated. - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Move error check down to avoid testing twice for - good cases. +2014-10-18 David Weiß -2011-07-08 Werner Lemberg + [build] Add property file to vc2010 project. - [psaux] Add better argument check for `callothersubr'. + This simplifies custom build configurations, especially for + automated build environments. - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Reject negative arguments. + * builds/windows/vc2010/freetype.user.props: New configuration file. -2011-07-07 Werner Lemberg + * builds/windows/vc2010/freetype.vcxproj: Include + `freetype.user.props' and use its data fields. - [sfnt] Try harder to find non-zero values for ascender and descender. + * builds/windows/vc2010/index.html: Updated. - * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case - the `hhea' table's values are zero. +2014-10-18 Werner Lemberg -2011-07-03 Werner Lemberg + [autofit] Add blue-zone support for Telugu. - Fix previous commit. + This essentially moves the Telugu script from the `Indic' hinter to + the `Latin' hinter. - We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap - strikes in the font. + Note that this is a first shot and quite certainly needs + refinements. - * src/truetype/ttobjs.c (tt_face_init): Implement it. + * src/autofit/afblue.dat: Add blue zone data for Telugu. - * docs/CHANGES: Updated. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. -2011-07-02 Just Fill Bugs + * src/autofit/afscript.h: Add Telugu standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. - Fix Savannah bug #33246. + * src/autofit/afranges.c: Move Telugu data out of + AF_CONFIG_OPTION_INDIC block. - * src/truetype/ttobjs.c (tt_check_single_notdef): New function. - (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE. + * src/autofit/afstyles.h: Update Telugu data; in particular, use + AF_WRITING_SYSTEM_LATIN. -2011-07-02 Werner Lemberg +2014-10-18 David Wimsey - * docs/CHANGES: Updated. + [cmake] Add iOS build support. + From Savannah patch #8497. -2011-07-02 David Bevan + * builds/cmake/iOS.cmake: New file. Universal binaries are built + with both 32 and 64 bit arm architectures. - [ftstroke] Major revision. + * 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. - The main problems - ----------------- +2014-10-16 Behdad Esfahbod + Werner Lemberg - 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. + [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro. - 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. + * devel/ftoption.h, include/config/ftoption.h + (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro. - The main fixes - -------------- + * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS, + SET_DARKENING_PARAMETERS_0): New macros. + (cff_driver_init): Use new macros. - o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected. +2014-10-14 Alexei Podtelezhnikov - o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been - introduced to support PostScript and PDF miter joins. + [truetype] Limit delta shift range. - o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an - alias for FT_STROKER_LINEJOIN_MITER. + The valid range for delta shift is zero through six. Negative values + are invalid according to - Additionally, a variety of stroking errors have been fixed. These - would cause various artifacts (including points `at infinity'), - especially when stroking poor quality fonts. + https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift - See + * 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'. - http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html +2014-10-16 Werner Lemberg - for example documents. The FreeType stroker now produces results - very similar to that produced by GhostScript and Distiller for these - fonts. + A better fix for Savannah bug #43392. + Suggested by Doug Felt . - Other problems - -------------- + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set + `vertAdvance' to zero... - The following problems have been resolved: + * 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. - o Inside corners could be generated incorrectly. Intersecting the - inside corner could cause a missing triangular area and other - effects. +2014-10-14 David Weiß - 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'. + [build] Better optimization settings for vc2010 solution file. - o Incorrect cubic curves could be generated. The angle - calculations in `FT_Stroker_CubicTo' have been corrected to - handle the case of the curve crossing the +/-PI direction. + * builds/windows/vc2010/freetype.sln, + builds/windows/vc2010/freetype.vcxproj: Updated. - 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.) +2014-10-14 Werner Lemberg - 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. + [autofit] Adjust Devenagari character range. - 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. + * src/autofit/afranges.c (af_deva_uniranges): Omit characters that + are common to all other Indic scripts. - o Cubics with close control points could be mishandled. All eight - cases are now distinguished correctly. +2014-10-12 Werner Lemberg - Other improvements - ------------------ + [sfnt] Fix Savannah bug #43392. - o Borders for cubic curves could be too `flat'. - FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent - this. + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let + vertical metrics uninitialized. - o The handling and use of movable points has been simplified a - little. +2014-10-11 Alexei Podtelezhnikov - o Various values are now computed only if the results are actually - needed. + [base] Small bbox correction. - o The directions of the outer and inner borders have been swapped, - as recommended by Graham Asher. + * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox + instead of initial point that could be `off' in conic outlines. - * src/base/ftstroke.c: Revised. - * include/freetype/ftstroke.h: Updated. +2014-10-08 Alexei Podtelezhnikov -2011-06-30 Ä°smail Dönmez + [base] Fix Savannah bug #43356. - * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'. + * 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. -2011-06-29 Werner Lemberg +2014-10-08 Alexei Podtelezhnikov - Fix Savannah bug #33663. + [base] Introduce and use new macro `FT_UPDATE_BBOX' - * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for - ENCODING correctly. + * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro. + (FT_Outline_Get_BBox): Use it here. - * docs/CHANGES: Document it. +2014-10-02 Alexei Podtelezhnikov -2011-06-24 Werner Lemberg + [base] Significant optimization of `ft_div64by32' - * Version 2.4.5 released. - ========================= + 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. - Tag sources with `VER-2-4-5'. +2014-10-02 Dave Arnold - * docs/CHANGES: Updated. + [cff] Fix Savannah bug #43271. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.5 + * src/cff/cf2font.c (cf2_computeDarkening): Change overflow + detection to use logarithms and clamp `scaledStem'. - * 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/. +2014-10-01 Alexei Podtelezhnikov - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. + * src/base/ftcalc.c: Remove miscellaneous type casts. - * builds/unix/configure.raw (version_info): Set to 13:0:7. +2014-10-01 Alexei Podtelezhnikov -2011-06-20 Werner Lemberg + [base] Use more common `FT_MSB' implementation with masks. - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change - from 2011-05-04. + * src/base/ftcalc.c (FT_MSB): Updated. -2011-06-19 suzuki toshiya +2014-09-30 Alexei Podtelezhnikov - [gxvalid] make the `prop' validation tracing verbose. + [base] Clean up. - * src/gxvalid/gxvprop.c: Add tracing messages for errors. + * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used + code. -2011-06-19 suzuki toshiya +2014-09-25 Alexei Podtelezhnikov - [autogen.sh] Reflect environment variable LIBTOOLIZE. + [base] Avoid unnecessary long division. -2011-06-18 Werner Lemberg + This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or + lack thereof are predicted accurately. - Update license documentation. + * 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. - * docs/GPL.TXT: Renamed to... - * docs/GPLv2.TXT: This. +2014-09-24 Werner Lemberg - * docs/LICENSE.TXT: Updated. + [autofit] Minor clean-ups. -2011-06-14 suzuki toshiya + * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values. - Fix g++4.6 compiler warnings in module drivers. + * src/autofit/afhints.c (af_glyph_hints_dump_points, + af_glyph_hints_align_strong_points): Updated. - The background is same with previous commit. + * 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... - * 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. +2014-09-22 Werner Lemberg -2011-05-27 Werner Lemberg + [autofit] Minor code streamlining. - [autofit] Improve tracing of hinting process. + * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant + initialization. - * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message - `ADJUST'. +2014-09-19 Alexei Podtelezhnikov -2011-05-26 Werner Lemberg + * src/base/ftcalc.c: Harmonize code. - [autofit] Fix trace message. +2014-09-15 Alexei Podtelezhnikov - * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in - tracing message. + [base] Tighten the overflow check in `FT_MulDiv'. -2011-05-24 Daniel Zimmermann + * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated. - Reduce warnings for MS Visual Studio 2010. +2014-09-08 Alexei Podtelezhnikov - * 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. + Fix Savannah bug #43153. -2011-05-16 suzuki toshiya + * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against + overflow in `divider'. - Automake component `builds/unix/install-sh' is removed. +2014-09-03 Alexei Podtelezhnikov - * builds/unix/install-sh: Removed. It is not needed to - include repository, because autogen.sh installs it. - * builds/unix/.gitignore: Register install-sh. + [base] Tighten the overflow check in `FT_DivFix'. -2011-05-12 suzuki toshiya + This fixes a 13-year old bug. The original overflow check should have + been updated when rounding was introduced into this function + (c2cd00443b). - [autofit] Make trace message for CJK bluezone more verbose. + * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated. + * include/freetype.h (FT_DivFix): Updated documentation. -2011-05-08 Just Fill Bugs - suzuki toshiya +2014-09-03 Alexei Podtelezhnikov - [autofit] Add bluezones for CJK Ideographs. + [base] Tighten the overflow check in `FT_MulFix'. - 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 + * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated. - * include/freetype/internal/fttrace.h: New trace component `afcjk'. - * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version - for AF_Latin{Blue,Axis,Metric}Rec. - (af_cjk_metrics_check_digits): Ditto, shared with Indic module. - (af_cjk_metrics_init_widths): Ditto. - (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric. - (af_cjk_metrics_scale): Ditto (declaration). - (af_cjk_hints_init): Ditto (declaration). - (af_cjk_hints_apply): Ditto (declaration). - * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body). - (af_cjk_hints_init): Ditto (body). - (af_cjk_hints_apply): Ditto (body). - (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths. - (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits. - (af_cjk_metrics_init): Call CJK bluezone initializer. - (af_cjk_metrics_scale_dim): Add code to scale bluezones. - (af_cjk_hints_compute_blue_edges): New function, CJK version of - af_latin_hints_compute_blue_edges. - (af_cjk_metrics_init_blues): New function, CJK version of - af_latin_metrics_init_blues. - (af_cjk_hints_edges): Add code to align the edge stems to blue zones. +2014-09-02 Alexei Podtelezhnikov - * 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. + [truetype] Shortcut ppem calculations for square pixels. - * docs/CHANGES: Note about CJK bluezone support. + * 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'. -2011-05-06 Werner Lemberg +2014-08-31 Behdad Esfahbod - [autofit] Remove unused struct member. + Don't use `register' keyword. Fixes compiler warnings. - * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'. + * 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. -2011-05-04 Werner Lemberg +2014-08-24 Alexei Podtelezhnikov - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify. + [truetype] Optimize DELTAP and DELTAC. -2011-05-01 Just Fill Bugs - Werner Lemberg + * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem + calculations outside of the loop. - [autofit] Add more debugging functions. +2014-08-21 Alexei Podtelezhnikov - * src/autofit/afhints.c (af_glyph_hints_get_num_segments, - af_glyph_hints_get_segment_offset): New functions. + Fix Savannah bug #43033. -2011-05-01 suzuki toshiya + * 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'. - Add new option `--disable-mmap' to configure script. +2014-08-20 Alexei Podtelezhnikov - * 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. + [base] Small optimization of `FT_MulFix'. -2011-04-30 suzuki toshiya + * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct + 32-bit calculations. - [truetype] Always recalculate the sfnt table checksum. +2014-08-19 Alexei Podtelezhnikov - * 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 + [base] Use unsigned calculation in `FT_MulDiv'. -2011-04-30 suzuki toshiya + * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range. - [truetype] Register a set of tricky fonts, NEC FA family. +2014-08-18 Alexei Podtelezhnikov - * 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. + [base] Remove truncation in `FT_DivFix'. -2011-04-29 suzuki toshiya + * src/base/ftcalc.c (FT_DivFix): Updated. - [truetype] Fix a bug in the sfnt table checksum getter. +2014-08-14 Alexei Podtelezhnikov - * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the - return value of face->goto_table() correctly. + Minor refactoring. -2011-04-28 Werner Lemberg + * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated. - [autofit] Improve tracing messages. +2014-08-14 Alexei Podtelezhnikov - * src/autofit/aflatin.c (af_latin_metrics_init_blues, - af_latin_align_linked_edge, af_latin_hint_edges): Do it. + Turn FT_MSB into a macro when using gcc builtins. -2011-04-25 Kan-Ru Chen + * src/base/ftcalc.c, include/internal/ftcalc.h: Updated. - [truetype] Always check the checksum to identify tricky fonts. +2014-08-12 Alexei Podtelezhnikov - 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 + [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'. - * src/truetype/ttobjs.c (tt_check_trickyness): Even when - tt_check_trickyness_family() finds no trickyness, - tt_check_trickyness_sfnt_ids() is invoked. + * src/base/ftbbox.c (BBox_Cubic_Check): Update. + (update_cubic_max): Repalce with... + (cubic_peak): ... this, which now handles upscaling. -2011-04-22 suzuki toshiya +2014-08-11 Alexei Podtelezhnikov - [autofit] Add more Indic scripts with hanging baseline. + [base] Handle collapsed outlines to avoid undefined FT_MSB. - * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu, - Sundanese, Meetei Mayak, Syloti Nagri and Sharada scripts are - added. + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update. -2011-04-21 Behdad Esfahbod +2014-08-11 Alexei Podtelezhnikov - Always ignore global advance. + [base] Restore FT_MulFix inlining. - 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. + * include/freetype.h (FT_MulFix): Unconditionally defined. - * src/truetype/ttdriver.c (tt_get_advances), - src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics, - tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph), - src/truetype/ttgload.h: Implement it. + * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here... - * docs/CHANGES: Updated. + * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here, + which conditionally replaces the function with an inline version + through the macro. -2011-04-21 rainy6144 +2014-08-08 Alexei Podtelezhnikov - [autofit] Blur CJK stems if too many to preserve their gaps. + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor. - 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. +2014-07-26 Werner Lemberg - * 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. + [cff] Fix typo. -2011-04-18 Werner Lemberg + * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct + offsets in third quadrant. - Integrate autofitter debugging stuff. + Reported by maks . - * devel/ftoption.h, include/freetype/config/ftoption.h - (FT_DEBUG_AUTOFIT): New macro. +2014-07-17 Werner Lemberg - * include/freetype/internal/fttrace.h: Add trace components for - autofitter. + Fix Savannah bug #42788. - * src/autofit/aftypes.h (AF_LOG): Removed. - (_af_debug): Removed. + * src/pfr/pfrobjs.c: Include `ftcalc.h'. - * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/. - s/AF_LOG/FT_TRACE5/. - Define FT_COMPONENT where necessary. +2014-07-16 Alexei Podtelezhnikov -2011-04-18 Werner Lemberg + Replace `ft_highpow2' function. - Synchronize config files. + * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of + `ft_highpow2'. - * builds/unix/ftconfig.in: Copy missing assembler routines from - include/freetype/config/ftconfig.h. + * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove + it. -2011-04-13 Werner Lemberg +2014-07-15 Alexei Podtelezhnikov - Fix Savannah bug #33047. + * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins. - Patch submitted by anonymous reporter. +2014-07-15 Alexei Podtelezhnikov - * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer - difference. + [base] Move assembler code back in the source file. -2011-04-11 Kan-Ru Chen + FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b. - Fix reading of signed integers from files on 64bit platforms. + * include/config/ftconfig.h, builds/unix/ftconfig.in, + builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here... - Previously, signed integers were converted to unsigned integers, but - this can fail because of sign extension. For example, 0xa344a1eb - becomes 0xffffffffa344a1eb. + * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here. - We now do the reverse which is always correct because the integer - size is the same during the cast from unsigned to signed. +2014-07-14 Alexei Podtelezhnikov - * 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. + [base] Further clean up color bitmap conversion. - * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated. + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop + using FT_MulFix and FT_DivFix since all calculations fit into 32 bits. -2011-04-07 Werner Lemberg +2014-07-13 Werner Lemberg - Update Unicode ranges for CJK autofitter; in particular, add Hangul. + [truetype] Improve handling of buggy `prep' tables. - * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0. + 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. -2011-04-04 Werner Lemberg + * 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. - Fix formatting of autofit debug dumps. + * 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/autofit/afhints.c (af_glyph_hints_dump_points, - af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust - column widths. + * 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. -2011-03-30 Werner Lemberg +2014-07-12 Werner Lemberg - * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused. + * builds/vms/ftconfig.h: Synchronize. + Problem reported by Alexei. -2011-03-24 Werner Lemberg +2014-07-11 Alexei Podtelezhnikov - * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256. - This limit is given on p. 37 of Adobe Technical Note #5014. + [base] Clean up bitmap conversion. -2011-03-23 Werner Lemberg + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use + appropriate FT_DivFix and remove superfluous upscaling. - * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning. +2014-07-04 Alexei Podtelezhnikov -2011-03-20 Werner Lemberg + [base] Small optimization of the ancient code. - * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts. + * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the + condition for direct 32-bit calculations. -2011-03-19 Werner Lemberg +2014-06-27 Werner Lemberg - More C++ compilation fixes. + Fix Apple standard glyph names. - * src/autofit/afhints.c (af_glyph_hints_dump_points, - af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) - [__cplusplus]: Protect with `extern "C"'. + * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with + `tools/glnames.py' -2011-03-18 Werner Lemberg + Problem reported by Adam Twardoch . - C++ compilation fixes. +2014-06-17 Werner Lemberg - * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c - (af_cjk_hints_apply): Use cast for `dim'. + Partially revert commit from 2014-06-13. -2011-03-17 Alexei Podtelezhnikov + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move + declaration of `p_first' and `p_last' out of the loop. - A better fix for Savannah bug #32671. +2014-06-17 Werner Lemberg - * src/smooth/ftgrays.c (gray_render_conic): Clean up code and - replace WHILE loop with a more natural DO-WHILE construct. + * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/. -2011-03-16 Werner Lemberg . + This simplifies cross-compiling. - * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field. - Suggested by Graham Asher. +2014-06-13 Werner Lemberg -2011-03-09 Werner Lemberg + Fix more compiler warnings. + Reported by Wojciech Mamrak . - Make FT_Sfnt_Table_Info return the number of SFNT tables. + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Make integer constant unsigned. - * src/sfnt/sfdriver.c (sfnt_table_info): Implement it. - * include/freetype/tttables.h: Update documentation. - * docs/CHANGES: Updated. + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + : Fix types. + (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper + casts. -2011-03-07 Bram Tassyns +2014-06-13 Werner Lemberg - Fix Savannah bug #27988. + Fix compiler warnings. + Reported by Wojciech Mamrak . - * src/cff/cffobjs.c (remove_style): New function. - (cff_face_init): Use it to strip off the style part of the family - name. + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage), + src/autofit/afmodule.c (af_property_set): Fix `signed' vs. + `unsigned' issues. -2011-03-07 Werner Lemberg + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler + happy. - * docs/CHANGES: Updated. + * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements + for `fir'. + Fix `signed' vs. `unsigned' issues. -2011-03-07 Alexei Podtelezhnikov + * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused. + (WRITE_USHORT, WRITE_ULONG): Add proper casts. - Quick fix for Savannah bug #32671. + * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts. - This isn't the optimal solution yet, but it restores the previous - rendering quality (more or less). + * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1' + and `B2'. - * src/smooth/ftgrays.c (gray_render_conic): Do more splitting. +2014-05-16 Alexey Petruchik -2011-03-06 Werner Lemberg + [cmake] Add option to build OS X framework. - Fix autohinting fallback. + * CMakeLists.txt: Update accordingly. - * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs, - ignoring CFF-based OTFs. + * builds/mac/freetype-Info.plist: New file. -2011-02-27 Werner Lemberg +2014-05-13 Pavel Koshevoy - Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper. + * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'. - * devel/ftoption.h, include/freetype/config/ftoption.h - (AF_CONFIG_OPTION_USE_WARPER): New macro. - * src/autofit/aftypes.h (AF_USE_WARPER): Remove. +2014-05-11 Werner Lemberg - * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/. + [autofit] Fix variable initializations. - * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy - variable assignment with a typedef. + * src/autofit/afhints.c (af_glyph_hints_reload): Assign default + values to `in_dir' and `out_dir' for all points. -2011-02-26 Werner Lemberg +2014-05-11 Werner Lemberg - [autofit] Slight simplifications. + [autofit] Fix crash with font `CabinSketch-Bold.ttf'. - * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove - test which always returns false. - (af_latin_hints_compute_blue_edges): Remove redundant assignment. + Problem reported by Ralf S. Engelschall . -2011-02-24 Werner Lemberg + * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for + finding first non-near point. + Properly initialize non-near point deltas. - * docs/PROBLEMS: Mention rendering differences on different - platforms. - Suggested and worded by Jason Owen . +2014-05-01 Werner Lemberg -2011-02-24 Werner Lemberg + [autofit] Add blue-zone support for Devanagari. - [autofit] Comment out unused code. + 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/aflatin.c, src/autofit/aflatin2.c - (af_latin_hints_compute_edges): Do it. + * src/autofit/afblue.dat: Add blue zone data for Devanagari. -2011-02-24 Werner Lemberg + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/autofit/afhints.h (AF_GlyphHints): Remove unused field. + * src/autofit/afscript.h: Add Devanagari standard characters and + move data out of AF_CONFIG_OPTION_INDIC block. -2011-02-20 suzuki toshiya + * src/autofit/afranges.c: Move Devanagari data out of + AF_CONFIG_OPTION_INDIC block. + Move U+20B9, (new) Rupee sign, from Latin to Devanagari. - [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'. - Found by , see detail in + * src/autofit/afstyles.h: Update Devanagari data; in particular, use + AF_WRITING_SYSTEM_LATIN. - http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html +2014-05-01 Werner Lemberg - * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node - buckets[cache->p + cache->mask] too. + [autofit] Fix handling of neutral blue zones in stems. -2011-02-19 Kevin Kofler + * src/autofit/afhints.h (AF_Edge_Flags): New value + `AF_EDGE_NEUTRAL'. - Fall back to autohinting if a TTF/OTF doesn't contain any bytecode. - This is Savannah patch #7471. + * 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. - * src/base/ftobjs.c (FT_Load_Glyph): Implement it. +2014-04-28 Werner Lemberg -2011-02-19 John Tytgat + [autofit] Introduce neutral blue zones to the latin module. - [cff] Fix subset prefix removal. - This is Savannah patch #7465. + 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/cff/cffobjs.c (remove_subset_prefix): Update length after - subset prefix removal. + * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New + property. -2011-02-13 Bradley Grainger + * src/autofit/afblue.h: Regenerated. - Add inline assembly version of FT_MulFix for MSVC. + * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro. + (AF_LATIN_BLUE_NEUTRAL): New enumeration value. - * include/freetype/config/ftconfig.h: Ported the FT_MulFix_i386 - function from GNU inline assembly syntax (see #ifdef __GNUC__ block - above) to MASM syntax for Microsoft Visual C++. + * src/autofit/aflatin.c (af_latin_metrics_init_blues, + af_latin_hints_compute_blue_edges): Handle neutral blue zones. -2011-02-13 Bradley Grainger +2014-04-25 Werner Lemberg - Add project and solution files in Visual Studio 2010 format. + * src/autofit/hbshim.c: Partially revert commit from 2014-04-17. - * 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. + Using input glyph coverage data is simply wrong. -2011-02-01 Werner Lemberg + Problem reported by Nikolaus Waxweiler and + Mantas Mikulėnas . - * src/autofit/afdummy.c: Include `aferrors.h'. - Problem reported by Chris Liddell . +2014-04-23 Werner Lemberg -2011-02-01 Werner Lemberg + * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode. - [cff] Ignore unknown operators in charstrings. - Patch suggested by Miles.Lau . + This spot has been missed while introducing support for various + drop-out modes years ago (including no drop-out mode, which this + commit fixes). - * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing - message for unknown operators and continue instead of exiting with a - syntax error. + Problem reported by Patrick Thomas . -2011-02-01 Werner Lemberg +2014-04-22 Werner Lemberg - [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also. + * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/. - * 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. +2014-04-20 Werner Lemberg -2011-01-31 Werner Lemberg + [autofit] Fix Savannah bug #42148. - [truetype] Protect jump instructions against endless loops. + The adaptation of the cjk auto-hinter module to blue stringsets in + 2013-08-25 had three severe bugs. Mea culpa. - * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error - if offset is zero. + 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. -2011-01-31 Werner Lemberg + 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. - [truetype] Improve handling of invalid references. + 3. Two flag values were inverted, causing incorrect assignment of + reference and overshoot values. - * 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. + * 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. -2011-01-31 Werner Lemberg + * 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. - [truetype] Improve handling of stack underflow. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * 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. + * 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. -2011-01-30 Werner Lemberg + * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer + used. - * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message. +2014-04-17 Werner Lemberg -2011-01-30 LIU Sun-Liang + [autofit] More coverage fixes for complex scripts. - [truetype]: Fix behaviour of MIAP for invalid arguments. + * 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. - * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in - case of error. +2014-04-17 Werner Lemberg -2011-01-18 Werner Lemberg + Make `FT_Get_SubGlyph_Info' actually work. - [truetype] Fix handling of MIRP instruction. + * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok + if there is no error. - Thanks to Greg Hitchcock who explained the issue. +2014-04-15 Werner Lemberg - * 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. + [afblue.pl]: Minor improvements. -2011-01-15 suzuki toshiya + * src/tools/afblue.pl: Allow whitespace before comments. + Ignore whitespace in strings. - Fix ARM assembly code in include/freetype/config/ftconfig.h. +2014-04-14 Werner Lemberg - * include/freetype/config/ftconfig.h (FT_MulFix_arm): - Copy the maintained code from builds/unix/ftconfig.in. - Old GNU binutils could not accept the reduced syntax - `orr %0, %2, lsl #16'. Un-omitted syntax like RVCT, - `orr %0, %0, %2, lsl #16' is better. Reported by - Johnson Y. Yan. The bug report by Qt developers is - considered too. + [autofit] Improve coverage handling. - http://bugreports.qt.nokia.com/browse/QTBUG-6521 + * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs + appearing in the GPOS table if we are processing the default + coverage. -2011-01-15 Werner Lemberg +2014-04-13 David Weber - [raster] Make bbox handling the same as with Microsoft's rasterizer. + [smooth] Fix stand-alone compilation. - 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. + * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define. - Thanks to Greg Hitchcock who explained this behaviour. +2014-04-12 Werner Lemberg - * src/raster/ftrend1.c (ft_raster1_render): Implement it. + [autofit] Redesign the recognition algorithm of strong points. -2011-01-15 suzuki toshiya + In particular, local extrema without horizontal or vertical segments + are better recognized: - Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS. + + A + D + \ / + \ / + \ / + \ / + \ + C + \ / + B +/ - * 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. + 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à. -2011-01-15 suzuki toshiya + 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. - Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer. + 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. - * 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. + This generally improves the auto-hinter's rendering results. -2011-01-13 Werner Lemberg + * src/autofit/afhints.c (af_glyph_hints_reload): Implement it. - [raster] Add undocumented drop-out rule to the other bbox side also. + * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag + `AF_FLAG_NEAR'. - * src/raster/ftraster.c (Vertical_Sweep_Drop, - Horizontal_Sweep_Drop): Implement it. +2014-04-05 Werner Lemberg -2011-01-13 Werner Lemberg + [autofit] Improve scoring algorithm for identifying stems. - [raster] Reduce jitter value. + Problem reported by Karsten Lücke . - 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. + 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/raster/ftraster.c (Set_High_Precision): Implement it. + * 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. -2011-01-13 Werner Lemberg + * src/autofit/aflatin.h: Updated. + * src/autofit/afcjk.c: Updated. - [raster] Handle drop-outs at glyph borders according to Microsoft. +2014-04-03 Werner Lemberg - 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. + Don't require `gzip' module for `sfnt'. - Thanks to Greg Hitchcock who explained this behaviour. + Reported by Preet . - * src/raster/ftraster.c (Vertical_Sweep_Drop, - Horizontal_Sweep_Drop): Implement it. + * src/sfnt/sfobjs.c (woff_open_font): Guard use of + FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB. -2011-01-09 suzuki toshiya +2014-03-27 Werner Lemberg - [cache] Fix Savannah bug #31923, patch drafted by Harsha. + Fix Savannah bug #38235. - 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 + 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. - * 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. + * builds/unix/freetype2.in: Don't use doublequotes. + * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory + names with backslashes. -2011-01-09 suzuki toshiya +2014-03-24 Werner Lemberg - [cache] Notice if a cache query induced the node list change. + Fix Savannah bug #41946. - 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. + Based on a patch from Marek Kašík . - * 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. + * builds/unix/configure.raw (LIBS_CONFIG): Remove. + * builds/unix/freetype-config.in (libs): Hard-code value. + * builds/unix/unix-def.in: Updated. - * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new - FTC_Node_CompareFunc type. - (ftc_gnode_compare): Ditto. +2014-03-22 Werner Lemberg - * 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). + Another revert for the change from 2014-03-18. - * 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. + Problem reported by Nikolaus Waxweiler . - * 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/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol + gets always exported. - * 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. +2014-03-20 Werner Lemberg - * 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. + CMakeLists.txt: Another fix for include directories. -2011-01-09 suzuki toshiya + Problem reported by Taylor Holberton . - [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'. +2014-03-19 Werner Lemberg - * 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'. + CMakeLists.txt: Fix include directories. -2011-01-09 suzuki toshiya + Problem reported by Taylor Holberton . - [cache] Deduplicate the code to get the top node by a hash. +2014-03-19 Werner Lemberg - There are several duplicated code fragments getting the top node - from a cache by a given hash, like: + Partially revert last commit. - idx = hash & cache->mask; - if ( idx < cache->p ) - idx = hash & ( cache->mask * 2 + 1 ); - pnode = cache->buckets + idx; + Found by Alexei. - 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/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing + those variables is plain wrong, since we are in a loop. - * 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. +2014-03-18 Sean McBride + Werner Lemberg -2011-01-09 suzuki toshiya + Fix clang warnings. - [cache] inline-specific functions are conditionalized. + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize + some variables. - * 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/base/ftcalc.c (FT_MulFix): Only use code if + `FT_MULFIX_INLINED' is not defined. - * 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. + * 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. -2011-01-09 suzuki toshiya + * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant + code. - [cache] Correct a type mismatch under non-inlined config. +2014-03-17 Werner Lemberg - * 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'. + Fix Savannah bug #41869. -2011-01-06 suzuki toshiya + This works around a problem with HarfBuzz (<= 0.9.26), which doesn't + validate glyph indices returned by + `hb_ot_layout_lookup_collect_glyphs'. - Update Jamfile to include Bzip2 support. + * src/autofit/hbshim.c (af_get_coverage): Guard `idx'. - * 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) + * docs/CHANGES: Updated. -2011-01-05 suzuki toshiya +2014-03-14 Werner Lemberg - Update Symbian project files to include Bzip2 support. + * builds/unix/configure.raw: Don't show error messages of `which'. - Currently, it provides `FT_Stream_OpenBzip2' that returns - unimplemented error always, to prevent unresolved symbol - error for the applications designed for Unix systems. +2014-03-09 Alan Coopersmith - * builds/symbian/bld.inf: Include ftbzip2.h. - * builds/symbian/freetype.mmp: Include ftbzip2.c. + Fix cppcheck 1.64 warning. -2011-01-05 suzuki toshiya + * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer + dereference in case of error. - Update classic MacOS makefiles to include Bzip2 support. +2014-03-09 Sean McBride - Currently, it provides `FT_Stream_OpenBzip2' that returns - unimplemented error always, to prevent unresolved symbol - error for the applications designed for Unix systems. + * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning. - * 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. +2014-03-06 Werner Lemberg -2011-01-05 suzuki toshiya + * Version 2.5.3 released. + ========================= - 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. + Tag sources with `VER-2-5-3'. - * 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. + * 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/. -2011-01-05 suzuki toshiya + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. - Update pkg-config tools to reflect Bzip2 support. + * builds/unix/configure.raw (version_info): Set to 17:2:11. + * CMakeLists.txt (VERSION_PATCH): Set to 3. + * docs/CHANGES: Updated. - * builds/unix/freetype-config.in: Include `-lbz2' to - --libs output, if built with Bzip2 support. - * builds/unix/freetype2.in: Ditto. +2014-03-06 Werner Lemberg -2011-01-05 suzuki toshiya + Fixes for compilation with C++. - * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro. + * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'. + (af_get_coverage): Updated. + (COVERAGE): Add cast. - 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. +2014-03-06 Sean McBride -2011-01-03 Werner Lemberg + Remove more clang analyzer warnings. - */rules.mk: Handle `*pic.c' files. + * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c + (TT_Load_Glyph): Remove dead stores. -2010-12-31 Werner Lemberg +2014-03-05 Werner Lemberg - * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64. - Problem reported by Tom Bishop . + * builds/unix/configure.raw: Simplify. -2010-12-31 Werner Lemberg +2014-03-05 suzuki toshiya - Improve bzip2 support. + Fix a bug in configure in library dependency setting + Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652. - * include/freetype/ftmoderr.h: Add bzip2. + * builds/unix/configure.raw: Use `x"${xxx}" != xno' style. - * docs/INSTALL.ANY, docs/CHANGES: Updated. +2014-03-04 Werner Lemberg - * src/pcf/README: Updated. - * include/freetype/internal/pcftypes.h: Obsolete, removed. + Minor fix for `make devel'. -2010-12-31 Joel Klinghed + * 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). - Add bzip2 compression support to handle *.pcf.bz2 files. +2014-03-04 Sean McBride - * builds/unix/configure.raw: Test for libbz2 library. + Fix several clang static analyzer dead store warnings. - * devel/ftoption.h, include/freetype/config/ftoption.h - (FT_CONFIG_OPTION_USE_BZIP2): Define. - * include/freetype/config/ftheader.h (FT_BZIP2_H): Define. + * src/autofit/afhints.c (af_glyph_hints_reload, + af_glyph_hints_align_weak_points): Remove unnecessary assignments. - * include/freetype/ftbzip2.h: New file. + * src/bdf/bdflib.c (bdf_font_load): Ditto. - * src/bzip2/*: New files. + * src/pshinter/pshalgo.c (psh_glyph_compute_extrema, + psh_glyph_interpolate_other_points): Ditto. - * src/pcf/pcf.h: s/gzip_/comp_/. - * src/pcf/pcfdrvr.c: Include FT_BZIP2_H. - s/gzip_/comp_/. - (PCF_Face_Init): Handle bzip2 compressed files. + * src/type1/t1load.c (T1_Set_MM_Blend): Ditto. - * docs/formats.txt, modules.cfg: Updated. +2014-03-03 Werner Lemberg -2010-12-25 Harsha + Rewrite library option handling in `configure'. - Apply Savannah patch #7422. + o Introduce `auto' value for `--with-XXX' library options; this is + now the default. - 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. + o First use `pkg-config' for library detection, then fall back to + other tests. - * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with - value 255. - (ftc_snode_compare): Fix condition. + * 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. -2010-12-13 Werner Lemberg + * 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'. - Fix parameter handling of `FT_Set_Renderer'. - Reported by Kirill Tishin . + * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated. - * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'. +2014-03-01 Werner Lemberg -2010-12-09 Werner Lemberg + Avoid `long long' warnings with older gcc compilers. + Problem reported by Hin-Tak Leung . - [cff] Allow `hlineto' and `vlineto' without arguments. + * 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. - We simply ignore such instructions. This is invalid, but it doesn't - harm; and indeed, there exist such subsetted fonts in PDFs. +2014-03-01 Werner Lemberg - Reported by Albert Astals Cid . + * docs/INSTALL.CROSS: Revised and updated. - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - [cff_op_hlineto]: Ignore instruction if there aren't any arguments - on the stack. +2014-03-01 Werner Lemberg -2010-11-28 Werner Lemberg + Make `make clean' remove `freetype2.pc'. - * Version 2.4.4 released. - ========================= + This is a generated file at build time, not configure time. + * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ... + (CLEAN): This variable. - Tag sources with `VER-2-4-4'. +2014-03-01 Werner Lemberg - * docs/CHANGES: Updated. + Use pkg-config for detecting libpng and libbz2 also. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.4 + * 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. - * 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/. +2014-03-01 Werner Lemberg - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. + Add configure support for HarfBuzz. - * builds/unix/configure.raw (version_info): Set to 12:2:6. + * 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. -2010-11-28 Alexei Podtelezhnikov + * docs/INSTALL.UNIX: Document interdependency of Freetype with + HarfBuzz. - [ftsmooth]: Minor code simplification. +2014-02-28 Alexei Podtelezhnikov - * src/smooth/ftgrays (gray_render_cubic): Do only one comparison - instead of two. + [cff] Math simplifications. -2010-11-26 Johnson Y. Yan + * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'. + * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division. - [truetype] Better multi-threading support. +2014-02-28 Dave Arnold - * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone - references. + [cff] Fix Savannah bug #41697, part 2. -2010-11-23 John Tytgat + * 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. - * 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). +2014-02-28 Dave Arnold -2010-11-22 suzuki toshiya + [cff] Fix Savannah bug #41697, part 1. - [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/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'. - * 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. +2014-02-26 Werner Lemberg -2010-11-18 Werner Lemberg + [sfnt] Fix Savannah bug #41696. - [truetype] Fix `loca' handling for inconsistent number of glyphs. - Reported by Johnson Y. Yan . + * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate, + tt_cmap4_validate, tt_cmap14_validate): Fix limit tests. - * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing, - handle case where `loca' is the last table in the font. +2014-02-26 Werner Lemberg -2010-11-18 Werner Lemberg + [winfnt] Fix Savannah bug #41694. - [sfnt] Ignore all errors while loading `OS/2' table. - Suggested by Johnson Y. Yan . + * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset. - * src/sfnt/sfobjs.c (sfnt_load_face): Do it. +2014-02-26 Werner Lemberg -2010-11-18 Johnson Y. Yan + [cff] Fix Savannah bug #41693. - [type1] Fix matrix normalization. + * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array. - * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling - factor. +2014-02-26 Werner Lemberg -2010-11-18 Werner Lemberg + [bdf] Fix Savannah bug #41692. - [type1] Improve guard against malformed data. - Based on a patch submitted by Johnson Y. Yan - + bdflib puts data from the input stream into a buffer in chunks of + 1024 bytes. The data itself gets then parsed line by line, simply + increasing the current pointer into the buffer; if the search for + the final newline character exceeds the buffer size, more data gets + read. - * src/type1/t1load.c (read_binary_data): Check `size'. + 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. -2010-11-17 Werner Lemberg + * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons + stop at string ends. - [sfnt] While tracing, output table checksums also. +2014-02-17 suzuki toshiya - * src/sfnt/ttload.c (tt_face_load_font_dir): Do it. + [autofit] Fix `make multi' compilation. -2010-11-04 suzuki toshiya + * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'. - [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545. +2014-02-19 Werner Lemberg + Simon Bünzli - 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. + Fix Savannah bug #32902. - * src/base/ftobjs.c (Fix find_variant_selector_charmap): - Returns UVS cmap correctly. + Patch taken from -2010-11-01 Alexei Podtelezhnikov + https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87 - [ftsmooth] Improve rendering. + with slight modifications. - * 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 + * 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. - http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html +2014-02-19 Simon Bünzli - and later mails in this thread. + Fix Savannah bug #41590. -2010-10-28 Werner Lemberg + * src/type1/t1load.c (parse_encoding): Protect against invalid + number. - [ftraster] Minor fixes. +2014-02-12 Dave Arnold - Reported by Tom Bishop . + [cff] Optimize by using `FT_MulDiv'. + Suggested by Alexei. - * src/raster/ftraster.c (ULong): Remove unused typedef. - (TWorker): Remove unused variable `precision_mask'. + * src/cff/cf2font.c (cf2_computeDarkening): Do it. -2010-10-28 Werner Lemberg +2014-02-12 Werner Lemberg - [ftraster] Fix rendering. + Fix Savannah bug #41465. - Problem reported by Tom Bishop ; see - thread starting with + * builds/unix/unix-def.in (CLEAN): Add `freetype-config'. + (DISTCLEAN): Remove `freetype-config'. - http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html +2014-02-08 Sean McBride - * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv - since the involved multiplication exceeds 32 bits. + Fix clang static analyzer and compiler warnings. -2010-10-25 suzuki toshiya + * 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. - Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'. + * 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/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. + * src/base/ftobjs.c (ft_remove_renderer): Protect against + library == NULL. + (ft_property_do): Make function static. -2010-10-24 suzuki toshiya + * src/base/ftrfork.c: Include `ftbase.h'. - [cache] Change the hash types to FT_PtrDist. + * 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. - On LLP64 platforms (e.g. Win64), FT_ULong (32-bit) - variables are inappropriate to calculate hash values - from the memory address (64-bit). The hash variables - are extended from FT_ULong to FT_PtrDist and new - hashing macro functions are introduced. The hash - values on 16-bit memory platforms are changed, but - ILP32 and LP64 are not changed. The hash value in - the cache subsystem is not reverted to the memory - address, so using signed type FT_PtrDist is safe. + * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of + variable. - * 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. +2014-02-08 Werner Lemberg - * src/cache/ftccache.h (FTC_NodeRec): The type of the - member `hash' is changed from FT_UInt32 to FT_PtrDist. + Fix Windows build directories. - * 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. + The build target is now `windows' instead of `win32'. - * 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. + Problem reported by Nickolas George . -2010-10-24 suzuki toshiya + * builds/modules.mk: Don't use `win32' and `win16' (!) but + `windows'. - [cache] Hide internal macros incompatible with LLP64. + * builds/windows/detect.mk, builds/windows/win32-def.mk: + s/win32/windows/. - `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. +2014-02-08 Eugen Sawin - For the history of these macros, see the investigation: - http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html + Fix Savannah bug #41507. -2010-10-24 suzuki toshiya + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) + [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling. - Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist. +2014-02-08 Dave Arnold - 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. + [cff] Fix minor performance bug. - * 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. + * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone + calculations are now cached and not recomputed on each glyph. -2010-10-24 suzuki toshiya +2014-02-05 Werner Lemberg - Replace "%lx" for memory address by "%p", LLP64 platforms. + Fix problems with perl 5.8.8 as distributed with current MinGW. - 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/tools/afblue.pl: Work-around for Perl bug #63402. + (string_re): Avoid `possessive quantifiers', which have been + introduced in Perl version 5.10. - * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p". - (End_Profile) Ditto. - * src/truetype/ttinterp.c (Init_Context): Ditto. +2014-02-04 Werner Lemberg -2010-10-15 Alexei Podtelezhnikov + Fix compilation with MinGW. - Fix thinko in spline flattening. + 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. - FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL. + https://sourceforge.net/p/mingw/bugs/2024/ + https://sourceforge.net/p/mingw/bugs/2046/ - * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and - replace it everywhere with ONE_PIXEL/8. + * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW. -2010-10-13 suzuki toshiya +2014-02-04 Werner Lemberg - [raccess] Skip unrequired resource access rules by Darwin VFS. + [autofit] Minor fix. - 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/autofit/afcjk.c (af_cjk_metrics_init_widths), + src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling + of alternative standard characters. + This also fixes a compilation warning in non-debug mode. - * src/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. +2014-02-03 Werner Lemberg -2010-10-13 suzuki toshiya + [cff] Fix Savannah bug #41363. - [raccess] Grouping resource access rules based on Darwin VFS. + * 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. - 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. +2014-01-26 Werner Lemberg - * 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. + [autofit] Introduce two more slots for standard characters. -2010-10-13 suzuki toshiya + 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. - Prevent to open a FT_Stream for zero-sized file on non-Unix. + * src/autofit/afscript.h: Add more standard characters. - 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/autofit/aftypes.h: Update use of `SCRIPT' macro. + (AF_ScriptClassRec): Add members to hold two more standard + characters. + (AF_DEFINE_SCRIPT_CLASS): Updated. - * 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. + * 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. -2010-10-12 Werner Lemberg + * src/autofit/afcjk.c (af_cjk_metrics_init_widths), + src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more + standard characters. - Fix Savannah bug #31310. +2014-01-24 Werner Lemberg - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against - invalid `runcnt' values. + Fix Savannah bug #41320. -2010-10-08 Chris Liddell + * src/autofit/aflatin.c (af_latin_metrics_init_blues) + : Avoid negative index of `last'. - Fix Savannah bug #31275. +2014-01-23 Werner Lemberg - * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H. + Fix Savannah bug #41310. -2010-10-06 Werner Lemberg + * 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. - [truetype] Improve error handling of `SHZ' bytecode instruction. - Problem reported by Chris Evans . +2014-01-23 Werner Lemberg - * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'. + Fix Savannah bug #41309. -2010-10-05 Werner Lemberg + * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result + of `T1_ToFixedArray'. - Fix Savannah bug #31253. - Patch submitted by an anonymous reporter. + * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with + `t1_parse_font_matrix'. - * configure: Use `awk' instead of `sed' to manipulate output of `ls - -id'. + * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with + `t1_parse_font_matrix'. + (t42_parse_encoding): Synchronize with `t1_parse_encoding'. -2010-10-03 Werner Lemberg + * src/psaux/psobjs.c (ps_parser_load_field) , + : Properly handle result of `ps_tofixedarray'. - * Version 2.4.3 released. - ========================= +2014-01-22 Werner Lemberg + * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks. - Tag sources with `VER-2-4-3'. +2014-01-16 Werner Lemberg - * docs/CHANGES: Updated. + [autofit] Improve tracing of style coverages. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.3 + * include/internal/fttrace.h: Add `afglobal' for tracing style + coverages. - * 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/. + * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H. + (FT_COMPONENT): Define. + (af_face_globals_compute_style_coverage): Trace `gstyles' array + data. - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. +2014-01-09 Werner Lemberg - * builds/unix/configure.raw (version_info): Set to 12:1:6. + Fix Savannah bug #41158. -2010-10-03 Werner Lemberg + * builds/unix/install.mk (install): Create man page directory. - Avoid `configure' issues with symbolic links. - Based on a patch from Alexander Stohr . +2014-01-08 Chongyu Zhu - * configure: Compare directories using `ls -id'. - Check existence of `reference' subdirectory before creating it. + [arm] Fix Savannah bug #41138, part 2. -2010-10-02 Werner Lemberg + * 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'. - Fix Savannah bug #31088 (sort of). +2014-01-08 Werner Lemberg - * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64 - function entries. + [autofit] Fix Savannah bug #41138, part 1. -2010-10-02 Werner Lemberg + * src/tools/afblue.pl : Produce correct auxiliary + enumeration names for generated `#else'. - [smooth] Fix splitting of cubics for negative values. + * src/autofit/afblue.h: Regenerated. - Reported by Róbert Márki ; see - http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html. +2014-01-06 Werner Lemberg - * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko. + Add manual page for `freetype-config'. + Contributed by Nis Martensen . -2010-10-01 suzuki toshiya + * docs/freetype-config.1: New file. - Fix Savannah bug #31040. + * builds/unix/unix-def.in (mandir): Define. + * builds/unix/install.mk (install, uninstall): Handle manpage. - * src/truetype/ttinterp.c (free_buffer_in_size): Remove. - (TT_RunIns): Updated. +2014-01-05 Werner Lemberg -2010-09-20 suzuki toshiya + [autofit] Minor fixes for `afblue.pl'. - [sfnt] Make error message filling NULL names less verbose. + * src/tools/afblue.pl (aux_name): Don't use `reverse'. + : Use proper indentation for generated `#else'. - * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message - when we fill `post' names by NULL, instead of per-entry message. + * src/autofit/afblue.h: Regenerated. -2010-09-20 Graham Asher - David Bevan +2014-01-04 Werner Lemberg - [smooth] Fix and improve spline flattening. + [autofit] Fix Indic scripts. - This fixes the flattening of cubic, S-shaped curves and speeds up - the handling of both the conic and cubic arcs. + 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. - See the discussions on the freetype-devel mailing list in late - August and September 2010 for details. + * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and + AF_CONFIG_OPTION_CJK. - * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro. - (TWorker): Remove `conic_level' and `cubic_level' elements. - (gray_render_conic): Simplify algorithm. - (gray_render_cubic): New algorithm; details are given in the code - comments. - (gray_convert_glyph): Remove heuristics. + * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro. + Use it, together with AF_CONFIG_OPTION_INDIC and + AF_CONFIG_OPTION_CJK, to update. -2010-09-19 Werner Lemberg + * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated. + [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed. + Sort entries by tags. - Minor fixes. +2014-01-03 Werner Lemberg - * 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'. + [autofit] Thinko. -2010-09-19 suzuki toshiya + * src/autofit/hbshim.c (af_get_char_index): Similar to + `af_get_coverage', reject glyphs which are not substituted. - [cff] Truncate the element length at the end of the stream. - See Savannah bug #30975. +2014-01-03 Werner Lemberg - * src/cff/cffload.c (cff_index_access_element): `off2', the offset - to the next element is truncated at the end of the stream to prevent - invalid I/O. As `off1', the offset to the requested element has - been checked by `FT_STREAM_SEEK', `off2' should be checked - similarly. + [autofit] Fix handling of default coverages. -2010-09-19 suzuki toshiya + With this commit, the implementation of coverage handling is + completed. - [cff] Ignore CID > 0xFFFFU. - See Savannah bug #30975. + * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to + do. + Reject coverages which don't contain appropriate glyphs for blue + zones. - * 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. +2014-01-03 Werner Lemberg -2010-09-19 suzuki toshiya + [autofit] Fix handling of default coverages. - [cff] Make trace message in` cff_charset_load' verbose. - See Savannah bug #30975. + * 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. - * src/cff/cffload.c (cff_charset_load): Report the original `nleft' - and truncated `nleft'. +2014-01-03 Werner Lemberg -2010-09-19 suzuki toshiya + [autofit] Fix scaling of HarfBuzz shaping. - [cff] Correct `max_cid' from CID array length to max CID. - See Savannah bug #30975. + * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM. - * 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. +2014-01-03 Werner Lemberg -2010-09-19 suzuki toshiya + [autofit] Better ftgrid support. - [truetype] Sanitize the broken offsets in `loca'. - See Savannah bug #31040. + * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add + parameters `is_blue' and `blue_offset'. - * 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. +2014-01-01 Werner Lemberg -2010-09-19 suzuki toshiya + [autofit] Remove some styles. - [sfnt] Prevent overrunning in `post' table parser. - See Savannah bug #31040. + * src/autofit/afcover.h: Remove coverages for alternative fractions, + denominators, numerators, and fractions. - * 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. + * src/autofit/afstyles.h (META_STYLE_LATIN): Updated. -2010-09-17 suzuki toshiya +2014-01-01 Werner Lemberg - [truetype] Don't duplicate size->twilight structure to be freed. - See Savannah bug #31040 for detail. + [autofit] Add more styles. - * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate - FT_GlyphZoneRec size->twilight to be freed. If duplicated, - `FT_FREE' erases the duplicated pointers only and leave original - pointers. They can cause the double-free crash when the burst - errors occur in TrueType interpreter and `free_buffer_in_size' is - invoked repeatedly. + * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New + auxiliary macros; use them to define styles for Cyrillic, Greek, and + Latin. -2010-09-15 Werner Lemberg + * 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. - Make bytecode debugging with FontForge work again. + * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit + `options' parameter to 4 bits. - * src/truetype/ttinterp.c (TT_RunIns): Don't call - `free_buffer_in_size' in case of error if a debugger is active. +2014-01-01 Werner Lemberg -2010-09-14 Werner Lemberg + [autofit] Fix style assignments to glyphs. - Improve tracing messages. + * 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. - * 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. +2014-01-01 Werner Lemberg -2010-09-13 Werner Lemberg + * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/. - Fix minor issues reported by . +2014-01-01 Werner Lemberg - * 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'. + [autofit] Implement and use `af_get_char_index' with HarfBuzz. -2010-08-31 suzuki toshiya + * 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. - 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 + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use + `y_offset' to adjust `best_y'. - * 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). +2013-12-31 Werner Lemberg -2010-08-31 suzuki toshiya + [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i. - [truetype] Decrease the trace level catching the interpreter error. +2013-12-31 Werner Lemberg - * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level - showing the error when the interpreter returns with an error, - from` FT_TRACE7' to `FT_TRACE1'. + [autofit] Fix interface of `af_get_char_index'. -2010-08-30 suzuki toshiya + * 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). - [truetype] Prevent bytecode reuse after the interpretation error. + * src/autofit/hbshim.h, src/autofit/afcjk.c, + src/autofit/aflatin.c: Updated. - * src/truetype/ttinterp.c (free_buffer_in_size): New function to - free the buffer allocated during the interpretation of this glyph. - (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if - an error occurs in the bytecode interpretation. The interpretation - of invalid bytecode may break the function definitions and referring - them in later interpretation is danger. By unsetting these flags, - `fpgm' and `prep' tables are executed again in next interpretation. +2013-12-30 Werner Lemberg - This fixes Savannah bug #30798, reported by Robert Święcki. + [autofit] Don't combine multiple features into one set. -2010-08-29 Werner Lemberg + 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. - [ftraster] Pacify compiler. + * 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/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is - not used. + * src/autofit/aftypes.h: Updated. + * src/autofit/hbshim.c: Updated. -2010-08-29 Werner Lemberg +2013-12-28 Werner Lemberg - [cff] Allow SIDs >= 65000. + [autofit] Code shuffling to reduce use of cpp macros. - * 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. + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Call `af_get_coverage' unconditionally. - Problem reported by Ivan Ninčić . + * src/autofit/autofit.c: Include `hbshim.c' unconditionally. -2010-08-28 suzuki toshiya + * src/autofit/hbshim.c (af_get_coverage) + [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function. - Force hinting when the font lacks its familyname. + * src/autofit/hbshim.h: Provide function declarations + unconditionally. - In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt - stream may lack `name' table because they are not required. Hinting - for nameless fonts is safer for PDFs including embedded Chinese - fonts. Written by David Bevan, see: +2013-12-28 Werner Lemberg - http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html - http://lists.freedesktop.org/archives/poppler/2010-August/006310.html + [autofit] Add wrapper function for `FT_Get_Char_Index'. - * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by - nameless font is given, TRUE is returned to enable hinting. + Yet-to-come changes will provide HarfBuzz functionality for the new + function. -2010-08-28 suzuki toshiya + * src/autofit/hbshim.c (af_get_char_index): New function. + * src/autofit/hbshim.h: Updated. - Register yet another tricky TrueType font. + * src/autofit/afcjk.c (af_cjk_metrics_init_widths, + af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. - * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?', - a Kaishu typeface paired with `HuaTianSongTi?' by Huatian - Information Industry. + * src/autofit/aflatin.c (af_latin_metrics_init_widths, + af_latin_metrics_init_blues, af_latin_metrics_check_digits): + Updated. -2010-08-17 Teijo Kinnunen +2013-12-28 Werner Lemberg - Fix Savannah bug #30788. + [autofit] Use `global' HarfBuzz font object. - * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for - NULL too. + We now use `hb_font' instead of `hb_face' since yet-to-come changes + need this. -2010-08-10 Werner Lemberg + * src/autofit/afglobal.h: Include `hbshim.h'. + (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member + `hb_font'. - Try to fix Savannah bug #30717 (and probably #30719 too). + * 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/smooth/ftsmooth.c (ft_smooth_render_generic): Add another - overflow test for `width' and `height'. + * src/autofit/hbshim.h: Include HarfBuzz headers. -2010-08-06 Werner Lemberg + * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz + headers. + (af_get_coverage): Updated. - * Version 2.4.2 released. - ========================= +2013-12-27 Werner Lemberg + [autofit] Handle `DFLT' OpenType script for coverages. - Tag sources with `VER-2-4-2'. + * include/ftautoh.h: Document new `default-script' property. - * docs/CHANGES: Updated. + * 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. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.2 + * src/autofit/hbshim.h: Updated. - * 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/. + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Updated. - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. + * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro. - * builds/unix/configure.raw (version_info): Set to 12:0:6. + * src/autofit/afmodule.h (AF_ModuleRec): New `default_script' + member. -2010-08-06 suzuki toshiya + * src/autofit/afmodule.c (af_property_set, af_property_get): Handle + `default-script' property. + (af_autofitter_init): Updated. - Fix Savannah bug #30648. +2013-12-27 suzuki toshiya - * 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. + [ftrfork] Fix the face order difference between POSIX and Carbon. -2010-08-06 Yuriy Kaminskiy + 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. - [raster] Fix valgrind warning. + 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/raster/ftraster.c (Decompose_Curve) : Access point[0] - only if we don't hit `limit'. + * 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. -2010-08-06 suzuki toshiya +2013-12-25 Werner Lemberg - Fix Savannah bug #30658. + Fix Savannah bug #40997. - * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total - length of collected POST segments does not overrun the allocated - buffer. + * 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. -2010-08-06 Yuriy Kaminskiy +2013-12-21 Werner Lemberg - Fix conditional usage of FT_MulFix_i386. - With -ansi flag, gcc does not define `i386', only `__i386__'. + [autofit] Introduce `coverages'. - * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: - s/i386/__i386__/. + Coverages are the interface to the HarfBuzz library to acces + OpenType features for handling glyphs not addressable by the cmap. -2010-08-05 Werner Lemberg + 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. - Fix Savannah bug #30657. + 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. - * src/truetype/ttinterp.c (BOUNDSL): New macro. - Change `BOUNDS' to `BOUNDSL' where appropriate. + * devel/ftoption.h, include/config/ftoption.h + (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro. - * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of - `cvtSize'. + * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h: + New files. -2010-08-05 Werner Lemberg + * src/autofit/afscript.h: Add HarfBuzz script name tags. - Fix Savannah bug #30656. + * src/autofit/afstyles.h: Add default coverage enumeration values. - * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative - string_size. - Fix comparison. + * 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. -2010-08-05 suzuki toshiya + * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage + data. - [cff] Don't use any values in decoder after parsing error. + * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros. + (AF_SCRIPT_FALLBACK): Renamed to ... + (AF_STYLE_FALLBACK): ... this. - * src/cff/cffgload.c (cff_slot_load): Skip the evaluations - of the values in decoder, if `cff_decoder_parse_charstrings' - returns any error. + * 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. -2010-08-04 Werner Lemberg + * src/autofit/afmodule.h (AF_ModuleRec): + s/fallback_script/fallback_style/. - Fix Savannah bug #30644. + * 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/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison. + * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros. -2010-08-04 Werner Lemberg + * src/autofit/afranges.h: Update use of `SCRIPT' macro. - `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set. + * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include + `hbshim.c'. - * devel/ftoption.h: Synchronize with - include/freetype/config/ftoption.h. + * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'. + (AUTOF_DRV_H): Add `afcover.h'. -2010-08-04 suzuki toshiya + * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for + all libraries needed by FreeType. - [cff] Improve stack overflow test. +2013-12-21 Werner Lemberg - * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack - after execution of operations too. + Fix Savannah bug #40975 (sort of). -2010-07-18 Werner Lemberg + * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType + behave the same as the Windows TrueType engine for the invalid case. - Add reference counters and to FT_Library and FT_Face objects. +2013-12-21 Werner Lemberg - * include/freetype/freetype.h (FT_Reference_Face): New function. - * include/freetype/ftmodapi.h (FT_Rererence_Library): New function. + [autofit] Make PIC mode work actually. - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec, - FT_LibraryRec): New field `refcount'. + * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the + enumeration values automatically generated by including `afscript.h' + and friends. - * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle - `refcount'. - (FT_Reference_Face, FT_Reference_Library): Implement new functions. - (FT_Done_Face, FT_Done_Library): Handle `refcount'. + * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. - * docs/CHANGES: Updated. +2013-12-21 Werner Lemberg -2010-07-18 Werner Lemberg + Fix PIC linking. - * Version 2.4.1 released. - ========================= + * 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. - Tag sources with `VER-2-4-1'. + * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so + that PIC functions are compiled also. - * docs/CHANGES: Updated. +2013-12-21 Werner Lemberg - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.1. + [base] Add missing dependencies to Makefile. - * README, Jamfile (RefDoc), - builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, - builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, - builds/win32/visualc/freetype.dsp, - builds/win32/visualc/freetype.vcproj, - builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, - builds/win32/visualce/freetype.vcproj, - builds/win32/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/. + * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'. + (BASE_H): Add `basepic.h'. - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. +2013-12-20 Werner Lemberg - * builds/unix/configure.raw (version_info): Set to 11:1:5. + [autofit] Fix PIC compilation. -2010-07-17 Werner Lemberg + * src/autofit/afcjk.c (af_cjk_metrics_init_widths), + src/autofit/aflatin.c (af_latin_metrics_init_widths) + [FT_CONFIG_OPTION_PIC]: Declare `globals'. - [cff] Final try to fix `hintmask' and `cntrmask' limit check. + * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and + AF_DEFINE_STYLE_CLASS. - Problem reported by Tobias Wolf . + * src/autofit/afpic.c: Include `afglobal.h'. + (autofit_module_class_pic_init): Typo. - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Sigh. I'm apparently too silly to fix this - correctly in less than three tries. + * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS, + AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro + parameter and structure member. -2010-07-12 Werner Lemberg +2013-12-20 Werner Lemberg - * Version 2.4.0 released. - ========================= + [autofit] Introduce `styles'. + This is the new top-level structure for handling glyph input data; + scripts are now defined separately. - Tag sources with `VER-2-4-0'. + * 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. - * docs/CHANGES: Updated. + * src/autofit/afstyles.h: New file, using data from `afscript.h'. + * src/autofit/afscript.h: Updated. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.4.0. + * src/autofit/afcjk.c (af_cjk_metrics_init_widths, + af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. - * 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/. + * 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. - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4. - (FREETYPE_PATCH): Set to 0. + * 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. - * builds/unix/configure.raw (version_info): Set to 11:0:5. + * src/autofit/aflatin.c (af_latin_metrics_init_widths, + af_latin_metrics_init_blues, af_latin_metrics_scale_dim, + af_latin_hint_edges): Updated. -2010-07-12 Werner Lemberg + * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated. + (af_ltn2_uniranges): Removed. - Remove C++ warnings. + * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): + Updated. - */*: Initialize pointers where necessary to make g++ happy. + * 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. -2010-07-12 malc - Richard Henderson + * src/autofit/afranges.h: Updated. - Fix type-punning issues with C++. + * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'. - * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]: - Emulate a `typeof' operator with an inline template which uses - `static_cast'. +2013-12-19 Werner Lemberg -2010-07-11 Werner Lemberg + [autofit] Factor scripts and uniranges out of writing system files. - Fix C++ compilation issue. + * src/autofit/afranges.c, src/autofit/afranges.h: New files. - * src/tools/apinames.c (names_dump) : Fix - type of `dot' variable. + * src/autofit/afscript.h: Extend `SCRIPT' macro with more + parameters, taking data from the writing system files. -2010-07-10 suzuki toshiya + * src/autofit/aftypes.h: Updated. - Fix another case reported in Savannah bug #30373. - Permit a face for Type1, Type42 and CFF without charmap, - patch by Tor Andersson. + * 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/type1/t1objs.c (T1_Face_Init): Reset the error if it - is FT_Err_No_Unicode_Glyph_Name. - * src/type42/t42objs.c (T42_Face_Init): Ditto. - * src/cff/cffobjs.c (cff_face_init): Ditto. + * src/autofit/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. -2010-07-09 suzuki toshiya + * src/autofit/afpic.c: Updated. - Use defined macros to set {platform,encoding}_id. + * src/autofir/autofit.c: Include `afranges.c'. + * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'. - * 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. +2013-12-18 Werner Lemberg -2010-07-09 suzuki toshiya + [autofit] More code orthogonality. - Fix Savannah bug #30373. - Too serious check of errors by `FT_CMap_New' since 2010-07-04 - is fixed. Reported by Tor Andersson. + * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class' + pointer to an `AF_ScriptClass' structure with `script' index of type + `AF_Script'. + Move some code around. - * 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/autofit/afcjk.c: Include `afpic.h'. + (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, + af_cjk_hint_edges): Updated. - * 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/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/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New' - is failed by the lack of Unicode glyph name. - * src/type42/t42objs.c (T42_Face_Init): Ditto. - * src/cff/cffobjs.c (cff_face_init): Ditto. + * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated. -2010-07-09 Ken Sharp + * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): + Updated. - Make ftraster.c compile in stand-alone mode with MSVC compiler. +2013-12-18 Werner Lemberg - * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef - since there is no `inttypes.h' for MSVC. + [autofit] s/ScriptMetrics/StyleMetrics/. -2010-07-08 Werner Lemberg +2013-12-18 Werner Lemberg - Fix Savannah bug #30361. + [autofit] s/script_{metrics,hints}/style_{metrics,hints}/ - * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check. +2013-12-18 Werner Lemberg -2010-07-06 Werner Lemberg + [autofit] s/gscripts/gstyles/. - Pacify compiler. +2013-12-18 Werner Lemberg - * src/cff/cffload.c (cff_index_get_pointers): Initialize - `new_bytes'. + [autofit] s/glyph_scripts/glyph_styles/. -2010-07-05 Eugene A. Shatokhin + 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. - Fix Savannah bug #27648. +2013-12-17 Werner Lemberg - * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call - `raster_done' only if we have an outline glyph format. + [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate. -2010-07-05 Werner Lemberg +2013-12-11 Infinality - Fix Savannah bug #30030. + [truetype] Simplify logic of rendering modes. - * builds/win32/*/freetype.vcproj: Add ftxf86.c. + This patch unifies the subpixel and non-subpixel cases. -2010-07-05 Werner Lemberg + * 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. - [cff] Next try to fix `hintmask' and `cntrmask' limit check. + * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated. + (tt_loader_init): Updated. - Problem reported by malc . + * src/truetype/ttinterp.c (Ins_GETINFO): Simplify. + Updated. - * 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. +2013-12-11 Werner Lemberg -2010-07-04 suzuki toshiya + [documentation] Add section how to include FreeType header files. + Problem reported by David Kastrup . - Restrict the number of the charmaps in a rogue-compatible mode. - Fix for Savannah bug #30059. + Surprisingly, a description how to do that was completely missing in + the API reference. - * 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). + * include/freetype.h, include/ftchapters.h: New documentation + section `header_inclusion'. - * 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. +2013-12-10 Werner Lemberg - * 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. + [autofit] s/DFLT/NONE/, s/dflt/none/. -2010-07-04 Werner Lemberg +2013-12-10 Werner Lemberg - TrueType hinting is no longer patented. + [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/. - * include/freetype/config/ftoption.h, devel/ftoption.h - (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define. - (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine. +2013-12-10 Werner Lemberg - * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated. - * docs/TRUETYPE, docs/PATENTS: Removed. + [truetype] Fix scaling of vertical phantom points. -2010-07-04 suzuki toshiya + * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and + pp4.x also. - Check error value by `FT_CMap_New'. +2013-12-10 Werner Lemberg - * 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. + [truetype] Fix positioning of composite glyphs. + Problem reported by Nigel Tao . -2010-07-03 Werner Lemberg + * 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. - Make ftgrays.c compile stand-alone again. +2013-12-08 Werner Lemberg - * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'. - (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define. + * Version 2.5.2 released. + ========================= -2010-07-02 suzuki toshiya - Additional fix for Savannah bug #30306. + Tag sources with `VER-2-5-2'. - * 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. + * 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/. -2010-07-01 Werner Lemberg + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. - [truetype] Protect against code range underflow. + * builds/unix/configure.raw (version_info): Set to 17:1:11. + * CMakeLists.txt (VERSION_PATCH): Set to 2. + * docs/CHANGES: Updated. - * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow - negative IP values. +2013-12-07 Werner Lemberg -2010-07-01 Werner Lemberg + [truetype] Next round in phantom point handling. - [truetype] Add rudimentary tracing for bytecode instructions. + Greg Hitchcock provided very interesting insights into the + complicated history of the horizontal positions of the TSB and BSB + phantom points. - * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New - array. - (TT_RunIns): Trace opcodes. + * 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. -2010-06-30 Werner Lemberg +2013-12-05 Werner Lemberg - Fix Savannah bug #30263. + * builds/freetype.mk (FT_CC): Removed. Unused. - * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned - int' to avoid integer overflow. +2013-12-04 Werner Lemberg - * 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. + [sfnt] Fix handling of embedded bitmap strikes. -2010-07-01 suzuki toshiya + This corrects the commit from 2013-11-21. Problem reported by + Andrey Panov . - Initial fix for Savannah bug #30306. + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to + detect excessive bytes for bit-aligned bitmaps. - * 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. +2013-12-03 Werner Lemberg -2010-07-01 suzuki toshiya + [truetype] Remove dead code. - Additional fix for Savannah bug #30248 and #30249. + Reported by Nigel Tao . - * 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. + * include/internal/tttypes.h (TT_LoaderRec): Remove unused + `preserve_pps' field. + * src/truetype/ttgload.c (TT_Hint_Glyph): Updated. -2010-06-30 Alexei Podtelezhnikov +2013-12-03 Werner Lemberg - Minor optimizations by avoiding divisions. + [truetype] Fix phantom point handling. - * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): - Replace divisions with multiplication in comparisons. + This is a further improvement to the changes from 2013-11-06. -2010-06-29 Werner Lemberg + * 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. - Fix minor tracing issues. +2013-12-02 Werner Lemberg - * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels. + [truetype] Fix change from 2013-11-20. -2010-06-27 Werner Lemberg + Problem reported by Akira Kakuto . - [cff] Really fix `hintmask' and `cntrmask' limit check. + * 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. - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Fix thinko and handle tracing also. +2013-11-27 Werner Lemberg -2010-06-27 Werner Lemberg + [autofit] Fix use of dumping functions in `ftgrid' demo program. - Fix valgrind warning. + * 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. - * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize - `result' array. +2013-11-25 Werner Lemberg -2010-06-27 Werner Lemberg + * Version 2.5.1 released. + ========================= - [cff] Fix memory leak. - * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in - case of errors. + Tag sources with `VER-2-5-1'. -2010-06-27 Werner Lemberg + * docs/VERSION.DLL: Update documentation and bump version number to + 2.5.1. + + * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, + builds/windows/vc2005/index.html, + builds/windows/vc2008/freetype.vcproj, + builds/windows/vc2008/index.html, + builds/windows/vc2010/freetype.vcxproj, + builds/windows/vc2010/index.html, + builds/windows/visualc/freetype.dsp, + builds/windows/visualc/freetype.vcproj, + builds/windows/visualc/index.html, + builds/windows/visualce/freetype.dsp, + builds/windows/visualce/freetype.vcproj, + builds/windows/visualce/index.html, + builds/wince/vc2005-ce/freetype.vcproj, + builds/wince/vc2005-ce/index.html, + builds/wince/vc2008-ce/freetype.vcproj, + builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/. - [cff] Protect against invalid `hintmask' and `cntrmask' operators. + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. - * 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. + * builds/unix/configure.raw (version_info): Set to 17:0:11. + * CMakeLists.txt (VERSION_PATCH): Set to 1. + * docs/CHANGES, docs/release: Updated. -2010-06-26 Werner Lemberg +2013-11-23 Werner Lemberg - Fix PFR change 2010-06-24. + [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'. - * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against - invalid indices. + * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS, + TRICK_NAMES_COUNT): Updated. + (trick_names): Add family name for the two fonts. -2010-06-26 Werner Lemberg +2013-11-23 Werner Lemberg - Improve PFR tracing messages. + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo. - * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for - simple and compound glyph offsets. +2013-11-21 Werner Lemberg -2010-06-26 Werner Lemberg + [sfnt] Typo. - Fix last PFR change. + Problem reported by Hin-Tak Leung . - * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic. + * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width' + value if the font lacks an `OS/2' table. -2010-06-26 Werner Lemberg +2013-11-21 Werner Lemberg - Fix Savannah bug #30262. + [sfnt] Improve handling of buggy embedded bitmap strikes. - * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth' - arbitrarily to 100 to avoid stack exhaustion. + We are now able to successfully load `AppleMyoungJo.ttf'. + Problem reported by Hin-Tak Leung . -2010-06-26 Werner Lemberg + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph + format. - Add some memory checks (mainly for debugging). +2013-11-20 Werner Lemberg - * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error - if the frame size is larger than the stream size. + [truetype] Don't trust `maxp's `maxSizeOfInstructions'. - * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if - seeking a position larger than the stream size. + Problem reported by Hin-Tak Leung ; see -2010-06-25 Werner Lemberg + http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html - Fix Savannah bug #30261. + for details. - * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain - neither outline nor bitmap glyphs. + * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep' + tables also for setting `autohint'. -2010-06-25 Werner Lemberg + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from + `TT_Process_Composite_Glyph' for handling unreliable values of + `maxSizeOfInstructions'. - Fix Savannah bug #30254. +2013-11-16 Werner Lemberg - * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for - first offset also. + [sfnt] Fix `OS/2' table version 5 support. -2010-06-25 suzuki toshiya + We now follow the `official' announcement from Microsoft (on the + OpenType mailing list, which unfortunately hasn't a public archive). - Initial fix for Savannah bug #30248 and #30249. + * include/freetype/tttables.h (TT_OS2): + s/usLowerPointSize/usLowerOpticalPointSize/, + s/usUpperPointSize/usUpperOpticalPointSize/. - * 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. + * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct + default values. -2010-06-24 Werner Lemberg +2013-11-13 Werner Lemberg - Fix Savannah bug #30247. + * builds/unix/ft2unix.h: Remove. No longer necessary. - * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with - zero metrics. + * builds/unix/install.mk (install): Updated. -2010-06-24 Graham Asher +2013-11-13 Werner Lemberg - * 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. + Simplify header file hierarchy. -2010-06-24 Werner Lemberg + This large patch changes the header file directory layout from + `include/freetype/...' to `include/...', effectively removing one + level. Since the file `ft2build.h' is also located in `include' + (and it stays there even after installation), all FreeType header + files are now in a single directory. - */*: Use module specific error names where appropriate. + Applications that use (a) `freetype-config' or FreeType's + `pkg-config' file to get the include directory for the compiler, and + (b) the documented way for header inclusion like -2010-06-24 Werner Lemberg + #include + #include FT_FREETYPE_H + ... - Fix Savannah bug #30236. + don't need any change to the source code. - * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer - to `cmap_table'. + * include/freetype/*: Move up to... + * include/*: ... this directory. -2010-06-24 Werner Lemberg + * builds/amiga/include/freetype/*: Move up to... + * builds/amiga/include/*: ... this directory. - Fix Savannah bug #30235. + */*: Essentially do `s@/freetype/@/@' where appropriate. - * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against - invalid indices if there aren't any coordinates for indexing. + * CMakeList.txt: Simplify. + * builds/unix/freetype-config.in, builds/unix/freetype2.in: For + `--cflags', return a single directory. + * builds/unix/install.mk (install): No longer try to remove `cache' + and `internal' subdirectories; instead, remove the `freetype' + subdirectory. -2010-06-24 Werner Lemberg +2013-11-12 Werner Lemberg - [bdf]: Font properties are optional. + [truetype] Fix last `truetype' commit. - * 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'. + * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position. + Return error value. + (load_truetype_glyph): Updated. -2010-06-23 Werner Lemberg +2013-11-10 Werner Lemberg - Fix Savannah bug #30220. + * docs/CMAKE: New dummy file. - * include/freetype/fterrdef.h - (BDF_Err_Missing_Fontboundingbox_Field): New error code. +2013-11-08 Dave Arnold - * 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). + [cff] Fix for hints that touch. -2010-06-21 Werner Lemberg + * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for + finding index value of insertion point. - Fix Savannah bug #30168. +2013-11-06 Werner Lemberg - * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of - subglyphs to avoid endless recursion. + [truetype] Fix handling of phantom points in composite glyphs. + Problem reported by Nigel Tao . -2010-06-20 Werner Lemberg + This is a follow-up commit to the previous one. - Fix Savannah bug #30145. + * src/truetype/ttgload.c (load_truetype_glyph): Call + `tt_get_metrics' after loading the glyph header. - * src/psaux/psobjs.c (t1_builder_add_contour): Protect against - `outline == NULL' which might happen in invalid fonts. +2013-11-06 Werner Lemberg -2010-06-19 Werner Lemberg + [truetype] Improve emulation of vertical metrics. - Fix Savannah bug #30135. + This commit also improves the start values of vertical phantom + points. Kudos to Greg Hitchcock for help. - * 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. + * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass + `yMax' value. Replace code with fixed Microsoft definition. + (tt_get_metrics): Updated. + (TT_LOADER_SET_PP): Add explanation how to initialize phantom + points, taken from both the OpenType specification and private + communication with Greg (which will eventually be added to the + standard). + Fix horizontal position of `pp3' and `pp4'. -2010-06-15 Werner Lemberg + * src/truetype/ttgload.h: Updated. - Fix Savannah bug #30108. + * src/truetype/ttdriver.c (tt_get_advances): Updated. - * src/autofit/afglobal.c (af_face_globals_compute_script_coverage): - Properly mask AF_DIGIT bit in comparison. + * docs/CHANGES: Updated. -2010-06-11 Werner Lemberg +2013-11-05 Werner Lemberg - Fix Savannah bug #30106. + * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/. + PlatformToolSet version 110 is for VC2012. - 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. + Problem reported (with solution) by Dave Arnold . - * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that - `end_point' is not larger than `glyph->num_points'. +2013-11-05 Werner Lemberg -2010-06-11 Werner Lemberg + [truetype] Correctly reset point tags for glyph components. + Problem reported by Nigel Tao . - [cff]: Improve debugging output. + * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop. - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Implement it. +2013-11-02 Werner Lemberg -2010-06-10 Graham Asher + [truetype] Fix GETINFO opcode handling of subpixel hinting bits. - ftgrays: Speed up rendering of small cubic splines. + * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to + get info on subpixel hinting. - * 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: + * docs/CHANGES: Updated. - http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html +2013-11-02 Werner Lemberg -2010-06-09 Werner Lemberg + Fix Savannah bug #40451. - Fix Savannah bug #30082. + Simply apply the patch from the bug report. - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Protect against stack underflow. + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h: The used #pragma directives only + work with gcc versions 4.6 and higher. -2010-06-08 Werner Lemberg +2013-11-01 Werner Lemberg - Fix Savannah bug #30053. + * docs/CHANGES: Updated. - * src/cff/cffparse.c (cff_parse_real): Handle border case where - `fraction_length' has value 10. +2013-11-01 Werner Lemberg -2010-06-07 Werner Lemberg + [truetype] Minor code refactoring. - Fix Savannah bug #30052. - This bug has been introduced with commit 2415cbf3. + Two benefits: The allocated FDEF (and IDEF) array gets slightly + smaller, and the `ttdebug' demo program has access to function + numbers without additional costs. - * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect - against endless loop in case of corrupted font header data. + Fortunately, no changes to FontForge are necessary – this is the + only external TrueType debugger I know of, but others may exist and + should check the code accordingly. -2010-05-26 Werner Lemberg + * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and + `Cur_End' with a pointer to the corresponding `TT_DefRecord' + structure. - Remove unused variable. - Found by Graham. + * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF, + Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns ): + Updated. - * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused - variable `first' in first block. +2013-10-27 Werner Lemberg -2010-05-22 Werner Lemberg + [sfnt] Implement support for `OS/2' table version 5. - Fix various memory problems found by linuxtesting.org. + See - * 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'. + http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism - * 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'. + for the announcement. -2010-05-22 Werner Lemberg + * include/freetype/tttables.h (TT_OS2): Add fields + `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns + this structure only as a pointer through `FT_Get_Sfnt_Table', there + shouldn't be any ABI problems. - autofit: Remove dead code. - Suggested by Graham. + * src/sfnt/ttload.c (tt_face_load_os2): Implement it. - * src/autofit/afhints.c (af_glyph_hints_compute_inflections): - Removed. - (af_glyph_hints_reload): Remove third argument. - Update all callers. + * docs/CHANGES: Updated. -2010-05-21 Bram Tassyns +2013-10-24 Werner Lemberg - Fix Savannah bug #27987. + * README.git, docs/CHANGES, docs/INSTALL: Updated. - * src/cff/cffobjs.c (remove_subset_prefix): New function. - (cff_face_init): Use it to adjust `cffface->family_name'. +2013-10-24 John Cary -2010-05-20 Werner Lemberg + Provide cmake support. - TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'. + * CMakeLists.txt: New file. - Acroread does the same. +2013-10-23 Kenneth Miller + Werner Lemberg - * 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. + Provide support for x64 builds in Visual C++ project files. - (load_truetype_glyph): Save `loader->byte_len' before recursive - call. + * src/builds/win32: Renamed to... + * src/builds/windows: This. - * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max): - Declare it as FT_LOCAL. + * src/builds/windows/vc2010/*: Updated to handle x64 target. -2010-05-18 Hongbo Ni + * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where + appropriate. - Apply Savannah patch #7196. +2013-10-22 Werner Lemberg - * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont - index is out of range. + * src/base/md5.c, src/base/md5.h: Updated to recent version. -2010-05-11 Werner Lemberg + * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'. - * docs/formats.txt: Give pointer to PCF documentation. - Information provided by Alan Coopersmith - . + The canonical URL to get updates for this file is -2010-05-10 Ken Sharp + http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/ - Fix Savannah bug #29846. + as the author told me in private communication. - 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. +2013-10-19 Werner Lemberg - This was fixed by simply ignoring the error and carrying on. + [autofit] s/SMALL_TOP/X_HEIGHT/. - 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. + * src/autofit/afblue.dat: Updated. - 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/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top - two elements of the stack to establish unconditionally the current x - and y coordinates. + * src/autofit/aflatin.c, src/autofit/aflatin.h, + src/autofit/atlatin2.c: Updated. - Make the `flex' subroutine handling (OtherSubr 0) put the current - x,y coordinates onto the stack, instead of two dummy uninitialised - values. +2013-10-19 Werner Lemberg + + * src/autofit/afblue.dat: s/MINOR/DESCENDER/. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + +2013-10-16 Werner Lemberg + + [autofit] Add description strings to script entries. + + Currently, this is unused. + + * src/autofit/afscript.h: Do it. + * src/autofit/afglobal.c, src/autofit/afpic.c, + src/autofit/aftypes.h: Updated. + +2013-10-16 Werner Lemberg + + [autofit] Improve tracing message for extra light flag. + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it. + +2013-10-15 Chongyu Zhu + + [arm] Fix thumb2 inline assembly under LLVM. + + When using `ADD' with an immediate operand, the instruction is + actually `ADD Rd, Rn, #', that is, the maximum of the + immediate operand cannot exceed 4095. It will fail to compile with + LLVM. + + However, in GCC, due to some legacy compatibility considerations, + `ADD.W' will be automatically emitted when the immediate operand is + larger than 4095. + + * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h + (FT_MulFix_arm) [__GNUC__]: Support clang compiler. + + * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto. + +2013-10-12 Werner Lemberg + + [autofit] Improve tracing of `latin' hinter. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue + zone types. + (af_latin_metrics_scale_dim): Report scaling changes due to x height + alignment. + Report scaled stroke width and blue zone values. + +2013-10-03 Dave Arnold + + * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero. + + Note that the old code avoided using a region of the piecewise + linear function where the slope was zero. The recovery was to use a + different section of the function, which produced a different, + incorrect amount of darkening. + +2013-10-02 Darrell Bellert + + * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'. + +2013-10-02 Dave Arnold + + * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount. + + This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect + is to use a previous darkening amount when producing an unhinted, + unscaled outline. This can cause autohint samples in ftgrid and + ftview to be based on darkened CFF outlines instead of unhinted, + undarkened ones. + +2013-09-29 Dave Arnold + + Fix Savannah bug #39295. + + The bug was caused by switching to the initial hintmap (the one in + effect when `moveto' executes) just before drawing the final element + in the charstring. This ensured that the path was closed (in both + Character Space and Device Space). But if the final element was a + curve and if the final hintmap was different enough from the initial + one, then the curve was visibly distorted. + + The first part of the fix is to draw the final curve using the final + hintmap as specified by the charstring. This corrects the + distortion but does not ensure closing in Device Space. It may + require the rasterizer to automatically generate an extra closing + line. Depending on the hintmap differences, this line could be from + zero to a couple pixels in length. + + The second part of the fix covers the case where the charstring + subpath is closed with an explicit line. We now modify that line's + end point to avoid the distortion. + + Some glyphs in the bug report font (TexGyreHeros-Regular) that show + the change are: + + 25ppem S (98) + 24ppem eight (52) + 25.5ppem p (85) + + Curves at the *end* of a subpath are no longer distorted. However, + some of these glyphs have bad hint substitutions in the middle of a + subpath, and these are not affected. + + The patch has been tested with a set of 106 fonts that shipped with + Adobe Creative Suite 4, together with 756 Open Source CFF fonts from + Google Fonts. There are 1.5 million glyphs, of which some 20k are + changed with the fix. A sampling of a few hundred of these changes + have been examined more closely, and the changes look good (or at + least acceptable). + + * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing' + to indicate that we synthesize a closepath line. + + * src/cff/cf2hints.c (cf2_glyphpath_init): Updated. + (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for + `lineto' operator) and adjust hint zone. + For synthesized closing lines, use end point in first hint zone. + (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In + particular, shift the detection of zero-length lines from character + space to device space. + (cf2_glyphpath_closeOpenPath): Remove assertion. + Updated. + +2013-09-25 Werner Lemberg + + * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays. + +2013-09-25 suzuki toshiya + + [bdf, pcf] Refuse non-zero face_index. + + Suggested by Akira Tagoh, see + + http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html + + * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument' + error if the font could be opened but non-zero `face_index' is + given. + * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto. + + * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED + macro for `face_index' because it is validated later. + +2013-09-23 Werner Lemberg + + Fix Savannah bug #40090. + + * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit + 306f8c5d (from 2013-08-25) affecting this function. + +2013-09-22 Werner Lemberg + + [autofit] Disunify Cyrillic and Greek handling from Latin. + + * src/autofit/afscript.h: Add Cyrillic and Greek. + + * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK, + AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic. + (AF_BLUE_STRINGSET_LATN): Fix typo. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New + arrays. + (af_grek_script_class, af_cyrl_script_class): New scripts. + * src/autofit/aflatin.h: Updated. + +2013-09-20 Werner Lemberg + + * docs/CHANGES: Updated. + +2013-09-20 Behdad Esfahbod + + Fix vertical size of emboldened glyphs. + + Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709 + + * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY' + also. + +2013-09-11 Alexei Podtelezhnikov + + * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation + algorithm description. + +2013-09-11 Werner Lemberg + + [autofit] Improve Hebrew rendering. + + This change introduces a new blue zone property + `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short + top segments. + + * src/autofit/afblue.dat: Fix Hebrew blue strings. + Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP. + + * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro. + + * src/autofit/afblue.c, src/autofit/afblue.h: Updated. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle + `AF_LATIN_IS_LONG_BLUE'. + + * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro. + +2013-08-28 Behdad Esfahbod + + [sfnt] Fix frame access while reading WOFF table directory. + + * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame + while reading the directory entries for the whole loop. + +2013-08-29 Werner Lemberg + Behdad Esfahbod + + Implement support for WOFF containers. + + We simply synthesize a SFNT from the WOFF, create a memory stream + for the new data, and load the SFNT as usual. + + Does NOT add any API to access WOFF metadata or private blocks. + + * include/freetype/internal/tttypes.h (WOFF_HeaderRec, + WOFF_TableRec): New structures. + + * include/freetype/tttags.h (TTAG_wOFF): New macro. + + * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling + `open_face'. + + * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include + `FT_GZIP_H'. + (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for + writing to a stream. + (sfnt_stream_close, compare_offsets, woff_open_font): New functions. + (sfnt_open_font): Handle `TTAG_wOFF'. + (sfnt_init_face): Set `stream' after calling `sfnt_open_font'. + + * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling + `sfnt->init_face'. + + * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an + argument so that a changed stream survives. + Update callers. + +2013-08-28 Werner Lemberg + + [gzip] New function `FT_Gzip_Uncompress'. + + This is modeled after zlib's `uncompress' function. We need this + for WOFF support. + + * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress): + New function. + + * src/gzip/rules.mk: Rewrite to better reflect dependencies. + +2013-08-28 Werner Lemberg + + [autofit] Fix `make multi' compilation. + + * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include + `afblue.h' but `aftypes.h'. + * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'. + +2013-08-28 Werner Lemberg + + [autofit] Fix C++ compilation. + + * src/autofit/afglobal.c (af_face_globals_get_metrics), + src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c + (af_deva_script_class): Use proper casts. + +2013-08-27 Behdad Esfahbod + + * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos. + +2013-08-27 Behdad Esfahbod + + FT_Open_Face: Improve external stream handling. + + If the font's `clazz->init_face' function wants to swap to new + stream, handling of whether original stream was external could + result to either memory leak or double free. Mark externality into + face flags before calling `init_face' such that the clazz can handle + external streams properly. + + * src/base/ftobjs.c (FT_Open_Face): Move code to set + FT_FACE_FLAG_EXTERNAL_STREAM to... + (open_face): This function. + +2013-08-27 Werner Lemberg + + Remove `FT_SqrtFixed' function. + + It's no longer used. + + * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it. + +2013-08-27 Werner Lemberg + + [autofit] While tracing, report script names instead of ID values. + + * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]: + New array. + * src/autofit/afglobal.h: Updated. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths, + af_cjk_hint_edges): Use `af_script_names'. + * src/autofit/aflatin.c (af_latin_metrics_init_widths, + af_latin_hint_edges): Ditto. + +2013-08-26 Werner Lemberg + + [autofit] Report used script while hinting a glyph. + + * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c + (af_latin_hint_edges): Implement it. + +2013-08-26 Werner Lemberg + + [autofit] Add support for Hebrew script. + + * src/autofit/afblue.dat: Add blue strings for Hebrew. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/aflatin.c (af_hebr_uniranges): New array. + (af_hebr_script_class): New script. + * src/autofit/aflatin.h, src/autofit/afscript.h: Updated. + +2013-08-26 Werner Lemberg + + [autofit] Improve tracing messages. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script + ID in tracing message. + (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner + loop. + Improve tracing messages. + (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable + `num_actions' to count hinting actions. + Improve tracing messages. + + * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention + script ID in tracing message. + (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing + messages. + +2013-08-26 Werner Lemberg + + Better tracing of loaded glyphs. + + Previously, the loading of a glyph was traced at level 4, if at all. + With this change, all font loading routines emit a tracing message + at level 1, making it easier to select tracing output (for example + using F2_DEBUG="any:1 afhints:7 aflatin:7"). + + * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message. + * src/cff/cffdrivr.c (cff_glyph_load): Ditto. + * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing + messages. + * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing + message. + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. + * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message. + * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. + * src/type1/t1gload.c (T1_Load_Glyph): Ditto. + * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. + * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. + +2013-08-26 Werner Lemberg + + [autofit] Fix script selection. + + * src/autofit/afglobal.c (af_face_globals_get_metrics): Use + `AF_SCRIPT_DFLT', not value 0. + Simplify code. + + * src/autofit/afscript.h: Sort by script name. + +2013-08-26 Werner Lemberg + + [autofit] Make `dummy' hinter work as expected. + + * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling + information. + (af_dummy_hints_apply): Scale the glyphs. + +2013-08-25 Werner Lemberg + + [autofit] Make `cjk' module use blue stringsets. + + * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed. + (af_cjk_hani_blue_chars): Removed. + (AF_CJK_BLUE_TYPE_*): Removed. + (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with + AF_BLUE_STRING_MAX_LEN. + Change loops to use offsets (in file `afblue.h') into the new arrays + `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). + Instead of three dimensions (as used in the old blue string array) + we now use properties to do the same, saving one loop nesting level. + + * src/autofit/afcjk.h: Remove old enumeration values superseded by + the new data in `afblue.h'. + (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE, + AF_CJK_IS_RIGHT_BLUE): New macros, to be used in + `af_cjk_metrics_init_blues'. + (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value. + (AF_CJK_BLUE_IS_TOP): Renamed to... + (AF_CJK_BLUE_TOP): This. + (AF_CJK_MAX_BLUES): Remove. + (AF_CJKAxisRec): Updated. + +2013-08-25 Werner Lemberg + + [autofit] Typo. + + * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use + cast. + +2013-08-25 Werner Lemberg + + [autofit] Synchronize `cjk' with `latin' module (and vice versa). + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing + messages. + (af_cjk_metrics_init_blues): Don't pass blue string array as + argument but use the global array directly. + Use `outline' directly. + Update and add tracing messages. + (af_cjk_metrics_init): Simplify code. + (af_cjk_metrics_scale_dim): Improve tracing message. + (af_cjk_metrics_scale): Synchronize. + + * src/autofit/aflatin.c (af_latin_metrics_init_widths, + af_latin_metrics_init_blues): Improve and add tracing messages. + +2013-08-25 Werner Lemberg + + [autofit] Make `latin' module use blue stringsets. + + * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed. + (af_latin_blue_chars): Removed. + (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS + with AF_BLUE_STRING_MAX_LEN. + Change loops to use offsets (in file `afblue.h') into the new arrays + `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). + Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro. + + * src/autofit/aflatin.h: Remove old enumeration values superseded by + the new data in `afblue.h'. + (AF_LATIN_IS_TOP_BLUE): Updated definition. + (AF_LATIN_IS_SMALL_TOP_BLUE): New macro. + (AF_LATIN_MAX_BLUES): Remove. + (AF_LatinAxisRec): Updated. + +2013-08-25 Werner Lemberg + + [autofit] Add blue stringsets. + + * src/autofit/aftypes.h: Include `afblue.h'. + (AF_ScriptClassRec): Add `blue_stringset' field. + (AF_DEFINE_SCRIPT_CLASS): Updated. + + * src/autofit/autofit.c: Include `afblue.c'. + + * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c + (af_dflt_script_class), src/autofit/afindic.c + (af_deva_script_class), src/autofit/aflatin.c + (af_latn_script_class), src/autofit/aflatin2.c + (af_ltn2_script_class): Updated. + + * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'. + +2013-08-25 Werner Lemberg + + [autofit] Introduce data file for blue strings. + + The idea is to have a central file which gets processed by a Perl + script to create proper `.c' and `.h' files using templates. There + are two other reasons to do that: + + . The data file should be easily readable. We use UTF-8 encoding + which then gets converted to single bytes. + + . Since the number of supported scripts will increase soon, the + current usage of blue string arrays is a waste of space. Using + the Perl script it is possible to imitate jagged arrays, + defining enumeration constants as offsets into the arrays. + + This commit only adds files without changing any functionality. + + * src/autofit/afblue.dat: New data file. + * src/tools/afblue.pl: New Perl script for processing `afblue.dat'. + + * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files + for... + * src/autofit/afblue.c, src/autofit/afblue.c: New source files. + To avoid a dependency on Perl, we add them too. + +2013-08-19 Alexei Podtelezhnikov + + [base] Enable new algorithm for `BBox_Cubic_Check'. + + * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove + the old one. + Improve comments. + +2013-08-18 Werner Lemberg + + * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit. + +2013-08-18 Werner Lemberg + + Fix Savannah bug #39804. + + * builds/unix/configure.raw (LIBPNG): Define and export. + * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle + libpng. + +2013-08-17 Alexei Podtelezhnikov + + [base] Clean up BBox_Conic_Check. + + * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for + extremum at the segment ends, which are already within the bbox. + Slightly modify calculations. + +2013-08-15 Alexei Podtelezhnikov + + [base] Finish experimental (disabled) BBox_Cubic_Check implementation. + + * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve + accuracy and avoid overflows. + +2013-08-13 Alexei Podtelezhnikov + + [base] Refactor experimental (disabled) BBox_Cubic_Check. + + * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search + as the mirror image of the maximum search implemented here... + (update_max): New function. + +2013-08-06 John Tytgat + + Fix Savannah bug #39702. + + * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset + != 0'; this stronger test is mandated by the CFF specification. + Fix test for INDEX structures which have one or more empty entries + at the end. + +2013-08-05 Werner Lemberg + + Fix gcc pragmas, part 2. + + * src/truetype/ttinterp.c (TT_MulFix14_long_long, + TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been + introduced with gcc version 4.6. + +2013-08-05 Werner Lemberg + + Fix gcc pragmas. + + * src/truetype/ttinterp.c (TT_MulFix14_long_long, + TT_DotFix14_long_long): Older gcc versions don't accept diagnostic + pragmas within a function body. + +2013-08-05 Werner Lemberg + + Fix Savannah bug #39700. + + * builds/unix/ftconfig.h: Synchronize with + `include/freetype/config/ftconfig.h'. + + * builds/vms/ftconfig.h: Ditto. + Make the differences to the master `ftconfig.h' file as small as + possible for easier maintainance. + +2013-08-05 Werner Lemberg + + [autofit] Improve handling of `near' points. + + Points which are very near to each other are now marked as such. + The `weak' flag is then computed by using the `in' vector of the + first and the `out' vector of the last point of a group of near + points. + + For example, this fixes the rendering of glyph `Oslash' in + `Roboto-Thin.ttf'. + + * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'. + + * src/autofit/afhints.c (af_glyph_hints_reload): Introduce + the heuristic value `near_limit' to decide whether the current point + is near to the previous one, then set `AF_FLAG_NEAR' accordingly. + Store good `in' vector (of last non-near point) in + `last_good_in_{x,y}' and use it as an argument to + `ft_corner_is_flat' if necessary. + +2013-08-02 Werner Lemberg + + * include/freetype/ftcffdrv.h: Improve documentation. + This is based on blog entries from David Lemon and Dave Arnold (both + from Adobe) with kind permission. Dave also helped in + proof-reading. + +2013-08-02 Werner Lemberg + + [autofit] Move declaration of scripts into separate file. + + This has the benefit that we don't need to duplicate the data at + different places. + + * src/autofit/afscript.h: New file. + + * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define + the enumeration values. + + * src/autofit/afglobal.c: Include `afscript.h' to get the script + specific header files. + (af_script_classes): Include `afscript.h' to fill this array. + + * src/autofit/afpic.c: Include `afscript.h' to get the script + specific header files. + (autofit_module_class_pic_init): Include `afscript.h' for + initialization. + * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT, + AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead. + + * src/autofit/rules.mk (AUTOF_DRV_H): Updated. + +2013-08-02 Werner Lemberg + + [autofit] Move declaration of writing systems into separate file. + + This has the benefit that we don't need to duplicate the data at + different places. + + * src/autofit/afwrtsys.h: New file. + + * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to + define the enumeration values. + + * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing + system specific header files. + Include `afpic.h'. + (af_writing_system_classes): Include `afwrtsys.h' to fill this + array. + + * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing + system specific header files. + (autofit_module_class_pic_init): Include `afwrtsys.h' for + initialization. + * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT, + AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use + `AF_WRITING_SYSTEM_MAX' instead. + +2013-08-02 Werner Lemberg + + [sfnt] Fix compilation with g++. + + * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use + cast. + (Load_SBit_Png): Pacify compiler. + +2013-08-02 suzuki toshiya + Werner Lemberg + + [autofit] Fix `make multi'. + + * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY, + FT_LOCAL_ARRAY_DEF): New macros. + + * src/autofit/afglobal.c (af_writing_system_classes, + af_script_classes): Use FT_LOCAL_ARRAY_DEF. + * src/autofit/afglobal.h: Declare `af_writing_system_classes' and + `af_script_classes'. + * src/autofit/afloader.c: Include `afpic.h'. + +2013-08-01 Werner Lemberg + + Another round of cppcheck nitpicks. + + The call was (from the top-level of the FreeType tree): + + cppcheck --force \ + --enable=all \ + -I /usr/include \ + -I /usr/local/include \ + -I /usr/lib/gcc/i586-suse-linux/4.7/include \ + -I include \ + -I include/freetype \ + -I include/freetype/config \ + -I include/freetype/internal \ + -DFT2_BUILD_LIBRARY \ + . &> cppcheck.log + + using cppcheck git commit f7e93f99. + + Note that cppcheck still can't handle `#include FOO' (with `FOO' a + macro). + + */* Improve variable scopes. + */* Remove redundant initializations which get overwritten. + + * src/gxvalid/*: Comment out redundant code or guard it with + FT_DEBUG_LEVEL_TRACE. + +2013-07-30 Werner Lemberg + + [autofit] Introduce `writing systems'. + + This patch adds a new top level to the auto-hinter's script class + hierarchy. It defines `writing systems' which can contain multiple + scripts. + + For example, the `latin' writing system (in file `aflatin.c') is + able to support scripts like Latin, Cyrillic, Armenian, etc., which + can be handled similarly. + + Scripts are now named using four-letter OpenType tags. + + * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members + to... + (AF_WritingSystemClassRec): This new structure. It holds pointers + to functions which can be shared among related scripts. + (AF_WritingSystem): New enumeration. + (AF_Script): Revised values using four-letter tags. + (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro. + (AF_DEFINE_SCRIPT_CLASS): Updated. + + * src/autofit/afglobal.c (af_writing_system_classes): New global, + constant array. + (af_script_classes): Updated. + (af_face_globals_free): Updated. + Remove assertion. + (af_face_globals_get_metrics): Updated. + + * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK) + [!AF_CONFIG_OPTION_CJK]: Handle this case. + + * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): + Updated. + + * src/autofit/afpic.c (autofit_module_class_pic_init): Updated; + initialize structures for both writing systems and scripts. + * src/autofit/afpic.h: Updated. + (AF_WRITING_SYSTEM_CLASSES_GET): New macro. + + * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing + system. + (af_cjk_uniranges): Renamed to... + (af_hani_uniranges): This. + (af_cjk_script_class): Reduced and renamed to... + (af_hani_script_class): This. + * src/autofit/afcjk.h: Updated. + + * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing + system. + (af_dummy_script_class): Reduced and renamed to... + (af_dflt_script_class): This. + * src/autofit/afdummy.h: Updated. + + * src/autofit/afindic.c (af_indic_writing_system_class): New writing + system. + (af_indic_uniranges): Renamed to... + (af_deva_uniranges): This. + (af_indic_script_class): Reduced and renamed to... + (af_deva_script_class): This. + * src/autofit/afcjk.h: Updated. + + * src/autofit/aflatin.c (af_latin_writing_system_class): New writing + system. + (af_latin_uniranges): Renamed to... + (af_latn_uniranges): This. + (af_latin_script_class): Reduced and renamed to... + (af_latn_script_class): This. + * src/autofit/aflatin.h: Updated. + + * src/autofit/aflatin2.c (af_latin2_writing_system_class): New + writing system. + (af_latin2_uniranges): Renamed to... + (af_ltn2_uniranges): This. + Synchronize ranges with `latin'. + (af_latin2_script_class): Reduced and renamed to... + (af_ltn2_script_class): This. + * src/autofit/aflatin2.h: Updated. + +2013-07-30 Werner Lemberg + + [autofit] Variable renaming. + + * src/autofit/aftypes.h (AF_ScriptMetricsRec): + s/clazz/script_class/. + Update all users. + +2013-07-30 suzuki toshiya + + Ignore libpng-config under cross-building configuration, + because it will return the flags for the hosting environment. + + * builds/unix/configure.raw: Ignore libpng-config when + `cross_compiling' == yes. + +2013-07-30 Behdad Esfahbod + + Prevent division by zero by a transparent color. + + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): + Return 0 immediately, when alpha channel is zero. + +2013-07-25 Behdad Esfahbod + + Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. + + Also disambiguate Google's color bitmap tables. + + * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR): + New macros. + + * include/freetype/internal/tttypes.h (TT_SbitTableType): Add + TT_SBIT_TABLE_TYPE_CBLC. + + * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR. + + * src/sfnt/ttsbit.c (tt_face_load_sbit, + tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle + TT_SBIT_TABLE_TYPE_CBLC. + +2013-07-24 suzuki toshiya + + [sfnt] Fix for `make multi' target. + + * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF(). + +2013-07-20 Werner Lemberg + + * docs/INSTALL.GNU: Updated. + +2013-07-20 Behdad Esfahbod + + [sfnt] Fix `sbix' table version handling. + + * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]: + USHORT version numbers are to be considered as `minor'. + +2013-07-19 Werner Lemberg + + [autofit] Fix segment classification for blue zones. + + The old code (essentially unchanged since the very beginning) + incorrectly handled this configuration + + x -o- x + / \ + / \ + / \ + o o + + as flat and this + + o o + / / + x| x| + | | + o---------------o + + as round. (`o' and `x' are on and off points, respectively). + + This is a major change which should improve the rendering results + enormously for many TrueType fonts, especially in the range approx. + 20-40ppem, fixing the appearance of many overshoots. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the + first and last points of the segment, not the points right before + and after. + +2013-07-19 Behdad Esfahbod + + [sfnt] `sbix' fix-ups. + + * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps + are rendered scaled and then the `glyf' outline rendered on top. We + don't support that yet, so just ignore the `glyf' outline and + advertise it as a bitmap-only font. + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units. + (tt_face_load_sbix_image): Typo. + +2013-07-18 Behdad Esfahbod + + [sfnt] Add support for Apple's `sbix' color bitmap table. + + * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen + fields to FT_Short and FT_UShort, respectively. + (TT_SBitTableType): New enumeration. + (TT_FaceRec): Add `sbit_table_type' field. + + * include/freetype/tttags.h (TTAG_sbix): New macro. + + * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic + FT_GlyphSlot argument instead FT_Bitmap. + Add flag to control map and metrics handling. + Update all users. + + * src/sfnt/ttsbit.c: Include `ttmtx.h'. + (tt_face_load_eblc): Renamed to... + (tt_face_load_sbit): This. + Handlic `sbix' bitmaps. + (tt_face_free_eblc): Renamed to... + (tt_face_load_sbit): This. + Updated. + (tt_face_load_strike_metrics): Handle `sbix' bitmaps. + (tt_face_load_sbix_image): New function. + (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image, + tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, + tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, + tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass + and handle load flags. + (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better + handle formats 17-19. + Move color to grayscale conversion to... + (tt_face_load_sbit_image): Here. + Handle `sbix' bitmaps. + + * src/sfnt/pngshim.h: Updated. + * src/sfnt/ttsbit.h: Updated. + * src/sfnt/sfdriver.c: Updated. + +2013-07-18 Werner Lemberg + + [sfnt] Ignore invalid magic number in `head' or `bhed'. + + Other font engines seem to ignore it also. Problem reported by + Hin-Tak Leung . + + * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if + we have an invalid magic number. + +2013-07-16 Werner Lemberg -2010-04-14 Ken Sharp + [smooth] Fix segfault caused by previous commit. - Fix Savannah bug #29444. + * src/smooth/ftgrays.c (gray_set_cell): Always compute + `ras.invalid'. - * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid) - `lineto' immediately after `hsbw', in accordance with Acrobat, GS, - and others. +2013-07-16 David Turner -2010-04-14 Michał Cichoń + [smooth] Improve performance. - Fix Savannah bug #27999. + Provide a work-around for an ARM-specific performance bug in GCC. + This speeds up the rasterizer by more than 5%. - * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove - selected entry, not all. + Also slightly optimize `set_gray_cell' and `gray_record_cell' (which + also improves performance on other platforms by a tiny bit (<1%). -2010-04-06 Jonathan Kew + * src/smooth/ftgrays.c (FT_DIV_MOD): New macro. + Use it where appropriate. - Add overflow check to `fvar' table. + (gray_record_cell, gray_set_cell, gray_move_to, + gray_convert_glyph_inner): Streamline condition handling. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance - count. +2013-07-16 David Turner -2010-04-05 Ken Sharp + [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14. - Fix Savannah bug #29335. + This patch provides slightly optimized versions for ARM, x86, and + x86_64 CPUs if built with GCC. - * src/raster/ftraster.c (Line_Up): Use slow multiplication to - prevent overflow. This shouldn't have any serious impact on speed, - however. + Also remove some dead code. -2010-04-05 Werner Lemberg + * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long, + TT_DotFix14_long_long): New functions. - Add new function `FT_Library_SetLcdFilterWeights'. +2013-07-16 David Turner - This is based on code written by Lifter - . It fixes - FreeDesktop bug #27386. + Optimize FT_MulFix for x86_64 GCC builds. - * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New - function. + This patch provides an optimized `FT_MulFix' implementation for + x86_64 machines when FreeType is built with GCC, or compatible + compilers like Clang. + + Example: + bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf + + Before: + + Load 4.863 us/op + Load_Advances (Normal) 4.816 us/op + Load_Advances (Fast) 0.028 us/op + Render 2.753 us/op + Get_Glyph 0.463 us/op + Get_CBox 0.077 us/op + Get_Char_Index 0.023 us/op + Iterate CMap 13.898 us/op + New_Face 12.368 us/op + Embolden 0.028 us/op + Get_BBox 0.302 us/op + + After: + + Load 4.617 us/op + Load_Advances (Normal) 4.645 us/op + Load_Advances (Fast) 0.027 us/op + Render 2.789 us/op + Get_Glyph 0.460 us/op + Get_CBox 0.077 us/op + Get_Char_Index 0.024 us/op + Iterate CMap 13.403 us/op + New_Face 12.278 us/op + Embolden 0.028 us/op + Get_BBox 0.301 us/op + + * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h + (FT_MulFix_x86_64): New function. + +2013-07-16 David Turner + + Speed up ARMv7 support. + + When building for ARMv7 with thumb2 instructions, the optimized + `FT_MulFix_arm' assembly routine was not being used. + + The reason for this is in the `ftconfig.h' header, namely: + + - The assembly routine uses the `smull' instruction which is not + available when generating Thumb-1 machine code. It is available + in Thumb-2 mode, though. + + - The header was written a long time ago before Thumb-2 became + widely popular (e.g. with Android). So it simply doesn't use the + assembly routine if the `__thumb__' built-in macro is defined. + + - When compiling in Thumb-2 mode, the compiler will define both + `__thumb__' and `__thumb2__'. + + By checking for `(__thumb2__ || !__thumb__)', we ensure that the + assembly routine is only avoided when generating Thumb-1 code. - * include/freetype/ftlcdfil.h: Updated. + Given that this is performance-sensitive function, this improves + `ftbench' as follows on a Galaxy Nexus: + + Before (us/op) After (us/op) + + - loading Arial.ttf glyphs at 14 ppem [1] + + Load 34.285 33.098 + + - same operation with the light auto-hinter [2] + + Load 31.317 29.590 + + - same operation without hinting [3] + + Load 6.143 5.376 + + - loading Arial.ttf advances at 14 ppem [4] + + Load_Advances (normal) 34.216 33.016 + Load_Advances (fast) 0.176 0.176 + + [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf + [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf + [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf + [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf + + * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h + (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7. + +2013-06-28 Werner Lemberg * docs/CHANGES: Updated. -2010-04-01 John Tytgat +2013-06-27 Werner Lemberg + + * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard. + +2013-06-25 Werner Lemberg + + [cff] Add darkening limit to `darkening-parameters'. + + * src/cff/cffdrivr.c (cff_property_set): Add check. + +2013-06-25 Werner Lemberg + + [cff] Add `darkening-parameters' property. + + * include/freetype/ftcffdrv.h: Document it. + + * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle + `darkening-parameters' property. + + * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array. + + * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams' + argument and use it. + Update all callers. + + * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy + `darken_params' values. + + * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array. + + * src/cff/cffobjs.c (cff_driver_init): Set default values for + `darken_params'. + +2013-06-25 Werner Lemberg + + [docmaker] Code shuffling. + + * src/tools/docmaker/tohtml.py (re_url): Move regexp... + * src/tools/docmaker/sources.py: ... to this file. + +2013-06-25 Werner Lemberg + + [docmaker] Remove unused functions. + + * src/tools/docmaker/content.py (DocMarkup.get_start, + DocBlock.get_markup_name): Removed. + * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code, + HtmlFormatter.make_html_words): Removed. + +2013-06-25 Werner Lemberg + + * builds/freetype.mk (dll): Remove target. + + Problem reported by Jörg Günnewig . + +2013-06-25 Werner Lemberg + + [docmaker] Recognise URLs. + + * src/tools/docmaker/tohtml.py (re_url): New regular expression. + (make_html_para): Use it. + +2013-06-19 Werner Lemberg + + * Version 2.5.0.1 released. + =========================== + + + Tag sources with `VER-2-5-0-1'. + + * include/freetype/config/ftoption.h: Undefine + CFF_CONFIG_OPTION_OLD_ENGINE. + * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE. + +2013-06-19 Werner Lemberg + + * builds/unix/install.mk (install): Don't create `cache' directory. + + Found by Peter Breitenlohner . + +2013-06-19 Werner Lemberg + + * Version 2.5.0 released. + ========================= + + + Tag sources with `VER-2-5-0'. + + * docs/VERSION.DLL: Update documentation and bump version number to + 2.5.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/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, + builds/win32/visualc/freetype.dsp, + builds/win32/visualc/freetype.vcproj, + builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, + builds/win32/visualce/freetype.vcproj, + builds/win32/visualce/index.html, + builds/wince/vc2005-ce/freetype.vcproj, + builds/wince/vc2005-ce/index.html, + builds/wince/vc2008-ce/freetype.vcproj, + builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/. + + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5. + (FREETYPE_PATCH): Set to 0. + + * builds/unix/configure.raw (version_info): Set to 16:2:10. + + * src/base/ftobjs.c (FT_Open_Face): Pacify compiler. + * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto. + +2013-06-18 Werner Lemberg + + Fix Savannah bug #39269. + + * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in + case of reacollocation failures. + +2013-06-18 Andrew Church + + Fix Savannah bug #39266. + + If memory allocations fail at certain points while opening a font, + FreeType can either crash due to a NULL dereference or leak memory. + + * include/freetype/internal/ftobjs.c (FT_Face_InternalRec, + FT_LibraryRec): Make `refcount' a signed integer. If, for example, + FT_Open_Face() fails in a memory allocation before the face's + reference count is set to 1, a subsequent `FT_Done_Library' call + would otherwise loop over `FT_Done_Face' 2^32 times before freeing + the face. + + * src/base/ftobjs.c (open_face): Initialize `stream' and friends + earlier. + (FT_Open_Face) : Behave correctly if `node' is NULL. + (FT_Destroy_Module) : Check that `renderer_clazz' is valid. + +2013-06-14 Werner Lemberg + + * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC. + +2013-06-06 Dave Arnold + Werner Lemberg + + [cff] Add code to Adobe's engine to handle ppem > 2000. + + * src/cff/cffgload.c (cff_slot_load): If we get + FT_Err_Glyph_Too_Big, retry unhinted and scale up later on. + +2013-06-12 Werner Lemberg + + Another try on pragmas. + + * include/freetype/internal/ftdebug.h: Move pragmas to... + * include/freetype/internal/internal.h: ... this file since it gets + included by all source files. + * include/freetype/internal/ftserv.h: Remove pragma which has no + effect. + +2013-06-12 Werner Lemberg + + * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127. + + This partially undoes commit 3f6e0e0c. + +2013-06-12 Werner Lemberg + + More compiler warning fixes. + + */*: Use cast to `FT_Bool' (or `Bool') where appropriate. + +2013-06-10 Werner Lemberg + + [truetype] Improve handling of broken sbit advance widths. + + * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled) + `linearHoriAdvance' if the sbit's `horiAdvance' value is zero. + + Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem. + +2013-06-10 Werner Lemberg + + [sfnt] Improve embedded bitmap tracing. + + * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding + bitmap strike match to... + (FT_Match_Size): This function. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics, + tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, + tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, + tt_sbit_decoder_load_image): Decorate with tracing messages. + +2013-06-10 Werner Lemberg + + Fix Savannah bug #39160. + + * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too + for the degenerate case. + +2013-06-09 David Turner + + * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush. + + This code, present since eight(!) years in the unused `CACHE' + branch, has been forgotten to apply to the master branch. It's + really amazing that noone has ever complained since + `FTC_Manager_Reset' is pretty useless without flushing the cache. + +2013-06-07 Werner Lemberg + + Add and improve pragmas for MSVC compiler. + + * include/freetype/internal/ftdebug.h: Remove pragmas. + * include/freetype/internal/ftserv.h: Use push and pop for pragmas. + * include/freetype/internal/ftvalid.h: Handle warning C4324. + * src/base/ftobjs.c: Use push and pop for pragmas. + * src/gzip/ftgzip.c: Handle warning C4244. + +2013-06-07 Werner Lemberg - Fix Savannah bug #29404. + [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/. - * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1 - of `head' table of TrueType fonts). + * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it. -2010-03-14 suzuki toshiya +2013-06-06 Dave Arnold - Fix `multi build' for Tytgat's CFF driver improvement. + [cff] Add early exit feature for width-only calls. - * src/base/cffload.h (cff_index_get_name): Added. + This is for `FT_Get_Advance'. -2010-03-12 suzuki toshiya + There are 7 places where the spec says the width can be defined: - Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c. + hstem/hstemhm + vstem/vstemhm + cntrmask/hintmask + hmoveto + vmoveto + rmoveto + endchar - * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'. + * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls, + if possible. -2010-03-11 Chris Liddell + (cf2_interpT2CharString) , , + , , , + , : Exit early for width-only calls. - Fix Savannah bug #27442. +2013-06-06 Werner Lemberg - * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'. + Next round of compiler fixes. -2010-03-09 Werner Lemberg + * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init): + Add proper cast. + * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix + cast. + * include/freetype/internal/ftstream.h: Decorate stream and frame + macros with `FT_Long' and `FT_ULong' as appropriate. + + * src/base/ftrfork.c (raccess_guess_darwin_hfsplus, + raccess_guess_darwin_newvfs): Use cast. + + * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast. + + * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast. + * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto. + + * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast. + * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto. + * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto. + + * src/cid/cidparse.c (cid_parser_new): Use cast. + + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast. + + * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type. + + * src/raster/ftraster.c (ft_black_reset): Use cast. + + * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast. + (ALL_POINTS): Fix cast. + + * src/type1/t1driver.c (t1_ps_get_font_value): Add casts. + * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast. + +2013-06-05 Dave Arnold + + Fix more MSVC Win32 compiler warnings. + + * src/base/ftobjs.c: Fix typo in MS pragma. + + * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property): + `lineno' is only used in debug mode. + + * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in + debug mode. + +2013-06-05 Werner Lemberg + + Fix compiler warnings. + + * include/freetype/internal/ftmemory.h: Decorate memory allocation + macros with `FT_Long' where appropriate. + Remove duplicate of FT_MEM_QRENEW_ARRAY definition. + + * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use + cast. + + * src/base/ftobjs.c: Add warning disabling pragma for MSVC while + including `md5.c'. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Add + cast. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts. + (tt_sbit_decoder_load_bitmap): Beautification. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize + variables (earlier). + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants + where appropriate. + + * src/type1/t1load.c (T1_Get_MM_Var): Ditto. + +2013-06-04 Werner Lemberg + + * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'. + + Problem reported by Ingmar Sittl . + +2013-06-04 Werner Lemberg + + Apply fixes for cppcheck nitpicks. + + http://cppcheck.sourceforge.net/ + + The call was (from the top-level of the FreeType tree): + + cppcheck --force \ + --enable=all \ + -I include \ + -I include/freetype/ \ + -I include/freetype/config/ \ + -I include/freetype/internal/ \ + . &> cppcheck.log + + Note that the current version heavily chokes on FreeType, delivering + many wrong results. I will report those issues to the cppcheck team + so that a newer version gives improved results hopefully. + + */* Improve variable scopes. + */* Remove redundant initializations which get overwritten. + + * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable): Remove unused variable. - Reported by Graham. - - * src/cff/cffparse.c (cff_parse_real): Remove `rest'. - -2010-03-02 John Tytgat - - 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/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero. - * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we - call FT_Get_Next_Char anyway if necessary. + * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): + Remove functionless code. -2010-02-26 Behdad Esfahbod + * src/tools/ftrandom.c (main): Fix memory leak. - Improve handling of invalid glyph indices in char->index functions. +2013-06-03 Werner Lemberg - * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a - loop. + Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option. + + This controls whether the old FreeType CFF engine gets compiled into + FreeType. It is now disabled by default. + + * devel/ftoption.h, include/freetype/config/ftoption.h + (CFF_CONFIG_OPTION_OLD_ENGINE): New macro. + + * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c + (CFF_Operator, cff_argument_counts, cff_builder_add_point, + cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load), + src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use + CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code. + + * docs/CHANGES: Updated. + +2013-06-02 Werner Lemberg + + Fix PNG library handling. -2010-02-18 Chris Liddell + * builds/unix/configure.raw: Don't use LIBPNG_LIBS but + LIBPNG_LDFLAGS. - Fix Savannah bug #28905. +2013-05-23 Behdad Esfahbod - Initialize phantom points before calling the incremental interface - to update glyph metrics. + Add support for color embedded bitmaps (eg. color emoji). - * src/truetype/ttgload.c (tt_get_metrics_incr_overrides) - [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from... - (tt_get_metrics): This. + A new load flag, FT_LOAD_COLOR, makes FreeType load color + embedded-bitmaps, following this draft specification + + https://color-emoji.googlecode.com/git/specification/v1.html + + which defines two new SFNT tables, `CBDT' and `CBLC' (named and + modeled after `EBDT' and `EBLC', respectively). The color bitmaps + are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA + pre-multiplied sRGB images. If PNG support is available, PNG color + images as defined in the same proposed specification are supported + also. + + Note that color bitmaps are converted to grayscale if client didn't + ask for color. + + * builds/unix/configure.raw: Search for libpng. + Add `--without-png' option. + + * devel/ftoption.h, include/freetype/config/ftoption.h + (FT_CONFIG_OPTION_USE_PNG): New macro. + + * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag. + + * include/freetype/ftimage.h (FT_Pixel_Mode): Add + `FT_PIXEL_MODE_BGRA'. + + * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags. + + * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated. + (ft_gray_for_premultiplied_srgb_bgra): New function. + (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA. + + * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files. + + * src/sfnt/sfnt.c: Include `pngshim.c'. + + * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h' + (tt_face_load_eblc): Load `CBLC'. + (tt_sbit_decoder_init): Load `CBDT'. + (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between + color and grayscale bitmaps. + Set `num_grays'. This is used by `ftview' to choose the blending + algorithm. + (tt_sbit_decoder_load_byte_aligned, + tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, + tt_sbit_decoder_load_image): Pass load flag. + s/write/pwrite/. + Don't call `tt_sbit_decoder_alloc_bitmap'. Updated. - (load_truetype_glyph): Use tt_get_metrics_incr_overrides. + (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function. + (tt_sbit_decoder_load_bitmap): Pass load flag. + Handle new glyph formats 17, 18, and 19. + Call `tt_sbit_decoder_alloc_bitmap'. + Flatten color bitmaps if necessary. + (tt_face_load_sbit_image): Updated. + + * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'. + + * docs/CHANGES: Updated. + +2013-05-24 Guenter + + Apply Savannah patch #8055. + + Make `apinames' create an import file for NetWare. + + * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2. + (OutputFormat): Add `OUTPUT_NETWARE_IMP'. + (names_dump): Handle it. + (usage): Updated. + (main): Handle new command line flag `-wN'. + +2013-05-23 Behdad Esfahbod + + Compilation fix. + + * src/truetype/ttinterp.c (TT_RunIns) + [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work. + +2013-05-22 Infinality + + [truetype] Formatting and an additional subpixel tweak. + + * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix. + * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): + Revert previous modification for Verdana clones. + +2013-05-22 Infinality + + [truetype] Adjust subpixel zp2 moves and tweak rules. + + These modifications fix thin diagonal stems in some legacy fonts. + + * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro. + (Move_Zp2_Point): Don't always disable x moves for subpixel rendering. + (Ins_SHP): Disable x moves here for subpixel rendering. + (Ins_SHPIX): Only disable x moves in compatibility mode. + Split out zp2 move reversals and reorder conditional respectively. + + * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight. + Only adjust Verdana clones for 17 ppem. + (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New. + (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'. + +2013-05-20 Infinality + + [truetype] Simplify and improve subpixel function detection. + + Some small enhancements have allowed the removal of many macros and + the simplification of existing rules in `ttsubpix.c'. + + * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX, + SPH_TWEAK_ALLOW_X_MOVE_ZP2, + SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES, + SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed. + (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro. + + * src/truetype/ttsubpix.c: Updated affected rules. + + * src/truetype/ttinterp.c (Direct_Move_X): Updated. + (INS_FDEF): Add additional function detection. + (INS_ENDF): Set runtime flag. + (Ins_CALL): Skip the call under certain conditions. + Remove bad code. + (Ins_LOOPCALL): Skip the call under certain conditions. + Remove bad code. + (Move_Zp2_Point): Updated. + (Ins_SHPIX): Updated. + Skip the move under some situations. + (Ins_MIAP): Improve conditions. + (Ins_MIRP): Updated. + (Ins_DELTAP): Skip move under certain conditions. + Simplify conditions. + (TT_RunIns): Updated. + Add code to handle new function detection. + Trace messages. + +2013-05-17 Werner Lemberg + + Update more FT_Err_XXX macros using FT_ERR and FT_THROW; + + * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c, + builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it. + +2013-05-15 Werner Lemberg + + [truetype] Add `interpreter-version' property. + + This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable + at runtime. + + * include/freetype/ftttdrv.h: New file. + + * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New + macro. + + * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H. + (tt_property_set, tt_property_get): Fill templates. + + * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version' + member. + Remove unused `extension_component' member. + + * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H. + (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph, + compute_glyph_metrics, tt_loader_init): Use `interpreter_version'. + + * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H. + (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag. + Update all affected functions to use it. + Use TT_INTERPRETER_VERSION_XXX where appropriate. + + * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H. + (tt_driver_init): Initialize `interpreter_version'. + + * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H. + Use TT_INTERPRETER_VERSION_XXX where appropriate. + +2013-05-13 Werner Lemberg + + [truetype] Avoid empty source file. + + * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: + Provide dummy typedef. + +2013-05-13 Werner Lemberg + + * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable. + + Fix suggested by Vaibhav Nagarnaik . + +2013-05-13 Brian Nixon + + Fix Savannah bug #38970. + + * src/base/ftdebug.c, builds/win32/ftdebug.c, + builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c + (ft_debug_init): Don't read past the environment variable FT2_DEBUG. + +2013-05-12 Werner Lemberg + + [truetype] Add framework for TrueType properties. + + * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H. + (tt_property_set, tt_property_get): New functions, still empty. + Define `tt_service_properties' service. + Update `tt_services'. + + * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H. + (TT_SERVICE_PROPERTIES_GET): New macro. + (TTModulePIC): Add `tt_service_properties'. + +2013-05-12 Werner Lemberg + + Fix Savannah bug #38967. + + * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast. + +2013-05-12 Werner Lemberg + + Introduce unsigned 64bit type (if available). + + * include/freetype/config/ftconfig.h: Define FT_UINT64 if available. + [FT_LONG64]: Provide FT_UInt64. + + * builds/unix/ftconfig.in: Synchronized. + +2013-05-12 Werner Lemberg + + Fix Savannah bug #38968. + + * include/freetype/ftmodapi.h: Add `FT_EXPORT' to + FT_Property_{Set,Get}. + * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to + FT_Property_{Set,Get}. + +2013-05-10 Werner Lemberg + + [sfnt] Clean up bitmap code. + + * src/sfnt/ttsbit.c: Deleted. + * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'. + * rules.mk (SFNT_DRV_H): Updated. + +2013-05-10 Werner Lemberg + + */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. ---------------------------------------------------------------------------- -Copyright 2010-2012 by +Copyright 2013-2014 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.21 b/ChangeLog.21 index d6371d1..300a094 100644 --- a/ChangeLog.21 +++ b/ChangeLog.21 @@ -6260,7 +6260,7 @@ Adding a new API `FT_Get_BDF_Property' to retrieve the BDF properties of a given PCF or BDF font. - * include/freetype/ftbdf.h (FT_PropertyType): New enumeration. + * include/freetype/ftbdf.h (BDF_PropertyType): New enumeration. (BDF_Property, BDF_PropertyRec): New structure. FT_Get_BDF_Property): New function. * include/freetype/internal/bdftypes.h: Include FT_BDF_H. diff --git a/ChangeLog.23 b/ChangeLog.23 index bc46c84..1a23848 100644 --- a/ChangeLog.23 +++ b/ChangeLog.23 @@ -6668,7 +6668,7 @@ 2007-01-10 Derek Clegg - * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed point + * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed-point values. 2007-01-08 David Turner diff --git a/ChangeLog.24 b/ChangeLog.24 new file mode 100644 index 0000000..01eb3b7 --- /dev/null +++ b/ChangeLog.24 @@ -0,0 +1,6360 @@ +2013-05-08 Werner Lemberg + + * 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/Jamfile b/Jamfile index 313bda6..16e097e 100644 --- a/Jamfile +++ b/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 top Jamfile. # -# Copyright 2001-2011 by +# Copyright 2001-2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -140,9 +140,9 @@ DEFINES += FT2_BUILD_LIBRARY ; # FT2_MULTI = true ; -# The file is used to define macros that are -# later used in #include statements. It needs to be parsed in order to -# record these definitions. +# The file is used to define macros that are later used +# in #include statements. It needs to be parsed in order to record these +# definitions. # HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ; HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ; @@ -177,7 +177,7 @@ actions GenExportSymbols1 bind APINAMES $(APINAMES) $(2) > $(1) } -GenExportSymbols ftexport.sym : include/freetype include/freetype/cache ; +GenExportSymbols ftexport.sym : include include/cache ; # Test files (hinter debugging). Only used by FreeType developers. # @@ -195,7 +195,7 @@ rule RefDoc actions RefDoc { - python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.4.9 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h + python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.5.5 --output=$(DOC_DIR) $(FT2_INCLUDE)/*.h $(FT2_INCLUDE)/config/*.h } RefDoc refdoc ; diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bbaba33 --- /dev/null +++ b/LICENSE @@ -0,0 +1,169 @@ + The FreeType Project LICENSE + ---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © The FreeType + Project (www.freetype.org). All rights reserved. + """ + + Please replace with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + http://www.freetype.org + + +--- end of FTL.TXT --- diff --git a/LICENSE.GPL-2.0 b/LICENSE.GPL-2.0 new file mode 100644 index 0000000..b2fe7b6 --- /dev/null +++ b/LICENSE.GPL-2.0 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/README b/README index 84b1c44..f00a1ab 100644 --- a/README +++ b/README @@ -1,17 +1,22 @@ - FreeType 2.4.9 + FreeType 2.5.5 ============== + Homepage: http://www.freetype.org + + FreeType is a freely available software library to render fonts. + + It is written in C, designed to be small, efficient, highly + customizable, and portable while capable of producing high-quality + output (glyph images) of most vector and bitmap font formats. + Please read the docs/CHANGES file, it contains IMPORTANT INFORMATION. - Read the files `docs/INSTALL' for installation instructions. - - See the file `docs/LICENSE.TXT' for the available licenses. Note - that we use ranges (`2008-2010') for copyright years also instead of - listing individual years (`2008, 2009, 2010'). + Read the files `docs/INSTALL*' for installation instructions; see + the file `docs/LICENSE.TXT' for the available licenses. The FreeType 2 API reference is located in `docs/reference'; use the - file `ft2-doc.html' as the top entry point. Additional + file `ft2-toc.html' as the top entry point. Additional documentation is available as a separate package from our sites. Go to @@ -19,23 +24,44 @@ and download one of the following files. - freetype-doc-2.4.9.tar.bz2 - freetype-doc-2.4.9.tar.gz - ftdoc249.zip + freetype-doc-2.5.5.tar.bz2 + freetype-doc-2.5.5.tar.gz + ftdoc255.zip + + To view the documentation online, go to + + http://www.freetype.org/freetype2/documentation.html + + + Mailing Lists + ============= + + The preferred way of communication with the FreeType team is using + e-mail lists. + + general use and discussion: freetype@nongnu.org + engine internals, porting, etc.: freetype-devel@nongnu.org + announcements: freetype-announce@nongnu.org + + The lists are moderated; see + + http://www.freetype.org/contact.html + + how to subscribe. Bugs ==== - Please report bugs by e-mail to `freetype-devel@nongnu.org'. Don't - forget to send a detailed explanation of the problem -- there is - nothing worse than receiving a terse message that only says `it - doesn't work'. - - Alternatively, you may submit a bug report at + Please submit bug reports at https://savannah.nongnu.org/bugs/?group=freetype + Alternatively, you might report bugs by e-mail to + `freetype-devel@nongnu.org'. Don't forget to send a detailed + explanation of the problem -- there is nothing worse than receiving + a terse message that only says `it doesn't work'. + Enjoy! @@ -44,7 +70,7 @@ ---------------------------------------------------------------------- -Copyright 2006-2011 by +Copyright 2006-2014 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/README.git b/README.git index 47cb242..021c121 100644 --- a/README.git +++ b/README.git @@ -31,9 +31,13 @@ configure script is necessary at all; saying should work on all platforms which have GNU make (or makepp). +Similarly, a build with `cmake' can be done directly from the git +repository. + + ---------------------------------------------------------------------- -Copyright 2005, 2006, 2007, 2008, 2009, 2010 by +Copyright 2005-2010, 2013 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/TC/_export_env.sh b/TC/_export_env.sh deleted file mode 100755 index 06b6671..0000000 --- a/TC/_export_env.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -. ./config -export TET_INSTALL_PATH=$TET_INSTALL_HOST_PATH # tetware root path -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH -export TET_ROOT=$TET_TARGET_PATH -export FT2_TC_ROOT_PATH=/mnt/nfs/DTS/freetype/ft2demos diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh deleted file mode 100755 index 5ddaa53..0000000 --- a/TC/_export_target_env.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -. ./config -export TET_INSTALL_PATH=$TET_INSTALL_TARGET_PATH # path to path -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH -export TET_ROOT=$TET_TARGET_PATH diff --git a/TC/build.sh b/TC/build.sh deleted file mode 100755 index 72aad6c..0000000 --- a/TC/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -FILE_NAME_EXTENSION=`date +%s` - -RESULT_DIR=results -HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html -JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal - -mkdir -p $RESULT_DIR - -tcc -c -p ./ -tcc -b -j $JOURNAL_RESULT -p ./ -grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/clean.sh b/TC/clean.sh deleted file mode 100755 index 29743e0..0000000 --- a/TC/clean.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. ./_export_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -RESULT_DIR=results - -tcc -c -p ./ # executing tcc, with clean option (-c) -rm -r $RESULT_DIR -rm -r tet_tmp_dir -rm testcase/tet_captured diff --git a/TC/config b/TC/config deleted file mode 100755 index e8c668e..0000000 --- a/TC/config +++ /dev/null @@ -1,2 +0,0 @@ -TET_INSTALL_HOST_PATH=/view/DTS/TETware -TET_INSTALL_TARGET_PATH=/mnt/nfs/DTS/TETware diff --git a/TC/execute.sh b/TC/execute.sh deleted file mode 100755 index a4f6095..0000000 --- a/TC/execute.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -. ./_export_target_env.sh # setting environment variables - -export TET_SUITE_ROOT=`pwd` -FILE_NAME_EXTENSION=`date +%s` - -RESULT_DIR=results -HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html -JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal - -mkdir -p $RESULT_DIR - -tcc -e -j $JOURNAL_RESULT -p ./ -grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT diff --git a/TC/testcase/Makefile b/TC/testcase/Makefile deleted file mode 100755 index 7ed8eb3..0000000 --- a/TC/testcase/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -CC ?= gcc - -C_FILES = $(shell ls *.c) - -PKGS = freetype2 capi-base-common dlog gthread-2.0 - -LDFLAGS = `pkg-config --libs $(PKGS)` -LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o -LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s -LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s - -CFLAGS = -I. `pkg-config --cflags $(PKGS)` -CFLAGS += -I$(TET_ROOT)/inc/tet3 -CFLAGS += -Wall - -TCS := $(shell ls -1 *.c | cut -d. -f1) - -all: $(TCS) - -%: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean: - rm -f $(TCS) diff --git a/TC/testcase/tslist b/TC/testcase/tslist deleted file mode 100755 index 7f1d607..0000000 --- a/TC/testcase/tslist +++ /dev/null @@ -1,9 +0,0 @@ -/testcase/utc_ft_bench -/testcase/utc_ft_diff -/testcase/utc_ft_dump -/testcase/utc_ft_gamma -/testcase/utc_ft_grid -/testcase/utc_ft_lint -/testcase/utc_ft_multi -/testcase/utc_ft_string -/testcase/utc_ft_view diff --git a/TC/testcase/utc_ft_bench.c b/TC/testcase/utc_ft_bench.c deleted file mode 100755 index 557375a..0000000 --- a/TC/testcase/utc_ft_bench.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_bench(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_bench, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_bench(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftbench /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_bench"); - else - dts_fail("utc_ft_bench"); -} diff --git a/TC/testcase/utc_ft_diff.c b/TC/testcase/utc_ft_diff.c deleted file mode 100755 index 9599fc7..0000000 --- a/TC/testcase/utc_ft_diff.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_diff(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_diff, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_diff(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftdiff /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_diff"); - else - dts_fail("utc_ft_diff"); -} diff --git a/TC/testcase/utc_ft_dump.c b/TC/testcase/utc_ft_dump.c deleted file mode 100755 index a0b6a2c..0000000 --- a/TC/testcase/utc_ft_dump.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_dump(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_dump, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_dump(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftdump /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_dump"); - else - dts_fail("utc_ft_dump"); -} diff --git a/TC/testcase/utc_ft_gamma.c b/TC/testcase/utc_ft_gamma.c deleted file mode 100755 index 6e42a43..0000000 --- a/TC/testcase/utc_ft_gamma.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_gamma(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_gamma, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_gamma(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftgamma", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_gamma"); - else - dts_fail("utc_ft_gamma"); -} diff --git a/TC/testcase/utc_ft_grid.c b/TC/testcase/utc_ft_grid.c deleted file mode 100755 index bf40ec8..0000000 --- a/TC/testcase/utc_ft_grid.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_grid(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_grid, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_grid(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftgrid 10pt /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_grid"); - else - dts_fail("utc_ft_grid"); -} diff --git a/TC/testcase/utc_ft_lint.c b/TC/testcase/utc_ft_lint.c deleted file mode 100755 index 3ce186f..0000000 --- a/TC/testcase/utc_ft_lint.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_lint(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_lint, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_lint(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftlint 10ppem /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_lint"); - else - dts_fail("utc_ft_lint"); -} diff --git a/TC/testcase/utc_ft_multi.c b/TC/testcase/utc_ft_multi.c deleted file mode 100755 index e005ceb..0000000 --- a/TC/testcase/utc_ft_multi.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_multi(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_multi, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_multi(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftmulti 10ppem /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_multi"); - else - dts_fail("utc_ft_multi"); -} diff --git a/TC/testcase/utc_ft_string.c b/TC/testcase/utc_ft_string.c deleted file mode 100755 index de17b48..0000000 --- a/TC/testcase/utc_ft_string.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_string(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_string, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_string(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftstring 10pt /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_string"); - else - dts_fail("utc_ft_string"); -} diff --git a/TC/testcase/utc_ft_view.c b/TC/testcase/utc_ft_view.c deleted file mode 100755 index 33f3c5f..0000000 --- a/TC/testcase/utc_ft_view.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - -static void startup(void); -static void cleanup(void); - -void (*tet_startup)(void) = startup; -void (*tet_cleanup)(void) = cleanup; - -static void utc_ft_view(void); - -struct tet_testlist tet_testlist[] = { - { utc_ft_view, 1 }, - { NULL, 0 }, -}; - -static void startup(void) -{ - /* start of TC */ -} - -static void cleanup(void) -{ - /* end of TC */ -} - -static void utc_ft_view(void) -{ - char buf[128]; - int ret; - sprintf(buf, "cd %s && ./ftview 10pt /usr/share/fonts/HelveticaNeueRegular.ttf ", getenv("FT2_TC_ROOT_PATH")); - ret = system(buf); - if(WEXITSTATUS(ret) == 0) - dts_pass("utc_ft_view"); - else - dts_fail("utc_ft_view"); -} diff --git a/TC/tet_scen b/TC/tet_scen deleted file mode 100755 index 03f029a..0000000 --- a/TC/tet_scen +++ /dev/null @@ -1,7 +0,0 @@ -all - ^TEST -##### Scenarios for TEST ##### - -# Test scenario -TEST - :include:/testcase/tslist diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg deleted file mode 100755 index f7eda55..0000000 --- a/TC/tetbuild.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option for build operation checking -TET_BUILD_TOOL=make # build with using make command -TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build -TET_API_COMPLIANT=True # use TET API in Test Case ? -TET_PASS_TC_NAME=True # report passed TC name in Journal file? diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg deleted file mode 100755 index 02d7030..0000000 --- a/TC/tetclean.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capture option -TET_CLEAN_TOOL= make clean # clean tool -TET_CLEAN_FILE= Makefile # file for clean -TET_API_COMPLIANT=True # TET API useage -TET_PASS_TC_NAME=True # showing name , passed TC diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg deleted file mode 100755 index ef3e452..0000000 --- a/TC/tetexec.cfg +++ /dev/null @@ -1,5 +0,0 @@ -TET_OUTPUT_CAPTURE=True # capturing execution or not -TET_EXEC_TOOL= # ex) exec : execution tool set up/ Optional -TET_EXEC_FILE= # ex) exectool : execution file/ Optional -TET_API_COMPLIANT=True # Test case or Tool usesTET API? -TET_PASS_TC_NAME=True # showing Passed TC name ? diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 index 9f2fb6a..cc0e661 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005, 2006, 2007, 2008, 2009, 2010 by +# Copyright 2005-2010, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -55,7 +55,7 @@ compare_to_minimum_version () if test $MAJOR1 -lt $MAJOR2; then echo 0 return - else + else if test $MAJOR1 -gt $MAJOR2; then echo 1 return @@ -67,7 +67,7 @@ compare_to_minimum_version () if test $MINOR1 -lt $MINOR2; then echo 0 return - else + else if test $MINOR1 -gt $MINOR2; then echo 1 return @@ -139,7 +139,7 @@ check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4 check_tool_version $AUTOCONF autoconf AUTOCONF 2.62 # This sets freetype_major, freetype_minor, and freetype_patch. -eval `sed -nf version.sed include/freetype/freetype.h` +eval `sed -nf version.sed include/freetype.h` # We set freetype-patch to an empty value if it is zero. if test "$freetype_patch" = ".0"; then diff --git a/builds/amiga/README b/builds/amiga/README index 2b8f8e8..85fcc43 100644 --- a/builds/amiga/README +++ b/builds/amiga/README @@ -1,7 +1,7 @@ README for the builds/amiga subdirectory. -Copyright 2005 by +Copyright 2005, 2013 by Werner Lemberg and Detlef Würkner. This file is part of the FreeType project, and may only be used, modified, @@ -51,8 +51,8 @@ directory. The results are: - ftdebug.o, an object module containing the standard version of the debugging code which uses vprintf() and exit() (not pure). - Debugging can be turned on in FT:include/freetype/config/ftoption.h - and with FT_SetTraceLevel(). + Debugging can be turned on in FT:include/config/ftoption.h and with + FT_SetTraceLevel(). - ftdebugpure.o, an object module containing the pure version of the debugging code which uses KVPrintf() from lib:debug.lib and no @@ -64,15 +64,14 @@ directory. The results are: ftsystem.o would force ALL FreeType2 modules to be linked to your program, I decided to use a different scheme: You must #include FT:src/base/ftinit.c in your sourcecode and specify with #define - statements which modules you need. See - include/freetype/config/ftmodule.h. + statements which modules you need. See include/config/ftmodule.h. To use in your own programs: - Insert the #define and #include statements from top of - include/freetype/config/ftmodule.h in your source code and uncomment - the #define statements for the FreeType2 modules you need. + include/config/ftmodule.h in your source code and uncomment the + #define statements for the FreeType2 modules you need. - You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for calling the FreeType2 functions, because the link library and the diff --git a/builds/amiga/include/freetype/config/ftconfig.h b/builds/amiga/include/config/ftconfig.h similarity index 90% rename from builds/amiga/include/freetype/config/ftconfig.h rename to builds/amiga/include/config/ftconfig.h index c2c2ac8..a73ace6 100644 --- a/builds/amiga/include/freetype/config/ftconfig.h +++ b/builds/amiga/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific configuration file (specification only). */ /* */ -/* Copyright 2005, 2006, 2007 by */ +/* Copyright 2005-2007, 2013 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -34,9 +34,9 @@ /* Now include the original file */ #ifndef __MORPHOS__ #ifdef __SASC -#include "FT:include/freetype/config/ftconfig.h" +#include "FT:include/config/ftconfig.h" #else -#include "/FT/include/freetype/config/ftconfig.h" +#include "/FT/include/config/ftconfig.h" #endif #else /* We must define that, it seems that @@ -45,7 +45,7 @@ * binaries from http://www.morphos.de) */ #define _LIBC_LIMITS_H_ -#include "/FT/include/freetype/config/ftconfig.h" +#include "/FT/include/config/ftconfig.h" #endif /* diff --git a/builds/amiga/include/freetype/config/ftmodule.h b/builds/amiga/include/config/ftmodule.h similarity index 100% rename from builds/amiga/include/freetype/config/ftmodule.h rename to builds/amiga/include/config/ftmodule.h diff --git a/builds/amiga/makefile b/builds/amiga/makefile index 379883d..8a1e4c6 100644 --- a/builds/amiga/makefile +++ b/builds/amiga/makefile @@ -5,7 +5,7 @@ # -# Copyright 2005, 2006, 2007, 2009 by +# Copyright 2005-2007, 2009, 2013 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, @@ -43,7 +43,7 @@ # # link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o # (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or -# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h). +# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h). all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o diff --git a/builds/amiga/makefile.os4 b/builds/amiga/makefile.os4 index 13758bc..a2e6ffc 100644 --- a/builds/amiga/makefile.os4 +++ b/builds/amiga/makefile.os4 @@ -4,7 +4,7 @@ # -# Copyright 2005, 2006, 2007, 2009 by +# Copyright 2005-2007, 2009, 2013 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, @@ -40,7 +40,7 @@ # # link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o # (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or -# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h). +# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h). all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile index 097aec9..aee7fb9 100644 --- a/builds/amiga/smakefile +++ b/builds/amiga/smakefile @@ -3,7 +3,7 @@ # -# Copyright 2005,2006, 2007, 2009 by +# Copyright 2005-2007, 2009, 2013 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, @@ -40,7 +40,7 @@ # # link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o # (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or -# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h). +# FT_DEBUG_LEVEL_TRACE in include/config/ftoption.h). OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfstype.o ftgasp.o \ ftglyph.o ftgxval.o ftlcdfil.o ftmm.o ftotval.o ftpatent.o ftpfr.o \ diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c index 5284e69..39688af 100644 --- a/builds/amiga/src/base/ftdebug.c +++ b/builds/amiga/src/base/ftdebug.c @@ -2,9 +2,9 @@ /* */ /* ftdebug.c */ /* */ -/* Debugging and logging component (body). */ +/* Debugging and logging component for amiga (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005 by */ +/* Copyright 1996-2002, 2004, 2005, 2013 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -41,12 +41,12 @@ /*************************************************************************/ -/* - * Based on the default ftdebug.c, - * replaced vprintf() with KVPrintF(), - * commented out exit(), - * replaced getenv() with GetVar(). - */ + /* + * Based on the default ftdebug.c, + * replaced vprintf() with KVPrintF(), + * commented out exit(), + * replaced getenv() with GetVar(). + */ #include #include @@ -59,9 +59,9 @@ #include #ifndef __amigaos4__ -extern struct Library *DOSBase; + extern struct Library *DOSBase; #else -extern struct DOSIFace *IDOS; + extern struct DOSIFace *IDOS; #endif @@ -75,13 +75,13 @@ extern struct DOSIFace *IDOS; /* documentation is in ftdebug.h */ FT_BASE_DEF( void ) - FT_Message( const char* fmt, ... ) + FT_Message( const char* fmt, + ... ) { va_list ap; va_start( ap, fmt ); -/* vprintf( fmt, ap ); */ KVPrintF( fmt, ap ); va_end( ap ); } @@ -90,19 +90,34 @@ extern struct DOSIFace *IDOS; /* documentation is in ftdebug.h */ FT_BASE_DEF( void ) - FT_Panic( const char* fmt, ... ) + FT_Panic( const char* fmt, + ... ) { va_list ap; va_start( ap, fmt ); -/* vprintf( fmt, ap ); */ KVPrintF( fmt, ap ); va_end( ap ); /* exit( EXIT_FAILURE ); */ } + + /* documentation is in ftdebug.h */ + + FT_BASE_DEF( int ) + FT_Throw( FT_Error error, + int line, + const char* file ) + { + FT_UNUSED( error ); + FT_UNUSED( line ); + FT_UNUSED( file ); + + return 0; + } + #endif /* FT_DEBUG_LEVEL_ERROR */ @@ -161,7 +176,7 @@ extern struct DOSIFace *IDOS; /* the memory and stream components which are set to 7 and 5, */ /* respectively. */ /* */ - /* See the file for details of the */ + /* See the file for details of the */ /* available toggle names. */ /* */ /* The level must be between 0 and 7; 0 means quiet (except for serious */ @@ -193,6 +208,9 @@ extern struct DOSIFace *IDOS; while ( *p && *p != ':' ) p++; + if ( !*p ) + break; + if ( *p == ':' && p > q ) { FT_Int n, i, len = (FT_Int)( p - q ); @@ -221,7 +239,7 @@ extern struct DOSIFace *IDOS; p++; if ( *p ) { - level = *p++ - '0'; + level = *p - '0'; if ( level < 0 || level > 7 ) level = -1; } diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c index 6f9eac1..42a552d 100644 --- a/builds/amiga/src/base/ftsystem.c +++ b/builds/amiga/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2001, 2002, 2005, 2006, 2007, 2010 by */ +/* Copyright 1996-2002, 2005-2007, 2010, 2013 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -386,7 +386,7 @@ Free_VecPooled( APTR poolHeader, if ( !stream ) - return FT_Err_Invalid_Stream_Handle; + return FT_THROW( Invalid_Stream_Handle ); #ifdef __amigaos4__ sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED ); @@ -398,7 +398,7 @@ Free_VecPooled( APTR poolHeader, FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE ); if ( !sysfile->file ) @@ -407,7 +407,7 @@ Free_VecPooled( APTR poolHeader, FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } fib = AllocDosObject( DOS_FIB, NULL ); @@ -418,7 +418,7 @@ Free_VecPooled( APTR poolHeader, FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } if ( !( ExamineFH( sysfile->file, fib ) ) ) { @@ -428,7 +428,7 @@ Free_VecPooled( APTR poolHeader, FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } stream->size = fib->fib_Size; FreeDosObject( DOS_FIB, fib ); @@ -447,7 +447,7 @@ Free_VecPooled( APTR poolHeader, ft_amiga_stream_close( stream ); FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " opened `%s' but zero-sized\n", filepathname )); - return FT_Err_Cannot_Open_Stream;; + return FT_THROW( Cannot_Open_Stream ); } FT_TRACE1(( "FT_Stream_Open:" )); diff --git a/builds/atari/deflinejoiner.awk b/builds/atari/deflinejoiner.awk index c872a70..16d9e6d 100644 --- a/builds/atari/deflinejoiner.awk +++ b/builds/atari/deflinejoiner.awk @@ -15,7 +15,7 @@ function shift( array, \ function init_cpp_src_line() { logical_line = "" - delete break_pos + delete break_pos } @@ -110,8 +110,8 @@ function shrink_spaces_to_linebreak( pos, \ { for ( i = 0; i < asorti( break_pos, junk ) && break_pos[i] < pos ; i++ ) ; - - if ( break_pos[i] < 1 ) + + if ( break_pos[i] < 1 ) return; part_str = substr( logical_line, pos, break_pos[i] - pos + 1 ) diff --git a/builds/cmake/iOS.cmake b/builds/cmake/iOS.cmake new file mode 100644 index 0000000..a41a7ac --- /dev/null +++ b/builds/cmake/iOS.cmake @@ -0,0 +1,275 @@ +# iOS.cmake +# +# Copyright 2014 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# Written by David Wimsey +# +# This file is part of the FreeType project, and may only be used, modified, +# and distributed under the terms of the FreeType project license, +# LICENSE.TXT. By continuing to use, modify, or distribute this file you +# indicate that you have read the license and understand and accept it +# fully. +# +# +# This file is derived from the files `Platform/Darwin.cmake' and +# `Platform/UnixPaths.cmake', which are part of CMake 2.8.4. It has been +# altered for iOS development. + + +# Options +# ------- +# +# IOS_PLATFORM = OS | SIMULATOR +# +# This decides whether SDKS are selected from the `iPhoneOS.platform' or +# `iPhoneSimulator.platform' folders. +# +# OS - the default, used to build for iPhone and iPad physical devices, +# which have an ARM architecture. +# SIMULATOR - used to build for the Simulator platforms, which have an +# x86 architecture. +# +# CMAKE_IOS_DEVELOPER_ROOT = /path/to/platform/Developer folder +# +# By default, this location is automatically chosen based on the +# IOS_PLATFORM value above. If you manually set this variable, it +# overrides the default location and forces the use of a particular +# Developer Platform. +# +# CMAKE_IOS_SDK_ROOT = /path/to/platform/Developer/SDKs/SDK folder +# +# By default, this location is automatically chosen based on the +# CMAKE_IOS_DEVELOPER_ROOT value. In this case it is always the most +# up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. If you +# manually set this variable, it forces the use of a specific SDK +# version. +# +# +# Macros +# ------ +# +# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE) +# +# A convenience macro for setting Xcode specific properties on targets. +# +# Example: +# +# set_xcode_property(myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1") +# +# find_host_package (PROGRAM ARGS) +# +# A macro to find executable programs on the host system, not within the +# iOS environment. Thanks to the `android-cmake' project for providing +# the command. + + +# standard settings +set(CMAKE_SYSTEM_NAME Darwin) +set(CMAKE_SYSTEM_VERSION 1) +set(UNIX True) +set(APPLE True) +set(IOS True) + +# required as of cmake 2.8.10 +set(CMAKE_OSX_DEPLOYMENT_TARGET "" + CACHE STRING "Force unset of the deployment target for iOS" FORCE +) + +# determine the cmake host system version so we know where to find the iOS +# SDKs +find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin) +if (CMAKE_UNAME) + exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" + DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") +endif (CMAKE_UNAME) + +# force the compilers to gcc for iOS +include(CMakeForceCompiler) +CMAKE_FORCE_C_COMPILER(gcc gcc) +CMAKE_FORCE_CXX_COMPILER(g++ g++) + +# skip the platform compiler checks for cross compiling +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_C_COMPILER_WORKS TRUE) + +# all iOS/Darwin specific settings - some may be redundant +set(CMAKE_SHARED_LIBRARY_PREFIX "lib") +set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") +set(CMAKE_SHARED_MODULE_PREFIX "lib") +set(CMAKE_SHARED_MODULE_SUFFIX ".so") +set(CMAKE_MODULE_EXISTS 1) +set(CMAKE_DL_LIBS "") + +set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG + "-compatibility_version ") +set(CMAKE_C_OSX_CURRENT_VERSION_FLAG + "-current_version ") +set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG + "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") +set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG + "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") + +# hidden visibility is required for cxx on iOS +set(CMAKE_C_FLAGS_INIT "") +set(CMAKE_CXX_FLAGS_INIT + "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden") + +set(CMAKE_C_LINK_FLAGS + "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") +set(CMAKE_CXX_LINK_FLAGS + "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") + +set(CMAKE_PLATFORM_HAS_INSTALLNAME 1) +set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS + "-dynamiclib -headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + "-bundle -headerpad_max_install_names") +set(CMAKE_SHARED_MODULE_LOADER_C_FLAG + "-Wl,-bundle_loader,") +set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG + "-Wl,-bundle_loader,") +set(CMAKE_FIND_LIBRARY_SUFFIXES + ".dylib" ".so" ".a") + +# hack: If a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old +# build tree (where `install_name_tool' was hardcoded), and where +# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't +# fail in `CMakeFindBinUtils.cmake' (because it isn't rerun), hardcode +# CMAKE_INSTALL_NAME_TOOL here to `install_name_tool' so it behaves as +# it did before. +if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) +endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + +# set up iOS platform unless specified manually with IOS_PLATFORM +if (NOT DEFINED IOS_PLATFORM) + set(IOS_PLATFORM "OS") +endif (NOT DEFINED IOS_PLATFORM) + +set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform") + +# check the platform selection and setup for developer root +if (${IOS_PLATFORM} STREQUAL "OS") + set(IOS_PLATFORM_LOCATION "iPhoneOS.platform") + + # this causes the installers to properly locate the output libraries + set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") + +elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR") + set(IOS_PLATFORM_LOCATION "iPhoneSimulator.platform") + + # this causes the installers to properly locate the output libraries + set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator") + +else (${IOS_PLATFORM} STREQUAL "OS") + message(FATAL_ERROR + "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR.") + +endif (${IOS_PLATFORM} STREQUAL "OS") + +# set up iOS developer location unless specified manually with +# CMAKE_IOS_DEVELOPER_ROOT -- +# note that Xcode 4.3 changed the installation location; choose the most +# recent one available +set(XCODE_POST_43_ROOT + "/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") +set(XCODE_PRE_43_ROOT + "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") + +if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) + if (EXISTS ${XCODE_POST_43_ROOT}) + set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT}) + elseif (EXISTS ${XCODE_PRE_43_ROOT}) + set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT}) + endif (EXISTS ${XCODE_POST_43_ROOT}) +endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) + +set(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} + CACHE PATH "Location of iOS Platform" +) + +# find and use the most recent iOS SDK unless specified manually with +# CMAKE_IOS_SDK_ROOT +if (NOT DEFINED CMAKE_IOS_SDK_ROOT) + file(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*") + if (_CMAKE_IOS_SDKS) + list(SORT _CMAKE_IOS_SDKS) + list(REVERSE _CMAKE_IOS_SDKS) + list(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT) + else (_CMAKE_IOS_SDKS) + message(FATAL_ERROR + "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.") + endif (_CMAKE_IOS_SDKS) + + message(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}") +endif (NOT DEFINED CMAKE_IOS_SDK_ROOT) + +set(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} + CACHE PATH "Location of the selected iOS SDK" +) + +# set the sysroot default to the most recent SDK +set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} + CACHE PATH "Sysroot used for iOS support" +) + +# set the architecture for iOS -- +# note that currently both ARCHS_STANDARD_32_BIT and +# ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually +if (${IOS_PLATFORM} STREQUAL "OS") + set(IOS_ARCH $(ARCHS_STANDARD_32_64_BIT)) +else (${IOS_PLATFORM} STREQUAL "OS") + set(IOS_ARCH i386) +endif (${IOS_PLATFORM} STREQUAL "OS") + +set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} + CACHE string "Build architecture for iOS" +) + +# set the find root to the iOS developer roots and to user defined paths +set(CMAKE_FIND_ROOT_PATH + ${CMAKE_IOS_DEVELOPER_ROOT} + ${CMAKE_IOS_SDK_ROOT} + ${CMAKE_PREFIX_PATH} + CACHE string "iOS find search path root" +) + +# default to searching for frameworks first +set(CMAKE_FIND_FRAMEWORK FIRST) + +# set up the default search directories for frameworks +set(CMAKE_SYSTEM_FRAMEWORK_PATH + ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks + ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks + ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks +) + +# only search the iOS SDKs, not the remainder of the host filesystem +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +# this little macro lets you set any Xcode specific property +macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE) + set_property(TARGET ${TARGET} + PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE}) +endmacro(set_xcode_property) + +# this macro lets you find executable programs on the host system +macro(find_host_package) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) + set(IOS FALSE) + + find_package(${ARGN}) + + set(IOS TRUE) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endmacro(find_host_package) + +# eof diff --git a/builds/compiler/bcc-dev.mk b/builds/compiler/bcc-dev.mk index 63a46ad..42a99b0 100644 --- a/builds/compiler/bcc-dev.mk +++ b/builds/compiler/bcc-dev.mk @@ -53,7 +53,7 @@ L := # Target flag -- no trailing space. # T := -o -TE := -e +TE := -e # C flags diff --git a/builds/detect.mk b/builds/detect.mk index 987ae51..ff4045d 100644 --- a/builds/detect.mk +++ b/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2002, 2003, 2006, 2008 by +# Copyright 1996-2003, 2006, 2008, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -17,8 +17,8 @@ # the following variables: # # BUILD_DIR The configuration and system-specific directory. Usually -# `freetype/builds/$(PLATFORM)' but can be different for -# custom builds of the library. +# `builds/$(PLATFORM)' but can be different for custom builds +# of the library. # # The following variables must be defined in system specific `detect.mk' # files: @@ -124,7 +124,7 @@ std_setup: @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help." @echo "" @echo "Otherwise, simply type \`$(MAKE)' again to build the library," - @echo "or \`$(MAKE) refdoc' to build the API reference (the latter needs python)." + @echo "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)." @echo "" @$(COPY) $(CONFIG_RULES) $(CONFIG_MK) @@ -146,7 +146,7 @@ dos_setup: @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help. @type builds$(SEP)newline @echo Otherwise, simply type 'make' again to build the library. - @echo or 'make refdoc' to build the API reference (the latter needs python). + @echo or 'make refdoc' to build the API reference (this needs python >= 2.6). @type builds$(SEP)newline @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk index 700a122..3e5e967 100644 --- a/builds/dos/detect.mk +++ b/builds/dos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2004, 2006 by +# Copyright 1996-2000, 2003, 2004, 2006, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -45,12 +45,12 @@ ifeq ($(PLATFORM),ansi) endif # We also try to recognize Dos 7.x without Windows 9X launched. - # See builds/win32/detect.mk for explanations about the logic. + # See builds/windows/detect.mk for explanations about the logic. # ifeq ($(is_dos),) ifdef winbootdir #ifneq ($(OS),Windows_NT) - # If win32 is available, do not trigger this test. + # If windows is available, do not trigger this test. ifndef windir is_dos := $(findstring Windows,$(strip $(shell ver))) endif @@ -124,7 +124,7 @@ ifeq ($(PLATFORM),dos) CAT := type # Setting COPY is a bit trickier. We can be running DJGPP on some - # Windows NT derivatives, like XP. See builds/win32/detect.mk for + # Windows NT derivatives, like XP. See builds/windows/detect.mk for # explanations why we need hacking here. # ifeq ($(OS),Windows_NT) diff --git a/builds/exports.mk b/builds/exports.mk index 52f2912..96b10db 100644 --- a/builds/exports.mk +++ b/builds/exports.mk @@ -51,7 +51,7 @@ ifneq ($(EXPORTS_LIST),) APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD)) $(APINAMES_EXE): $(APINAMES_SRC) - $(CCexe) $(TE)$@ $< + $(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS) .PHONY: symbols_list diff --git a/builds/freetype.mk b/builds/freetype.mk index 7a89c8e..8b2e2ea 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by +# Copyright 1996-2006, 2008, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -97,7 +97,7 @@ BASE_DIR := $(SRC_DIR)/base # Other derived directories. # -PUBLIC_DIR := $(TOP_DIR)/include/freetype +PUBLIC_DIR := $(TOP_DIR)/include INTERNAL_DIR := $(PUBLIC_DIR)/internal SERVICES_DIR := $(INTERNAL_DIR)/services CONFIG_DIR := $(PUBLIC_DIR)/config @@ -116,8 +116,8 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A # IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed # before the standard include list. Porters are then able to # put their own version of some of the FreeType components -# in the `freetype/builds/' directory, as these -# files will override the default sources. +# in the `builds/' directory, as these files will +# override the default sources. # INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \ $(DEVEL_DIR) \ @@ -126,6 +126,14 @@ INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \ INCLUDE_FLAGS := $(INCLUDES:%=$I%) +ifdef DEVEL_DIR + # We assume that all library dependencies for FreeType are fulfilled for a + # development build, so we directly access the necessary include directory + # information using `pkg-config'. + INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \ + harfbuzz ) +endif + # C flags used for the compilation of an object file. This must include at # least the paths for the `base' and `builds/' 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) @@ -178,7 +187,7 @@ PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h) INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \ $(wildcard $(SERVICES_DIR)/*.h) CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \ - $(wildcard $(BUILD_DIR)/freetype/config/*.h) \ + $(wildcard $(BUILD_DIR)/config/*.h) \ $(FTMODULE_H) \ $(FTOPTION_H) DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h) @@ -261,8 +270,6 @@ objects: $(OBJECTS_LIST) library: $(PROJECT_LIBRARY) -dll: $(PROJECT_LIBRARY) exported_symbols - .c.$O: $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) @@ -290,19 +297,16 @@ ifneq ($(findstring refdoc,$(MAKECMDGOALS)),) version := $(major).$(minor).$(patch) endif -# We write-protect the docmaker directory to suppress generation -# of .pyc files. +# Option `-B' disables generation of .pyc files (available since python 2.6) # refdoc: - -chmod -w $(SRC_DIR)/tools/docmaker - python $(SRC_DIR)/tools/docmaker/docmaker.py \ - --prefix=ft2 \ - --title=FreeType-$(version) \ - --output=$(DOC_DIR) \ - $(PUBLIC_DIR)/*.h \ - $(PUBLIC_DIR)/config/*.h \ - $(PUBLIC_DIR)/cache/*.h - -chmod +w $(SRC_DIR)/tools/docmaker + python -B $(SRC_DIR)/tools/docmaker/docmaker.py \ + --prefix=ft2 \ + --title=FreeType-$(version) \ + --output=$(DOC_DIR) \ + $(PUBLIC_DIR)/*.h \ + $(PUBLIC_DIR)/config/*.h \ + $(PUBLIC_DIR)/cache/*.h .PHONY: clean_project_std distclean_project_std diff --git a/builds/mac/README b/builds/mac/README index bd3df8a..f58e47d 100644 --- a/builds/mac/README +++ b/builds/mac/README @@ -1,8 +1,8 @@ This folder contains - * Makefile skeltons for Apple MPW (Macintosh's Programmers Workshop) + * Makefile skeletons for Apple MPW (Macintosh's Programmer's Workshop) - * Python script to generate MPW makefile from skelton + * Python script to generate MPW makefile from skeleton * Metrowerks CodeWarrior 9.0 project file in XML format @@ -51,7 +51,7 @@ environment by Metrowerks. GCC for MPW and Symantec Also you can find documents how to update by MPW-PR. Python is required to restore MPW makefiles from the - skeltons. Python bundled to Mac OS X is enough. For + skeletons. Python bundled to Mac OS X is enough. For classic MacOS, MacPython is available: http://homepages.cwi.nl/~jack/macpython/ @@ -78,10 +78,10 @@ environment by Metrowerks. GCC for MPW and Symantec Detailed building procedure by Apple MPW is described in following. - 3-1-1. Generate MPW makefiles from the skeltons + 3-1-1. Generate MPW makefiles from the skeletons ------------------------------------------------ - Here are 4 skeltons for following targets are + Here are 4 skeletons for following targets are included. - FreeType.m68k_far.make.txt @@ -109,7 +109,7 @@ environment by Metrowerks. GCC for MPW and Symantec MPW makefile syntax uses 8bit characters. To keep from violating them during version control, here - we store skeltons in pure ASCII format. You must + we store skeletons in pure ASCII format. You must generate MPW makefile by Python script ascii2mpw.py. In Mac OS X terminal, you can convert as: @@ -118,10 +118,10 @@ environment by Metrowerks. GCC for MPW and Symantec < builds/mac/FreeType.m68k_far.make.txt \ > FreeType.m68k_far.make - The skeltons are designed to use in the top + The skeletons are designed to use in the top directory where there are builds, include, src etc. You must name the generated MPW makefile by removing - ".txt" from source skelton name. + ".txt" from source skeleton name. 3-1-2. Add resource forks to related files ------------------------------------------ @@ -392,12 +392,10 @@ ATSFontGetFileSpecification() | x | x | x | x | ATS font manager is not published in these versions. ------------------------------------------------------------ -Last update: 2009-Jul-25. +Last update: 2013-Nov-03. Currently maintained by suzuki toshiya, Originally prepared by Leonard Rosenthol, Just van Rossum, - -This directory is now actively maintained as part of the FreeType Project. diff --git a/builds/mac/freetype-Info.plist b/builds/mac/freetype-Info.plist new file mode 100644 index 0000000..b3d114d --- /dev/null +++ b/builds/mac/freetype-Info.plist @@ -0,0 +1,36 @@ + + + + + + + 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/builds/mac/ftmac.c b/builds/mac/ftmac.c index 719dd0c..27b5511 100644 --- a/builds/mac/ftmac.c +++ b/builds/mac/ftmac.c @@ -5,7 +5,7 @@ /* Mac FOND support. Written by just@letterror.com. */ /* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2008, 2013, 2014 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -184,7 +184,7 @@ typedef short ResourceIndex; FT_UNUSED( pathSpec ); FT_UNUSED( face_index ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } #else @@ -204,6 +204,9 @@ typedef short ResourceIndex; FMFontFamily family = 0; + if ( !fontName || !face_index ) + return FT_THROW( Invalid_Argument ); + *face_index = 0; while ( status == 0 && !the_font ) { @@ -270,7 +273,7 @@ typedef short ResourceIndex; return FT_Err_Ok; } else - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); } #endif /* HAVE_QUICKDRAW_CARBON */ @@ -323,10 +326,10 @@ typedef short ResourceIndex; CFRelease( cf_fontName ); if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); /* face_index calculation by searching preceding fontIDs */ /* with same FSRef */ @@ -365,7 +368,7 @@ typedef short ResourceIndex; FT_UNUSED( maxPathSize ); FT_UNUSED( face_index ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } #else @@ -381,11 +384,11 @@ typedef short ResourceIndex; err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); - if ( FT_Err_Ok != err ) + if ( err ) return err; if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); return FT_Err_Ok; } @@ -404,7 +407,7 @@ typedef short ResourceIndex; FT_UNUSED( pathSpec ); FT_UNUSED( face_index ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } #else @@ -420,12 +423,12 @@ typedef short ResourceIndex; err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); - if ( FT_Err_Ok != err ) + if ( err ) return err; if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL, pathSpec, NULL ) ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); return FT_Err_Ok; } @@ -580,7 +583,7 @@ typedef short ResourceIndex; if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); /* at present, no support for dfont format */ err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res ); @@ -598,7 +601,7 @@ typedef short ResourceIndex; if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); /* at present, no support for dfont format without FSRef */ /* (see above), try original resource-fork font */ @@ -696,11 +699,9 @@ typedef short ResourceIndex; count_faces_scalable( char* fond_data ) { AsscEntry* assoc; - FamRec* fond; short i, face, face_all; - fond = (FamRec*)fond_data; face_all = EndianS16_BtoN( *( (short *)( fond_data + sizeof ( FamRec ) ) ) ) + 1; assoc = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 ); @@ -847,17 +848,17 @@ typedef short ResourceIndex; /* We should not extract parent directory by string manipulation. */ if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL, NULL, &par_ref ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* now we have absolute dirname in path_lwfn */ if ( path_lwfn[0] == '/' ) @@ -870,11 +871,11 @@ typedef short ResourceIndex; path_lwfn[dirname_len + base_lwfn[0]] = '\0'; if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL, NULL, NULL ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); return FT_Err_Ok; @@ -886,7 +887,7 @@ typedef short ResourceIndex; /* pathname for FSSpec is always HFS format */ if ( ft_strlen( (char *)path_fond ) > path_size ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); ft_strcpy( (char *)path_lwfn, (char *)path_fond ); @@ -895,7 +896,7 @@ typedef short ResourceIndex; i--; if ( i + 1 + base_lwfn[0] > path_size ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( ':' == path_lwfn[i] ) { @@ -909,7 +910,7 @@ typedef short ResourceIndex; } if ( noErr != FT_FSPathMakeSpec( path_lwfn, &spec, FALSE ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); return FT_Err_Ok; @@ -1003,7 +1004,7 @@ typedef short ResourceIndex; /* detect integer overflows */ if ( total_size < old_total_size ) { - error = FT_Err_Array_Too_Large; + error = FT_ERR( Array_Too_Large ); goto Error; } @@ -1088,7 +1089,7 @@ typedef short ResourceIndex; if ( noErr != FT_FSPathMakeRes( pathname, &res ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); pfb_data = NULL; pfb_size = 0; @@ -1123,7 +1124,7 @@ typedef short ResourceIndex; sfnt = GetResource( TTAG_sfnt, sfnt_id ); if ( sfnt == NULL ) - return FT_Err_Invalid_Handle; + return FT_THROW( Invalid_Handle ); sfnt_size = (FT_ULong)GetHandleSize( sfnt ); if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) ) @@ -1182,23 +1183,26 @@ typedef short ResourceIndex; FT_Long face_index, FT_Face* aface ) { - FT_Error error = FT_Err_Cannot_Open_Resource; + FT_Error error = FT_ERR( Cannot_Open_Resource ); ResFileRefNum res_ref; ResourceIndex res_index; Handle fond; - short num_faces_in_res, num_faces_in_fond; + short num_faces_in_res; if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); UseResFile( res_ref ); if ( ResError() ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); num_faces_in_res = 0; for ( res_index = 1; ; ++res_index ) { + short num_faces_in_fond; + + fond = Get1IndResource( TTAG_FOND, res_index ); if ( ResError() ) break; @@ -1237,9 +1241,12 @@ typedef short ResourceIndex; FT_Error error = FT_Err_Ok; + /* test for valid `aface' and `library' delayed to */ + /* `FT_New_Face_From_XXX' */ + GetResInfo( fond, &fond_id, &fond_type, fond_name ); if ( ResError() != noErr || fond_type != TTAG_FOND ) - return FT_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); HLock( fond ); parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index ); @@ -1322,7 +1329,7 @@ typedef short ResourceIndex; face_index, aface ); else - error = FT_Err_Unknown_File_Format; + error = FT_ERR( Unknown_File_Format ); found_no_lwfn_file: if ( have_sfnt && FT_Err_Ok != error ) @@ -1389,9 +1396,8 @@ typedef short ResourceIndex; /* test for valid `library' and `aface' delayed to FT_Open_Face() */ if ( !pathname ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); - error = FT_Err_Ok; *aface = NULL; /* try resourcefork based font: LWFN, FFIL */ @@ -1432,7 +1438,7 @@ typedef short ResourceIndex; FT_UNUSED( face_index ); FT_UNUSED( aface ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); #else @@ -1442,12 +1448,14 @@ typedef short ResourceIndex; UInt8 pathname[PATH_MAX]; + /* test for valid `library' and `aface' delayed to `FT_Open_Face' */ + if ( !ref ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); err = FSRefMakePath( ref, pathname, sizeof ( pathname ) ); if ( err ) - error = FT_Err_Cannot_Open_Resource; + error = FT_ERR( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); if ( error != 0 || *aface != NULL ) @@ -1487,7 +1495,7 @@ typedef short ResourceIndex; if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); else return FT_New_Face_From_FSRef( library, &ref, face_index, aface ); @@ -1500,11 +1508,11 @@ typedef short ResourceIndex; if ( !spec ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); err = FT_FSpMakePath( spec, pathname, sizeof ( pathname ) ); if ( err ) - error = FT_Err_Cannot_Open_Resource; + error = FT_ERR( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); if ( error != 0 || *aface != NULL ) @@ -1522,7 +1530,7 @@ typedef short ResourceIndex; FT_UNUSED( face_index ); FT_UNUSED( aface ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); #endif /* HAVE_FSREF, HAVE_FSSPEC */ diff --git a/builds/modules.mk b/builds/modules.mk index c4a882c..3c1b083 100644 --- a/builds/modules.mk +++ b/builds/modules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2006, 2008 by +# Copyright 1996-2000, 2003, 2006, 2008, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -28,7 +28,7 @@ $(FTMODULE_H): $(MODULES_CFG) $(FTMODULE_H_CREATE) $(FTMODULE_H_DONE) -ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),) +ifneq ($(findstring $(PLATFORM),dos windows os2),) OPEN_MODULE := @echo$(space) CLOSE_MODULE := >> $(subst /,$(SEP),$(FTMODULE_H)) REMOVE_MODULE := @-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H)) diff --git a/builds/symbian/bld.inf b/builds/symbian/bld.inf index dd5f559..bc8c160 100644 --- a/builds/symbian/bld.inf +++ b/builds/symbian/bld.inf @@ -2,7 +2,7 @@ // FreeType 2 project for the symbian platform // -// Copyright 2008, 2009 by +// Copyright 2008, 2009, 2013 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, @@ -19,48 +19,48 @@ freetype.mmp PRJ_EXPORTS ../../include/ft2build.h -../../include/freetype/config/ftconfig.h freetype/config/ftconfig.h -../../include/freetype/config/ftheader.h freetype/config/ftheader.h -../../include/freetype/config/ftmodule.h freetype/config/ftmodule.h -../../include/freetype/config/ftoption.h freetype/config/ftoption.h -../../include/freetype/config/ftstdlib.h freetype/config/ftstdlib.h -../../include/freetype/freetype.h freetype/freetype.h -../../include/freetype/ftbbox.h freetype/ftbbox.h -../../include/freetype/ftbdf.h freetype/ftbdf.h -../../include/freetype/ftbitmap.h freetype/ftbitmap.h -../../include/freetype/ftcache.h freetype/ftcache.h -../../include/freetype/ftcid.h freetype/ftcid.h -../../include/freetype/fterrdef.h freetype/fterrdef.h -../../include/freetype/fterrors.h freetype/fterrors.h -../../include/freetype/ftgasp.h freetype/ftgasp.h -../../include/freetype/ftglyph.h freetype/ftglyph.h -../../include/freetype/ftgxval.h freetype/ftgxval.h -../../include/freetype/ftgzip.h freetype/ftgzip.h -../../include/freetype/ftbzip2.h freetype/ftbzip2.h -../../include/freetype/ftimage.h freetype/ftimage.h -../../include/freetype/ftincrem.h freetype/ftincrem.h -../../include/freetype/ftlcdfil.h freetype/ftlcdfil.h -../../include/freetype/ftlist.h freetype/ftlist.h -../../include/freetype/ftlzw.h freetype/ftlzw.h -../../include/freetype/ftmac.h freetype/ftmac.h -../../include/freetype/ftmm.h freetype/ftmm.h -../../include/freetype/ftmodapi.h freetype/ftmodapi.h -../../include/freetype/ftmoderr.h freetype/ftmoderr.h -../../include/freetype/ftotval.h freetype/ftotval.h -../../include/freetype/ftoutln.h freetype/ftoutln.h -../../include/freetype/ftpfr.h freetype/ftpfr.h -../../include/freetype/ftrender.h freetype/ftrender.h -../../include/freetype/ftsizes.h freetype/ftsizes.h -../../include/freetype/ftsnames.h freetype/ftsnames.h -../../include/freetype/ftstroke.h freetype/ftstroke.h -../../include/freetype/ftsynth.h freetype/ftsynth.h -../../include/freetype/ftsystem.h freetype/ftsystem.h -../../include/freetype/fttrigon.h freetype/fttrigon.h -../../include/freetype/fttypes.h freetype/fttypes.h -../../include/freetype/ftwinfnt.h freetype/ftwinfnt.h -../../include/freetype/ftxf86.h freetype/ftxf86.h -../../include/freetype/t1tables.h freetype/t1tables.h -../../include/freetype/ttnameid.h freetype/ttnameid.h -../../include/freetype/tttables.h freetype/tttables.h -../../include/freetype/tttags.h freetype/tttags.h -../../include/freetype/ttunpat.h freetype/ttunpat.h +../../include/config/ftconfig.h config/ftconfig.h +../../include/config/ftheader.h config/ftheader.h +../../include/config/ftmodule.h config/ftmodule.h +../../include/config/ftoption.h config/ftoption.h +../../include/config/ftstdlib.h config/ftstdlib.h +../../include/freetype.h freetype.h +../../include/ftbbox.h ftbbox.h +../../include/ftbdf.h ftbdf.h +../../include/ftbitmap.h ftbitmap.h +../../include/ftcache.h ftcache.h +../../include/ftcid.h ftcid.h +../../include/fterrdef.h fterrdef.h +../../include/fterrors.h fterrors.h +../../include/ftgasp.h ftgasp.h +../../include/ftglyph.h ftglyph.h +../../include/ftgxval.h ftgxval.h +../../include/ftgzip.h ftgzip.h +../../include/ftbzip2.h ftbzip2.h +../../include/ftimage.h ftimage.h +../../include/ftincrem.h ftincrem.h +../../include/ftlcdfil.h ftlcdfil.h +../../include/ftlist.h ftlist.h +../../include/ftlzw.h ftlzw.h +../../include/ftmac.h ftmac.h +../../include/ftmm.h ftmm.h +../../include/ftmodapi.h ftmodapi.h +../../include/ftmoderr.h ftmoderr.h +../../include/ftotval.h ftotval.h +../../include/ftoutln.h ftoutln.h +../../include/ftpfr.h ftpfr.h +../../include/ftrender.h ftrender.h +../../include/ftsizes.h ftsizes.h +../../include/ftsnames.h ftsnames.h +../../include/ftstroke.h ftstroke.h +../../include/ftsynth.h ftsynth.h +../../include/ftsystem.h ftsystem.h +../../include/fttrigon.h fttrigon.h +../../include/fttypes.h fttypes.h +../../include/ftwinfnt.h ftwinfnt.h +../../include/ftxf86.h ftxf86.h +../../include/t1tables.h t1tables.h +../../include/ttnameid.h ttnameid.h +../../include/tttables.h tttables.h +../../include/tttags.h tttags.h +../../include/ttunpat.h ttunpat.h diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 18bcef2..16d4be8 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2003, 2006, 2008, 2009, 2010 by +# Copyright 1996-2001, 2003, 2006, 2008-2010, 2012-2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -112,10 +112,10 @@ ifdef check_platform include $(TOP_DIR)/builds/detect.mk - # This rule makes sense for Unix only to remove files created by a run - # of the configure script which hasn't been successful (so that no + # This rule makes sense for Unix only to remove files created by a run of + # the configure script which hasn't been successful (so that no # `config.mk' has been created). It uses the built-in $(RM) command of - # GNU make. Similarly, `nul' is created if e.g. `make setup win32' has + # GNU make. Similarly, `nul' is created if e.g. `make setup windows' has # been erroneously used. # # Note: This test is duplicated in `builds/unix/detect.mk'. @@ -176,7 +176,7 @@ include $(TOP_DIR)/builds/modules.mk # we check for `dist', not `distclean' ifneq ($(findstring distx,$(MAKECMDGOALS)x),) - FT_H := include/freetype/freetype.h + FT_H := include/freetype.h major := $(shell sed -n 's/.*FREETYPE_MAJOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H)) minor := $(shell sed -n 's/.*FREETYPE_MINOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H)) @@ -201,6 +201,7 @@ dist: currdir=`pwd` ; \ for f in `find . -wholename '*/.git' -prune \ -o -name .gitignore \ + -o -name .mailmap \ -o -type d \ -o -print` ; do \ ln -s $$currdir/$$f tmp/$$f ; \ @@ -219,9 +220,9 @@ dist: mv tmp freetype-$(version) - tar cfh - freetype-$(version) \ + tar -H ustar -chf - freetype-$(version) \ | gzip -9 -c > freetype-$(version).tar.gz - tar cfh - freetype-$(version) \ + tar -H ustar -chf - freetype-$(version) \ | bzip2 -c > freetype-$(version).tar.bz2 @# Use CR/LF for zip files. diff --git a/builds/unix/.gitignore b/builds/unix/.gitignore index 86b8c40..e4e0a12 100644 --- a/builds/unix/.gitignore +++ b/builds/unix/.gitignore @@ -10,6 +10,7 @@ configure.ac freetype2.pc freetype-config ftconfig.h +install-sh libtool ltmain.sh unix-cc.mk diff --git a/builds/unix/aclocal.m4 b/builds/unix/aclocal.m4 index f90ad9f..97bf3eb 100644 --- a/builds/unix/aclocal.m4 +++ b/builds/unix/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, @@ -1317,7 +1318,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1329,9 +1330,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-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1350,7 +1361,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1693,7 +1707,8 @@ 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 @@ -2517,17 +2532,6 @@ 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 @@ -2644,7 +2648,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # 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 @@ -2689,6 +2693,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + 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='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3248,10 +3264,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3290,11 +3302,11 @@ 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 ;; -netbsd*) +netbsd* | netbsdelf*-gnu) 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 @@ -4042,7 +4054,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 @@ -4106,7 +4118,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4341,7 +4353,7 @@ 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. ecc*) @@ -4583,6 +4595,9 @@ m4_if([$1], [CXX], [ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4645,6 +4660,9 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4866,7 +4884,7 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5043,6 +5061,7 @@ _LT_EOF if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then @@ -5347,7 +5366,7 @@ _LT_EOF _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -6223,9 +6242,6 @@ 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(link_all_deplibs, $1)=yes @@ -6387,7 +6403,7 @@ if test "$_lt_caught_CXX_error" != yes; then _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 @@ -8599,3 +8615,4 @@ m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) m4_include([ft-munmap.m4]) +m4_include([pkg.m4]) diff --git a/builds/unix/config.guess b/builds/unix/config.guess index d622a44..b79252d 100755 --- a/builds/unix/config.guess +++ b/builds/unix/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # 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. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,6 +820,9 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -852,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,21 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$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 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1287,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,9 +1361,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. @@ -26,11 +20,12 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +116,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -225,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -253,10 +252,12 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -267,7 +268,7 @@ case $basic_machine in | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -285,16 +286,17 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -364,13 +366,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -383,7 +385,8 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -401,12 +404,13 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -782,11 +786,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -822,7 +830,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1013,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1340,21 +1352,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1486,9 +1498,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1537,6 +1546,12 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1577,6 +1592,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/builds/unix/configure b/builds/unix/configure index 7d2eb89..f4c6e91 100755 --- a/builds/unix/configure +++ b/builds/unix/configure @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for FreeType 2.4.9. +# Generated by GNU Autoconf 2.69 for FreeType 2.5.4. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,12 +192,12 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -182,7 +205,8 @@ test \$(( 1 + 1 )) = 2 || exit 1 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -222,21 +246,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -339,6 +367,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -460,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -494,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -515,28 +555,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -570,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FreeType' PACKAGE_TARNAME='freetype' -PACKAGE_VERSION='2.4.9' -PACKAGE_STRING='FreeType 2.4.9' +PACKAGE_VERSION='2.5.4' +PACKAGE_STRING='FreeType 2.5.4' PACKAGE_BUGREPORT='freetype@nongnu.org' PACKAGE_URL='' @@ -618,6 +638,27 @@ LIBOBJS build_libtool_libs wl hardcode_libdir_flag_spec +LIBSSTATIC_CONFIG +LIBS_PRIVATE +REQUIRES_PRIVATE +ftmac_c +HARFBUZZ_LIBS +HARFBUZZ_CFLAGS +LIBPNG_LIBS +LIBPNG_CFLAGS +BZIP2_LIBS +BZIP2_CFLAGS +ZLIB_LIBS +ZLIB_CFLAGS +XX_ANSIFLAGS +XX_CFLAGS +FTSYS_SRC +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +RMDIR +EXEEXT_BUILD +CC_BUILD OTOOL64 OTOOL LIPO @@ -635,28 +676,16 @@ ac_ct_DUMPBIN DUMPBIN LD FGREP +EGREP +GREP SED LIBTOOL OBJDUMP DLLTOOL AS -SYSTEM_ZLIB -FT2_EXTRA_LIBS -LIBBZ2 -LIBZ -ftmac_c -FTSYS_SRC -EGREP -GREP -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -RMDIR -RMF -XX_ANSIFLAGS -XX_CFLAGS -EXEEXT_BUILD -CC_BUILD +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG CPP OBJEXT EXEEXT @@ -716,23 +745,25 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock enable_biarch_config enable_mmap with_zlib with_bzip2 +with_png +with_harfbuzz with_old_mac_fonts with_fsspec with_fsref with_quickdraw_toolbox with_quickdraw_carbon with_ats -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock ' ac_precious_vars='build_alias host_alias @@ -742,7 +773,18 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +ZLIB_CFLAGS +ZLIB_LIBS +BZIP2_CFLAGS +BZIP2_LIBS +LIBPNG_CFLAGS +LIBPNG_LIBS +HARFBUZZ_CFLAGS +HARFBUZZ_LIBS' # Initialize some variables set by options. @@ -1198,8 +1240,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1285,7 +1325,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures FreeType 2.4.9 to adapt to many kinds of systems. +\`configure' configures FreeType 2.5.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1350,7 +1390,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeType 2.4.9:";; + short | recursive ) echo "Configuration of FreeType 2.5.4:";; esac cat <<\_ACEOF @@ -1358,20 +1398,34 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-biarch-config install biarch ftconfig.h to support multiple - architectures by single file - --disable-mmap do not check mmap() and do not use --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-biarch-config install biarch ftconfig.h to support multiple + architectures by single file + --disable-mmap do not check mmap() and do not use Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --without-zlib use internal zlib instead of system-wide - --without-bzip2 do not support bzip2 compressed fonts + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-zlib=[yes|no|auto] + use system zlib instead of internal library + [default=auto] + --with-bzip2=[yes|no|auto] + support bzip2 compressed fonts [default=auto] + --with-png=[yes|no|auto] + support png compressed OpenType embedded bitmaps + [default=auto] + --with-harfbuzz=[yes|no|auto] + improve auto-hinting of OpenType fonts + [default=auto] --with-old-mac-fonts allow Mac resource-based fonts to be used --with-fsspec use obsolete FSSpec API of MacOS, if available (default=yes) @@ -1383,11 +1437,6 @@ Optional Packages: --with-quickdraw-carbon use MacOS QuickDraw in Carbon, if available (default=yes) --with-ats use AppleTypeService, if available (default=yes) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1398,6 +1447,23 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I 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. @@ -1465,10 +1531,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeType configure 2.4.9 -generated by GNU Autoconf 2.68 +FreeType configure 2.5.4 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1554,6 +1620,83 @@ fi } # ac_fn_c_try_cpp +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes @@ -1596,6 +1739,73 @@ fi } # ac_fn_c_try_run +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case 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 @@ -1687,37 +1897,6 @@ fi } # ac_fn_c_check_header_mongrel -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -1735,7 +1914,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1751,7 +1931,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1777,7 +1958,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1793,7 +1975,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1827,7 +2010,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1896,124 +2080,11 @@ rm -f conftest.val } # ac_fn_c_compute_int -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case 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 -# accordingly. -ac_fn_c_check_decl () +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` @@ -2058,8 +2129,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeType $as_me 2.4.9, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by FreeType $as_me 2.5.4, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2414,7 +2485,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Don't forget to update docs/VERSION.DLL! -version_info='14:1:8' +version_info='17:3:11' ft_version=`echo $version_info | tr : .` @@ -2548,7 +2619,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2588,7 +2659,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2641,7 +2712,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2682,7 +2753,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2740,7 +2811,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2784,7 +2855,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3230,8 +3301,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3456,27 +3526,34 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# checks for native programs to generate building tool -if test ${cross_compiling} = yes; then - # Extract the first word of "${build}-gcc", so it can be a program name with args. -set dummy ${build}-gcc; ac_word=$2 + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC_BUILD+:} false; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC_BUILD"; then - ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC_BUILD="${build}-gcc" + 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 @@ -3484,36 +3561,42 @@ done done IFS=$as_save_IFS + ;; +esac fi -fi -CC_BUILD=$ac_cv_prog_CC_BUILD -if test -n "$CC_BUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5 -$as_echo "$CC_BUILD" >&6; } +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 - test -z "${CC_BUILD}" && # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC_BUILD+:} false; then : +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC_BUILD"; then - ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC_BUILD="gcc" + 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 @@ -3521,332 +3604,170 @@ done done IFS=$as_save_IFS + ;; +esac fi -fi -CC_BUILD=$ac_cv_prog_CC_BUILD -if test -n "$CC_BUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5 -$as_echo "$CC_BUILD" >&6; } +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 - - test -z "${CC_BUILD}" && # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC_BUILD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC_BUILD"; then - ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC_BUILD="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC_BUILD - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC_BUILD to just the basename; use the full file name. - shift - ac_cv_prog_CC_BUILD="$as_dir/$ac_word${1+' '}$@" + 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 -fi -CC_BUILD=$ac_cv_prog_CC_BUILD -if test -n "$CC_BUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5 -$as_echo "$CC_BUILD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +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 - test -z "${CC_BUILD}" && as_fn_error $? "cannot find native C compiler" "$LINENO" 5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of native executables" >&5 -$as_echo_n "checking for suffix of native executables... " >&6; } - rm -f a.* b.* a_out.exe conftest.* - echo > conftest.c "int main() { return 0;}" - ${CC_BUILD} conftest.c || as_fn_error $? "native C compiler is not working" "$LINENO" 5 - rm -f conftest.c - if test -x a.out -o -x b.out -o -x conftest; then - EXEEXT_BUILD="" - elif test -x a_out.exe -o -x conftest.exe; then - EXEEXT_BUILD=".exe" - elif test -x conftest.*; then - EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\././'` - fi - rm -f a.* b.* a_out.exe conftest.* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT_BUILD" >&5 -$as_echo "$EXEEXT_BUILD" >&6; } -else - CC_BUILD=${CC} - EXEEXT_BUILD=${EXEEXT} -fi +macro_version='2.4.2' +macro_revision='1.3337' -# get compiler flags right -if test "x$GCC" = xyes; then - XX_CFLAGS="-Wall" - XX_ANSIFLAGS="-pedantic -ansi" -else - case "$host" in - *-dec-osf*) - CFLAGS= - XX_CFLAGS="-std1 -g3" - XX_ANSIFLAGS= - ;; - *) - XX_CFLAGS= - XX_ANSIFLAGS= - ;; - esac -fi -# auxiliary programs -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RMF+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RMF"; then - ac_cv_prog_RMF="$RMF" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RMF="rm -f" - $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 -RMF=$ac_cv_prog_RMF -if test -n "$RMF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMF" >&5 -$as_echo "$RMF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +ltmain="$ac_aux_dir/ltmain.sh" -# Extract the first word of "rmdir", so it can be a program name with args. -set dummy rmdir; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RMDIR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RMDIR"; then - ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RMDIR="rmdir" - $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 +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -fi -fi -RMDIR=$ac_cv_prog_RMDIR -if test -n "$RMDIR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5 -$as_echo "$RMDIR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +# 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' -# Since this file will be finally moved to another directory we make -# the path of the install script absolute. This small code snippet has -# been taken from automake's `ylwrap' script. +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 +{ $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 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; + # 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 - done -IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -case "$INSTALL" in -/*) - ;; -*/*) - INSTALL="`pwd`/$INSTALL" - ;; -esac -# checks for header files -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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 "$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 - if test -z "$GREP"; then - ac_path_GREP_found=false + 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$PATH_SEPARATOR/usr/xpg4/bin +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in + 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_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" @@ -3855,14 +3776,14 @@ case `"$ac_path_GREP" --version 2>&1` in 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 + $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_GREP_max-0}; then + 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_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + 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 @@ -3870,22 +3791,98 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 + $ac_path_SED_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 + 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_GREP=$GREP + ac_cv_path_SED=$SED 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}: 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 @@ -3907,7 +3904,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + 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 @@ -3955,1454 +3952,1603 @@ $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +{ $as_echo "$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 - 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 : + 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_header_stdc=no + ac_cv_path_FGREP=$FGREP fi -rm -f conftest* + 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" -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 : +test -z "$GREP" && GREP=grep -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 fcntl.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done -# checks for typedefs, structures, and compiler characteristics -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 +# 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + with_gnu_ld=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h +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 - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if ${ac_cv_sizeof_int+:} false; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - + 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 "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_int=0 - fi + lt_cv_path_LD="$LD" # Let the user override the test with a path. fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if ${ac_cv_sizeof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long=0 - fi + { $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 "$ac_cv_sizeof_long" >&6; } - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF -# check whether cpp computation of size of int and long in ftconfig.in works -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.in works" >&5 -$as_echo_n "checking whether cpp computation of bit length in ftconfig.in works... " >&6; } -orig_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}" -ac_clean_files="ft2build.h ftoption.h ftstdlib.h" -touch ft2build.h ftoption.h ftstdlib.h -cat > conftest.c <<\_ACEOF -#include -#define FT_CONFIG_OPTIONS_H "ftoption.h" -#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h" -#define FT_UINT_MAX UINT_MAX -#define FT_ULONG_MAX ULONG_MAX -#include "ftconfig.in" -_ACEOF -echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int} -echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int} -echo >> conftest.c "#endif" -echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long} -echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long} -echo >> conftest.c "#endif" -${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh -eval `cat conftest.sh` -${RMF} conftest.c conftest.sh confft2build.h ftoption.h ftstdlib.h -if test x != "x${ac_cpp_ft_sizeof_int}" \ - -a x != x"${ac_cpp_ft_sizeof_long}"; then - unset ft_use_autoconf_sizeof_types +{ $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 - ft_use_autoconf_sizeof_types=yes -fi - -# Check whether --enable-biarch-config was given. -if test "${enable_biarch_config+set}" = set; then : - enableval=$enable_biarch_config; -fi - - -case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in - :yes:yes:) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken but use it" >&5 -$as_echo "broken but use it" >&6; } - unset ft_use_autoconf_sizeof_types - ;; - ::no:) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: works but ignore it" >&5 -$as_echo "works but ignore it" >&6; } - ft_use_autoconf_sizeof_types=yes - ;; - ::yes: | :::) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - unset ft_use_autoconf_sizeof_types - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ft_use_autoconf_sizeof_types=yes - ;; -esac - -if test x"${ft_use_autoconf_sizeof_types}" = xyes; then - $as_echo "#define FT_USE_AUTOCONF_SIZEOF_TYPES 1" >>confdefs.h - + 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 -CPPFLAGS="${orig_CPPFLAGS}" - +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 -# checks for library functions -# Here we check whether we can use our mmap file component. + 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 -# Check whether --enable-mmap was given. -if test "${enable_mmap+set}" = set; then : - enableval=$enable_mmap; enable_mmap="no" +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 - enable_mmap="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -if test "x${enable_mmap}" != "xno"; then - - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + 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 -done - + 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 -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF +{ $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 -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if ${ac_cv_func_mmap_fixed_mapped+:} false; then : +# 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 - if test "$cross_compiling" = yes; then : - ac_cv_func_mmap_fixed_mapped=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc + i=0 + teststring="ABCD" -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include + 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 + ;; -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif + 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; + ;; -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ + 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; + ;; -#endif /* no HAVE_GETPAGESIZE */ + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; -int -main () -{ - char *data, *data2, *data3; - const char *cdata2; - int i, pagesize; - int fd, fd2; + 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; + ;; - pagesize = getpagesize (); + 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` + ;; - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 2; - if (write (fd, data, pagesize) != pagesize) - return 3; - close (fd); + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) - return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 9; - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 11; + 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 $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 - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 12; - if (read (fd, data3, pagesize) != pagesize) - return 13; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 14; - close (fd); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes -else - ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then +max_cmd_len=$lt_cv_sys_max_cmd_len -$as_echo "#define HAVE_MMAP 1" >>confdefs.h -fi -rm -f conftest.mmap conftest.txt -fi -if test "x${enable_mmap}" = "xno" \ - -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then - FTSYS_SRC='$(BASE_DIR)/ftsystem.c' -else - FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' - ac_fn_c_check_decl "$LINENO" "munmap" "ac_cv_have_decl_munmap" " -#ifdef HAVE_UNISTD_H -#include -#endif -#include +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} -" -if test "x$ac_cv_have_decl_munmap" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 +{ $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 -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MUNMAP $ac_have_decl -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for munmap's first parameter type" >&5 -$as_echo_n "checking for munmap's first parameter type... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# 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 -#include -#include -int munmap(void *, size_t); -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: void *" >&5 -$as_echo "void *" >&6; } -$as_echo "#define MUNMAP_USES_VOIDP /**/" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: char *" >&5 -$as_echo "char *" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -for ac_func in memcpy memmove -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +{ $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 -done +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; } -# check for system zlib -# don't quote AS_HELP_STRING! -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -fi -if test x$with_zlib != xno && test -z "$LIBZ"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5 -$as_echo_n "checking for gzsetparams in -lz... " >&6; } -if ${ac_cv_lib_z_gzsetparams+:} false; then : +{ $as_echo "$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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + #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 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gzsetparams (); -int -main () -{ -return gzsetparams (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_gzsetparams=yes -else - ac_cv_lib_z_gzsetparams=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzsetparams" >&5 -$as_echo "$ac_cv_lib_z_gzsetparams" >&6; } -if test "x$ac_cv_lib_z_gzsetparams" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - LIBZ='-lz' fi +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; } -fi - -fi -if test x$with_zlib != xno && test -n "$LIBZ"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" - SYSTEM_ZLIB=yes -fi -# check for system libbz2 -# don't quote AS_HELP_STRING! -# Check whether --with-bzip2 was given. -if test "${with_bzip2+set}" = set; then : - withval=$with_bzip2; -fi -if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzDecompress in -lbz2" >&5 -$as_echo_n "checking for BZ2_bzDecompress in -lbz2... " >&6; } -if ${ac_cv_lib_bz2_BZ2_bzDecompress+:} false; then : +{ $as_echo "$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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbz2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char BZ2_bzDecompress (); -int -main () -{ -return BZ2_bzDecompress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bz2_BZ2_bzDecompress=yes -else - ac_cv_lib_bz2_BZ2_bzDecompress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzDecompress" >&5 -$as_echo "$ac_cv_lib_bz2_BZ2_bzDecompress" >&6; } -if test "x$ac_cv_lib_bz2_BZ2_bzDecompress" = xyes; then : - ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" -if test "x$ac_cv_header_bzlib_h" = xyes; then : - LIBBZ2='-lbz2' + 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 -fi -fi -if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" - LDFLAGS="$LDFLAGS $LIBBZ2" -fi -# Some options handling SDKs/archs in CFLAGS should be copied -# to LDFLAGS. Apple TechNote 2137 recommends to include these -# options in CFLAGS but not in LDFLAGS. -save_config_args=$* -set dummy ${CFLAGS} -i=1 -while test $i -le $# -do - c=$1 - case "${c}" in - -isysroot|-arch) # options taking 1 argument - a=$2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFLAGS and LDFLAGS share ${c} ${a}" >&5 -$as_echo_n "checking whether CFLAGS and LDFLAGS share ${c} ${a}... " >&6; } - if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5 -$as_echo "no, copy to LDFLAGS" >&6; } - LDFLAGS="${LDFLAGS} ${c} ${a}" - fi - shift 1 - ;; - -m32|-m64|-march=*|-mcpu=*) # options taking no argument - { $as_echo "$as_me:${as_lineno-$LINENO}: result: whether CFLAGS and LDFLAGS share ${c}" >&5 -$as_echo "whether CFLAGS and LDFLAGS share ${c}" >&6; } - if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5 -$as_echo "no, copy to LDFLAGS" >&6; } - LDFLAGS="${LDFLAGS} ${c}" - fi - ;; - # *) - # AC_MSG_RESULT([${c} is not copied to LDFLAGS]) - # ;; - esac - shift 1 -done -set ${save_config_args} -# Whether to use Mac OS resource-based fonts. +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 -ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default +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 -# don't quote AS_HELP_STRING! -# Check whether --with-old-mac-fonts was given. -if test "${with_old_mac_fonts+set}" = set; then : - withval=$with_old_mac_fonts; fi +if test -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 -if test x$with_old_mac_fonts = xyes; then - orig_LDFLAGS="${LDFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking CoreServices & ApplicationServices of Mac OS X" >&5 -$as_echo_n "checking CoreServices & ApplicationServices of Mac OS X... " >&6; } - FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" - LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +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 -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif -int -main () -{ - short res = 0; +{ $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. - UseResFile( res ); +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; +beos*) + lt_cv_deplibs_check_method=pass_all + ;; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - ftmac_c='ftmac.c' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS_INLINE macro is ANSI compatible" >&5 -$as_echo_n "checking whether OS_INLINE macro is ANSI compatible... " >&6; } - orig_CFLAGS="$CFLAGS -DFT_MACINTOSH" - CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +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 + ;; -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif +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 + ;; -int -main () -{ +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 + ;; - /* OSHostByteOrder() is typed as OS_INLINE */ - int32_t os_byte_order = OSHostByteOrder(); +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)$' + ;; - if ( OSBigEndian != os_byte_order ) - return 1; - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$orig_CFLAGS" - CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, ANSI incompatible" >&5 -$as_echo "no, ANSI incompatible" >&6; } - CFLAGS="$orig_CFLAGS" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking type ResourceIndex" >&5 -$as_echo_n "checking type ResourceIndex... " >&6; } - orig_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - +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 + ;; -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -# include -#endif +netbsd* | netbsdelf*-gnu) + 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 + ;; -int -main () -{ +*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 + ;; - ResourceIndex i = 0; - return i; +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$orig_CFLAGS" - CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1" +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$orig_CFLAGS" - CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0" +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - FT2_EXTRA_LIBS="" - LDFLAGS="${orig_LDFLAGS}" - CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -else - case x$host_os in - xdarwin*) - CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" +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 -fi - - -# Whether to use FileManager which is deprecated since Mac OS X 10.4. + ;; +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac -# Check whether --with-fsspec was given. -if test "${with_fsspec+set}" = set; then : - withval=$with_fsspec; fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } -if test x$with_fsspec = xno; then - CFLAGS="$CFLAGS -DHAVE_FSSPEC=0" -elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSSpec-based FileManager" >&5 -$as_echo_n "checking FSSpec-based FileManager... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - +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 -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif +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 -int -main () -{ - FCBPBPtr paramBlock; - short vRefNum; - long dirID; - ConstStr255Param fileName; - FSSpec* spec; - /* FSSpec functions: deprecated since Mac OS X 10.4 */ - PBGetFCBInfoSync( paramBlock ); - FSMakeFSSpec( vRefNum, dirID, fileName, spec ); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$CFLAGS -DHAVE_FSSPEC=1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - CFLAGS="$CFLAGS -DHAVE_FSSPEC=0" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -# Whether to use FileManager in Carbon since MacOS 9.x. -# Check whether --with-fsref was given. -if test "${with_fsref+set}" = set; then : - withval=$with_fsref; -fi -if test x$with_fsref = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: -*** WARNING - FreeType2 built without FSRef API cannot load - data-fork fonts on MacOS, except of XXX.dfont. - " >&5 -$as_echo "$as_me: WARNING: -*** WARNING - FreeType2 built without FSRef API cannot load - data-fork fonts on MacOS, except of XXX.dfont. - " >&2;} - CFLAGS="$CFLAGS -DHAVE_FSREF=0" -elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSRef-based FileManager" >&5 -$as_echo_n "checking FSRef-based FileManager... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif -int -main () -{ - short vRefNum; - long dirID; - ConstStr255Param fileName; - Boolean* isDirectory; - UInt8* path; - SInt16 desiredRefNum; - SInt16* iterator; - SInt16* actualRefNum; - HFSUniStr255* outForkName; - FSVolumeRefNum volume; - FSCatalogInfoBitmap whichInfo; - FSCatalogInfo* catalogInfo; - FSForkInfo* forkInfo; - FSRef* ref; -#if HAVE_FSSPEC - FSSpec* spec; -#endif - - /* FSRef functions: no need to check? */ - FSGetForkCBInfo( desiredRefNum, volume, iterator, - actualRefNum, forkInfo, ref, - outForkName ); - FSPathMakeRef( path, ref, isDirectory ); - -#if HAVE_FSSPEC - FSpMakeFSRef ( spec, ref ); - FSGetCatalogInfo( ref, whichInfo, catalogInfo, - outForkName, spec, ref ); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$CFLAGS -DHAVE_FSREF=1" +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - CFLAGS="$CFLAGS -DHAVE_FSREF=0" + 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 -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi - - -# Whether to use QuickDraw API in ToolBox which is deprecated since -# Mac OS X 10.4. - - -# Check whether --with-quickdraw-toolbox was given. -if test "${with_quickdraw_toolbox+set}" = set; then : - withval=$with_quickdraw_toolbox; +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 -if test x$with_quickdraw_toolbox = xno; then - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0" -elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in ToolBox" >&5 -$as_echo_n "checking QuickDraw FontManager functions in ToolBox... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +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 defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif + 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 -int -main () -{ - Str255 familyName; - SInt16 familyID = 0; - FMInput* fmIn = NULL; - FMOutput* fmOut = NULL; - GetFontName( familyID, familyName ); - GetFNum( familyName, &familyID ); - fmOut = FMSwapFont( fmIn ); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1" +{ $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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - -# Whether to use QuickDraw API in Carbon which is deprecated since -# Mac OS X 10.4. + 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 -# Check whether --with-quickdraw-carbon was given. -if test "${with_quickdraw_carbon+set}" = set; then : - withval=$with_quickdraw_carbon; 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 x$with_quickdraw_carbon = xno; then - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0" -elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in Carbon" >&5 -$as_echo_n "checking QuickDraw FontManager functions in Carbon... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif -int -main () -{ - FMFontFamilyIterator famIter; - FMFontFamily family; - Str255 famNameStr; - FMFontFamilyInstanceIterator instIter; - FMFontStyle style; - FMFontSize size; - FMFont font; - FSSpec* pathSpec; +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 - FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, - &famIter ); - FMGetNextFontFamily( &famIter, &family ); - FMGetFontFamilyName( family, famNameStr ); - FMCreateFontFamilyInstanceIterator( family, &instIter ); - FMGetNextFontFamilyInstance( &instIter, &font, &style, &size ); - FMDisposeFontFamilyInstanceIterator( &instIter ); - FMDisposeFontFamilyIterator( &famIter ); - FMGetFontContainer( font, pathSpec ); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1" + 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0" + 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 -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +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 -# Whether to use AppleTypeService since Mac OS X. - -# don't quote AS_HELP_STRING! + test -n "$ac_ct_AR" && break +done -# Check whether --with-ats was given. -if test "${with_ats+set}" = set; then : - withval=$with_ats; + 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 -if test x$with_ats = xno; then - CFLAGS="$CFLAGS -DHAVE_ATS=0" -elif test x$with_old_mac_fonts = xyes -a x$with_ats != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking AppleTypeService functions" >&5 -$as_echo_n "checking AppleTypeService functions... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +: ${AR=ar} +: ${AR_FLAGS=cru} -#if defined(__GNUC__) && defined(__APPLE_CC__) -# include -# include -#else -# include -# include -#endif -int -main () -{ - FSSpec* pathSpec; - ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); -#if HAVE_FSSPEC - ATSFontGetFileSpecification( 0, pathSpec ); -#endif +{ $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_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - CFLAGS="$CFLAGS -DHAVE_ATS=1" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - CFLAGS="$CFLAGS -DHAVE_ATS=0" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -case "$CFLAGS" in - *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: -*** WARNING - FSSpec/FSRef/QuickDraw/ATS options are explicitly given, - thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c. - " >&5 -$as_echo "$as_me: WARNING: -*** WARNING - FSSpec/FSRef/QuickDraw/ATS options are explicitly given, - thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c. - " >&2;} - CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/' - ;; - *) - ;; -esac - - - - - - - +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 -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' +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=: -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' +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 -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +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 -# 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' +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 -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO +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 -{ $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' + 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 - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' + RANLIB="$ac_cv_prog_RANLIB" fi -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} +test -z "$RANLIB" && RANLIB=: -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 +# 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 @@ -5410,77 +5556,9 @@ 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" - { test -f "$ac_path_SED" && $as_test_x "$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//" @@ -5492,74 +5570,48 @@ 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 : +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 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 + 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_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# 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 + 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 - 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 + +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 - ac_cv_path_FGREP=$FGREP + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } 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 -n "$AWK" && break +done -test -z "$GREP" && GREP=grep @@ -5578,656 +5630,557 @@ test -z "$GREP" && GREP=grep +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} -# 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 +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} -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 : + +# 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 - # 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 +# 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 -{ $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 + 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 - 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. + + # 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 - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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 - done -IFS=$as_save_IFS fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= 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; } +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: no" >&5 -$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi - - test -n "$DUMPBIN" && break - done +# 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 -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; else - lt_unset=false + with_sysroot=no 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' - ;; +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 - -{ $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 - ;; +# 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 - ;; - * ) # 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; } + 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*|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*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) + 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-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) + 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 () +{ -{ $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 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes 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 + 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 -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 - - - - - - - - +need_locks="$enable_libtool_lock" 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 + # 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_OBJDUMP+:} false; then : +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. + 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 @@ -6235,8 +6188,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + 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 @@ -6246,10 +6199,10 @@ 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; } +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; } @@ -6257,17 +6210,17 @@ 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 +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_OBJDUMP+:} false; then : +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} 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. + 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 @@ -6275,8 +6228,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" + 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 @@ -6286,17 +6239,17 @@ 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; } +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_OBJDUMP" = x; then - OBJDUMP="false" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6304,273 +6257,142 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OBJDUMP=$ac_ct_OBJDUMP + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else - OBJDUMP="$ac_cv_prog_OBJDUMP" + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi -test -z "$OBJDUMP" && OBJDUMP=objdump +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 -{ $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 : + 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 - 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 - ;; + 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 -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 - ;; +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 -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 +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 - ;; - -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' - ;; +done + done +IFS=$as_save_IFS -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; +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 -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 + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" else - lt_cv_deplibs_check_method=pass_all + 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 - ;; - -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 +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" 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 + 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_DLLTOOL+:} false; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. + 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 @@ -6578,8 +6400,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + 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 @@ -6589,10 +6411,10 @@ 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; } +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; } @@ -6600,17 +6422,17 @@ 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 +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_DLLTOOL+:} false; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} 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. + 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 @@ -6618,8 +6440,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" + 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 @@ -6629,17 +6451,17 @@ 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; } +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_DLLTOOL" = x; then - DLLTOOL="false" + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6647,114 +6469,62 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - DLLTOOL=$ac_ct_DLLTOOL + NMEDIT=$ac_ct_NMEDIT fi else - DLLTOOL="$ac_cv_prog_DLLTOOL" + NMEDIT="$ac_cv_prog_NMEDIT" 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 : + 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 - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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 -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } +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 - 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 +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_AR+:} false; then : +if ${ac_cv_prog_ac_ct_LIPO+:} 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. + 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 @@ -6762,8 +6532,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="$ac_prog" + 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 @@ -6773,21 +6543,17 @@ 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; } +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 - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" + if test "x$ac_ct_LIPO" = x; then + LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6795,91 +6561,22 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - AR=$ac_ct_AR + LIPO=$ac_ct_LIPO 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 + LIPO="$ac_cv_prog_LIPO" 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 + 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_STRIP+:} false; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + 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 @@ -6887,8 +6584,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" + 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 @@ -6898,10 +6595,10 @@ 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; } +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; } @@ -6909,17 +6606,17 @@ 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 +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_STRIP+:} false; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} 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. + 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 @@ -6927,8 +6624,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" + 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 @@ -6938,17 +6635,17 @@ 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; } +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_STRIP" = x; then - STRIP=":" + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6956,29 +6653,22 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - STRIP=$ac_ct_STRIP + OTOOL=$ac_ct_OTOOL fi else - STRIP="$ac_cv_prog_STRIP" + OTOOL="$ac_cv_prog_OTOOL" 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 + 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_RANLIB+:} false; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + 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 @@ -6986,8 +6676,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + 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 @@ -6997,10 +6687,10 @@ 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; } +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; } @@ -7008,17 +6698,17 @@ 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 +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_RANLIB+:} false; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} 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. + 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 @@ -7026,8 +6716,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" + 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 @@ -7037,17 +6727,17 @@ 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; } +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_RANLIB" = x; then - RANLIB=":" + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) @@ -7055,42 +6745,17 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - RANLIB=$ac_ct_RANLIB + OTOOL64=$ac_ct_OTOOL64 fi else - RANLIB="$ac_cv_prog_RANLIB" + OTOOL64="$ac_cv_prog_OTOOL64" 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 @@ -7112,1175 +6777,1016 @@ 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 "$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 - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. + 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 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_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 + 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. */ -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; } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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; } - test -n "$AWK" && break -done + { $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 +{ $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 -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +fi -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} +# 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 -# Allow CC to be a program name with arguments. -compiler=$CC +fi +done -# 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?!! ;)] +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 -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' +fi -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' +done -# 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 +# Set options +enable_win32_dll=yes -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do +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 - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" +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 - # 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 +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 - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" +done + done +IFS=$as_save_IFS - # Check to see that the pipe works correctly. - pipe_works=no +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 - 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 + if test "x$ac_ct_AS" = x; then + AS="false" else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 + 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 - rm -rf conftest* conftst* +else + AS="$ac_cv_prog_AS" +fi - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= + 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 - -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; } +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: 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='@' + { $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 -{ $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 + enable_dlopen=no -# 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 + # 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 - 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 + enable_shared=yes +fi - 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" + + + + + + # 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 - ;; - esac + done + IFS="$lt_save_ifs" ;; esac - fi - rm -rf conftest* - ;; -esac +else + enable_static=yes +fi -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + + +# 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 - 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=: + pic_mode=default fi +test -z "$pic_mode" && pic_mode=default - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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; } + + + # 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + enable_fast_install=yes 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# 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" + + + -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 + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST 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 "$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 - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_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 + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs 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; } +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 - 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 + + + + +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 -else - LIPO="$ac_cv_prog_LIPO" -fi + ;; +esac - 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 : +# 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 - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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 -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; } + +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 -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 : + + + +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 - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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 -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; } + +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 "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 + MAGIC_CMD=: 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + ;; +esac -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 +# 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 -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +# Source file extension for C test sources. +ac_ext=c - 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 +# 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);}' @@ -8288,476 +7794,474 @@ fi +# 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 - { $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. */ + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= -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" + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' -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; } + 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 + ;; - { $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' ;; + 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 - ;; - 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 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; -done + 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 + ;; -# Set options -enable_win32_dll=yes + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; -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 + *) + 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 + ;; -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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' + ;; -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 + 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' + ;; - 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 + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + 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' + ;; + 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 + ;; -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 + 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' + ;; -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; -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 + rdos*) + lt_prog_compiler_static='-non_shared' + ;; - 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 + 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 - DLLTOOL="$ac_cv_prog_DLLTOOL" + 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 - 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 : +# +# 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 - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 - + 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 -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -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; } +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no 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 @@ -8765,31 +8269,46 @@ test -z "$OBJDUMP" && OBJDUMP=objdump - enable_dlopen=no +# +# 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; } - # 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 +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : else - enable_shared=yes + lt_prog_compiler_static= fi @@ -8798,92 +8317,134 @@ 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 + { $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 - enable_static=yes -fi - - + 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; } -# 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 + { $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 - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - + 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; } - # 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 +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 - enable_fast_install=yes + need_locks=no fi @@ -8891,2207 +8452,1251 @@ 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 + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=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 -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - + 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* | netbsdelf*-gnu) + 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 + ;; -test -z "$LN_S" && LN_S="ln -s" + 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 + link_all_deplibs=no + 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 -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST + aix_libpath=$lt_cv_aix_libpath_ 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 + 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 - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 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 >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : - - - -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 + 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 - ;; -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" +fi -old_CC="$CC" -old_CFLAGS="$CFLAGS" + aix_libpath=$lt_cv_aix_libpath_ +fi -# 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 + 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 + ;; -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-%%"` + 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 + ;; -# 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 - : + 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 - 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 + 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 + ;; -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi + darwin* | rhapsody*) -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 + 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 - MAGIC_CMD=: + whole_archive_flag_spec='' fi -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 - ;; -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;" + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' + # 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' + ;; + *) -# 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 : + # 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_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 + 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 conftest* + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" 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; } +{ $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_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +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 - : -fi - + 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 + ;; - - 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' + netbsd* | netbsdelf*-gnu) + 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 ;; - 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 + 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 ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + *nto* | *qnx*) ;; - 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' + 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 ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' + 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' ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= + 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=: ;; - 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 - ;; + 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].*) ;; *) - lt_prog_compiler_pic='-fPIC' + # 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 ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. + 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 ;; - 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 + 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 ;; - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' + 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 - lt_prog_compiler_pic=-Kconform_pic + 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 ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac + 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' - 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" + 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 ;; - 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' + + 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 - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + 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 ;; - 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' + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no ;; - 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' + *) + 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 - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; + fi + fi - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no - 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 - ;; +with_gnu_ld=$with_gnu_ld - 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. +# Do we need to explicitly link libc? # -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 : +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 - 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* + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext -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 { { 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* -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}: 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 @@ -11598,17 +10203,6 @@ 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 @@ -11725,7 +10319,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # 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 @@ -11739,428 +10333,2389 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) 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 () -{ + 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' + ;; + +netbsdelf*-gnu) + version_type=linux + 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='NetBSD ld.elf_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: + + + + +# checks for native programs to generate building tool + +if test ${cross_compiling} = yes; then + # Extract the first word of "${build}-gcc", so it can be a program name with args. +set dummy ${build}-gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_BUILD"; then + ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC_BUILD="${build}-gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC_BUILD=$ac_cv_prog_CC_BUILD +if test -n "$CC_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5 +$as_echo "$CC_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "${CC_BUILD}" && # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_BUILD"; then + ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC_BUILD="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC_BUILD=$ac_cv_prog_CC_BUILD +if test -n "$CC_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5 +$as_echo "$CC_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "${CC_BUILD}" && # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_BUILD"; then + ac_cv_prog_CC_BUILD="$CC_BUILD" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC_BUILD="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC_BUILD + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC_BUILD to just the basename; use the full file name. + shift + ac_cv_prog_CC_BUILD="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC_BUILD=$ac_cv_prog_CC_BUILD +if test -n "$CC_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_BUILD" >&5 +$as_echo "$CC_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -z "${CC_BUILD}" && as_fn_error $? "cannot find native C compiler" "$LINENO" 5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of native executables" >&5 +$as_echo_n "checking for suffix of native executables... " >&6; } + rm -f a.* b.* a_out.exe conftest.* + echo > conftest.c "int main() { return 0;}" + ${CC_BUILD} conftest.c || as_fn_error $? "native C compiler is not working" "$LINENO" 5 + rm -f conftest.c + if test -x a.out -o -x b.out -o -x conftest; then + EXEEXT_BUILD="" + elif test -x a_out.exe -o -x conftest.exe; then + EXEEXT_BUILD=".exe" + elif test -x conftest.*; then + EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\././'` + fi + rm -f a.* b.* a_out.exe conftest.* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT_BUILD" >&5 +$as_echo "$EXEEXT_BUILD" >&6; } +else + CC_BUILD=${CC} + EXEEXT_BUILD=${EXEEXT} +fi + + + + + +# auxiliary programs + +# Extract the first word of "rmdir", so it can be a program name with args. +set dummy rmdir; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RMDIR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RMDIR"; then + ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RMDIR="rmdir" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RMDIR=$ac_cv_prog_RMDIR +if test -n "$RMDIR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5 +$as_echo "$RMDIR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Since this file will be finally moved to another directory we make +# the path of the install script absolute. This small code snippet has +# been taken from automake's `ylwrap' script. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +case "$INSTALL" in +/*) + ;; +*/*) + INSTALL="`pwd`/$INSTALL" + ;; +esac + + +# checks for header files + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#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 + +for ac_header in fcntl.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +# checks for typedefs, structures, and compiler characteristics + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - ; - 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 +else + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_int=0 + fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } - 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 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF - # 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 - ;; +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : -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 - ;; +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi -*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' - ;; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -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" - ;; +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF -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 - ;; +# check whether cpp computation of size of int and long in ftconfig.in works -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 - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpp computation of bit length in ftconfig.in works" >&5 +$as_echo_n "checking whether cpp computation of bit length in ftconfig.in works... " >&6; } +orig_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}" -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 +ac_clean_files= +for f in ft2build.h ftoption.h ftstdlib.h; do + if test ! -f $f; then + ac_clean_files="$ac_clean_files $f" + touch $f fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; +done + +cat > conftest.c <<\_ACEOF +#include +#define FT_CONFIG_OPTIONS_H "ftoption.h" +#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h" +#define FT_UINT_MAX UINT_MAX +#define FT_ULONG_MAX ULONG_MAX +#include "ftconfig.in" +_ACEOF +echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int} +echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int} +echo >> conftest.c "#endif" +echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long} +echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long} +echo >> conftest.c "#endif" -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 - ;; +${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh +eval `cat conftest.sh` +rm -f conftest.* $ac_clean_files -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 - ;; +if test x != "x${ac_cpp_ft_sizeof_int}" \ + -a x != x"${ac_cpp_ft_sizeof_long}"; then + unset ft_use_autoconf_sizeof_types +else + ft_use_autoconf_sizeof_types=yes +fi -*) - dynamic_linker=no - ;; +# Check whether --enable-biarch-config was given. +if test "${enable_biarch_config+set}" = set; then : + enableval=$enable_biarch_config; +fi + + +case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in + :yes:yes:) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken but use it" >&5 +$as_echo "broken but use it" >&6; } + unset ft_use_autoconf_sizeof_types + ;; + ::no:) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: works but ignore it" >&5 +$as_echo "works but ignore it" >&6; } + ft_use_autoconf_sizeof_types=yes + ;; + ::yes: | :::) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + unset ft_use_autoconf_sizeof_types + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ft_use_autoconf_sizeof_types=yes + ;; esac -{ $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" +if test x"${ft_use_autoconf_sizeof_types}" = xyes; then + +$as_echo "#define FT_USE_AUTOCONF_SIZEOF_TYPES /**/" >>confdefs.h + 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" +CPPFLAGS="${orig_CPPFLAGS}" + + +# checks for library functions + +# Here we check whether we can use our mmap file component. + +# Check whether --enable-mmap was given. +if test "${enable_mmap+set}" = set; then : + enableval=$enable_mmap; enable_mmap="no" +else + enable_mmap="yes" fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test "x${enable_mmap}" != "xno"; then + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi +done + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF +fi +done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include +#include +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ +#endif /* no HAVE_GETPAGESIZE */ +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + pagesize = getpagesize (); + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then +$as_echo "#define HAVE_MMAP 1" >>confdefs.h +fi +rm -f conftest.mmap conftest.txt +fi +if test "x${enable_mmap}" = "xno" \ + -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then + FTSYS_SRC='$(BASE_DIR)/ftsystem.c' +else + FTSYS_SRC='$(BUILD_DIR)/ftsystem.c' + ac_fn_c_check_decl "$LINENO" "munmap" "ac_cv_have_decl_munmap" " +#ifdef HAVE_UNISTD_H +#include +#endif +#include +" +if test "x$ac_cv_have_decl_munmap" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MUNMAP $ac_have_decl +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for munmap's first parameter type" >&5 +$as_echo_n "checking for munmap's first parameter type... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int munmap(void *, size_t); +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: void *" >&5 +$as_echo "void *" >&6; } +$as_echo "#define MUNMAP_USES_VOIDP /**/" >>confdefs.h +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: char *" >&5 +$as_echo "char *" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +for ac_func in memcpy memmove +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done +# get compiler flags right +# +# We try to make the compiler work for C89-strict source. Even if the +# C compiler is gcc and C89 flags are available, some system headers +# (e.g., Android Bionic libc) are broken in C89 mode. We have to check +# whether the compilation finishes successfully. +# +# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW. +# +# To avoid zillions of +# +# ISO C90 does not support 'long long' +# +# warnings, we disable `-pedantic' for gcc version < 4.6. +# +if test "x$GCC" = xyes; then + XX_CFLAGS="-Wall" + case "$host" in + *-*-mingw*) + XX_ANSIFLAGS="-pedantic" + ;; + *) + GCC_VERSION=`$CC -dumpversion` + GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([^.][^.]*\).*/\1/'` + GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[^.][^.]*.\([^.][^.]*\).*/\1/'` + XX_PEDANTIC=-pedantic + if test $GCC_MAJOR -lt 4; then + XX_PEDANTIC= + else + if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then + XX_PEDANTIC= + fi + fi + XX_ANSIFLAGS="" + for a in $XX_PEDANTIC -ansi + do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc compiler flag ${a} to assure ANSI C works correctly" >&5 +$as_echo_n "checking gcc compiler flag ${a} to assure ANSI C works correctly... " >&6; } + orig_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + { + puts( "" ); + return 0; + } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, add it to XX_ANSIFLAGS" >&5 +$as_echo "ok, add it to XX_ANSIFLAGS" >&6; } + XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="${orig_CFLAGS}" + done + ;; + esac +else + case "$host" in + *-dec-osf*) + CFLAGS= + XX_CFLAGS="-std1 -g3" + XX_ANSIFLAGS= + ;; + *) + XX_CFLAGS= + XX_ANSIFLAGS= + ;; + esac +fi +# All library tests below try `pkg-config' first. If that fails, a function +# from the library is tested in the traditional autoconf way (zlib, bzip2), +# or a config script is called (libpng). +# +# The `xxx_reqpriv' variables are for the `Requires.private' field in +# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private' +# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file. +# +# The `xxx_libstaticconf' variables are for the `freetype-config' script. +# +# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the +# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set +# for a library by the user, no entry for this library is added to +# `Requires.private'. Instead, it gets added to `Libs.private' +# check for system zlib +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then : + withval=$with_zlib; +else + with_zlib=auto +fi +have_zlib=no +if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then + zlib_pkg="zlib" + have_zlib_pkg=no + if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$zlib_pkg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$zlib_pkg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_zlib_pkg=yes +fi + fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5 +$as_echo_n "checking for ZLIB... " >&6; } +if test -n "$ZLIB_CFLAGS"; then + pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$zlib_pkg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$zlib_pkg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "$zlib_pkg" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$ZLIB_LIBS"; then + pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$zlib_pkg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$zlib_pkg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "$zlib_pkg" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$zlib_pkg" 2>&1` + else + ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$zlib_pkg" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ZLIB_PKG_ERRORS" >&5 + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS + ZLIB_LIBS=$pkg_cv_ZLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_zlib="yes (pkg-config)" +fi + if test $have_zlib_pkg = yes; then + # we have zlib.pc + zlib_reqpriv="$zlib_pkg" + zlib_libpriv= + zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"` + else + zlib_reqpriv= + if test "$have_zlib" != no; then + # ZLIB_CFLAGS and ZLIB_LIBS are set by the user + zlib_libpriv="$ZLIB_LIBS" + zlib_libstaticconf="$ZLIB_LIBS" + have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)" + else + # fall back to standard autoconf test + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzsetparams in -lz" >&5 +$as_echo_n "checking for gzsetparams in -lz... " >&6; } +if ${ac_cv_lib_z_gzsetparams+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gzsetparams (); +int +main () +{ +return gzsetparams (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_gzsetparams=yes +else + ac_cv_lib_z_gzsetparams=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzsetparams" >&5 +$as_echo "$ac_cv_lib_z_gzsetparams" >&6; } +if test "x$ac_cv_lib_z_gzsetparams" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes; then : + have_zlib="yes (autoconf test)" + zlib_libpriv="-lz" + zlib_libstaticconf="$zlib_libpriv" + ZLIB_LIBS="$zlib_libpriv" +fi +fi + fi + fi +fi +if test x"$with_zlib" = xyes -a "$have_zlib" = no; then + as_fn_error $? "external zlib support requested but library not found" "$LINENO" 5 +fi +# check for system libbz2 +# Check whether --with-bzip2 was given. +if test "${with_bzip2+set}" = set; then : + withval=$with_bzip2; +else + with_bzip2=auto +fi +have_bzip2=no +if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then + bzip2_pkg="bzip2" + have_bzip2_pkg=no + if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$bzip2_pkg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$bzip2_pkg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_bzip2_pkg=yes +fi + fi - { $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 +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZIP2" >&5 +$as_echo_n "checking for BZIP2... " >&6; } - # 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 +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 - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported + pkg_failed=yes 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 + 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 test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes 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 - ;; + _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 - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; + : +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 - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; + 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= - 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 : + if test "$have_bzip2" != no; then + # BZIP2_CFLAGS and BZIP2_LIBS are set by the user + bzip2_libpriv="$BZIP2_LIBS" + bzip2_libstaticconf="$BZIP2_LIBS" + have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)" + else + # fall back to standard autoconf test + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzDecompress in -lbz2" >&5 +$as_echo_n "checking for BZ2_bzDecompress in -lbz2... " >&6; } +if ${ac_cv_lib_bz2_BZ2_bzDecompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" +LIBS="-lbz2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12170,597 +12725,957 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char dlopen (); +char BZ2_bzDecompress (); int main () { -return dlopen (); +return BZ2_bzDecompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes + ac_cv_lib_bz2_BZ2_bzDecompress=yes else - ac_cv_lib_dl_dlopen=no + ac_cv_lib_bz2_BZ2_bzDecompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_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" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzDecompress" >&5 +$as_echo "$ac_cv_lib_bz2_BZ2_bzDecompress" >&6; } +if test "x$ac_cv_lib_bz2_BZ2_bzDecompress" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default" +if test "x$ac_cv_header_bzlib_h" = xyes; then : + have_bzip2="yes (autoconf test)" + bzip2_libpriv="-lbz2" + bzip2_libstaticconf="$bzip2_libpriv" + BZIP2_LIBS="$bzip2_libpriv" +fi + + +fi + + fi + fi +fi + +if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then + as_fn_error $? "bzip2 support requested but library not found" "$LINENO" 5 +fi + + +# check for system libpng + + +# Check whether --with-png was given. +if test "${with_png+set}" = set; then : + withval=$with_png; else + with_png=auto +fi - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +have_libpng=no +if test x"$with_png" = xyes -o x"$with_png" = xauto; then + libpng_pkg="libpng" + have_libpng_pkg=no + + if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$libpng_pkg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$libpng_pkg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_libpng_pkg=yes fi + fi - ;; +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG" >&5 +$as_echo_n "checking for LIBPNG... " >&6; } - *) - 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" +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 - { $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 + 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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + pkg_failed=yes +fi + else + pkg_failed=untried +fi -/* 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 + + +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 - ac_cv_lib_dld_shl_load=no + _pkg_short_errors_supported=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + 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 -{ $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" + + 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 - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + 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 - { $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 + 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 - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + pkg_failed=yes +fi + else + pkg_failed=untried +fi -/* 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 + + +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 - ac_cv_lib_dl_dlopen=no + _pkg_short_errors_supported=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + if test $_pkg_short_errors_supported = yes; then + HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$harfbuzz_pkg" 2>&1` + else + HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$harfbuzz_pkg" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HARFBUZZ_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + HARFBUZZ_CFLAGS=$pkg_cv_HARFBUZZ_CFLAGS + HARFBUZZ_LIBS=$pkg_cv_HARFBUZZ_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_harfbuzz="yes (pkg-config)" +fi + + if test $have_harfbuzz_pkg = yes; then + # we have harfbuzz.pc + harfbuzz_reqpriv="$harfbuzz_pkg" + harfbuzz_libpriv= + harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"` + else + harfbuzz_reqpriv= + + if test "$have_harfbuzz" != no; then + # HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user + harfbuzz_libpriv="$HARFBUZZ_LIBS" + harfbuzz_libstaticconf="$HARFBUZZ_LIBS" + have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)" + else + # since HarfBuzz is quite a new library we don't fall back to a + # different test; additionally, it has too many dependencies + : + fi + fi +fi + +if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then + as_fn_error $? "harfbuzz support requested but library not found" "$LINENO" 5 +fi + + +# Some options handling SDKs/archs in CFLAGS should be copied +# to LDFLAGS. Apple TechNote 2137 recommends to include these +# options in CFLAGS but not in LDFLAGS. + +save_config_args=$* +set dummy ${CFLAGS} +i=1 +while test $i -le $# +do + c=$1 + + case "${c}" in + -isysroot|-arch) # options taking 1 argument + a=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFLAGS and LDFLAGS share ${c} ${a}" >&5 +$as_echo_n "checking whether CFLAGS and LDFLAGS share ${c} ${a}... " >&6; } + if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5 +$as_echo "no, copy to LDFLAGS" >&6; } + LDFLAGS="${LDFLAGS} ${c} ${a}" + fi + shift 1 + ;; + -m32|-m64|-march=*|-mcpu=*) # options taking no argument + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFLAGS and LDFLAGS share ${c}" >&5 +$as_echo_n "checking whether CFLAGS and LDFLAGS share ${c}... " >&6; } + if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, copy to LDFLAGS" >&5 +$as_echo "no, copy to LDFLAGS" >&6; } + LDFLAGS="${LDFLAGS} ${c}" + fi + ;; + # *) + # AC_MSG_RESULT([${c} is not copied to LDFLAGS]) + # ;; + esac + + shift 1 +done +set ${save_config_args} + + +# Whether to use Mac OS resource-based fonts. + +ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default + + +# Check whether --with-old-mac-fonts was given. +if test "${with_old_mac_fonts+set}" = set; then : + withval=$with_old_mac_fonts; fi -{ $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 + +if test x$with_old_mac_fonts = xyes; then + orig_LDFLAGS="${LDFLAGS}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CoreServices & ApplicationServices of Mac OS X" >&5 +$as_echo_n "checking CoreServices & ApplicationServices of Mac OS X... " >&6; } + ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" + LDFLAGS="$LDFLAGS $ft2_extra_libs" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* 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" + + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include #endif -char dlopen (); + + int main () { -return dlopen (); + + + short res = 0; + + + UseResFile( res ); + + ; 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + ftmac_c='ftmac.c' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS_INLINE macro is ANSI compatible" >&5 +$as_echo_n "checking whether OS_INLINE macro is ANSI compatible... " >&6; } + orig_CFLAGS="$CFLAGS -DFT_MACINTOSH" + CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* 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" + + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include #endif -char dld_link (); + + int main () { -return dld_link (); + + + /* OSHostByteOrder() is typed as OS_INLINE */ + int32_t os_byte_order = OSHostByteOrder(); + + + if ( OSBigEndian != os_byte_order ) + return 1; + + ; return 0; } _ACEOF -if ac_fn_c_try_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 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$orig_CFLAGS" + CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, ANSI incompatible" >&5 +$as_echo "no, ANSI incompatible" >&6; } + CFLAGS="$orig_CFLAGS" fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking type ResourceIndex" >&5 +$as_echo_n "checking type ResourceIndex... " >&6; } + orig_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi - -fi +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +# include +#endif -fi +int +main () +{ - ;; - esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi + ResourceIndex i = 0; + return i; - 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\" + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$orig_CFLAGS" + CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1" - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$orig_CFLAGS" + CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0" - { $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 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + ft2_extra_libs="" + LDFLAGS="${orig_LDFLAGS}" + CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext else - 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" + case x$host_os in + xdarwin*) + CFLAGS="$CFLAGS -DDARWIN_NO_CARBON" + ;; + *) + ;; + esac +fi -#if HAVE_DLFCN_H -#include -#endif -#include +# Whether to use FileManager, which is deprecated since Mac OS X 10.4. -#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 +# Check whether --with-fsspec was given. +if test "${with_fsspec+set}" = set; then : + withval=$with_fsspec; +fi -/* 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"))); +if test x$with_fsspec = xno; then + CFLAGS="$CFLAGS -DHAVE_FSSPEC=0" +elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSSpec-based FileManager" >&5 +$as_echo_n "checking FSSpec-based FileManager... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include #endif -int fnord () { return 42; } -int main () + +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; + FCBPBPtr paramBlock; + short vRefNum; + long dirID; + ConstStr255Param fileName; + FSSpec* spec; + + + /* FSSpec functions: deprecated since Mac OS X 10.4 */ + PBGetFCBInfoSync( paramBlock ); + FSMakeFSSpec( vRefNum, dirID, fileName, spec ); + + + ; + return 0; } -_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 +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$CFLAGS -DHAVE_FSSPEC=1" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + CFLAGS="$CFLAGS -DHAVE_FSSPEC=0" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -fr conftest* +# Whether to use FileManager in Carbon since MacOS 9.x. + + +# Check whether --with-fsref was given. +if test "${with_fsref+set}" = set; then : + withval=$with_fsref; fi -{ $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 test x$with_fsref = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** WARNING + FreeType2 built without FSRef API cannot load + data-fork fonts on MacOS, except of XXX.dfont. + " >&5 +$as_echo "$as_me: WARNING: +*** WARNING + FreeType2 built without FSRef API cannot load + data-fork fonts on MacOS, except of XXX.dfont. + " >&2;} + CFLAGS="$CFLAGS -DHAVE_FSREF=0" +elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FSRef-based FileManager" >&5 +$as_echo_n "checking FSRef-based FileManager... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -#if HAVE_DLFCN_H -#include -#endif -#include -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include #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 +# include +# include #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 () +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* + short vRefNum; + long dirID; + ConstStr255Param fileName; + Boolean* isDirectory; + UInt8* path; + SInt16 desiredRefNum; + SInt16* iterator; + SInt16* actualRefNum; + HFSUniStr255* outForkName; + FSVolumeRefNum volume; + FSCatalogInfoBitmap whichInfo; + FSCatalogInfo* catalogInfo; + FSForkInfo* forkInfo; + FSRef* ref; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi +#if HAVE_FSSPEC + FSSpec* spec; +#endif - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac + /* FSRef functions: no need to check? */ + FSGetForkCBInfo( desiredRefNum, volume, iterator, + actualRefNum, forkInfo, ref, + outForkName ); + FSPathMakeRef( path, ref, isDirectory ); - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +#if HAVE_FSSPEC + FSpMakeFSRef ( spec, ref ); + FSGetCatalogInfo( ref, whichInfo, catalogInfo, + outForkName, spec, ref ); +#endif - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$CFLAGS -DHAVE_FSREF=1" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + CFLAGS="$CFLAGS -DHAVE_FSREF=0" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +# Whether to use QuickDraw API in ToolBox, which is deprecated since +# Mac OS X 10.4. +# Check whether --with-quickdraw-toolbox was given. +if test "${with_quickdraw_toolbox+set}" = set; then : + withval=$with_quickdraw_toolbox; +fi +if test x$with_quickdraw_toolbox = xno; then + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0" +elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in ToolBox" >&5 +$as_echo_n "checking QuickDraw FontManager functions in ToolBox... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif +int +main () +{ + Str255 familyName; + SInt16 familyID = 0; + FMInput* fmIn = NULL; + FMOutput* fmOut = NULL; + GetFontName( familyID, familyName ); + GetFNum( familyName, &familyID ); + fmOut = FMSwapFont( fmIn ); - -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; } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1" else -# 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +# Whether to use QuickDraw API in Carbon, which is deprecated since +# Mac OS X 10.4. +# Check whether --with-quickdraw-carbon was given. +if test "${with_quickdraw_carbon+set}" = set; then : + withval=$with_quickdraw_carbon; +fi +if test x$with_quickdraw_carbon = xno; then + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0" +elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking QuickDraw FontManager functions in Carbon" >&5 +$as_echo_n "checking QuickDraw FontManager functions in Carbon... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif +int +main () +{ - # 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; } + FMFontFamilyIterator famIter; + FMFontFamily family; + Str255 famNameStr; + FMFontFamilyInstanceIterator instIter; + FMFontStyle style; + FMFontSize size; + FMFont font; + FSSpec* pathSpec; - { $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 - ;; + FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption, + &famIter ); + FMGetNextFontFamily( &famIter, &family ); + FMGetFontFamilyName( family, famNameStr ); + FMCreateFontFamilyInstanceIterator( family, &instIter ); + FMGetNextFontFamilyInstance( &instIter, &font, &style, &size ); + FMDisposeFontFamilyInstanceIterator( &instIter ); + FMDisposeFontFamilyIterator( &famIter ); + FMGetFontContainer( font, pathSpec ); - 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; } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +# Whether to use AppleTypeService since Mac OS X. +# Check whether --with-ats was given. +if test "${with_ats+set}" = set; then : + withval=$with_ats; fi -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" +if test x$with_ats = xno; then + CFLAGS="$CFLAGS -DHAVE_ATS=0" +elif test x$with_old_mac_fonts = xyes -a x$with_ats != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking AppleTypeService functions" >&5 +$as_echo_n "checking AppleTypeService functions... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +#if defined(__GNUC__) && defined(__APPLE_CC__) +# include +# include +#else +# include +# include +#endif + + +int +main () +{ + + + FSSpec* pathSpec; + ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope ); +#if HAVE_FSSPEC + ATSFontGetFileSpecification( 0, pathSpec ); +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + CFLAGS="$CFLAGS -DHAVE_ATS=1" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + CFLAGS="$CFLAGS -DHAVE_ATS=0" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +case "$CFLAGS" in + *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** WARNING + FSSpec/FSRef/QuickDraw/ATS options are explicitly given, + thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c. + " >&5 +$as_echo "$as_me: WARNING: +*** WARNING + FSSpec/FSRef/QuickDraw/ATS options are explicitly given, + thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c. + " >&2;} + CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/' + ;; + *) + ;; +esac +# entries in Requires.private are separated by commas; +REQUIRES_PRIVATE="$zlib_reqpriv, \ + $bzip2_reqpriv, \ + $libpng_reqpriv, \ + $harfbuzz_reqpriv" +# beautify +REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \ + | sed -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/, */,/g' \ + -e 's/,,*/,/g' \ + -e 's/^,*//' \ + -e 's/,*$//' \ + -e 's/,/, /g'` +LIBS_PRIVATE="$zlib_libpriv \ + $bzip2_libpriv \ + $libpng_libpriv \ + $harfbuzz_libpriv \ + $ft2_extra_libs" +# beautify +LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ + | sed -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/ */ /g'` +LIBSSTATIC_CONFIG="-lfreetype \ + $zlib_libstaticconf \ + $bzip2_libstaticconf \ + $libpng_libstaticconf \ + $harfbuzz_libstaticconf \ + $ft2_extra_libs" +# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later +# on if necessary; also beautify +LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \ + | sed -e 's|-L */usr/lib64/* | |g' \ + -e 's|-L */usr/lib/* | |g' \ + -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/ */ /g'` - ac_config_commands="$ac_config_commands libtool" -# Only expand once: +# changing LDFLAGS value should only be done after +# lt_cv_prog_compiler_static_works test +if test "$have_zlib" != no; then + CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" +fi +if test "$have_bzip2" != no; then + CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + LDFLAGS="$LDFLAGS $BZIP2_LIBS" +fi +if test "$have_libpng" != no; then + CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" + LDFLAGS="$LDFLAGS $LIBPNG_LIBS" +fi +if test "$have_harfbuzz" != no; then + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ" + LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS" +fi @@ -12776,7 +13691,7 @@ ac_config_headers="$ac_config_headers ftconfig.h:ftconfig.in" # create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk' # and `builds/unix/unix-cc.mk' that will be used by the build system # -ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in" +ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in" # re-generate the Jamfile to use libtool now @@ -13190,16 +14105,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -13259,28 +14174,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -13301,8 +14204,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeType $as_me 2.4.9, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by FreeType $as_me 2.5.4, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13367,11 +14270,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeType config.status 2.4.9 -configured by $0, generated by GNU Autoconf 2.68, +FreeType config.status 2.5.4 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13461,7 +14364,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -13777,8 +14680,6 @@ do "ftconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;; "unix-cc.mk") CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;; "unix-def.mk") CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;; - "freetype-config") CONFIG_FILES="$CONFIG_FILES freetype-config" ;; - "freetype2.pc") CONFIG_FILES="$CONFIG_FILES freetype2.pc:freetype2.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -15009,4 +15910,21 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: + +Library configuration: + external zlib: $have_zlib + bzip2: $have_bzip2 + libpng: $have_libpng + harfbuzz: $have_harfbuzz +" >&5 +$as_echo "$as_me: + +Library configuration: + external zlib: $have_zlib + bzip2: $have_bzip2 + libpng: $have_libpng + harfbuzz: $have_harfbuzz +" >&6;} + # end of configure.raw diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac index a066216..ab6ee8e 100644 --- a/builds/unix/configure.ac +++ b/builds/unix/configure.ac @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright 2001-2012 by +# Copyright 2001-2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -11,13 +11,13 @@ # indicate that you have read the license and understand and accept it # fully. -AC_INIT([FreeType], [2.4.9], [freetype@nongnu.org], [freetype]) +AC_INIT([FreeType], [2.5.4], [freetype@nongnu.org], [freetype]) AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update docs/VERSION.DLL! -version_info='14:1:8' +version_info='17:3:11' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -34,6 +34,10 @@ AC_PROG_CC AC_PROG_CPP AC_SUBST(EXEEXT) +PKG_PROG_PKG_CONFIG([0.24]) + +LT_INIT(win32-dll) + # checks for native programs to generate building tool @@ -66,32 +70,8 @@ AC_SUBST(CC_BUILD) AC_SUBST(EXEEXT_BUILD) - -# get compiler flags right - -if test "x$GCC" = xyes; then - XX_CFLAGS="-Wall" - XX_ANSIFLAGS="-pedantic -ansi" -else - case "$host" in - *-dec-osf*) - CFLAGS= - XX_CFLAGS="-std1 -g3" - XX_ANSIFLAGS= - ;; - *) - XX_CFLAGS= - XX_ANSIFLAGS= - ;; - esac -fi -AC_SUBST([XX_CFLAGS]) -AC_SUBST([XX_ANSIFLAGS]) - - # auxiliary programs -AC_CHECK_PROG([RMF], [rm], [rm -f]) AC_CHECK_PROG([RMDIR], [rmdir], [rmdir]) @@ -127,8 +107,14 @@ AC_CHECK_SIZEOF([long]) AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works]) orig_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}" -ac_clean_files="ft2build.h ftoption.h ftstdlib.h" -touch ft2build.h ftoption.h ftstdlib.h + +ac_clean_files= +for f in ft2build.h ftoption.h ftstdlib.h; do + if test ! -f $f; then + ac_clean_files="$ac_clean_files $f" + touch $f + fi +done cat > conftest.c <<\_ACEOF #include @@ -147,7 +133,7 @@ echo >> conftest.c "#endif" ${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh eval `cat conftest.sh` -${RMF} conftest.c conftest.sh confft2build.h ftoption.h ftstdlib.h +rm -f conftest.* $ac_clean_files if test x != "x${ac_cpp_ft_sizeof_int}" \ -a x != x"${ac_cpp_ft_sizeof_long}"; then @@ -180,7 +166,8 @@ case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in esac if test x"${ft_use_autoconf_sizeof_types}" = xyes; then - AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES]) + AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [], + [Define if autoconf sizeof types should be used.]) fi CPPFLAGS="${orig_CPPFLAGS}" @@ -222,35 +209,297 @@ AC_SUBST([FTSYS_SRC]) AC_CHECK_FUNCS([memcpy memmove]) +# get compiler flags right +# +# We try to make the compiler work for C89-strict source. Even if the +# C compiler is gcc and C89 flags are available, some system headers +# (e.g., Android Bionic libc) are broken in C89 mode. We have to check +# whether the compilation finishes successfully. +# +# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW. +# +# To avoid zillions of +# +# ISO C90 does not support 'long long' +# +# warnings, we disable `-pedantic' for gcc version < 4.6. +# +if test "x$GCC" = xyes; then + XX_CFLAGS="-Wall" + case "$host" in + *-*-mingw*) + XX_ANSIFLAGS="-pedantic" + ;; + *) + GCC_VERSION=`$CC -dumpversion` + GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'` + GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` + + XX_PEDANTIC=-pedantic + if test $GCC_MAJOR -lt 4; then + XX_PEDANTIC= + else + if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then + XX_PEDANTIC= + fi + fi + + XX_ANSIFLAGS="" + for a in $XX_PEDANTIC -ansi + do + AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly]) + orig_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}" + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + +#include + + ], + [ + + { + puts( "" ); + return 0; + } + + ])], + [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS]) + XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" + ], + [AC_MSG_RESULT([no])]) + CFLAGS="${orig_CFLAGS}" + done + ;; + esac +else + case "$host" in + *-dec-osf*) + CFLAGS= + XX_CFLAGS="-std1 -g3" + XX_ANSIFLAGS= + ;; + *) + XX_CFLAGS= + XX_ANSIFLAGS= + ;; + esac +fi +AC_SUBST([XX_CFLAGS]) +AC_SUBST([XX_ANSIFLAGS]) + + +# All library tests below try `pkg-config' first. If that fails, a function +# from the library is tested in the traditional autoconf way (zlib, bzip2), +# or a config script is called (libpng). +# +# The `xxx_reqpriv' variables are for the `Requires.private' field in +# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private' +# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file. +# +# The `xxx_libstaticconf' variables are for the `freetype-config' script. +# +# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the +# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set +# for a library by the user, no entry for this library is added to +# `Requires.private'. Instead, it gets added to `Libs.private' + + # check for system zlib -# don't quote AS_HELP_STRING! AC_ARG_WITH([zlib], - AS_HELP_STRING([--without-zlib], - [use internal zlib instead of system-wide])) -if test x$with_zlib != xno && test -z "$LIBZ"; then - AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) + [AS_HELP_STRING([--with-zlib=@<:@yes|no|auto@:>@], + [use system zlib instead of internal library @<:@default=auto@:>@])], + [], [with_zlib=auto]) + +have_zlib=no +if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then + zlib_pkg="zlib" + have_zlib_pkg=no + + if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then + PKG_CHECK_EXISTS([$zlib_pkg], [have_zlib_pkg=yes]) + fi + PKG_CHECK_MODULES([ZLIB], [$zlib_pkg], + [have_zlib="yes (pkg-config)"], [:]) + + if test $have_zlib_pkg = yes; then + # we have zlib.pc + zlib_reqpriv="$zlib_pkg" + zlib_libpriv= + zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"` + else + zlib_reqpriv= + + if test "$have_zlib" != no; then + # ZLIB_CFLAGS and ZLIB_LIBS are set by the user + zlib_libpriv="$ZLIB_LIBS" + zlib_libstaticconf="$ZLIB_LIBS" + have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)" + else + # fall back to standard autoconf test + AC_CHECK_LIB([z], + [gzsetparams], + [AC_CHECK_HEADER([zlib.h], + [have_zlib="yes (autoconf test)" + zlib_libpriv="-lz" + zlib_libstaticconf="$zlib_libpriv" + ZLIB_LIBS="$zlib_libpriv"])]) + fi + fi fi -if test x$with_zlib != xno && test -n "$LIBZ"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" - SYSTEM_ZLIB=yes + +if test x"$with_zlib" = xyes -a "$have_zlib" = no; then + AC_MSG_ERROR([external zlib support requested but library not found]) fi + # check for system libbz2 -# don't quote AS_HELP_STRING! AC_ARG_WITH([bzip2], - AS_HELP_STRING([--without-bzip2], - [do not support bzip2 compressed fonts])) -if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then - AC_CHECK_LIB([bz2], [BZ2_bzDecompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])]) + [AS_HELP_STRING([--with-bzip2=@<:@yes|no|auto@:>@], + [support bzip2 compressed fonts @<:@default=auto@:>@])], + [], [with_bzip2=auto]) + +have_bzip2=no +if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then + bzip2_pkg="bzip2" + have_bzip2_pkg=no + + if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then + PKG_CHECK_EXISTS([$bzip2_pkg], [have_bzip2_pkg=yes]) + fi + PKG_CHECK_MODULES([BZIP2], [$bzip2_pkg], + [have_bzip2="yes (pkg-config)"], [:]) + + if test $have_bzip2_pkg = yes; then + # we have bzip2.pc + bzip2_reqpriv="$bzip2_pkg" + bzip2_libpriv= + bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"` + else + bzip2_reqpriv= + + if test "$have_bzip2" != no; then + # BZIP2_CFLAGS and BZIP2_LIBS are set by the user + bzip2_libpriv="$BZIP2_LIBS" + bzip2_libstaticconf="$BZIP2_LIBS" + have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)" + else + # fall back to standard autoconf test + AC_CHECK_LIB([bz2], + [BZ2_bzDecompress], + [AC_CHECK_HEADER([bzlib.h], + [have_bzip2="yes (autoconf test)" + bzip2_libpriv="-lbz2" + bzip2_libstaticconf="$bzip2_libpriv" + BZIP2_LIBS="$bzip2_libpriv"])]) + fi + fi +fi + +if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then + AC_MSG_ERROR([bzip2 support requested but library not found]) +fi + + +# check for system libpng + +AC_ARG_WITH([png], + [AS_HELP_STRING([--with-png=@<:@yes|no|auto@:>@], + [support png compressed OpenType embedded bitmaps @<:@default=auto@:>@])], + [], [with_png=auto]) + +have_libpng=no +if test x"$with_png" = xyes -o x"$with_png" = xauto; then + libpng_pkg="libpng" + have_libpng_pkg=no + + if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then + PKG_CHECK_EXISTS([$libpng_pkg], [have_libpng_pkg=yes]) + fi + PKG_CHECK_MODULES([LIBPNG], [$libpng_pkg], + [have_libpng="yes (pkg-config)"], [:]) + + if test $have_libpng_pkg = yes; then + # we have libpng.pc + libpng_reqpriv="$libpng_pkg" + libpng_libpriv= + libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"` + else + libpng_reqpriv= + + if test "$have_libpng" != no; then + # LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user + libpng_libpriv="$LIBPNG_LIBS" + libpng_libstaticconf="$LIBPNG_LIBS" + have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)" + else + # fall back to config script. + AC_MSG_CHECKING([for libpng-config]) + if which libpng-config > /dev/null 2>&1; then + LIBPNG_CFLAGS=`libpng-config --cflags` + LIBPNG_LIBS=`libpng-config --ldflags` + libpng_libpriv=`libpng-config --static --ldflags` + libpng_libstaticconf="$libpng_libpriv" + have_libpng="yes (libpng-config)" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + fi + fi fi -if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" - LDFLAGS="$LDFLAGS $LIBBZ2" + +if test x"$with_png" = xyes -a "$have_libpng" = no; then + AC_MSG_ERROR([libpng support requested but library not found]) +fi + + +# check for system libharfbuzz + +AC_ARG_WITH([harfbuzz], + [AS_HELP_STRING([--with-harfbuzz=@<:@yes|no|auto@:>@], + [improve auto-hinting of OpenType fonts @<:@default=auto@:>@])], + [], [with_harfbuzz=auto]) + +have_harfbuzz=no +if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then + harfbuzz_pkg="harfbuzz >= 0.9.19" + have_harfbuzz_pkg=no + + if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then + PKG_CHECK_EXISTS([$harfbuzz_pkg], [have_harfbuzz_pkg=yes]) + fi + PKG_CHECK_MODULES([HARFBUZZ], [$harfbuzz_pkg], + [have_harfbuzz="yes (pkg-config)"], [:]) + + if test $have_harfbuzz_pkg = yes; then + # we have harfbuzz.pc + harfbuzz_reqpriv="$harfbuzz_pkg" + harfbuzz_libpriv= + harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"` + else + harfbuzz_reqpriv= + + if test "$have_harfbuzz" != no; then + # HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user + harfbuzz_libpriv="$HARFBUZZ_LIBS" + harfbuzz_libstaticconf="$HARFBUZZ_LIBS" + have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)" + else + # since HarfBuzz is quite a new library we don't fall back to a + # different test; additionally, it has too many dependencies + : + fi + fi +fi + +if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then + AC_MSG_ERROR([harfbuzz support requested but library not found]) fi + # Some options handling SDKs/archs in CFLAGS should be copied # to LDFLAGS. Apple TechNote 2137 recommends to include these # options in CFLAGS but not in LDFLAGS. @@ -276,7 +525,7 @@ do shift 1 ;; -m32|-m64|-march=*|-mcpu=*) # options taking no argument - AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}]) + AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}]) if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null then AC_MSG_RESULT([yes]) @@ -299,15 +548,14 @@ set ${save_config_args} ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default -# don't quote AS_HELP_STRING! AC_ARG_WITH([old-mac-fonts], AS_HELP_STRING([--with-old-mac-fonts], [allow Mac resource-based fonts to be used])) if test x$with_old_mac_fonts = xyes; then orig_LDFLAGS="${LDFLAGS}" AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X]) - FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" - LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS" + ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" + LDFLAGS="$LDFLAGS $ft2_extra_libs" AC_LINK_IFELSE([ AC_LANG_PROGRAM([ @@ -393,7 +641,7 @@ if test x$with_old_mac_fonts = xyes; then CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0" ])], [AC_MSG_RESULT([not found]) - FT2_EXTRA_LIBS="" + ft2_extra_libs="" LDFLAGS="${orig_LDFLAGS}" CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"]) else @@ -408,7 +656,7 @@ else fi -# Whether to use FileManager which is deprecated since Mac OS X 10.4. +# Whether to use FileManager, which is deprecated since Mac OS X 10.4. AC_ARG_WITH([fsspec], AS_HELP_STRING([--with-fsspec], @@ -517,7 +765,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then fi -# Whether to use QuickDraw API in ToolBox which is deprecated since +# Whether to use QuickDraw API in ToolBox, which is deprecated since # Mac OS X 10.4. AC_ARG_WITH([quickdraw-toolbox], @@ -559,7 +807,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then fi -# Whether to use QuickDraw API in Carbon which is deprecated since +# Whether to use QuickDraw API in Carbon, which is deprecated since # Mac OS X 10.4. AC_ARG_WITH([quickdraw-carbon], @@ -613,7 +861,6 @@ fi # Whether to use AppleTypeService since Mac OS X. -# don't quote AS_HELP_STRING! AC_ARG_WITH([ats], AS_HELP_STRING([--with-ats], [use AppleTypeService, if available (default=yes)])) @@ -664,22 +911,82 @@ case "$CFLAGS" in esac -AC_SUBST([ftmac_c]) -AC_SUBST([LIBZ]) -AC_SUBST([LIBBZ2]) -AC_SUBST([CFLAGS]) -AC_SUBST([LDFLAGS]) -AC_SUBST([FT2_EXTRA_LIBS]) -AC_SUBST([SYSTEM_ZLIB]) +# entries in Requires.private are separated by commas; +REQUIRES_PRIVATE="$zlib_reqpriv, \ + $bzip2_reqpriv, \ + $libpng_reqpriv, \ + $harfbuzz_reqpriv" +# beautify +REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \ + | sed -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/, */,/g' \ + -e 's/,,*/,/g' \ + -e 's/^,*//' \ + -e 's/,*$//' \ + -e 's/,/, /g'` + +LIBS_PRIVATE="$zlib_libpriv \ + $bzip2_libpriv \ + $libpng_libpriv \ + $harfbuzz_libpriv \ + $ft2_extra_libs" +# beautify +LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ + | sed -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/ */ /g'` + +LIBSSTATIC_CONFIG="-lfreetype \ + $zlib_libstaticconf \ + $bzip2_libstaticconf \ + $libpng_libstaticconf \ + $harfbuzz_libstaticconf \ + $ft2_extra_libs" +# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later +# on if necessary; also beautify +LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \ + | sed -e 's|-L */usr/lib64/* | |g' \ + -e 's|-L */usr/lib/* | |g' \ + -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/ */ /g'` -LT_INIT(win32-dll) +AC_SUBST([ftmac_c]) +AC_SUBST([REQUIRES_PRIVATE]) +AC_SUBST([LIBS_PRIVATE]) +AC_SUBST([LIBSSTATIC_CONFIG]) AC_SUBST([hardcode_libdir_flag_spec]) AC_SUBST([wl]) AC_SUBST([build_libtool_libs]) +# changing LDFLAGS value should only be done after +# lt_cv_prog_compiler_static_works test + +if test "$have_zlib" != no; then + CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" +fi + +if test "$have_bzip2" != no; then + CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + LDFLAGS="$LDFLAGS $BZIP2_LIBS" +fi +if test "$have_libpng" != no; then + CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" + LDFLAGS="$LDFLAGS $LIBPNG_LIBS" +fi +if test "$have_harfbuzz" != no; then + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ" + LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS" +fi + +AC_SUBST([CFLAGS]) +AC_SUBST([LDFLAGS]) + # configuration file -- stay in 8.3 limit # # since #undef doesn't survive in configuration header files we replace @@ -694,9 +1001,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in], # and `builds/unix/unix-cc.mk' that will be used by the build system # AC_CONFIG_FILES([unix-cc.mk:unix-cc.in - unix-def.mk:unix-def.in - freetype-config - freetype2.pc:freetype2.in]) + unix-def.mk:unix-def.in]) # re-generate the Jamfile to use libtool now # @@ -704,4 +1009,13 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in AC_OUTPUT +AC_MSG_NOTICE([ + +Library configuration: + external zlib: $have_zlib + bzip2: $have_bzip2 + libpng: $have_libpng + harfbuzz: $have_harfbuzz +]) + # end of configure.raw diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index 111dbab..72543cf 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright 2001-2012 by +# Copyright 2001-2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update docs/VERSION.DLL! -version_info='14:1:8' +version_info='17:4:11' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -34,6 +34,10 @@ AC_PROG_CC AC_PROG_CPP AC_SUBST(EXEEXT) +PKG_PROG_PKG_CONFIG([0.24]) + +LT_INIT(win32-dll) + # checks for native programs to generate building tool @@ -66,32 +70,8 @@ AC_SUBST(CC_BUILD) AC_SUBST(EXEEXT_BUILD) - -# get compiler flags right - -if test "x$GCC" = xyes; then - XX_CFLAGS="-Wall" - XX_ANSIFLAGS="-pedantic -ansi" -else - case "$host" in - *-dec-osf*) - CFLAGS= - XX_CFLAGS="-std1 -g3" - XX_ANSIFLAGS= - ;; - *) - XX_CFLAGS= - XX_ANSIFLAGS= - ;; - esac -fi -AC_SUBST([XX_CFLAGS]) -AC_SUBST([XX_ANSIFLAGS]) - - # auxiliary programs -AC_CHECK_PROG([RMF], [rm], [rm -f]) AC_CHECK_PROG([RMDIR], [rmdir], [rmdir]) @@ -127,8 +107,14 @@ AC_CHECK_SIZEOF([long]) AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works]) orig_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}" -ac_clean_files="ft2build.h ftoption.h ftstdlib.h" -touch ft2build.h ftoption.h ftstdlib.h + +ac_clean_files= +for f in ft2build.h ftoption.h ftstdlib.h; do + if test ! -f $f; then + ac_clean_files="$ac_clean_files $f" + touch $f + fi +done cat > conftest.c <<\_ACEOF #include @@ -147,7 +133,7 @@ echo >> conftest.c "#endif" ${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh eval `cat conftest.sh` -${RMF} conftest.c conftest.sh confft2build.h ftoption.h ftstdlib.h +rm -f conftest.* $ac_clean_files if test x != "x${ac_cpp_ft_sizeof_int}" \ -a x != x"${ac_cpp_ft_sizeof_long}"; then @@ -180,7 +166,8 @@ case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in esac if test x"${ft_use_autoconf_sizeof_types}" = xyes; then - AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES]) + AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [], + [Define if autoconf sizeof types should be used.]) fi CPPFLAGS="${orig_CPPFLAGS}" @@ -222,35 +209,297 @@ AC_SUBST([FTSYS_SRC]) AC_CHECK_FUNCS([memcpy memmove]) +# get compiler flags right +# +# We try to make the compiler work for C89-strict source. Even if the +# C compiler is gcc and C89 flags are available, some system headers +# (e.g., Android Bionic libc) are broken in C89 mode. We have to check +# whether the compilation finishes successfully. +# +# Due to bugs in mingwrt 4.0.3 we don't use `-ansi' for MinGW. +# +# To avoid zillions of +# +# ISO C90 does not support 'long long' +# +# warnings, we disable `-pedantic' for gcc version < 4.6. +# +if test "x$GCC" = xyes; then + XX_CFLAGS="-Wall" + case "$host" in + *-*-mingw*) + XX_ANSIFLAGS="-pedantic" + ;; + *) + GCC_VERSION=`$CC -dumpversion` + GCC_MAJOR=`echo "$GCC_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'` + GCC_MINOR=`echo "$GCC_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` + + XX_PEDANTIC=-pedantic + if test $GCC_MAJOR -lt 4; then + XX_PEDANTIC= + else + if test $GCC_MAJOR -eq 4 -a $GCC_MINOR -lt 6; then + XX_PEDANTIC= + fi + fi + + XX_ANSIFLAGS="" + for a in $XX_PEDANTIC -ansi + do + AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly]) + orig_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}" + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + +#include + + ], + [ + + { + puts( "" ); + return 0; + } + + ])], + [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS]) + XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" + ], + [AC_MSG_RESULT([no])]) + CFLAGS="${orig_CFLAGS}" + done + ;; + esac +else + case "$host" in + *-dec-osf*) + CFLAGS= + XX_CFLAGS="-std1 -g3" + XX_ANSIFLAGS= + ;; + *) + XX_CFLAGS= + XX_ANSIFLAGS= + ;; + esac +fi +AC_SUBST([XX_CFLAGS]) +AC_SUBST([XX_ANSIFLAGS]) + + +# All library tests below try `pkg-config' first. If that fails, a function +# from the library is tested in the traditional autoconf way (zlib, bzip2), +# or a config script is called (libpng). +# +# The `xxx_reqpriv' variables are for the `Requires.private' field in +# `freetype2.pc'. The `xxx_libpriv' variables are for the `Libs.private' +# field in `freetype2.pc' if pkg-config doesn't find a proper .pc file. +# +# The `xxx_libstaticconf' variables are for the `freetype-config' script. +# +# Note that a call to PKG_CHECK_MODULES(XXX, ...) sets and creates the +# output variables `XXX_CFLAGS' and `XXX_LIBS'. In case one or both are set +# for a library by the user, no entry for this library is added to +# `Requires.private'. Instead, it gets added to `Libs.private' + + # check for system zlib -# don't quote AS_HELP_STRING! AC_ARG_WITH([zlib], - AS_HELP_STRING([--without-zlib], - [use internal zlib instead of system-wide])) -if test x$with_zlib != xno && test -z "$LIBZ"; then - AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) + [AS_HELP_STRING([--with-zlib=@<:@yes|no|auto@:>@], + [use system zlib instead of internal library @<:@default=auto@:>@])], + [], [with_zlib=auto]) + +have_zlib=no +if test x"$with_zlib" = xyes -o x"$with_zlib" = xauto; then + zlib_pkg="zlib" + have_zlib_pkg=no + + if test x"$ZLIB_CFLAGS" = x -a x"$ZLIB_LIBS" = x; then + PKG_CHECK_EXISTS([$zlib_pkg], [have_zlib_pkg=yes]) + fi + PKG_CHECK_MODULES([ZLIB], [$zlib_pkg], + [have_zlib="yes (pkg-config)"], [:]) + + if test $have_zlib_pkg = yes; then + # we have zlib.pc + zlib_reqpriv="$zlib_pkg" + zlib_libpriv= + zlib_libstaticconf=`$PKG_CONFIG --static --libs "$zlib_pkg"` + else + zlib_reqpriv= + + if test "$have_zlib" != no; then + # ZLIB_CFLAGS and ZLIB_LIBS are set by the user + zlib_libpriv="$ZLIB_LIBS" + zlib_libstaticconf="$ZLIB_LIBS" + have_zlib="yes (ZLIB_CFLAGS and ZLIB_LIBS)" + else + # fall back to standard autoconf test + AC_CHECK_LIB([z], + [gzsetparams], + [AC_CHECK_HEADER([zlib.h], + [have_zlib="yes (autoconf test)" + zlib_libpriv="-lz" + zlib_libstaticconf="$zlib_libpriv" + ZLIB_LIBS="$zlib_libpriv"])]) + fi + fi fi -if test x$with_zlib != xno && test -n "$LIBZ"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" - LDFLAGS="$LDFLAGS $LIBZ" - SYSTEM_ZLIB=yes + +if test x"$with_zlib" = xyes -a "$have_zlib" = no; then + AC_MSG_ERROR([external zlib support requested but library not found]) fi + # check for system libbz2 -# don't quote AS_HELP_STRING! AC_ARG_WITH([bzip2], - AS_HELP_STRING([--without-bzip2], - [do not support bzip2 compressed fonts])) -if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then - AC_CHECK_LIB([bz2], [BZ2_bzDecompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])]) + [AS_HELP_STRING([--with-bzip2=@<:@yes|no|auto@:>@], + [support bzip2 compressed fonts @<:@default=auto@:>@])], + [], [with_bzip2=auto]) + +have_bzip2=no +if test x"$with_bzip2" = xyes -o x"$with_bzip2" = xauto; then + bzip2_pkg="bzip2" + have_bzip2_pkg=no + + if test x"$BZIP2_CFLAGS" = x -a x"$BZIP2_LIBS" = x; then + PKG_CHECK_EXISTS([$bzip2_pkg], [have_bzip2_pkg=yes]) + fi + PKG_CHECK_MODULES([BZIP2], [$bzip2_pkg], + [have_bzip2="yes (pkg-config)"], [:]) + + if test $have_bzip2_pkg = yes; then + # we have bzip2.pc + bzip2_reqpriv="$bzip2_pkg" + bzip2_libpriv= + bzip2_libstaticconf=`$PKG_CONFIG --static --libs "$bzip2_pkg"` + else + bzip2_reqpriv= + + if test "$have_bzip2" != no; then + # BZIP2_CFLAGS and BZIP2_LIBS are set by the user + bzip2_libpriv="$BZIP2_LIBS" + bzip2_libstaticconf="$BZIP2_LIBS" + have_bzip2="yes (BZIP2_CFLAGS and BZIP2_LIBS)" + else + # fall back to standard autoconf test + AC_CHECK_LIB([bz2], + [BZ2_bzDecompress], + [AC_CHECK_HEADER([bzlib.h], + [have_bzip2="yes (autoconf test)" + bzip2_libpriv="-lbz2" + bzip2_libstaticconf="$bzip2_libpriv" + BZIP2_LIBS="$bzip2_libpriv"])]) + fi + fi +fi + +if test x"$with_bzip2" = xyes -a "$have_bzip2" = no; then + AC_MSG_ERROR([bzip2 support requested but library not found]) +fi + + +# check for system libpng + +AC_ARG_WITH([png], + [AS_HELP_STRING([--with-png=@<:@yes|no|auto@:>@], + [support png compressed OpenType embedded bitmaps @<:@default=auto@:>@])], + [], [with_png=auto]) + +have_libpng=no +if test x"$with_png" = xyes -o x"$with_png" = xauto; then + libpng_pkg="libpng" + have_libpng_pkg=no + + if test x"$LIBPNG_CFLAGS" = x -a x"$LIBPNG_LIBS" = x; then + PKG_CHECK_EXISTS([$libpng_pkg], [have_libpng_pkg=yes]) + fi + PKG_CHECK_MODULES([LIBPNG], [$libpng_pkg], + [have_libpng="yes (pkg-config)"], [:]) + + if test $have_libpng_pkg = yes; then + # we have libpng.pc + libpng_reqpriv="$libpng_pkg" + libpng_libpriv= + libpng_libstaticconf=`$PKG_CONFIG --static --libs "$libpng_pkg"` + else + libpng_reqpriv= + + if test "$have_libpng" != no; then + # LIBPNG_CFLAGS and LIBPNG_LIBS are set by the user + libpng_libpriv="$LIBPNG_LIBS" + libpng_libstaticconf="$LIBPNG_LIBS" + have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)" + else + # fall back to config script. + AC_MSG_CHECKING([for libpng-config]) + if which libpng-config > /dev/null 2>&1; then + LIBPNG_CFLAGS=`libpng-config --cflags` + LIBPNG_LIBS=`libpng-config --ldflags` + libpng_libpriv=`libpng-config --static --ldflags` + libpng_libstaticconf="$libpng_libpriv" + have_libpng="yes (libpng-config)" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + fi + fi fi -if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then - CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" - LDFLAGS="$LDFLAGS $LIBBZ2" + +if test x"$with_png" = xyes -a "$have_libpng" = no; then + AC_MSG_ERROR([libpng support requested but library not found]) +fi + + +# check for system libharfbuzz + +AC_ARG_WITH([harfbuzz], + [AS_HELP_STRING([--with-harfbuzz=@<:@yes|no|auto@:>@], + [improve auto-hinting of OpenType fonts @<:@default=auto@:>@])], + [], [with_harfbuzz=auto]) + +have_harfbuzz=no +if test x"$with_harfbuzz" = xyes -o x"$with_harfbuzz" = xauto; then + harfbuzz_pkg="harfbuzz >= 0.9.19" + have_harfbuzz_pkg=no + + if test x"$HARFBUZZ_CFLAGS" = x -a x"$HARFBUZZ_LIBS" = x; then + PKG_CHECK_EXISTS([$harfbuzz_pkg], [have_harfbuzz_pkg=yes]) + fi + PKG_CHECK_MODULES([HARFBUZZ], [$harfbuzz_pkg], + [have_harfbuzz="yes (pkg-config)"], [:]) + + if test $have_harfbuzz_pkg = yes; then + # we have harfbuzz.pc + harfbuzz_reqpriv="$harfbuzz_pkg" + harfbuzz_libpriv= + harfbuzz_libstaticconf=`$PKG_CONFIG --static --libs "$harfbuzz_pkg"` + else + harfbuzz_reqpriv= + + if test "$have_harfbuzz" != no; then + # HARFBUZZ_CFLAGS and HARFBUZZ_LIBS are set by the user + harfbuzz_libpriv="$HARFBUZZ_LIBS" + harfbuzz_libstaticconf="$HARFBUZZ_LIBS" + have_harfbuzz="yes (HARFBUZZ_CFLAGS and HARFBUZZ_LIBS)" + else + # since HarfBuzz is quite a new library we don't fall back to a + # different test; additionally, it has too many dependencies + : + fi + fi +fi + +if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then + AC_MSG_ERROR([harfbuzz support requested but library not found]) fi + # Some options handling SDKs/archs in CFLAGS should be copied # to LDFLAGS. Apple TechNote 2137 recommends to include these # options in CFLAGS but not in LDFLAGS. @@ -276,7 +525,7 @@ do shift 1 ;; -m32|-m64|-march=*|-mcpu=*) # options taking no argument - AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}]) + AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c}]) if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null then AC_MSG_RESULT([yes]) @@ -299,15 +548,14 @@ set ${save_config_args} ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default -# don't quote AS_HELP_STRING! AC_ARG_WITH([old-mac-fonts], AS_HELP_STRING([--with-old-mac-fonts], [allow Mac resource-based fonts to be used])) if test x$with_old_mac_fonts = xyes; then orig_LDFLAGS="${LDFLAGS}" AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X]) - FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" - LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS" + ft2_extra_libs="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices" + LDFLAGS="$LDFLAGS $ft2_extra_libs" AC_LINK_IFELSE([ AC_LANG_PROGRAM([ @@ -393,7 +641,7 @@ if test x$with_old_mac_fonts = xyes; then CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0" ])], [AC_MSG_RESULT([not found]) - FT2_EXTRA_LIBS="" + ft2_extra_libs="" LDFLAGS="${orig_LDFLAGS}" CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"]) else @@ -408,7 +656,7 @@ else fi -# Whether to use FileManager which is deprecated since Mac OS X 10.4. +# Whether to use FileManager, which is deprecated since Mac OS X 10.4. AC_ARG_WITH([fsspec], AS_HELP_STRING([--with-fsspec], @@ -517,7 +765,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then fi -# Whether to use QuickDraw API in ToolBox which is deprecated since +# Whether to use QuickDraw API in ToolBox, which is deprecated since # Mac OS X 10.4. AC_ARG_WITH([quickdraw-toolbox], @@ -559,7 +807,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then fi -# Whether to use QuickDraw API in Carbon which is deprecated since +# Whether to use QuickDraw API in Carbon, which is deprecated since # Mac OS X 10.4. AC_ARG_WITH([quickdraw-carbon], @@ -613,7 +861,6 @@ fi # Whether to use AppleTypeService since Mac OS X. -# don't quote AS_HELP_STRING! AC_ARG_WITH([ats], AS_HELP_STRING([--with-ats], [use AppleTypeService, if available (default=yes)])) @@ -664,22 +911,82 @@ case "$CFLAGS" in esac -AC_SUBST([ftmac_c]) -AC_SUBST([LIBZ]) -AC_SUBST([LIBBZ2]) -AC_SUBST([CFLAGS]) -AC_SUBST([LDFLAGS]) -AC_SUBST([FT2_EXTRA_LIBS]) -AC_SUBST([SYSTEM_ZLIB]) +# entries in Requires.private are separated by commas; +REQUIRES_PRIVATE="$zlib_reqpriv, \ + $bzip2_reqpriv, \ + $libpng_reqpriv, \ + $harfbuzz_reqpriv" +# beautify +REQUIRES_PRIVATE=`echo "$REQUIRES_PRIVATE" \ + | sed -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/, */,/g' \ + -e 's/,,*/,/g' \ + -e 's/^,*//' \ + -e 's/,*$//' \ + -e 's/,/, /g'` + +LIBS_PRIVATE="$zlib_libpriv \ + $bzip2_libpriv \ + $libpng_libpriv \ + $harfbuzz_libpriv \ + $ft2_extra_libs" +# beautify +LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ + | sed -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/ */ /g'` + +LIBSSTATIC_CONFIG="-lfreetype \ + $zlib_libstaticconf \ + $bzip2_libstaticconf \ + $libpng_libstaticconf \ + $harfbuzz_libstaticconf \ + $ft2_extra_libs" +# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later +# on if necessary; also beautify +LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \ + | sed -e 's|-L */usr/lib64/* | |g' \ + -e 's|-L */usr/lib/* | |g' \ + -e 's/^ *//' \ + -e 's/ *$//' \ + -e 's/ */ /g'` -LT_INIT(win32-dll) +AC_SUBST([ftmac_c]) +AC_SUBST([REQUIRES_PRIVATE]) +AC_SUBST([LIBS_PRIVATE]) +AC_SUBST([LIBSSTATIC_CONFIG]) AC_SUBST([hardcode_libdir_flag_spec]) AC_SUBST([wl]) AC_SUBST([build_libtool_libs]) +# changing LDFLAGS value should only be done after +# lt_cv_prog_compiler_static_works test + +if test "$have_zlib" != no; then + CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + LDFLAGS="$LDFLAGS $ZLIB_LIBS" +fi + +if test "$have_bzip2" != no; then + CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + LDFLAGS="$LDFLAGS $BZIP2_LIBS" +fi +if test "$have_libpng" != no; then + CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" + LDFLAGS="$LDFLAGS $LIBPNG_LIBS" +fi +if test "$have_harfbuzz" != no; then + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ" + LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS" +fi + +AC_SUBST([CFLAGS]) +AC_SUBST([LDFLAGS]) + # configuration file -- stay in 8.3 limit # # since #undef doesn't survive in configuration header files we replace @@ -694,9 +1001,7 @@ AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in], # and `builds/unix/unix-cc.mk' that will be used by the build system # AC_CONFIG_FILES([unix-cc.mk:unix-cc.in - unix-def.mk:unix-def.in - freetype-config - freetype2.pc:freetype2.in]) + unix-def.mk:unix-def.in]) # re-generate the Jamfile to use libtool now # @@ -704,4 +1009,13 @@ AC_CONFIG_FILES([unix-cc.mk:unix-cc.in AC_OUTPUT +AC_MSG_NOTICE([ + +Library configuration: + external zlib: $have_zlib + bzip2: $have_bzip2 + libpng: $have_libpng + harfbuzz: $have_harfbuzz +]) + # end of configure.raw diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk index b2ae4f4..0506e7d 100644 --- a/builds/unix/detect.mk +++ b/builds/unix/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2003, 2004, 2006 by +# Copyright 1996-2000, 2002-2004, 2006, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -76,13 +76,14 @@ ifeq ($(PLATFORM),unix) have_Makefile := $(wildcard $(OBJ_DIR)/Makefile) + CONFIG_SHELL ?= /bin/sh setup: std_setup ifdef must_configure ifneq ($(have_Makefile),) # we are building FT2 not in the src tree - $(TOP_DIR)/builds/unix/configure $(value CFG) + $(CONFIG_SHELL) $(TOP_DIR)/builds/unix/configure $(value CFG) else - cd builds/unix; ./configure $(value CFG) + cd builds/unix; $(CONFIG_SHELL) ./configure $(value CFG) endif endif diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in index 815367b..ebc311f 100644 --- a/builds/unix/freetype-config.in +++ b/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 by +# Copyright 2000-2005, 2008, 2009, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -9,14 +9,15 @@ # indicate that you have read the license and understand and accept it # fully. -prefix=@prefix@ -exec_prefix=@exec_prefix@ -exec_prefix_set=no -includedir=@includedir@ -libdir=@libdir@ -enable_shared=@build_libtool_libs@ -wl=@wl@ -hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@' +LC_ALL=C +export LC_ALL + +prefix="%prefix%" +exec_prefix="%exec_prefix%" +exec_prefix_set="no" +includedir="%includedir%" +libdir="%libdir%" +enable_shared="%build_libtool_libs%" usage() { @@ -37,6 +38,8 @@ Options: --libtool display library name for linking with libtool --cflags display flags for compiling with the FreeType library + --static make command line options display flags + for static linking EOF exit $1 } @@ -72,7 +75,7 @@ while test $# -gt 0 ; do echo_exec_prefix=yes ;; --version) - echo @ft_version@ + echo %ft_version% exit 0 ;; --ftversion) @@ -87,6 +90,9 @@ while test $# -gt 0 ; do --libtool) echo_libtool=yes ;; + --static) + show_static=yes + ;; *) usage 1 1>&2 ;; @@ -118,13 +124,13 @@ else fi if test "$echo_ft_version" = "yes" ; then - major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \ + major=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \ | grep FREETYPE_MAJOR \ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'` - minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \ + minor=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \ | grep FREETYPE_MINOR \ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'` - patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \ + patch=`grep define ${SYSROOT}$includedir/freetype2/freetype.h \ | grep FREETYPE_PATCH \ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'` echo $major.$minor.$patch @@ -132,20 +138,17 @@ fi if test "$echo_cflags" = "yes" ; then cflags="-I${SYSROOT}$includedir/freetype2" - if test "${SYSROOT}$includedir" != "/usr/include" ; then - echo $cflags -I${SYSROOT}$includedir - else - echo $cflags - fi + echo $cflags fi if test "$echo_libs" = "yes" ; then - rpath= - if test "$enable_shared" = "yes" ; then - eval "rpath=\"$hardcode_libdir_flag_spec\"" + libs="-lfreetype" + staticlibs="%LIBSSTATIC_CONFIG%" + if test "$show_static" = "yes" ; then + libs="$staticlibs" fi - libs="-lfreetype @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@" - if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then + if test "${SYSROOT}$libdir" != "/usr/lib" && + test "${SYSROOT}$libdir" != "/usr/lib64"; then echo -L${SYSROOT}$libdir $libs else echo $libs diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in index b731800..a488d96 100644 --- a/builds/unix/freetype2.in +++ b/builds/unix/freetype2.in @@ -1,12 +1,14 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir%/freetype2 Name: FreeType 2 +URL: http://freetype.org Description: A free, high-quality, and portable font engine. -Version: @ft_version@ +Version: %ft_version% Requires: +Requires.private: %REQUIRES_PRIVATE% Libs: -L${libdir} -lfreetype -Libs.private: @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@ -Cflags: -I${includedir}/freetype2 -I${includedir} +Libs.private: %LIBS_PRIVATE% +Cflags: -I${includedir} diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4 index 3d0ecb3..3a806d9 100644 --- a/builds/unix/freetype2.m4 +++ b/builds/unix/freetype2.m4 @@ -1,7 +1,7 @@ # Configure paths for FreeType2 # Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor # -# Copyright 2001, 2003, 2007, 2009 by +# Copyright 2001, 2003, 2007, 2009, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,7 +15,7 @@ # generated by Autoconf, under the same distribution terms as the rest of # that program. # -# serial 3 +# serial 4 # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. @@ -61,7 +61,7 @@ AC_DEFUN([AC_CHECK_FT2], fi if test "x$FT2_CONFIG" = x ; then - AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no]) + AC_PATH_TOOL([FT2_CONFIG], [freetype-config], [no]) fi min_ft_version=m4_if([$1], [], [7.0.1], [$1]) diff --git a/builds/unix/ft2unix.h b/builds/unix/ft2unix.h deleted file mode 100644 index 6a3b8d9..0000000 --- a/builds/unix/ft2unix.h +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************/ -/* */ -/* ft2build.h */ -/* */ -/* Build macros of the FreeType 2 library. */ -/* */ -/* Copyright 1996-2001, 2003, 2006 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This is a Unix-specific version of that should be used */ - /* exclusively *after* installation of the library. */ - /* */ - /* It assumes that `/usr/local/include/freetype2' (or whatever is */ - /* returned by the `freetype-config --cflags' or `pkg-config --cflags' */ - /* command) is in your compilation include path. */ - /* */ - /* We don't need to do anything special in this release. However, for */ - /* a future FreeType 2 release, the following installation changes will */ - /* be performed: */ - /* */ - /* - The contents of `freetype-2.x/include/freetype' will be installed */ - /* to `/usr/local/include/freetype2' instead of */ - /* `/usr/local/include/freetype2/freetype'. */ - /* */ - /* - This file will #include , instead */ - /* of . */ - /* */ - /* - The contents of `ftheader.h' will be processed with `sed' to */ - /* replace all `' with `'. */ - /* */ - /* - Adding `/usr/local/include/freetype2' to your compilation include */ - /* path will not be necessary anymore. */ - /* */ - /* These changes will be transparent to client applications which use */ - /* freetype-config (or pkg-config). No modifications will be necessary */ - /* to compile with the new scheme. */ - /* */ - /*************************************************************************/ - - -#ifndef __FT2_BUILD_UNIX_H__ -#define __FT2_BUILD_UNIX_H__ - - /* `/include/freetype2' must be in your current inclusion path */ -#include - -#endif /* __FT2_BUILD_UNIX_H__ */ - - -/* END */ diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in index 9531afd..e66f3ea 100644 --- a/builds/unix/ftconfig.in +++ b/builds/unix/ftconfig.in @@ -4,7 +4,7 @@ /* */ /* UNIX-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2004, 2006-2009, 2011 by */ +/* Copyright 1996-2004, 2006-2009, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,9 +27,9 @@ /* Note however that if some specific modifications are needed, we */ /* advise you to place a modified copy in your build directory. */ /* */ - /* The build directory is usually `freetype/builds/', and */ - /* contains system-specific files that are always included first when */ - /* building the library. */ + /* The build directory is usually `builds/', and contains */ + /* system-specific files that are always included first when building */ + /* the library. */ /* */ /*************************************************************************/ @@ -52,7 +52,7 @@ FT_BEGIN_HEADER /* These macros can be toggled to suit a specific system. The current */ /* ones are defaults used to compile FreeType in an ANSI C environment */ /* (16bit compilers are also supported). Copy this file to your own */ - /* `freetype/builds/' directory, and edit it to port the engine. */ + /* `builds/' directory, and edit it to port the engine. */ /* */ /*************************************************************************/ @@ -86,7 +86,7 @@ FT_BEGIN_HEADER #else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ /* Following cpp computation of the bit length of int and long */ - /* is copied from default include/freetype/config/ftconfig.h. */ + /* is copied from default include/config/ftconfig.h. */ /* If any improvement is required for this file, it should be */ /* applied to the original header file for the builders that */ /* does not use configure script. */ @@ -175,13 +175,89 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* IntN types */ + /*
*/ + /* basic_types */ /* */ - /* Used to guarantee the size of some specific integers. */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int16 */ + /* */ + /* */ + /* A typedef for a 16bit signed integer type. */ + /* */ + typedef signed short FT_Int16; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt16 */ + /* */ + /* */ + /* A typedef for a 16bit unsigned integer type. */ /* */ - typedef signed short FT_Int16; typedef unsigned short FT_UInt16; + /* */ + + + /* this #if 0 ... #endif clause is for documentation purposes */ +#if 0 + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int32 */ + /* */ + /* */ + /* A typedef for a 32bit signed integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef signed XXX FT_Int32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt32 */ + /* */ + /* A typedef for a 32bit unsigned integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef unsigned XXX FT_UInt32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int64 */ + /* */ + /* A typedef for a 64bit signed integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef signed XXX FT_Int64; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + + /* */ + +#endif + #if FT_SIZEOF_INT == 4 typedef signed int FT_Int32; @@ -217,13 +293,24 @@ FT_BEGIN_HEADER /* FT_LONG64 must be defined if a 64-bit type is available */ #define FT_LONG64 -#define FT_INT64 long +#define FT_INT64 long +#define FT_UINT64 unsigned long -#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + /*************************************************************************/ + /* */ + /* A 64-bit data type may create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ + /* types if __STDC__ is defined. You can however ignore this rule */ + /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __BORLANDC__ ) /* Borland C++ */ @@ -232,7 +319,8 @@ FT_BEGIN_HEADER /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __WATCOMC__ ) /* Watcom C++ */ @@ -241,38 +329,24 @@ FT_BEGIN_HEADER #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ #define FT_LONG64 -#define FT_INT64 long long int +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int #elif defined( __GNUC__ ) /* GCC provides the `long long' type */ #define FT_LONG64 -#define FT_INT64 long long int - -#endif /* FT_SIZEOF_LONG == 8 */ - - - /*************************************************************************/ - /* */ - /* A 64-bit data type will create compilation problems if you compile */ - /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ - /* is defined. You can however ignore this rule by defining the */ - /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ - /* */ -#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int -#ifdef __STDC__ - - /* Undefine the 64-bit macros in strict ANSI compilation mode. */ - /* Since `#undef' doesn't survive in configuration header files */ - /* we use the postprocessing facility of AC_CONFIG_HEADERS to */ - /* replace the leading `/' with `#'. */ -/undef FT_LONG64 -/undef FT_INT64 +#endif /* _MSC_VER */ -#endif /* __STDC__ */ +#endif /* FT_SIZEOF_LONG == 8 */ -#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ +#ifdef FT_LONG64 + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; +#endif #define FT_BEGIN_STMNT do { @@ -280,147 +354,6 @@ FT_BEGIN_HEADER #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT -#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER - /* Provide assembler fragments for performance-critical functions. */ - /* These must be defined `static __inline__' with GCC. */ - -#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 t, t2; - - - __asm - { - smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ - mov a, t, asr #31 /* a = (hi >> 31) */ - add a, a, #0x8000 /* a += 0x8000 */ - adds t2, t2, a /* t2 += a */ - adc t, t, #0 /* t += carry */ - mov a, t2, lsr #16 /* a = t2 >> 16 */ - orr a, a, t, lsl #16 /* a |= t << 16 */ - } - return a; - } - -#endif /* __CC_ARM || __ARMCC__ */ - - -#ifdef __GNUC__ - -#if defined( __arm__ ) && !defined( __thumb__ ) && \ - !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 t, t2; - - - __asm__ __volatile__ ( - "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ - "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ - "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ - "adds %1, %1, %0\n\t" /* %1 += %0 */ - "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ - "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ - : "=r"(a), "=&r"(t2), "=&r"(t) - : "r"(a), "r"(b) ); - return a; - } - -#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ - -#if defined( __i386__ ) -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 result; - - - __asm__ __volatile__ ( - "imul %%edx\n" - "movl %%edx, %%ecx\n" - "sarl $31, %%ecx\n" - "addl $0x8000, %%ecx\n" - "addl %%ecx, %%eax\n" - "adcl $0, %%edx\n" - "shrl $16, %%eax\n" - "shll $16, %%edx\n" - "addl %%edx, %%eax\n" - : "=a"(result), "=d"(b) - : "a"(a), "d"(b) - : "%ecx", "cc" ); - return result; - } - -#endif /* i386 */ - -#endif /* __GNUC__ */ - - -#ifdef _MSC_VER /* Visual C++ */ - -#ifdef _M_IX86 - -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 result; - - __asm - { - mov eax, a - mov edx, b - imul edx - mov ecx, edx - sar ecx, 31 - add ecx, 8000h - add eax, ecx - adc edx, 0 - shr eax, 16 - shl edx, 16 - add eax, edx - mov result, eax - } - return result; - } - -#endif /* _M_IX86 */ - -#endif /* _MSC_VER */ - -#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ - - -#ifdef FT_CONFIG_OPTION_INLINE_MULFIX -#ifdef FT_MULFIX_ASSEMBLER -#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER -#endif -#endif - - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x @@ -438,6 +371,9 @@ FT_BEGIN_HEADER #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ +#define FT_LOCAL_ARRAY( x ) extern const x +#define FT_LOCAL_ARRAY_DEF( x ) const x + #ifndef FT_BASE diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index 95f8271..7f7b3ac 100644 --- a/builds/unix/ftsystem.c +++ b/builds/unix/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Unix-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2002, 2004-2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -235,7 +235,7 @@ if ( !stream ) - return FT_Err_Invalid_Stream_Handle; + return FT_THROW( Invalid_Stream_Handle ); /* open the file */ file = open( filepathname, O_RDONLY ); @@ -243,7 +243,7 @@ { FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } /* Here we ensure that a "fork" will _not_ duplicate */ @@ -268,9 +268,9 @@ /* XXX: TODO -- real 64bit platform support */ /* */ - /* `stream->size' is typedef'd to unsigned long (in */ - /* freetype/ftsystem.h); `stat_buf.st_size', however, is usually */ - /* typedef'd to off_t (in sys/stat.h). */ + /* `stream->size' is typedef'd to unsigned long (in `ftsystem.h'); */ + /* `stat_buf.st_size', however, is usually typedef'd to off_t */ + /* (in sys/stat.h). */ /* On some platforms, the former is 32bit and the latter is 64bit. */ /* To avoid overflow caused by fonts in huge files larger than */ /* 2GB, do a test. Temporary fix proposed by Sean McBride. */ @@ -317,7 +317,8 @@ } total_read_count = 0; - do { + do + { ssize_t read_count; @@ -365,7 +366,7 @@ stream->size = 0; stream->pos = 0; - return FT_Err_Cannot_Open_Stream; + return FT_THROW( Cannot_Open_Stream ); } diff --git a/builds/unix/install-sh b/builds/unix/install-sh index a9244eb..377bb86 100755 --- a/builds/unix/install-sh +++ b/builds/unix/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ 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 @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # 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 @@ -190,7 +190,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 +202,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 @@ -240,7 +240,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 @@ -354,7 +354,7 @@ do 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. + # 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 diff --git a/builds/unix/install.mk b/builds/unix/install.mk index 2e5ef08..83525ee 100644 --- a/builds/unix/install.mk +++ b/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2003, 2006 by +# Copyright 1996-2000, 2002, 2003, 2006, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -24,55 +24,55 @@ # Unix installation and deinstallation targets. # -# Note that we no longer install internal headers, and we remove any -# `internal' subdirectory found in `$(includedir)/freetype2/freetype'. +# Note that we remove any data in the `freetype' subdirectory found in +# `$(includedir)/freetype2', which was the previous location of the header +# files up to version 2.5.0. # install: $(PROJECT_LIBRARY) - $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \ - $(DESTDIR)$(libdir)/pkgconfig \ - $(DESTDIR)$(includedir)/freetype2/freetype/config \ - $(DESTDIR)$(includedir)/freetype2/freetype/cache \ - $(DESTDIR)$(bindir) \ - $(DESTDIR)$(datadir)/aclocal + $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \ + $(DESTDIR)$(libdir)/pkgconfig \ + $(DESTDIR)$(includedir)/freetype2/config \ + $(DESTDIR)$(bindir) \ + $(DESTDIR)$(datadir)/aclocal \ + $(DESTDIR)$(mandir)/man1 $(LIBTOOL) --mode=install $(INSTALL) \ $(PROJECT_LIBRARY) $(DESTDIR)$(libdir) - -for P in $(PUBLIC_H) ; do \ - $(INSTALL_DATA) \ - $$P $(DESTDIR)$(includedir)/freetype2/freetype ; \ + -for P in $(PUBLIC_H) ; do \ + $(INSTALL_DATA) \ + $$P $(DESTDIR)$(includedir)/freetype2 ; \ done - -for P in $(CONFIG_H) ; do \ - $(INSTALL_DATA) \ - $$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \ + -for P in $(CONFIG_H) ; do \ + $(INSTALL_DATA) \ + $$P $(DESTDIR)$(includedir)/freetype2/config ; \ done - -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/cache/* - -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/cache - -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/internal/* - -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/internal - $(INSTALL_DATA) $(BUILD_DIR)/ft2unix.h \ - $(DESTDIR)$(includedir)/ft2build.h - $(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \ - $(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h - $(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \ - $(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h + -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/config/* + -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/config + -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/* + -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype + $(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \ + $(DESTDIR)$(includedir)/freetype2/config/ftconfig.h + $(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \ + $(DESTDIR)$(includedir)/freetype2/config/ftmodule.h $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \ $(DESTDIR)$(bindir)/freetype-config $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \ $(DESTDIR)$(datadir)/aclocal/freetype2.m4 $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \ $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc + $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \ + $(DESTDIR)$(mandir)/man1/freetype-config.1 uninstall: -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIBRARY).$A - -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/config/* - -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/config - -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/* - -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype + -$(DELETE) $(DESTDIR)$(includedir)/freetype2/config/* + -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/config + -$(DELETE) $(DESTDIR)$(includedir)/freetype2/* -$(DELDIR) $(DESTDIR)$(includedir)/freetype2 - -$(DELETE) $(DESTDIR)$(includedir)/ft2build.h -$(DELETE) $(DESTDIR)$(bindir)/freetype-config -$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4 -$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc + -$(DELETE) $(DESTDIR)$(mandir)/man1/freetype-config.1 check: diff --git a/builds/unix/ltmain.sh b/builds/unix/ltmain.sh old mode 100755 new mode 100644 index 63ae69d..a356aca --- a/builds/unix/ltmain.sh +++ b/builds/unix/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 +VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" TIMESTAMP="" package_revision=1.3337 @@ -6124,7 +6124,10 @@ func_mode_link () case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -6444,19 +6447,19 @@ func_mode_link () # 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" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done elif test "$linkmode" != prog && test "$linkmode" != lib; 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 - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -7349,6 +7352,9 @@ func_mode_link () revision="$number_minor" lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; esac ;; no) diff --git a/builds/unix/pkg.m4 b/builds/unix/pkg.m4 new file mode 100644 index 0000000..f26f84c --- /dev/null +++ b/builds/unix/pkg.m4 @@ -0,0 +1,199 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# 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/builds/unix/unix-def.in b/builds/unix/unix-def.in index e0a7a3a..4c06a05 100644 --- a/builds/unix/unix-def.in +++ b/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2004, 2006, 2008 by +# Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -12,13 +12,14 @@ # indicate that you have read the license and understand and accept it # fully. +SHELL := @SHELL@ TOP_DIR := $(shell cd $(TOP_DIR); pwd) -DELETE := @RMF@ -DELDIR := @RMDIR@ -CAT := cat -SEP := / +DELETE := rm -f +DELDIR := @RMDIR@ +CAT := cat +SEP := / # this is used for `make distclean' and `make install' OBJ_BUILD ?= $(BUILD_DIR) @@ -33,15 +34,16 @@ INSTALL_PROGRAM := @INSTALL_PROGRAM@ INSTALL_SCRIPT := @INSTALL_SCRIPT@ MKINSTALLDIRS := $(BUILD_DIR)/mkinstalldirs -DISTCLEAN += $(OBJ_BUILD)/config.cache \ - $(OBJ_BUILD)/config.log \ - $(OBJ_BUILD)/config.status \ - $(OBJ_BUILD)/unix-def.mk \ - $(OBJ_BUILD)/unix-cc.mk \ - $(OBJ_BUILD)/ftconfig.h \ - $(OBJ_BUILD)/freetype-config \ - $(OBJ_BUILD)/freetype2.pc \ - $(LIBTOOL) \ +CLEAN += $(OBJ_BUILD)/freetype-config \ + $(OBJ_BUILD)/freetype2.pc + +DISTCLEAN += $(OBJ_BUILD)/config.cache \ + $(OBJ_BUILD)/config.log \ + $(OBJ_BUILD)/config.status \ + $(OBJ_BUILD)/unix-def.mk \ + $(OBJ_BUILD)/unix-cc.mk \ + $(OBJ_BUILD)/ftconfig.h \ + $(LIBTOOL) \ $(OBJ_BUILD)/Makefile @@ -54,9 +56,17 @@ bindir := @bindir@ includedir := @includedir@ datarootdir := @datarootdir@ datadir := @datadir@ +mandir := @mandir@ version_info := @version_info@ +# Variables needed for `freetype-config' and `freetype.pc'. +# +REQUIRES_PRIVATE := @REQUIRES_PRIVATE@ +LIBS_PRIVATE := @LIBS_PRIVATE@ +LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@ +build_libtool_libs := @build_libtool_libs@ +ft_version := @ft_version@ # The directory where all library files are placed. # @@ -82,4 +92,57 @@ SYSTEM_ZLIB := @SYSTEM_ZLIB@ NO_OUTPUT := 2> /dev/null +# To support calls like +# +# configure --includedir='${libdir}'/freetype2/include +# +# we generate `freetype-config' and `freetype.pc' at compile time so that +# those variables are properly expanded. + +$(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in + rm -f $@ $@.tmp + sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \ + -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \ + -e 's|%exec_prefix%|$(exec_prefix)|' \ + -e 's|%ft_version%|$(ft_version)|' \ + -e 's|%includedir%|$(includedir)|' \ + -e 's|%libdir%|$(libdir)|' \ + -e 's|%prefix%|$(prefix)|' \ + $< \ + > $@.tmp + chmod +x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + +# To support directory names with spaces (as might easily happen on Windows +# platforms), the right solution would be to surround the pkg-variables in +# `freetype2.pc' with double quotes. However, doing so ironically disables +# the prefix override mechanism especially written for Windows. This is a +# bug in pkg-config version 0.28 and earlier. +# +# For this reason, we escape spaces with backslashes. + +exec_prefix_x := $(subst $(space),\\$(space),$(exec_prefix)) +includedir_x := $(subst $(space),\\$(space),$(includedir)) +libdir_x := $(subst $(space),\\$(space),$(libdir)) +prefix_x := $(subst $(space),\\$(space),$(prefix)) + +$(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in + rm -f $@ $@.tmp + sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \ + -e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \ + -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \ + -e 's|%exec_prefix%|$(exec_prefix_x)|' \ + -e 's|%ft_version%|$(ft_version)|' \ + -e 's|%includedir%|$(includedir_x)|' \ + -e 's|%libdir%|$(libdir_x)|' \ + -e 's|%prefix%|$(prefix_x)|' \ + $< \ + > $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + +all: $(OBJ_BUILD)/freetype-config \ + $(OBJ_BUILD)/freetype2.pc + # EOF diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h index 62fadac..b309651 100644 --- a/builds/vms/ftconfig.h +++ b/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* VMS-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2004, 2006-2008, 2011 by */ +/* Copyright 1996-2004, 2006-2008, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,18 +27,15 @@ /* Note however that if some specific modifications are needed, we */ /* advise you to place a modified copy in your build directory. */ /* */ - /* The build directory is usually `freetype/builds/', and */ - /* contains system-specific files that are always included first when */ - /* building the library. */ + /* The build directory is usually `builds/', and contains */ + /* system-specific files that are always included first when building */ + /* the library. */ /* */ /*************************************************************************/ - #ifndef __FTCONFIG_H__ #define __FTCONFIG_H__ - - /* Include the header file containing all developer build options */ #include #include FT_CONFIG_OPTIONS_H #include FT_CONFIG_STANDARD_LIBRARY_H @@ -46,6 +43,7 @@ FT_BEGIN_HEADER + /*************************************************************************/ /* */ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ @@ -53,7 +51,7 @@ FT_BEGIN_HEADER /* These macros can be toggled to suit a specific system. The current */ /* ones are defaults used to compile FreeType in an ANSI C environment */ /* (16bit compilers are also supported). Copy this file to your own */ - /* `freetype/builds/' directory, and edit it to port the engine. */ + /* `builds/' directory, and edit it to port the engine. */ /* */ /*************************************************************************/ @@ -120,19 +118,95 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* IntN types */ + /*
*/ + /* basic_types */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int16 */ + /* */ + /* */ + /* A typedef for a 16bit signed integer type. */ + /* */ + typedef signed short FT_Int16; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt16 */ /* */ - /* Used to guarantee the size of some specific integers. */ + /* */ + /* A typedef for a 16bit unsigned integer type. */ /* */ - typedef signed short FT_Int16; typedef unsigned short FT_UInt16; -#if FT_SIZEOF_INT == 4 + /* */ + + + /* this #if 0 ... #endif clause is for documentation purposes */ +#if 0 + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int32 */ + /* */ + /* */ + /* A typedef for a 32bit signed integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef signed XXX FT_Int32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt32 */ + /* */ + /* A typedef for a 32bit unsigned integer type. The size depends on */ + /* the configuration. */ + /* */ + typedef unsigned XXX FT_UInt32; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int64 */ + /* */ + /* A typedef for a 64bit signed integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef signed XXX FT_Int64; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + + /* */ + +#endif + +#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) typedef signed int FT_Int32; typedef unsigned int FT_UInt32; -#elif FT_SIZEOF_LONG == 4 +#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) typedef signed long FT_Int32; typedef unsigned long FT_UInt32; @@ -141,13 +215,14 @@ FT_BEGIN_HEADER #error "no 32bit type found -- please check your configuration files" #endif + /* look up an integer type that is at least 32 bits */ -#if FT_SIZEOF_INT >= 4 +#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT) typedef int FT_Fast; typedef unsigned int FT_UFast; -#elif FT_SIZEOF_LONG >= 4 +#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT) typedef long FT_Fast; typedef unsigned long FT_UFast; @@ -157,17 +232,28 @@ FT_BEGIN_HEADER /* determine whether we have a 64-bit int type for platforms without */ /* Autoconf */ -#if FT_SIZEOF_LONG == 8 +#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) /* FT_LONG64 must be defined if a 64-bit type is available */ #define FT_LONG64 -#define FT_INT64 long +#define FT_INT64 long +#define FT_UINT64 unsigned long -#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + /*************************************************************************/ + /* */ + /* A 64-bit data type may create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ + /* types if __STDC__ is defined. You can however ignore this rule */ + /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __BORLANDC__ ) /* Borland C++ */ @@ -176,7 +262,8 @@ FT_BEGIN_HEADER /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __WATCOMC__ ) /* Watcom C++ */ @@ -185,15 +272,24 @@ FT_BEGIN_HEADER #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ #define FT_LONG64 -#define FT_INT64 long long int +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int #elif defined( __GNUC__ ) /* GCC provides the `long long' type */ #define FT_LONG64 -#define FT_INT64 long long int +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + +#endif /* _MSC_VER */ + +#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ -#endif /* FT_SIZEOF_LONG == 8 */ +#ifdef FT_LONG64 + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; +#endif #define FT_BEGIN_STMNT do { @@ -201,26 +297,6 @@ FT_BEGIN_HEADER #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT - /*************************************************************************/ - /* */ - /* A 64-bit data type will create compilation problems if you compile */ - /* in strict ANSI mode. To avoid them, we disable their use if */ - /* __STDC__ is defined. You can however ignore this rule by */ - /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ - /* */ -#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) - -#ifdef __STDC__ - - /* undefine the 64-bit macros in strict ANSI compilation mode */ -#undef FT_LONG64 -#undef FT_INT64 - -#endif /* __STDC__ */ - -#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ - - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x @@ -238,6 +314,9 @@ FT_BEGIN_HEADER #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ +#define FT_LOCAL_ARRAY( x ) extern const x +#define FT_LOCAL_ARRAY_DEF( x ) const x + #ifndef FT_BASE @@ -253,9 +332,9 @@ FT_BEGIN_HEADER #ifndef FT_BASE_DEF #ifdef __cplusplus -#define FT_BASE_DEF( x ) extern "C" x +#define FT_BASE_DEF( x ) x #else -#define FT_BASE_DEF( x ) extern x +#define FT_BASE_DEF( x ) x #endif #endif /* !FT_BASE_DEF */ diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c index fb35967..5c2819e 100644 --- a/builds/vms/ftsystem.c +++ b/builds/vms/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* VMS-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2001, 2002, 2005, 2010 by */ +/* Copyright 1996-2002, 2005, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -212,7 +212,7 @@ if ( !stream ) - return FT_Err_Invalid_Stream_Handle; + return FT_THROW( Invalid_Stream_Handle ); /* open the file */ file = open( filepathname, O_RDONLY ); @@ -220,7 +220,7 @@ { FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } if ( fstat( file, &stat_buf ) < 0 ) @@ -274,7 +274,7 @@ stream->size = 0; stream->pos = 0; - return FT_Err_Cannot_Open_Stream; + return FT_THROW( Cannot_Open_Stream ); } diff --git a/builds/win32/vc2010/freetype.vcxproj b/builds/win32/vc2010/freetype.vcxproj deleted file mode 100644 index e88c45f..0000000 --- a/builds/win32/vc2010/freetype.vcxproj +++ /dev/null @@ -1,832 +0,0 @@ - - - - - Debug Multithreaded - Win32 - - - Debug Singlethreaded - Win32 - - - Debug - Win32 - - - Release Multithreaded - Win32 - - - Release Singlethreaded - Win32 - - - Release - Win32 - - - - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} - - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - - - - <_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\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - freetype249_D - freetype249MT_D - freetype249ST_D - freetype249 - freetype249MT - freetype249ST - - - - 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 - - - - - - Disabled - ..\..\..\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - 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) - 0x0409 - - - true - - - - - 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) - false - false - EnableFastChecks - MultiThreadedDebug - true - Level4 - ProgramDatabase - Default - 4001 - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - false - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - false - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - false - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - false - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - false - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - false - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - diff --git a/builds/win32/vc2010/index.html b/builds/win32/vc2010/index.html deleted file mode 100644 index 1d492fb..0000000 --- a/builds/win32/vc2010/index.html +++ /dev/null @@ -1,37 +0,0 @@ - -
- - FreeType 2 Project Files for VS.NET 2010 - - - -

- FreeType 2 Project Files for VS.NET 2010 -

- -

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

- -
    -
    -    freetype249.lib     - release build; single threaded
    -    freetype249_D.lib   - debug build;   single threaded
    -    freetype249MT.lib   - release build; multi-threaded
    -    freetype249MT_D.lib - debug build;   multi-threaded
    -
- -

Be sure to extract the files with the Windows (CR+LF) line endings. ZIP -archives are already stored this way, so no further action is required. If -you use some .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 -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 -directory.

- - - diff --git a/builds/wince/ftdebug.c b/builds/wince/ftdebug.c index 272415d..24f9658 100644 --- a/builds/wince/ftdebug.c +++ b/builds/wince/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for WinCE (body). */ /* */ -/* Copyright 1996-2001, 2002, 2005, 2008, 2009 by */ +/* Copyright 1996-2002, 2005, 2008, 2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -71,7 +71,8 @@ FT_BASE_DEF( void ) - FT_Message( const char* fmt, ... ) + FT_Message( const char* fmt, + ... ) { static char buf[8192]; va_list ap; @@ -87,7 +88,8 @@ FT_BASE_DEF( void ) - FT_Panic( const char* fmt, ... ) + FT_Panic( const char* fmt, + ... ) { static char buf[8192]; va_list ap; @@ -102,6 +104,20 @@ } + /* documentation is in ftdebug.h */ + + FT_BASE_DEF( int ) + FT_Throw( FT_Error error, + int line, + const char* file ) + { + FT_UNUSED( error ); + FT_UNUSED( line ); + FT_UNUSED( file ); + + return 0; + } + #ifdef FT_DEBUG_LEVEL_TRACE @@ -132,8 +148,8 @@ /* for the memory and stream components which are set to 6 and 5, */ /* respectively. */ /* */ - /* See the file for details of the */ - /* available toggle names. */ + /* See the file for details of the available toggle */ + /* names. */ /* */ /* The level must be between 0 and 6; 0 means quiet (except for serious */ /* runtime errors), and 6 means _very_ verbose. */ @@ -168,9 +184,12 @@ while ( *p && *p != ':' ) p++; + if ( !*p ) + break; + if ( *p == ':' && p > q ) { - int n, i, len = p - q; + int n, i, len = (int)( p - q ); int level = -1, found = -1; @@ -196,7 +215,7 @@ p++; if ( *p ) { - level = *p++ - '0'; + level = *p - '0'; if ( level < 0 || level > 7 ) level = -1; } diff --git a/builds/wince/vc2005-ce/freetype.vcproj b/builds/wince/vc2005-ce/freetype.vcproj index fa0e986..5614235 100644 --- a/builds/wince/vc2005-ce/freetype.vcproj +++ b/builds/wince/vc2005-ce/freetype.vcproj @@ -21,7 +21,7 @@ - + @@ -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 @@ - + @@ -3822,15 +3822,15 @@ - + - + - + - + - + diff --git a/builds/wince/vc2005-ce/index.html b/builds/wince/vc2005-ce/index.html index cffa8cb..e2160f6 100644 --- a/builds/wince/vc2005-ce/index.html +++ b/builds/wince/vc2005-ce/index.html @@ -21,14 +21,14 @@ the following targets:
  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.4.9 sources:

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

      -    freetype249.lib     - release build; single threaded
      -    freetype249_D.lib   - debug build;   single threaded
      -    freetype249MT.lib   - release build; multi-threaded
      -    freetype249MT_D.lib - debug build;   multi-threaded
      + 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/builds/wince/vc2008-ce/freetype.vcproj b/builds/wince/vc2008-ce/freetype.vcproj index 1f052c1..e36ccb0 100644 --- a/builds/wince/vc2008-ce/freetype.vcproj +++ b/builds/wince/vc2008-ce/freetype.vcproj @@ -88,7 +88,7 @@ /> diff --git a/builds/wince/vc2008-ce/index.html b/builds/wince/vc2008-ce/index.html index 0c636b6..469baef 100644 --- a/builds/wince/vc2008-ce/index.html +++ b/builds/wince/vc2008-ce/index.html @@ -21,14 +21,14 @@ the following targets:

  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.4.9 sources:

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

      -    freetype249.lib     - release build; single threaded
      -    freetype249_D.lib   - debug build;   single threaded
      -    freetype249MT.lib   - release build; multi-threaded
      -    freetype249MT_D.lib - debug build;   multi-threaded
      + 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/builds/windows/.gitignore b/builds/windows/.gitignore new file mode 100644 index 0000000..41456a4 --- /dev/null +++ b/builds/windows/.gitignore @@ -0,0 +1,5 @@ +# user-specific cache/settings files +*.opensdf +*.sdf +*.suo +*.user diff --git a/builds/win32/detect.mk b/builds/windows/detect.mk similarity index 95% rename from builds/win32/detect.mk rename to builds/windows/detect.mk index 1906539..9dca261 100644 --- a/builds/win32/detect.mk +++ b/builds/windows/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2004, 2006, 2007 by +# Copyright 1996-2000, 2003, 2004, 2006, 2007, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -23,7 +23,7 @@ ifeq ($(PLATFORM),ansi) # ifeq ($(OS),Windows_NT) - PLATFORM := win32 + PLATFORM := windows else @@ -44,7 +44,8 @@ ifeq ($(PLATFORM),ansi) # # A better test is to check whether there are both the environment # variables `winbootdir' and `windir'. The first indicates an - # underlying DOS 7.x, while the second is set only if win32 is available. + # underlying DOS 7.x, while the second is set only if windows is + # available. # # Note that on Windows NT, such an environment variable will not be seen # from DOS-based tools like DJGPP's make; this is not actually a problem @@ -53,7 +54,7 @@ ifeq ($(PLATFORM),ansi) ifdef winbootdir ifdef windir - PLATFORM := win32 + PLATFORM := windows endif endif @@ -62,7 +63,7 @@ ifeq ($(PLATFORM),ansi) endif # test PLATFORM ansi -ifeq ($(PLATFORM),win32) +ifeq ($(PLATFORM),windows) DELETE := del CAT := type @@ -177,7 +178,7 @@ ifeq ($(PLATFORM),win32) .PHONY: devel-gcc endif -endif # test PLATFORM win32 +endif # test PLATFORM windows # EOF diff --git a/builds/win32/ftdebug.c b/builds/windows/ftdebug.c similarity index 90% rename from builds/win32/ftdebug.c rename to builds/windows/ftdebug.c index d1ca15a..dd2c2ad 100644 --- a/builds/win32/ftdebug.c +++ b/builds/windows/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for Win32 (body). */ /* */ -/* Copyright 1996-2001, 2002, 2005, 2008, 2009 by */ +/* Copyright 1996-2002, 2005, 2008, 2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -47,7 +47,6 @@ #ifdef FT_DEBUG_LEVEL_ERROR - #include #include #include @@ -55,8 +54,11 @@ #include + /* documentation is in ftdebug.h */ + FT_BASE_DEF( void ) - FT_Message( const char* fmt, ... ) + FT_Message( const char* fmt, + ... ) { static char buf[8192]; va_list ap; @@ -71,8 +73,11 @@ } + /* documentation is in ftdebug.h */ + FT_BASE_DEF( void ) - FT_Panic( const char* fmt, ... ) + FT_Panic( const char* fmt, + ... ) { static char buf[8192]; va_list ap; @@ -87,6 +92,21 @@ } + /* documentation is in ftdebug.h */ + + FT_BASE_DEF( int ) + FT_Throw( FT_Error error, + int line, + const char* file ) + { + FT_UNUSED( error ); + FT_UNUSED( line ); + FT_UNUSED( file ); + + return 0; + } + + #ifdef FT_DEBUG_LEVEL_TRACE @@ -117,8 +137,8 @@ /* for the memory and stream components which are set to 6 and 5, */ /* respectively. */ /* */ - /* See the file for details of the */ - /* available toggle names. */ + /* See the file for details of the available toggle */ + /* names. */ /* */ /* The level must be between 0 and 6; 0 means quiet (except for serious */ /* runtime errors), and 6 means _very_ verbose. */ @@ -146,9 +166,12 @@ while ( *p && *p != ':' ) p++; + if ( !*p ) + break; + if ( *p == ':' && p > q ) { - int n, i, len = p - q; + int n, i, len = (int)( p - q ); int level = -1, found = -1; @@ -174,7 +197,7 @@ p++; if ( *p ) { - level = *p++ - '0'; + level = *p - '0'; if ( level < 0 || level > 7 ) level = -1; } diff --git a/builds/win32/vc2005/freetype.sln b/builds/windows/vc2005/freetype.sln similarity index 100% rename from builds/win32/vc2005/freetype.sln rename to builds/windows/vc2005/freetype.sln diff --git a/builds/win32/vc2005/freetype.vcproj b/builds/windows/vc2005/freetype.vcproj similarity index 97% rename from builds/win32/vc2005/freetype.vcproj rename to builds/windows/vc2005/freetype.vcproj index 6f17352..5880b7d 100644 --- a/builds/win32/vc2005/freetype.vcproj +++ b/builds/windows/vc2005/freetype.vcproj @@ -16,7 +16,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -629,15 +629,15 @@ - + - + - + - + - + diff --git a/builds/win32/vc2005/index.html b/builds/windows/vc2005/index.html similarity index 76% rename from builds/win32/vc2005/index.html rename to builds/windows/vc2005/index.html index bc4291c..4929dcd 100644 --- a/builds/win32/vc2005/index.html +++ b/builds/windows/vc2005/index.html @@ -11,14 +11,14 @@

    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.4.9 sources:

    +compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype249.lib     - release build; single threaded
      -    freetype249_D.lib   - debug build;   single threaded
      -    freetype249MT.lib   - release build; multi-threaded
      -    freetype249MT_D.lib - debug build;   multi-threaded
      + 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/builds/win32/vc2008/freetype.sln b/builds/windows/vc2008/freetype.sln similarity index 100% rename from builds/win32/vc2008/freetype.sln rename to builds/windows/vc2008/freetype.sln diff --git a/builds/win32/vc2008/freetype.vcproj b/builds/windows/vc2008/freetype.vcproj similarity index 94% rename from builds/win32/vc2008/freetype.vcproj rename to builds/windows/vc2008/freetype.vcproj index 897c5e5..95d722b 100644 --- a/builds/win32/vc2008/freetype.vcproj +++ b/builds/windows/vc2008/freetype.vcproj @@ -70,7 +70,7 @@ /> diff --git a/builds/win32/vc2008/index.html b/builds/windows/vc2008/index.html similarity index 76% rename from builds/win32/vc2008/index.html rename to builds/windows/vc2008/index.html index 9ad33ea..7e0d154 100644 --- a/builds/win32/vc2008/index.html +++ b/builds/windows/vc2008/index.html @@ -11,14 +11,14 @@

    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.4.9 sources:

    +compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype249.lib     - release build; single threaded
      -    freetype249_D.lib   - debug build;   single threaded
      -    freetype249MT.lib   - release build; multi-threaded
      -    freetype249MT_D.lib - debug build;   multi-threaded
      + 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/builds/win32/vc2010/freetype.sln b/builds/windows/vc2010/freetype.sln similarity index 56% rename from builds/win32/vc2010/freetype.sln rename to builds/windows/vc2010/freetype.sln index 3439f62..3bd176a 100644 --- a/builds/win32/vc2010/freetype.sln +++ b/builds/windows/vc2010/freetype.sln @@ -1,30 +1,48 @@  Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +# Visual Studio Express 2012 for Windows Desktop Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Debug Multithreaded|Win32 = Debug Multithreaded|Win32 + Debug Multithreaded|x64 = Debug Multithreaded|x64 Debug Singlethreaded|Win32 = Debug Singlethreaded|Win32 - Debug|Win32 = Debug|Win32 + Debug Singlethreaded|x64 = Debug Singlethreaded|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 Release Multithreaded|Win32 = Release Multithreaded|Win32 + Release Multithreaded|x64 = Release Multithreaded|x64 Release Singlethreaded|Win32 = Release Singlethreaded|Win32 - Release|Win32 = Release|Win32 + Release Singlethreaded|x64 = Release Singlethreaded|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.ActiveCfg = Debug Multithreaded|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|Win32.Build.0 = Debug Multithreaded|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.ActiveCfg = Debug Multithreaded|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded|x64.Build.0 = Debug Multithreaded|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.ActiveCfg = Debug Singlethreaded|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|Win32.Build.0 = Debug Singlethreaded|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.ActiveCfg = Debug Singlethreaded|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded|x64.Build.0 = Debug Singlethreaded|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.ActiveCfg = Release Multithreaded|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|Win32.Build.0 = Release Multithreaded|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.ActiveCfg = Release Multithreaded|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded|x64.Build.0 = Release Multithreaded|x64 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.ActiveCfg = Release Singlethreaded|Win32 {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|Win32.Build.0 = Release Singlethreaded|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32 - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.ActiveCfg = Release Singlethreaded|x64 + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded|x64.Build.0 = Release Singlethreaded|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/builds/windows/vc2010/freetype.user.props b/builds/windows/vc2010/freetype.user.props new file mode 100644 index 0000000..234dd5d --- /dev/null +++ b/builds/windows/vc2010/freetype.user.props @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/builds/windows/vc2010/freetype.vcxproj b/builds/windows/vc2010/freetype.vcxproj new file mode 100644 index 0000000..7cafe45 --- /dev/null +++ b/builds/windows/vc2010/freetype.vcxproj @@ -0,0 +1,1718 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Debug Multithreaded + Win32 + + + Debug Multithreaded + x64 + + + Debug Singlethreaded + Win32 + + + Debug Singlethreaded + x64 + + + Release + Win32 + + + Release + x64 + + + Release Multithreaded + Win32 + + + Release Multithreaded + x64 + + + Release Singlethreaded + Win32 + + + Release Singlethreaded + x64 + + + + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} + + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + StaticLibrary + false + MultiByte + v100 + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\..\..\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 + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + freetype255d + freetype255d + freetype255MTd + freetype255MTd + freetype255STd + freetype255STd + freetype255 + freetype255 + freetype255MT + freetype255MT + freetype255ST + freetype255ST + + + + + 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 + MultiThreadedDebugDLL + 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 + MultiThreadedDebugDLL + true + Level4 + ProgramDatabase + Default + 4001 + true + false + $(OutDir)$(TargetName).pdb + Disabled + + + _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;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions) + false + false + 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;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions) + false + false + EnableFastChecks + MultiThreadedDebug + true + Level4 + ProgramDatabase + Default + 4001 + true + false + $(OutDir)$(TargetName).pdb + Disabled + + + _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) + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + false + false + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + false + false + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + false + false + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + false + false + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + false + false + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + false + false + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + Disabled + Disabled + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + EnableFastChecks + EnableFastChecks + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + MaxSpeed + MaxSpeed + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + \ No newline at end of file diff --git a/builds/win32/vc2010/freetype.vcxproj.filters b/builds/windows/vc2010/freetype.vcxproj.filters similarity index 91% rename from builds/win32/vc2010/freetype.vcxproj.filters rename to builds/windows/vc2010/freetype.vcxproj.filters index a3a9f19..99fc43f 100644 --- a/builds/win32/vc2010/freetype.vcxproj.filters +++ b/builds/windows/vc2010/freetype.vcxproj.filters @@ -136,19 +136,19 @@ Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files diff --git a/builds/windows/vc2010/index.html b/builds/windows/vc2010/index.html new file mode 100644 index 0000000..cb205aa --- /dev/null +++ b/builds/windows/vc2010/index.html @@ -0,0 +1,52 @@ + +

    + + FreeType 2 Project Files for VS.NET 2010 or newer + + + +

    + FreeType 2 Project Files for VS.NET 2010 or newer +

    + +

    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:

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

    + +

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP +archives are already stored this way, so no further action is required. If +you use some .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 +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\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/builds/win32/visualc/freetype.dsp b/builds/windows/visualc/freetype.dsp similarity index 86% rename from builds/win32/visualc/freetype.dsp rename to builds/windows/visualc/freetype.dsp index 274a763..cf76f7c 100644 --- a/builds/win32/visualc/freetype.dsp +++ b/builds/windows/visualc/freetype.dsp @@ -7,23 +7,23 @@ CFG=freetype - Win32 Debug Singlethreaded !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "freetype.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Debug Multithreaded" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Release Multithreaded" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Release Singlethreaded" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Debug Singlethreaded" (based on "Win32 (x86) Static Library") -!MESSAGE +!MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug" @@ -78,7 +78,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -92,7 +92,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\objs\debug_mt" # PROP Intermediate_Dir "..\..\..\objs\debug_mt" # PROP Target_Dir "" -# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c +# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c # SUBTRACT BASE CPP /X # ADD CPP /MTd /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c # SUBTRACT CPP /nologo /X /YX @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype249_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT_D.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype255_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded" @@ -117,7 +117,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\objs\release_mt" # PROP Intermediate_Dir "..\..\..\objs\release_mt" # PROP Target_Dir "" -# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c +# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c # ADD CPP /MT /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c # SUBTRACT CPP /nologo /Z /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype249.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype255.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded" @@ -151,8 +151,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype249ST.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255.lib" +# ADD LIB32 /out:"..\..\..\objs\freetype255ST.lib" # SUBTRACT LIB32 /nologo !ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded" @@ -177,10 +177,10 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255ST_D.lib" -!ENDIF +!ENDIF # Begin Target @@ -377,23 +377,23 @@ SOURCE=..\..\..\include\ft2build.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftconfig.h +SOURCE=..\..\..\include\config\ftconfig.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftheader.h +SOURCE=..\..\..\include\config\ftheader.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftmodule.h +SOURCE=..\..\..\include\config\ftmodule.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftoption.h +SOURCE=..\..\..\include\config\ftoption.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftstdlib.h +SOURCE=..\..\..\include\config\ftstdlib.h # End Source File # End Group # End Target diff --git a/builds/win32/visualce/freetype.dsw b/builds/windows/visualc/freetype.dsw similarity index 100% rename from builds/win32/visualce/freetype.dsw rename to builds/windows/visualc/freetype.dsw diff --git a/builds/win32/visualc/freetype.sln b/builds/windows/visualc/freetype.sln similarity index 100% rename from builds/win32/visualc/freetype.sln rename to builds/windows/visualc/freetype.sln diff --git a/builds/win32/visualc/freetype.vcproj b/builds/windows/visualc/freetype.vcproj similarity index 94% rename from builds/win32/visualc/freetype.vcproj rename to builds/windows/visualc/freetype.vcproj index f0638da..a71a0e9 100644 --- a/builds/win32/visualc/freetype.vcproj +++ b/builds/windows/visualc/freetype.vcproj @@ -69,7 +69,7 @@ /> diff --git a/builds/win32/visualc/index.html b/builds/windows/visualc/index.html similarity index 77% rename from builds/win32/visualc/index.html rename to builds/windows/visualc/index.html index a32c95f..751d7ad 100644 --- a/builds/win32/visualc/index.html +++ b/builds/windows/visualc/index.html @@ -11,14 +11,14 @@

    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.4.9 sources:

    +compiles the following libraries from the FreeType 2.5.5 sources:

      -    freetype249.lib     - release build; single threaded
      -    freetype249_D.lib   - debug build;   single threaded
      -    freetype249MT.lib   - release build; multi-threaded
      -    freetype249MT_D.lib - debug build;   multi-threaded
      + 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/builds/win32/visualce/freetype.dsp b/builds/windows/visualce/freetype.dsp similarity index 86% rename from builds/win32/visualce/freetype.dsp rename to builds/windows/visualce/freetype.dsp index 274a763..cf76f7c 100644 --- a/builds/win32/visualce/freetype.dsp +++ b/builds/windows/visualce/freetype.dsp @@ -7,23 +7,23 @@ CFG=freetype - Win32 Debug Singlethreaded !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "freetype.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Debug Multithreaded" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Release Multithreaded" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Release Singlethreaded" (based on "Win32 (x86) Static Library") !MESSAGE "freetype - Win32 Debug Singlethreaded" (based on "Win32 (x86) Static Library") -!MESSAGE +!MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug" @@ -78,7 +78,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -92,7 +92,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\objs\debug_mt" # PROP Intermediate_Dir "..\..\..\objs\debug_mt" # PROP Target_Dir "" -# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c +# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c # SUBTRACT BASE CPP /X # ADD CPP /MTd /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c # SUBTRACT CPP /nologo /X /YX @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype249_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT_D.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype255_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded" @@ -117,7 +117,7 @@ LIB32=link.exe -lib # PROP Output_Dir "..\..\..\objs\release_mt" # PROP Intermediate_Dir "..\..\..\objs\release_mt" # PROP Target_Dir "" -# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c +# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c # ADD CPP /MT /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c # SUBTRACT CPP /nologo /Z /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype249.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249MT.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype255.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255MT.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded" @@ -151,8 +151,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype249ST.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255.lib" +# ADD LIB32 /out:"..\..\..\objs\freetype255ST.lib" # SUBTRACT LIB32 /nologo !ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded" @@ -177,10 +177,10 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype249_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype249ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype255_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype255ST_D.lib" -!ENDIF +!ENDIF # Begin Target @@ -377,23 +377,23 @@ SOURCE=..\..\..\include\ft2build.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftconfig.h +SOURCE=..\..\..\include\config\ftconfig.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftheader.h +SOURCE=..\..\..\include\config\ftheader.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftmodule.h +SOURCE=..\..\..\include\config\ftmodule.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftoption.h +SOURCE=..\..\..\include\config\ftoption.h # End Source File # Begin Source File -SOURCE=..\..\..\include\freetype\config\ftstdlib.h +SOURCE=..\..\..\include\config\ftstdlib.h # End Source File # End Group # End Target diff --git a/builds/win32/visualc/freetype.dsw b/builds/windows/visualce/freetype.dsw similarity index 100% rename from builds/win32/visualc/freetype.dsw rename to builds/windows/visualce/freetype.dsw diff --git a/builds/win32/visualce/freetype.vcproj b/builds/windows/visualce/freetype.vcproj similarity index 95% rename from builds/win32/visualce/freetype.vcproj rename to builds/windows/visualce/freetype.vcproj index 89a416a..e4cddfb 100644 --- a/builds/win32/visualce/freetype.vcproj +++ b/builds/windows/visualce/freetype.vcproj @@ -87,7 +87,7 @@ /> diff --git a/builds/win32/visualce/index.html b/builds/windows/visualce/index.html similarity index 80% rename from builds/win32/visualce/index.html rename to builds/windows/visualce/index.html index eec6d61..68d15fd 100644 --- a/builds/win32/visualce/index.html +++ b/builds/windows/visualce/index.html @@ -21,14 +21,14 @@ the following targets:

  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.4.9 sources:

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

      -    freetype249.lib     - release build; single threaded
      -    freetype249_D.lib   - debug build;   single threaded
      -    freetype249MT.lib   - release build; multi-threaded
      -    freetype249MT_D.lib - debug build;   multi-threaded
      + 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/builds/win32/w32-bcc.mk b/builds/windows/w32-bcc.mk similarity index 88% rename from builds/win32/w32-bcc.mk rename to builds/windows/w32-bcc.mk index a9f48fc..87d8ea3 100644 --- a/builds/win32/w32-bcc.mk +++ b/builds/windows/w32-bcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005 by +# Copyright 1996-2000, 2003, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -18,7 +18,7 @@ EXPORTS_LIST = $(OBJ_DIR)/freetype.def EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST) APINAMES_OPTIONS := -dfreetype.dll -wB -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/bcc.mk # include linking instructions diff --git a/builds/win32/w32-bccd.mk b/builds/windows/w32-bccd.mk similarity index 86% rename from builds/win32/w32-bccd.mk rename to builds/windows/w32-bccd.mk index 51b15d9..dd21edd 100644 --- a/builds/win32/w32-bccd.mk +++ b/builds/windows/w32-bccd.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2006 by +# Copyright 1996-2000, 2003, 2006, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,7 +15,7 @@ DEVEL_DIR := $(TOP_DIR)/devel -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/bcc-dev.mk diff --git a/builds/win32/w32-dev.mk b/builds/windows/w32-dev.mk similarity index 88% rename from builds/win32/w32-dev.mk rename to builds/windows/w32-dev.mk index 00cacb0..3561229 100644 --- a/builds/win32/w32-dev.mk +++ b/builds/windows/w32-dev.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2000, 2003, 2006 by +# Copyright 1996-2000, 2003, 2006, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -21,7 +21,7 @@ DEVEL_DIR := $(TOP_DIR)/devel -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/gcc-dev.mk diff --git a/builds/win32/w32-gcc.mk b/builds/windows/w32-gcc.mk similarity index 89% rename from builds/win32/w32-gcc.mk rename to builds/windows/w32-gcc.mk index 580afc5..3bbdd3c 100644 --- a/builds/win32/w32-gcc.mk +++ b/builds/windows/w32-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005 by +# Copyright 1996-2000, 2003, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -19,7 +19,7 @@ EXPORTS_OPTIONS = $(EXPORTS_LIST) APINAMES_OPTIONS := -dfreetype.dll -w # include Win32-specific definitions -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk # include gcc-specific definitions include $(TOP_DIR)/builds/compiler/gcc.mk diff --git a/builds/win32/w32-icc.mk b/builds/windows/w32-icc.mk similarity index 89% rename from builds/win32/w32-icc.mk rename to builds/windows/w32-icc.mk index 8819a1f..44d26bd 100644 --- a/builds/win32/w32-icc.mk +++ b/builds/windows/w32-icc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2005 by +# Copyright 1996-2000, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -18,7 +18,7 @@ EXPORTS_LIST = $(OBJ_DIR)/freetype.def EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST) APINAMES_OPTIONS := -dfreetype.dll -w -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/visualage.mk # include linking instructions diff --git a/builds/win32/w32-intl.mk b/builds/windows/w32-intl.mk similarity index 88% rename from builds/win32/w32-intl.mk rename to builds/windows/w32-intl.mk index ae62e1b..0f3e22b 100644 --- a/builds/win32/w32-intl.mk +++ b/builds/windows/w32-intl.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005 by +# Copyright 1996-2000, 2003, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -18,7 +18,7 @@ EXPORTS_LIST = $(OBJ_DIR)/freetype.def EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST) APINAMES_OPTIONS := -dfreetype.dll -w -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/intelc.mk # include linking instructions diff --git a/builds/win32/w32-lcc.mk b/builds/windows/w32-lcc.mk similarity index 87% rename from builds/win32/w32-lcc.mk rename to builds/windows/w32-lcc.mk index a147c4c..8bd5b56 100644 --- a/builds/win32/w32-lcc.mk +++ b/builds/windows/w32-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000 by +# Copyright 1996-2000, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -14,7 +14,7 @@ SEP := / -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/win-lcc.mk # include linking instructions diff --git a/builds/win32/w32-mingw32.mk b/builds/windows/w32-mingw32.mk similarity index 89% rename from builds/win32/w32-mingw32.mk rename to builds/windows/w32-mingw32.mk index 04e9e21..b35dbb0 100644 --- a/builds/win32/w32-mingw32.mk +++ b/builds/windows/w32-mingw32.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005 by +# Copyright 1996-2000, 2003, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -19,7 +19,7 @@ EXPORTS_OPTIONS = $(EXPORTS_LIST) APINAMES_OPTIONS := -dfreetype.dll -w # include Win32-specific definitions -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk LIBRARY := lib$(PROJECT) diff --git a/builds/win32/w32-vcc.mk b/builds/windows/w32-vcc.mk similarity index 88% rename from builds/win32/w32-vcc.mk rename to builds/windows/w32-vcc.mk index 7fb8794..95f7685 100644 --- a/builds/win32/w32-vcc.mk +++ b/builds/windows/w32-vcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005 by +# Copyright 1996-2000, 2003, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -18,7 +18,7 @@ EXPORTS_LIST = $(OBJ_DIR)/freetype.def EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST) APINAMES_OPTIONS := -dfreetype.dll -w -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/visualc.mk # include linking instructions diff --git a/builds/win32/w32-wat.mk b/builds/windows/w32-wat.mk similarity index 88% rename from builds/win32/w32-wat.mk rename to builds/windows/w32-wat.mk index 820b817..e1ddf66 100644 --- a/builds/win32/w32-wat.mk +++ b/builds/windows/w32-wat.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005 by +# Copyright 1996-2000, 2003, 2005, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -18,7 +18,7 @@ EXPORTS_LIST = $(OBJ_DIR)/watcom-ftexports.lbc EXPORTS_OPTIONS = -\"export @$(EXPORTS_LIST)\"- APINAMES_OPTIONS := -wW -include $(TOP_DIR)/builds/win32/win32-def.mk +include $(TOP_DIR)/builds/windows/win32-def.mk include $(TOP_DIR)/builds/compiler/watcom.mk # include linking instructions diff --git a/builds/win32/win32-def.mk b/builds/windows/win32-def.mk similarity index 89% rename from builds/win32/win32-def.mk rename to builds/windows/win32-def.mk index e6ae31c..61af5df 100644 --- a/builds/win32/win32-def.mk +++ b/builds/windows/win32-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2003, 2005, 2006 by +# Copyright 1996-2000, 2003, 2005, 2006, 2013, 2014 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -16,8 +16,8 @@ DELETE := del CAT := type SEP := $(strip \ ) -BUILD_DIR := $(TOP_DIR)/builds/win32 -PLATFORM := win32 +BUILD_DIR := $(TOP_DIR)/builds/windows +PLATFORM := windows # The executable file extension (for tools). NOTE: WE INCLUDE THE DOT HERE !! # diff --git a/configure b/configure index 55a24fd..4d8a945 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by +# Copyright 2002-2006, 2008-2010, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,19 +15,29 @@ rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk +# respect GNUMAKE environment variable for backwards compatibility if test "x$GNUMAKE" = x; then - GNUMAKE=make + if test "x$MAKE" = x; then + if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then + MAKE=gmake + else + MAKE=make + fi + fi +else + MAKE=$GNUMAKE fi -if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then - if test -z "`$GNUMAKE -v 2>/dev/null | grep makepp`"; then - echo "GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2." >&2 - echo "Please try" >&2 - echo " \`GNUMAKE= $0'." >&2 - echo "or >&2" - echo " \`GNUMAKE=\"makepp --norc-substitution\" $0'." >&2 - exit 1 - fi +if test "x`$MAKE -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then + echo "GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2." >&2 + echo "Please try" >&2 + echo >&2 + echo " MAKE= $0" >&2 + echo >&2 + echo "or" >&2 + echo >&2 + echo " MAKE=\"makepp --norc-substitution\" $0" >&2 + exit 1 fi # Get `dirname' functionality. This is taken and adapted from autoconf's @@ -120,6 +130,6 @@ case $# in esac done ;; esac -CFG=$CFG $GNUMAKE setup unix +CFG=$CFG $MAKE setup unix # eof diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 13476fd..0000000 --- a/debian/changelog +++ /dev/null @@ -1,104 +0,0 @@ -freetype (2.4.9-slp2+1) unstable; urgency=low - - * FT2 version upgrade from 2.4.3 to 2.4.9 - * Git: 165.213.180.234:/slp/unmodified/freetype - * Tag: freetype_2.4.9-slp2+1 - -- Deokjin Kim Wed, 30 May 2012 15:18:41 +0900 - -freetype (2.4.3-6slp2+1) unstable; urgency=low - - * Fix text display bug in m.etnews.com - * Git: 165.213.180.234:/slp/unmodified/freetype - * Tag: freetype_2.4.3-6slp2+1 - - -- Deokjin Kim Thu, 20 Oct 2011 16:17:50 +0900 - -freetype (2.4.3-5slp4) unstable; urgency=low - - * Packag Rollback - * Git: 165.213.180.234:/slp/unmodified/freetype - * Tag: freetype_2.4.3-5slp4 - - -- WooHyun Jung Mon, 11 Apr 2011 12:16:22 +0900 - -freetype (2.4.3-5slp3) unstable; urgency=low - - * Rollback pkgs - * Git: 165.213.180.234:/slp/unmodified/freetype - * Tag: freetype_2.4.3-5slp3 - - -- WooHyun Jung Mon, 11 Apr 2011 11:56:46 +0900 - -freetype (2.4.3-5slp2) unstable; urgency=low - - * Removed unused modules - * Git: 165.213.180.234:slp/unmodified/freetype - * Tag: freetype_2.4.3-5slp2 - - -- Deokjin Kim Tue, 05 Apr 2011 10:51:07 +0900 - -freetype (2.4.3-4slp2) unstable; urgency=low - - * Rollback removing API - * Git: 165.213.180.234:slp/unmodified/freetype - * Tag: freetype_2.4.3-4slp2 - - -- Deokjin Kim Wed, 02 Mar 2011 14:11:53 +0900 - -freetype (2.4.3-3slp2) unstable; urgency=low - - * Reduce amount of memory usage - * Git: 165.213.180.234:slp/unmodified/freetype - * Tag: freetype_2.4.3-3slp2 - - -- Deokjin Kim Fri, 18 Feb 2011 11:14:20 +0900 - -freetype (2.4.3-2slp2) unstable; urgency=low - - * Add debug package - * Git: 165.213.180.234:/git/slp/unmodified/freetype - * Tag: freetype_2.4.3-2slp2 - - -- Deokjin Kim Thu, 18 Nov 2010 14:58:43 +0900 - -freetype (2.4.3-1slp2) unstable; urgency=low - - * Freetype version upgrade (from 2.3.5 to 2.4.3) - * Git: 165.213.180.234:/git/slp/unmodified/freetype - * Tag: freetype_2.4.3-1slp2 - - -- Deokjin Kim Tue, 09 Nov 2010 16:54:10 +0900 - -freetype (2.3.5-5slp2) unstable; urgency=low - - * Change maintainer - - -- Jihoon Kim Tue, 20 Apr 2010 11:06:10 +0900 - -freetype (2.3.5-4slp2) unstable; urgency=low - - * Change revision - - -- Sung-Jin Park Thu, 25 Mar 2010 19:34:16 +0900 - -freetype (2.3.5-3) unstable; urgency=low - - [ Kyu Young Kim ] - * modify debian files - - [ root ] - * - - - -- root Thu, 25 Mar 2010 19:34:13 +0900 - -freetype (2.3.5-2) unstable; urgency=low - - * install modify - - -- Kyu Young Kim Thu, 12 Nov 2009 15:45:39 +0900 - -freetype (2.3.5) unstable; urgency=low - - * Initial Release. - - -- Kyu Young Kim Thu, 12 Nov 2009 13:27:46 +0900 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7ed6ff8..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/debian/control b/debian/control deleted file mode 100644 index f14499e..0000000 --- a/debian/control +++ /dev/null @@ -1,68 +0,0 @@ -Source: freetype -Section: libs -Priority: optional -Uploaders: Deokjin Kim -Maintainer: Deokjin Kim , Inpyo Kang -Build-Depends: debhelper (>= 5), autotools-dev -Standards-Version: 3.7.2 - -Package: libfreetype6 -Architecture: any -Section: libs -Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: freetype, xpdf-reader (<< 1.00-4) -Description: FreeType 2 font engine, shared library files - The FreeType project is a team of volunteers who develop free, - portable and high-quality software solutions for digital typography. - They specifically target embedded systems and focus on bringing small, - efficient and ubiquitous products. - . - The FreeType 2 library is their new software font engine. It has been - designed to provide the following important features: - * A universal and simple API to manage font files - * Support for several font formats through loadable modules - * High-quality anti-aliasing - * High portability & performance - . - Supported font formats include: - * TrueType files (.ttf) and collections (.ttc) - * Type 1 font files both in ASCII (.pfa) or binary (.pfb) format - * Type 1 Multiple Master fonts. The FreeType 2 API also provides - routines to manage design instances easily - * Type 1 CID-keyed fonts - * OpenType/CFF (.otf) fonts - * CFF/Type 2 fonts - * Adobe CEF fonts (.cef), used to embed fonts in SVG documents with - the Adobe SVG viewer plugin. - * Windows FNT/FON bitmap fonts - -Package: libfreetype6-dev -Architecture: any -Section: libdevel -Depends: libfreetype6 (= ${binary:Version}), libc6-dev | libc-dev, zlib1g-dev | libz-dev -Conflicts: freetype0-dev, freetype1 (<= 1.0.0.1998-03-22-1), freetype1-dev -Replaces: freetype0-dev, freetype1-dev -Description: FreeType 2 font engine, development files - The FreeType project is a team of volunteers who develop free, - portable and high-quality software solutions for digital typography. - They specifically target embedded systems and focus on bringing small, - efficient and ubiquitous products. - . - This package contains all supplementary files (static library, headers - and documentation) you need to develop your own programs using the - FreeType 2 library. - -Package: libfreetype6-dbg -Section: debug -Priority: extra -Architecture: any -Depends: ${misc:Depends}, - libfreetype6 (= ${binary:Version}) -Conflicts: libfreetype6-dbg -Replaces: libfreetype6-dbg -Description: FreeType 2 font engine, debugging symbols - The FreeType project is a team of volunteers who develop free, - portable and high-quality software solutions for digital typography. - They specifically target embedded systems and focus on bringing small, - efficient and ubiquitous products. - . diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 761470d..0000000 --- a/debian/copyright +++ /dev/null @@ -1,22 +0,0 @@ -This is libfreetype6, written and maintained by Se Mun Lee -on Fri, 13 Nov 2009 14:08:22 +0900. - -The original source can always be found at: - ftp://slp.samsung.net/dists/unstable/main/source/ - -Copyright Holder: Se Mun Lee - -License: - samsung - -/* - * SLP2.0 - * Copyright (c) 2008 Samsung Electronics, Inc. - * All rights reserved. - * - * This software is a confidential and proprietary information - * of Samsung Electronics, Inc. ("Confidential Information"). You - * shall not disclose such Confidential Information and shall use - * it only in accordance with the terms of the license agreement - * you entered into with Samsung Electronics. - */ diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index ca882bb..0000000 --- a/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/sbin diff --git a/debian/docs b/debian/docs deleted file mode 100644 index cb7384d..0000000 --- a/debian/docs +++ /dev/null @@ -1,6 +0,0 @@ -README -README.git -ChangeLog.20 -ChangeLog.21 -ChangeLog.22 -ChangeLog.23 diff --git a/debian/libfreetype6-dev.install.in b/debian/libfreetype6-dev.install.in deleted file mode 100644 index fa49e27..0000000 --- a/debian/libfreetype6-dev.install.in +++ /dev/null @@ -1,7 +0,0 @@ -@PREFIX@/bin/freetype-config -@PREFIX@/include/ -@PREFIX@/lib/*.so -@PREFIX@/lib/*.la -@PREFIX@/lib/*.a -@PREFIX@/lib/pkgconfig/ -@PREFIX@/share/aclocal/ diff --git a/debian/libfreetype6.install.in b/debian/libfreetype6.install.in deleted file mode 100644 index a7c24c5..0000000 --- a/debian/libfreetype6.install.in +++ /dev/null @@ -1 +0,0 @@ -@PREFIX@/lib/*.so.* diff --git a/debian/rules b/debian/rules deleted file mode 100755 index c88e6cc..0000000 --- a/debian/rules +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -CFLAGS ?= -Wall -g -LDFLAGS ?= -PREFIX ?= /usr -DATADIR ?= /opt - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed - -config.status: configure - dh_testdir - # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --prefix=$(PREFIX) - -build: build-stamp - -build-stamp: config.status - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - #docbook-to-man debian/ncurses.sgml > ncurses.1 - - for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ - cat $$f > $${f%.in}; \ - sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \ - sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \ - done - - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) distclean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - - for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ - rm -f $${f%.in}; \ - done - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/ncurses. - $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_install --sourcedir=debian/tmp -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip --dbg-package=libfreetype6-dbg - dh_compress - dh_fixperms -# dh_perl - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/devel/ft2build.h b/devel/ft2build.h index c1d38c3..6cc34b7 100644 --- a/devel/ft2build.h +++ b/devel/ft2build.h @@ -2,10 +2,9 @@ /* */ /* ft2build.h */ /* */ -/* FreeType 2 build and setup macros. */ -/* (Generic version) */ +/* FreeType 2 build and setup macros (development version). */ /* */ -/* Copyright 1996-2001, 2003, 2006 by */ +/* Copyright 1996-2001, 2003, 2006, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,24 +17,24 @@ /* - * This is a development version of that is used - * to build the library in debug mode. Its only difference with - * the reference is that it forces the use of the local `ftoption.h' - * which contains different settings for all configuration macros. + * This is a development version of to build the library in + * debug mode. Its only difference to the default version is that it + * includes a local `ftoption.h' header file with different settings for + * many configuration macros. + * + * To use it, simply ensure that the directory containing this file is + * scanned by the compiler before the default FreeType header directory. * - * To use it, you must define the environment variable FT2_BUILD_INCLUDE - * to point to the directory containing these two files (`ft2build.h' and - * `ftoption.h'), then invoke Jam as usual. */ -#ifndef __FT2_BUILD_DEVEL_H__ -#define __FT2_BUILD_DEVEL_H__ +#ifndef __FT2BUILD_H__ +#define __FT2BUILD_H__ -#define FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H -#include +#include -#endif /* __FT2_BUILD_DEVEL_H__ */ +#endif /* __FT2BUILD_H__ */ /* END */ diff --git a/devel/ftoption.h b/devel/ftoption.h index 4da0221..10027bb 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -38,9 +38,9 @@ FT_BEGIN_HEADER /* library from a single source directory. */ /* */ /* - You can put a copy of this file in your build directory, more */ - /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ - /* is the name of a directory that is included _before_ the FreeType */ - /* include path during compilation. */ + /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */ + /* name of a directory that is included _before_ the FreeType include */ + /* path during compilation. */ /* */ /* The default FreeType Makefiles and Jamfiles use the build */ /* directory `builds/' by default, but you can easily change */ @@ -51,7 +51,7 @@ FT_BEGIN_HEADER /* locate this file during the build. For example, */ /* */ /* #define FT_CONFIG_OPTIONS_H */ - /* #include */ + /* #include */ /* */ /* will use `$BUILD/myftoptions.h' instead of this file for macro */ /* definitions. */ @@ -59,9 +59,9 @@ FT_BEGIN_HEADER /* Note also that you can similarly pre-define the macro */ /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ /* that are statically linked to the library at compile time. By */ - /* default, this file is . */ + /* default, this file is . */ /* */ - /* We highly recommend using the third method whenever possible. */ + /* We highly recommend using the third method whenever possible. */ /* */ /*************************************************************************/ @@ -205,6 +205,33 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* PNG bitmap support. */ + /* */ + /* FreeType now handles loading color bitmap glyphs in the PNG format. */ + /* This requires help from the external libpng library. Uncompressed */ + /* color bitmaps do not need any external libraries and will be */ + /* supported regardless of this configuration. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_PNG + + + /*************************************************************************/ + /* */ + /* HarfBuzz support. */ + /* */ + /* FreeType uses the HarfBuzz library to improve auto-hinting of */ + /* OpenType fonts. If available, many glyphs not directly addressable */ + /* by a font's character map will be hinted also. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_HARFBUZZ + + + /*************************************************************************/ + /* */ /* Define to disable the use of file stream functions and types, FILE, */ /* fopen() etc. Enables the use of smaller system libraries on embedded */ /* systems that have multiple system libraries, some with or without */ @@ -514,7 +541,7 @@ FT_BEGIN_HEADER /* does not contain any glyph name though. */ /* */ /* Accessing SFNT names is done through the functions declared in */ - /* `freetype/ftsnames.h'. */ + /* `ftsnames.h'. */ /* */ #define TT_CONFIG_OPTION_SFNT_NAMES @@ -560,6 +587,28 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ + /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ + /* replaces the native TrueType hinting mechanism when anything but */ + /* FT_RENDER_MODE_MONO is requested. */ + /* */ + /* Enabling this causes the TrueType driver to ignore instructions under */ + /* certain conditions. This is done in accordance with the guide here, */ + /* with some minor differences: */ + /* */ + /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ + /* By undefining this, you only compile the code necessary to hint */ + /* TrueType glyphs with native TT hinting. */ + /* */ + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ +#define TT_CONFIG_OPTION_SUBPIXEL_HINTING + + + /*************************************************************************/ + /* */ /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ /* of the TrueType bytecode interpreter is used that doesn't implement */ /* any of the patented opcodes and algorithms. The patents related to */ @@ -669,7 +718,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ /* required. */ /* */ @@ -716,6 +765,49 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ /**** ****/ + /**** C F F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */ + /* possible to set up the default values of the four control points that */ + /* define the stem darkening behaviour of the (new) CFF engine. For */ + /* more details please read the documentation of the */ + /* `darkening-parameters' property of the cff driver module (file */ + /* `ftcffdrv.h'), which allows the control at run-time. */ + /* */ + /* Do *not* undefine these macros! */ + /* */ +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 + + + /*************************************************************************/ + /* */ + /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the cff driver module. */ + /* */ +#define CFF_CONFIG_OPTION_OLD_ENGINE + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ @@ -752,37 +844,10 @@ FT_BEGIN_HEADER /* - * Define this variable if you want to keep the layout of internal - * structures that was used prior to FreeType 2.2. This also compiles in - * a few obsolete functions to avoid linking problems on typical Unix - * distributions. - * - * For embedded systems or building a new distribution from scratch, it - * is recommended to disable the macro since it reduces the library's code - * size and activates a few memory-saving optimizations as well. - */ -#define FT_CONFIG_OPTION_OLD_INTERNALS - - - /* - * To detect legacy cache-lookup call from a rogue client (<= 2.1.7), - * we restrict the number of charmaps in a font. The current API of - * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API - * takes charcode only. To determine the passed value is for cmap_index - * or charcode, the possible cmap_index is restricted not to exceed - * the minimum possible charcode by a rogue client. It is also very - * unlikely that a rogue client is interested in Unicode values 0 to 15. - * - * NOTE: The original threshold was 4 deduced from popular number of - * cmap subtables in UCS-4 TrueType fonts, but now it is not - * irregular for OpenType fonts to have more than 4 subtables, - * because variation selector subtables are available for Apple - * and Microsoft platforms. + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. */ - -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS -#define FT_MAX_CHARMAP_CACHEABLE 15 -#endif +/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ /* @@ -796,6 +861,35 @@ FT_BEGIN_HEADER #define TT_USE_BYTECODE_INTERPRETER #endif + + /* + * Check CFF darkening parameters. The checks are the same as in function + * `cff_property_set' in file `cffdrivr.c'. + */ +#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 +#error "Invalid CFF darkening parameters!" +#endif + FT_END_HEADER diff --git a/docs/CHANGES b/docs/CHANGES index ae57932..bbc3110 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,4 +1,534 @@ +CHANGES BETWEEN 2.5.4 and 2.5.5 + + I. IMPORTANT BUG FIXES + + - Handling of uncompressed PCF files works again (bug introduced + in version 2.5.4). + + +====================================================================== + +CHANGES BETWEEN 2.5.3 and 2.5.4 + + I. IMPORTANT BUG FIXES + + - A variant of vulnerability CVE-2014-2240 was identified + (cf. http://savannah.nongnu.org/bugs/?43661) and fixed in the + new CFF driver. All users should upgrade. + + - The new auto-hinter code using HarfBuzz crashed for some invalid + fonts. + + - Many fixes to better protect against malformed input. + + + II. IMPORTANT CHANGES + + - Full auto-hinter support of the Devanagari script. + + - Experimental auto-hinter support of the Telugu script. + + - CFF stem darkening behaviour can now be controlled at build time + using the eight macros + + CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} . + + - Some fields in the `FT_Bitmap' structure have been changed from + signed to unsigned type, which better reflects the actual usage. + It is also an additional means to protect against malformed + input. + + This change doesn't break the ABI; however, it might cause + compiler warnings. + + + III. MISCELLANEOUS + + - Improvements to the auto-hinter's algorithm to recognize stems + and local extrema. + + - Function `FT_Get_SubGlyph_Info' always returned an error even in + case of success. + + - Version 2.5.1 introduced major bugs in the cjk part of the + auto-hinter, which are now fixed. + + - The `FT_Sfnt_Tag' enumeration values have been changed to + uppercase, e.g. `FT_SFNT_HEAD'. The lowercase variants are + deprecated. This is for orthogonality with all other + enumeration (and enumeration-like) values in FreeType. + + - `cmake' now supports builds of FreeType as an OS X framework and + for iOS. + + - Improved project files for vc2010, introducing a property file. + + - The documentation generator for the API reference has been + updated to produce better HTML code (with proper CSS). At the + same time, the documentation got a better structure. + + - The FT_LOAD_BITMAP_CROP flag is obsolete; it is not used by any + driver. + + - The TrueType DELTAP[123] bytecode instructions now work in + subpixel hinting mode as described in the ClearType whitepaper + (i.e., for touched points in the non-subpixel direction). + + - Many small improvements to the internal arithmetic routines. + + +====================================================================== + +CHANGES BETWEEN 2.5.2 and 2.5.3 + + I. IMPORTANT BUG FIXES + + - A vulnerability (CVE-2014-2240) was identified and fixed in the + new CFF driver (cf. http://savannah.nongnu.org/bugs/?41697). + All users should upgrade. + + - More bug fixes related to correct positioning of composite + glyphs. + + - Many fixes to better protect against malformed input. + + + II. IMPORTANT CHANGES + + - FreeType can now use the HarfBuzz library to greatly improve the + auto-hinting of fonts that use OpenType features: Many glyphs + that are part of such features but don't have cmap entries are + now handled properly, for example small caps or superscripts. + Define the configuration macro FT_CONFIG_OPTION_USE_HARFBUZZ to + activate HarfBuzz support. + + You need HarfBuzz version 0.9.19 or newer. + + Note that HarfBuzz depends on FreeType; this currently causes a + chicken-and-egg problem that can be solved as follows in case + HarfBuzz is not yet installed on your system. + + 1. Compile and install FreeType without the configuration + macro FT_CONFIG_OPTION_USE_HARFBUZZ. + + 2. Compile and install HarfBuzz. + + 3. Define macro FT_CONFIG_OPTION_USE_HARFBUZZ, then compile + and install FreeType again. + + With FreeType's `configure' script the procedure boils down to + configure, build, and install Freetype, then configure, compile, + and install HarfBuzz, then configure, compile, and install + FreeType again (after executing `make distclean'). + + - All libraries FreeType depends on are now checked using the + `pkg-config' configuration files first, followed by alternative + methods. + + - The new value `auto' for the various `--with-XXX' library + options (for example `--with-harfbuzz=auto') makes the + `configure' script automatically link to the libraries it finds. + This is now the default. + + - In case FreeType's `configure' script can't find a library, you + can pass environment variables to circumvent pkg-config, and + those variables have been harmonized as a consequence of the + changes mentioned above: + + LIBZ -> removed; use LIBZ_CFLAGS and LIBZ_LIBS + LIBBZ2 -> removed; use BZIP2_CFLAGS and BZIP2_LIBS + LIBPNG_LDFLAGS -> LIBPNG_LIBS + + `./configure --help' shows all available environment variables. + + - The `freetype-config' script now understands option `--static' + to emit static linking information. + + +====================================================================== + +CHANGES BETWEEN 2.5.1 and 2.5.2 + + I. IMPORTANT BUG FIXES + + - Improving the display of some broken TrueType fonts introduced a + bug that made FreeType crash on some popular (but not fully + conformant) fonts like `ahronbd.ttf'. + + - Another round of improvements to correct positioning and hinting + of composite glyphs in TrueType fonts. + + + II. MISCELLANEOUS + + - Version 2.5.1 introduced a bug in handling embedded bitmap + strikes of TrueType fonts, causing garbage display under some + circumstances. + + - The `ftgrid' demo program couldn't be compiled in + non-development builds. + + +====================================================================== + +CHANGES BETWEEN 2.5 and 2.5.1 + + I. IMPORTANT BUG FIXES + + - For some WinFNT files, the last glyph wasn't displayed but + incorrectly marked as invalid. + + - The vertical size of glyphs was incorrectly set after a call to + `FT_GlyphSlot_Embolden', resulting in clipped glyphs. + + - Many fields of the `PCLT' table in SFNT based fonts (if accessed + with `FT_Get_Sfnt_Table') were computed incorrectly. + + - In TrueType fonts, hinting of composite glyphs could sometimes + deliver incorrect positions of components or even distorted + shapes. + + + II. IMPORTANT CHANGES + + - WOFF font format support has been added. + + - The auto-hinter now supports Hebrew. Greek and Cyrillic support + has been improved. + + - Support for the forthcoming `OS/2' SFNT table version 5, as can + be found e.g. in the `Sitka' font family for Windows 8.1. + + - The header file layout has been changed. After installation, + all files are now located in `/include/freetype2'. + + Applications that use (a) `freetype-config' or FreeType's + `pkg-config' file to get the include directory for the compiler, + and (b) the documented way for header inclusion like + + #include + #include FT_FREETYPE_H + ... + + don't need any change to the source code. + + + III. MISCELLANEOUS + + - The stem darkening feature of the new CFF engine can now be + fine-tuned with the new `darkening-parameters' property. + + - `ftgrid' has been updated to toggle various engines with the `H' + key, similar to `ftview' and `ftdiff'. + + - The functionality of `ttdebug' has been greatly enhanced. + + . It now displays twilight, storage, and control value data; key + `T' shows the twilight point table, key `S' the storage data, + and key `C' the control value table. + + . Some keys have been reassigned from lowercase to their + uppercase equivalents; for example `q' to quit the program is + now `Q'. + + . Key `f' finishes the current function. + + . Key `R' restarts the debugger. + + . Keys `b' and `p' set a breakpoint. + + . Key `B' provides a function call backtrace. + + - Better support of ARMv7 and x86_64 processors. + + - Apple's `sbix' color bitmap format is now supported. + + - Improved auto-hinter rendering for many TrueType fonts, + especially in the range 20-40ppem. + + - A new face flag `FT_FACE_FLAG_COLOR' has been added (to be + accessed with the macro `FT_HAS_COLOR'). + + - `FT_Gzip_Uncompress' (modeled after zlib's `uncompress' + function) has been added; this is a by-product of the newly + added WOFF support. + + - Support for a build with `cmake' has been contributed by John + Cary . + + - Support for x64 builds with Visual C++ has been contributed by + Kenneth Miller + + - Manual pages for most demo programs have been added. + + - The GETINFO bytecode instruction for TrueType fonts was buggy if + used to retrieve subpixel hinting information. It was necessary + to set selector bit 6 to get results for selector bits 7-10, + which is wrong. + + - Improved computation of emulated vertical metrics for TrueType + fonts. + + - Fixed horizontal start-up position of vertical phantom points in + TrueType bytecode. + + +====================================================================== + +CHANGES BETWEEN 2.4.12 and 2.5 + + I. IMPORTANT BUG FIXES + + - The cache manager function `FTC_Manager_Reset' didn't flush the + cache. + + + II. IMPORTANT CHANGES + + - Behdad Esfahbod (on behalf of Google) contributed support for + color embedded bitmaps (eg. color emoji). + + A new load flag, FT_LOAD_COLOR, makes FreeType load color + embedded-bitmaps, following this draft specification + + https://color-emoji.googlecode.com/git/specification/v1.html + + which defines two new SFNT tables, `CBDT' and `CBLC' (named and + modeled after `EBDT' and `EBLC', respectively). The color + bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to + represent BGRA pre-multiplied sRGB images. If PNG support is + available, PNG color images as defined in the same proposed + specification are supported also. + + Note that color bitmaps are converted to grayscale if client + didn't ask for color. + + - As announced in the previous release, the old FreeType CFF + engine is now disabled by default. It can be conditionally + compiled by defining the configuration macro + CFF_CONFIG_OPTION_OLD_ENGINE. + + - As announced in the previous release, all code related to macro + FT_CONFIG_OPTION_OLD_INTERNALS has been removed, thus becoming + obsolete. + + + III. MISCELLANEOUS + + - The property API (`FT_Property_Get' and `FT_Property_Set') is + now declared as stable. + + The exception, however, are the experimental auto-hinter + properties `glyph-to-script-map' and `fallback-script' which are + subject to change in a forthcoming release. + + - `ftview' has been updated to support color embedded bitmaps; it + can be toggled on and off with key `c'. The small cache toggle + is now key `K'. + + - It is now possible to control the version of the TrueType + hinting engine using the new `interpreter-version' property of + the `truetype' module: Versions 35 and 38 (the default) are + supported, which roughly corresponds to disable and enable + subpixel hinting support, respectively. + + In both `ftview' and `ftdiff', switching between the two + versions can be done with key `H'. In the `ftbench' demo + program, command line option `-H' has been extended to activate + the non-default interpreter version. + + - The `ttdebug' program has been further improved. In particular, + it accepts a new command line option `-H' to select the hinting + engine. + + - `ftdump's verbose option has been renamed to `-V'. For all demo + programs, `-v' now shows version information. + + - Another round of TrueType subpixel hinting fixes. + + - The `apinames' tool can now create an import file for NetWare. + + - 64bit compilation of the new CFF engine was buggy. + + - Some fixes to improve robustness in memory-tight situations. + + +====================================================================== + +CHANGES BETWEEN 2.4.11 and 2.4.12 + + - We have another CFF parsing and hinting engine! Written by Dave + Arnold , this work has been contributed by + Adobe in collaboration with Google. It is vastly superior to + the old CFF engine, and it will replace it in the next release. + Right now, it is still off by default, and you have to + explicitly select it using the new `hinting-engine' property of + the cff driver: + + ... + #include FT_MODULE_H + #include FT_CFF_DRIVER_H + + FT_Library library; + int engine = FT_CFF_HINTING_ADOBE; + + + ... + FT_Property_Set( library, "cff", "hinting-engine", &engine ); + + The code has a (mature) beta status; we encourage all users to + test it and report any problems. + + In case you want to activate the new CFF engine unconditionally, + apply this patch: + +--- snip --- +diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c +index ebcf189..3f2ce6b 100644 +--- a/src/cff/cffobjs.c ++++ b/src/cff/cffobjs.c +@@ -1056,7 +1056,7 @@ + + + /* set default property values */ +- driver->hinting_engine = FT_CFF_HINTING_FREETYPE; ++ driver->hinting_engine = FT_CFF_HINTING_ADOBE; + driver->no_stem_darkening = FALSE; + + return FT_Err_Ok; +--- snip --- + + - The macro FT_CONFIG_OPTION_OLD_INTERNALS is no longer set by + default. In the next release, we will completely remove the + associated code. Please update your programs in case you are + still using this macro. + + + II. MISCELLANEOUS + + - The (top-level) `configure' script now respects the MAKE + environment variable to specify a `make' binary. For backwards + compatibility, GNUMAKE still overrides MAKE, though. + + - The `ftview' and `ftdiff' demo programs have been redesigned, + showing more options permanently on the screen, among other + minor improvements. + + - Using the `H' key, it is now possible to select the CFF engine + in both `ftview' and `ftdiff'. + + - The new command line option `-H' for `ftbench' selects the Adobe + CFF engine. + + - It is now possible to directly select the LCD rendering mode + with the keys `A'-`F' in `ftview'. The key mapping for cycling + through LCD modes has been changed from `K' and `L' to `k' and + `l', and toggling custom LCD filtering is no longer mapped to + key `F' but to key `L'. + + - In `ftdiff', key `x' toggles between layout modes: Either use + the advance width (this is new and now the default) or the + bounding box information to determine line breaks. + + - For all demo tools, the new command line option `-v' shows the + version. + + - For the demo tools with a GUI, the new command line options `-w' + and `-h' select the width and the height of the output window, + respectively. + + - The `ttdebug' program was broken and has been reactivated. Note + that this program is not compiled by default. + + +====================================================================== + +CHANGES BETWEEN 2.4.10 and 2.4.11 + + I. IMPORTANT BUG FIXES + + - Some vulnerabilities in the BDF implementation have been fixed. + Users of this font format should upgrade. + + + II. IMPORTANT CHANGES + + - Subpixel hinting support has been contributed by Infinality, + based on Greg Hitchcock's whitepaper at + + http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx + + Originally, it was a separate patch available from + + http://www.infinality.net/blog/ + + and which has been integrated. + + Note that ClearType support is not completely implemented! In + particular, full support for the options `compatible_widths', + `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode + instruction) is missing. + + Activation of subpixel hinting support can be controlled with + the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' configuration option; it + is switched off by default. This feature is still experimental; + we welcome test reports! + + - Support for OpenType collections (OTC) has been added. + + - Pure CFF fonts within an SFNT wrapper are now supported. + + + III. MISCELLANEOUS + + - Minor rendering improvements to the auto-hinter. + + - `FT_GlyphSlot_Oblique' now uses a shear angle of 12°. + + - Experimental support to handle `property modules', for example + to control the behaviour of the auto-hinter. The API consists + of two new functions, `FT_Property_Set' and `FT_Property_Get'. + + The code is still subject to change and should not be used for + production. + + - The `ftdiff' demo program now supports UTF-8 encoded input files + for option `-f'. + + - Using keys `r' and `R', you can now adjust the stroker radius in + the `ftview' demo program. + + - Other, minor fixes and improvements. + + +====================================================================== + +CHANGES BETWEEN 2.4.9 and 2.4.10 + + I. IMPORTANT BUG FIXES + + - Incremental glyph loading as needed by ghostscript was broken. + + + II. MISCELLANEOUS + + - A new function `FT_Outline_EmboldenXY', contributed by Alexei + Podtelezhnikov. + + - In the `ftview' demo program, key `e' has been replaced with `x' + and `y' to embolden in the horizontal and vertical direction, + respectively. + + - The glyph spacing computation in `FT_GlyphSlot_Embolden' (and + similar code in `ftview') has been improved. + + - Minor improvements to the TrueType bytecode interpreter and + glyph loader, the auto-hinter, and the B/W rasterizer. + + +====================================================================== + CHANGES BETWEEN 2.4.8 and 2.4.9 I. IMPORTANT BUG FIXES @@ -22,7 +552,7 @@ CHANGES BETWEEN 2.4.8 and 2.4.9 - The demo programs no longer recognize and handle default suffixes; you now have to always specify the complete font name. - - Better rendering and LCD mode cycling added to ftview. + - Better rendering and LCD mode cycling added to `ftview'. ====================================================================== @@ -209,7 +739,7 @@ CHANGES BETWEEN 2.4.1 and 2.4.2 The two new functions increment the respective counter. `FT_Done_Library' and `FT_Done_Face' then only destroy a library or face if the counter is 1, otherwise they simply decrement the - counter. + counter. ====================================================================== @@ -2401,7 +2931,7 @@ CHANGES BETWEEN 2.0.3 and 2.0.2 number. see for details. - A new public header file has been introduced, named - FT_TRIGONOMETRY_H (include/freetype/fttrig.h), providing + FT_TRIGONOMETRY_H (include/freetype/fttrigon.h), providing trigonometric functions to compute sines, cosines, arctangents, etc. with 16.16 fixed precision. The implementation is based on the CORDIC algorithm and is very fast while being sufficiently @@ -3629,7 +4159,7 @@ Extensions support: ------------------------------------------------------------------------ -Copyright 2000-2012 by +Copyright 2000-2013 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/CMAKE b/docs/CMAKE new file mode 100644 index 0000000..31237ae --- /dev/null +++ b/docs/CMAKE @@ -0,0 +1,2 @@ +Support for a cmake build has been contributed. See the remarks in the +top-level `CMakeLists.txt' file for more. diff --git a/docs/CUSTOMIZE b/docs/CUSTOMIZE index 7d7d474..dfadb46 100644 --- a/docs/CUSTOMIZE +++ b/docs/CUSTOMIZE @@ -8,10 +8,9 @@ How to customize the compilation of the library I. Configuration macros - The file found in `include/freetype/config/ftoption.h' contains a - list of commented configuration macros that can be toggled by - developers to indicate which features should be active while - building the library. + The file found in `include/config/ftoption.h' contains a list of + commented configuration macros that can be toggled by developers to + indicate which features should be active while building the library. These options range from debug level to availability of certain features, like native TrueType hinting through a bytecode @@ -31,10 +30,14 @@ II. Modules list make uses `modules.cfg' to generate `ftmodule.h' (in the object directory). + If you build FreeType in a directory separate from the source files, + put your customized `modules.cfg' in that directory; that way you + can keep the source files `clean'. + If you don't use GNU make you have to manually edit the file - `include/freetype/config/ftmodule.h' (which is *not* used with if - compiled with GNU make) to add or remove the drivers and components - you want to compile into the library. See `INSTALL.ANY' for more + `include/config/ftmodule.h' (which is *not* used with if compiled + with GNU make) to add or remove the drivers and components you want + to compile into the library. See `INSTALL.ANY' for more information. @@ -77,11 +80,12 @@ IV. Overriding default configuration and module headers [This is actually a combination of method 2 and 3.] - Just put your custom `ftoption.h' file into the objects directory - (normally `/objs'), which GNU make prefers over the - standard location. No action is needed for `ftmodule.h' because - it is generated automatically in the objects directory. - + Just put your custom `ftoption.h' file into the objects directory + (normally `/objs' if you build in the source tree, or the + directory where you invoke configure if you build in a separate + directory), which GNU make prefers over the standard location. No + action is needed for `ftmodule.h' because it is generated + automatically in the objects directory. 2. Using the C include path @@ -91,19 +95,16 @@ IV. Overriding default configuration and module headers #include FT_CONFIG_OPTIONS_H #include FT_CONFIG_MODULES_H - are compiled. Their default values being - and , you - can do something like: + are compiled. Their default values being and + , you can do something like: custom/ - freetype/ - config/ - ftoption.h => custom options header - ftmodule.h => custom modules list + config/ + ftoption.h => custom options header + ftmodule.h => custom modules list include/ => normal FreeType 2 include - freetype/ - ... + ... then change the C include path to always give the path to `custom' before the FreeType 2 `include'. @@ -121,7 +122,7 @@ IV. Overriding default configuration and module headers #define FT_CONFIG_OPTIONS_H #define FT_CONFIG_MODULES_H - #include + #include #endif /* __FT2_BUILD_MY_PLATFORM_H__ */ @@ -137,7 +138,7 @@ IV. Overriding default configuration and module headers ---------------------------------------------------------------------- -Copyright 2003, 2005, 2006 by +Copyright 2003, 2005, 2006, 2012, 2013 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/DEBUG b/docs/DEBUG index 3d6acd3..d8c79d1 100644 --- a/docs/DEBUG +++ b/docs/DEBUG @@ -4,63 +4,63 @@ Debugging within the FreeType sources I. Configuration macros ----------------------- -There are several ways to enable debugging features in a FreeType 2 -builds. This is controlled through the definition of special macros +There are several ways to enable debugging features in a FreeType 2 +builds. This is controlled through the definition of special macros located in the file `ftoptions.h'. The macros are: FT_DEBUG_LEVEL_ERROR - #define this macro if you want to compile the FT_ERROR macro calls - to print error messages during program execution. This will not - stop the program. Very useful to spot invalid fonts during + #define this macro if you want to compile the FT_ERROR macro calls + to print error messages during program execution. This will not + stop the program. Very useful to spot invalid fonts during development and to code workarounds for them. FT_DEBUG_LEVEL_TRACE - #define this macro if you want to compile both macros FT_ERROR and - FT_TRACE. This also includes the variants FT_TRACE0, FT_TRACE1, + #define this macro if you want to compile both macros FT_ERROR and + FT_TRACE. This also includes the variants FT_TRACE0, FT_TRACE1, FT_TRACE2, ..., FT_TRACE7. - The trace macros are used to send debugging messages when an - appropriate `debug level' is configured at runtime through the + The trace macros are used to send debugging messages when an + appropriate `debug level' is configured at runtime through the FT2_DEBUG environment variable (more on this later). FT_DEBUG_MEMORY - If this macro is #defined, the FreeType engine is linked with a - small but effective debugging memory manager that tracks all + If this macro is #defined, the FreeType engine is linked with a + small but effective debugging memory manager that tracks all allocations and frees that are performed within the font engine. - When the FT2_DEBUG_MEMORY environment variable is defined at - runtime, a call to FT_Done_FreeType will dump memory statistics, - including the list of leaked memory blocks with the source locations - where these were allocated. It is always a very good idea to define - this in development builds. This works with _any_ program linked to - FreeType, but requires a big deal of memory (the debugging memory - manager never frees the blocks to the heap in order to detect double - frees). + When the FT2_DEBUG_MEMORY environment variable is defined at + runtime, a call to FT_Done_FreeType will dump memory statistics, + including the list of leaked memory blocks with the source + locations where these were allocated. It is always a very good + idea to define this in development builds. This works with _any_ + program linked to FreeType, but requires a big deal of memory (the + debugging memory manager never frees the blocks to the heap in + order to detect double frees). - When FT2_DEBUG_MEMORY isn't defined at runtime, the debugging memory - manager is ignored, and performance is unaffected. + When FT2_DEBUG_MEMORY isn't defined at runtime, the debugging + memory manager is ignored, and performance is unaffected. II. Debugging macros -------------------- -Several macros can be used within the FreeType sources to help debugging -its code: +Several macros can be used within the FreeType sources to help +debugging its code: 1. FT_ERROR(( ... )) - This macro is used to send debug messages that indicate relatively - serious errors (like broken font files), but will not stop the - execution of the running program. Its code is compiled only when - either FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined in + This macro is used to send debug messages that indicate relatively + serious errors (like broken font files), but will not stop the + execution of the running program. Its code is compiled only when + either FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined in `ftoption.h'. - Note that you have to use a printf-like signature, but with double + Note that you have to use a printf-like signature, but with double parentheses, like in FT_ERROR(( "your %s is not %s\n", "foo", "bar" )); @@ -68,128 +68,130 @@ its code: 2. FT_ASSERT( condition ) - This macro is used to check strong assertions at runtime. If its - condition isn't TRUE, the program will abort with a panic message. - Its code is compiled when either FT_DEBUG_LEVEL_ERROR or - FT_DEBUG_LEVEL_TRACE are defined. You don't need double parentheses - here. For example + This macro is used to check strong assertions at runtime. If its + condition isn't TRUE, the program will abort with a panic message. + Its code is compiled when either FT_DEBUG_LEVEL_ERROR or + FT_DEBUG_LEVEL_TRACE are defined. You don't need double + parentheses here. For example FT_ASSERT( ptr != NULL ); 3. FT_TRACE( level, (message...) ) - The FT_TRACE macro is used to send general-purpose debugging - messages during program execution. This macro uses an *implicit* - macro named FT_COMPONENT used to name the current FreeType component - being run. + The FT_TRACE macro is used to send general-purpose debugging + messages during program execution. This macro uses an *implicit* + macro named FT_COMPONENT used to name the current FreeType + component being run. - The developer should always define FT_COMPONENT as appropriate, for - example as in + The developer should always define FT_COMPONENT as appropriate, + for example as in #undef FT_COMPONENT #define FT_COMPONENT trace_io - The value of the FT_COMPONENT macro is an enumeration named - trace_XXXX where XXXX is one of the component names defined in the - internal file `freetype/internal/fttrace.h'. If you modify FreeType - source and insert new trace_XXXX macro, you must register it in - fttrace.h. If you insert or remove many trace macros, you can check - the undefined or the unused trace macro by src/tools/chktrcmp.py. + The value of the FT_COMPONENT macro is an enumeration named + `trace_XXXX' where `XXXX' is one of the component names defined in + the internal file `internal/fttrace.h'. If you modify FreeType + source and insert new `trace_XXXX' macro, you must register it in + `fttrace.h'. If you insert or remove many trace macros, you can + check the undefined or the unused trace macro by + `src/tools/chktrcmp.py'. - Each such component is assigned a `debug level', ranging from 0 - to 7, through the use of the FT2_DEBUG environment variable + Each such component is assigned a `debug level', ranging from 0 to + 7, through the use of the FT2_DEBUG environment variable (described below) when a program linked with FreeType starts. - When FT_TRACE is called, its level is compared to the one of the - corresponding component. Messages with trace levels *higher* than + When FT_TRACE is called, its level is compared to the one of the + corresponding component. Messages with trace levels *higher* than the corresponding component level are filtered and never printed. - This means that trace messages with level 0 are always printed, - those with level 2 are only printed when the component level is *at - least* 2. + This means that trace messages with level 0 are always printed, + those with level 2 are only printed when the component level is + *at least* 2. - The second parameter to FT_TRACE must contain parentheses and + The second parameter to FT_TRACE must contain parentheses and correspond to a printf-like call, as in FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) ) - The shortcut macros FT_TRACE0, FT_TRACE1, FT_TRACE2, ..., FT_TRACE7 - can be used with constant level indices, and are much cleaner to - use, as in + The shortcut macros FT_TRACE0, FT_TRACE1, FT_TRACE2, ..., + FT_TRACE7 can be used with constant level indices, and are much + cleaner to use, as in - FT_TRACE2(( "your %s is not %s\n", "foo", "bar" )); + FT_TRACE2(( "your %s is not %s\n", "foo", "bar" )); III. Environment variables -------------------------- -The following environment variables control debugging output and +The following environment variables control debugging output and behaviour of FreeType at runtime. FT2_DEBUG - This variable is only used when FreeType is built with - FT_DEBUG_LEVEL_TRACE defined. It contains a list of component level - definitions, following this format: + This variable is only used when FreeType is built with + FT_DEBUG_LEVEL_TRACE defined. It contains a list of component + level definitions, following this format: - component1:level1 component2:level2 component3:level3 ... + component1:level1 component2:level2 component3:level3 ... - where `componentX' is the name of a tracing component, as defined in - `fttrace.h', but without the `trace_' prefix. `levelX' is the + where `componentX' is the name of a tracing component, as defined + in `fttrace.h', but without the `trace_' prefix. `levelX' is the corresponding level to use at runtime. - `any' is a special component name that will be interpreted as + `any' is a special component name that will be interpreted as `any/all components'. For example, the following definitions - set FT2_DEBUG=any:2 memory:5 io:4 (on Windows) - export FT2_DEBUG="any:2 memory:5 io:4" (on Linux with bash) + set FT2_DEBUG=any:2 memory:5 io:4 (on Windows) + export FT2_DEBUG="any:2 memory:5 io:4" (on Linux with bash) - both stipulate that all components should have level 2, except for - the memory and io components which will be set to trace levels 5 and - 4, respectively. + both stipulate that all components should have level 2, except for + the memory and io components which will be set to trace levels 5 + and 4, respectively. FT2_DEBUG_MEMORY - This environment variable, when defined, tells FreeType to use a - debugging memory manager that will track leaking memory blocks as - well as other common errors like double frees. It is also capable - of reporting _where_ the leaking blocks were allocated, which - considerably saves time when debugging new additions to the library. + This environment variable, when defined, tells FreeType to use a + debugging memory manager that will track leaking memory blocks as + well as other common errors like double frees. It is also capable + of reporting _where_ the leaking blocks were allocated, which + considerably saves time when debugging new additions to the + library. - This code is only compiled when FreeType is built with the - FT_DEBUG_MEMORY macro #defined in `ftoption.h' though, it will be + This code is only compiled when FreeType is built with the + FT_DEBUG_MEMORY macro #defined in `ftoption.h' though, it will be ignored in other builds. FT2_ALLOC_TOTAL_MAX - This variable is ignored if FT2_DEBUG_MEMORY is not defined. It - allows you to specify a maximum heap size for all memory allocations - performed by FreeType. This is very useful to test the robustness - of the font engine and programs that use it in tight memory - conditions. + This variable is ignored if FT2_DEBUG_MEMORY is not defined. It + allows you to specify a maximum heap size for all memory + allocations performed by FreeType. This is very useful to test + the robustness of the font engine and programs that use it in + tight memory conditions. - If it is undefined, or if its value is not strictly positive, then + If it is undefined, or if its value is not strictly positive, then no allocation bounds are checked at runtime. FT2_ALLOC_COUNT_MAX - This variable is ignored if FT2_DEBUG_MEMORY is not defined. It - allows you to specify a maximum number of memory allocations - performed by FreeType before returning the error - FT_Err_Out_Of_Memory. This is useful for debugging and testing the - engine's robustness. + This variable is ignored if FT2_DEBUG_MEMORY is not defined. It + allows you to specify a maximum number of memory allocations + performed by FreeType before returning the error + FT_Err_Out_Of_Memory. This is useful for debugging and testing + the engine's robustness. - If it is undefined, or if its value is not strictly positive, then + If it is undefined, or if its value is not strictly positive, then no allocation bounds are checked at runtime. ------------------------------------------------------------------------ -Copyright 2002, 2003, 2004, 2005, 2009 by +Copyright 2002-2005, 2009, 2013 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL b/docs/INSTALL index fc699a8..456b76d 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -43,7 +43,12 @@ I. Normal installation and upgrades directory, where stands for your OS or environment. - 5. From you own IDE, or own Makefiles + 5. Using cmake + + See the top-level `CMakeLists.txt' file for more information. + + + 6. From you own IDE, or own Makefiles If you want to create your own project file, follow the instructions given in the `INSTALL.ANY' document of this @@ -70,7 +75,7 @@ II. Custom builds of the library ---------------------------------------------------------------------- -Copyright 2000-2008, 2010-2011 +Copyright 2000-2008, 2010-2011, 2013 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.ANY b/docs/INSTALL.ANY index 80f161c..8aa394f 100644 --- a/docs/INSTALL.ANY +++ b/docs/INSTALL.ANY @@ -33,25 +33,25 @@ I. Standard procedure src/base/ftbase.c - src/base/ftbbox.c -- recommended, see - src/base/ftglyph.c -- recommended, see + src/base/ftbbox.c -- recommended, see + src/base/ftglyph.c -- recommended, see - src/base/ftbdf.c -- optional, see - src/base/ftbitmap.c -- optional, see - src/base/ftcid.c -- optional, see + src/base/ftbdf.c -- optional, see + src/base/ftbitmap.c -- optional, see + src/base/ftcid.c -- optional, see src/base/ftfstype.c -- optional - src/base/ftgasp.c -- optional, see - src/base/ftgxval.c -- optional, see - src/base/ftlcdfil.c -- optional, see - src/base/ftmm.c -- optional, see - src/base/ftotval.c -- optional, see + src/base/ftgasp.c -- optional, see + src/base/ftgxval.c -- optional, see + src/base/ftlcdfil.c -- optional, see + src/base/ftmm.c -- optional, see + src/base/ftotval.c -- optional, see src/base/ftpatent.c -- optional - src/base/ftpfr.c -- optional, see - src/base/ftstroke.c -- optional, see - src/base/ftsynth.c -- optional, see - src/base/fttype1.c -- optional, see - src/base/ftwinfnt.c -- optional, see - src/base/ftxf86.c -- optional, see + src/base/ftpfr.c -- optional, see + src/base/ftstroke.c -- optional, see + src/base/ftsynth.c -- optional, see + src/base/fttype1.c -- optional, see + src/base/ftwinfnt.c -- optional, see + src/base/ftxf86.c -- optional, see src/base/ftmac.c -- only on the Macintosh @@ -143,7 +143,7 @@ II. Support for flat-directory compilation ---------------------------------------------------------------------- -Copyright 2003, 2005, 2006, 2009, 2010 by +Copyright 2003, 2005, 2006, 2009, 2010, 2013 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS index 3def12c..d372adc 100644 --- a/docs/INSTALL.CROSS +++ b/docs/INSTALL.CROSS @@ -1,26 +1,27 @@ This document contains instructions on how to cross-build the FreeType library on Unix systems, for example, building binaries for Linux/MIPS -on FreeBSD/i386. Before reading this document, please consult -INSTALL.UNIX for required tools and the basic self-building procedure. +on FreeBSD/i386. Before reading this document, please consult the +file `INSTALL.UNIX' for required tools and the basic self-building +procedure. 1. Required Tools ----------------- For self-building the FreeType library on a Unix system, GNU Make - 3.80 or newer is required. INSTALL.UNIX contains hints how to + 3.80 or newer is required. `INSTALL.UNIX' contains hints how to check the installed `make'. The GNU C compiler to cross-build the target system is required. - At present, using non-GNU cross compiler is not tested. The cross + Currently, using a non-GNU cross compiler is untested. The cross compiler is expected to be installed with a system prefix. For example, if your building system is FreeBSD/i386 and the target - system is Linux/MIPS, the cross compiler should be installed with + system is Linux/MIPS, the cross compiler should be installed with the name `mips-ip22-linuxelf-gcc'. A C compiler for a self-build is required also, to build a tool - that is executed during the building procedure. Non-GNU self - compilers are acceptable, but such a setup is not tested yet. + (`apinames') that is executed during the build procedure. Non-GNU + self compilers are acceptable, but such a setup is untested. 2. Configuration @@ -28,10 +29,10 @@ INSTALL.UNIX for required tools and the basic self-building procedure. 2.1. Building and target system - To configure for cross-build, the options `--host=' 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 \ @@ -44,11 +45,11 @@ INSTALL.UNIX for required tools and the basic self-building procedure. the option pair `--host=' and `--target='. This is broken and doesn't work. Similarly, an explicit CC specification like - env CC=mips-ip22-linux-gcc ./configure + env CC=mips-ip22-linux-gcc ./configure # BAD or - env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure + env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure # BAD doesn't work either; such a configuration confuses the `configure' script while trying to find the cross and native C @@ -58,22 +59,63 @@ INSTALL.UNIX for required tools and the basic self-building procedure. 2.2. The prefix to install FreeType2 Setting `--prefix=' properly is important. The prefix - to install FreeType2 is written into the freetype-config script - and freetype2.pc configuration file. + to install FreeType2 is written into the `freetype-config' + script and `freetype2.pc' configuration file. If the built FreeType 2 library is used as a part of the cross-building system, the prefix is expected to be different - from the self-building system. For example, configuration with - `--prefix=/usr/local' installs binaries into the system wide - `/usr/local' directory which then can't be executed. This - causes confusion in configuration of all applications which use - FreeType2. Instead, use a prefix to install the cross-build - into a separate system tree, for example, - `--prefix=/usr/local/mips-ip22-linux/'. - - On the other hand, if the built FreeType2 is used as a part of - the target system, the prefix to install should reflect the file - system structure of the target system. + from the self-building system. For example, a configuration + with `--prefix=/usr/local' installs binaries into the + system-wide `/usr/local' directory, which then can't be executed + due to the incorrect architecture. This causes confusion in + configuration of all applications that use FreeType2. Instead, + use a prefix to install the cross-build into a separate system + tree, for example, `--prefix=/usr/local/mips-ip22-linux/'. + + On the other hand, if the built FreeType 2 library is used as a + part of the target system, the prefix to install should reflect + the file system structure of the target system. + + + 2.3. Library dependencies + + FreeType normally depends on external libraries like `libpng' or + `libharfbuzz'. The easiest case is to deactivate all such + dependencies using the `--without-XXX' configuration options. + However, if you want to use those libraries, you should ensure + that they are available both on the target system and as + (cross-compiled) libraries on the build system. + + FreeType uses `pkg-config' to find most of the libraries; the + other libraries it links to are expected in the standard system + directories. Since the default pkg-config's meta-information + files (like `harfbuzz.pc') of the build platform don't work, use + one of the two possible solutions below. + + o Use pkg-config's meta-information files that are adjusted to + cross-compile and cross-link with the target platform's + libraries. Make sure those files are found before the build + system's default files. Example: + + ./configure \ + --build=i386-unknown-freebsd \ + --host=mips-ip22-linuxelf \ + PKG_CONFIG_LIBDIR="/usr/local/mips-ip22-linux/lib/pkgconfig" \ + [other options] + + See the manpage of `pkg-config' for more details. + + o Set variables like LIBPNG_LIBS as additional options to the + `configure' script, overriding the values `pkg-config' would + provide. `configure --help' shows the available environment + variables. Example: + + ./configure \ + --build=i386-unknown-freebsd \ + --host=mips-ip22-linuxelf \ + LIBPNG_CFLAGS="-I/usr/local/mips-ip22-linux/include" \ + LIBPNG_LIBS="-L/usr/local/mips-ip22-linux/lib -lpng12" \ + [other options] 3. Building command @@ -121,7 +163,7 @@ INSTALL.UNIX for required tools and the basic self-building procedure. ---------------------------------------------------------------------- -Copyright 2006, 2008 by suzuki toshiya +Copyright 2006, 2008, 2012, 2014 by suzuki toshiya David Turner, Robert Wilhelm, and Werner Lemberg. diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU index 72df50a..3b9e0a2 100644 --- a/docs/INSTALL.GNU +++ b/docs/INSTALL.GNU @@ -1,7 +1,7 @@ -This document contains instructions how to build the FreeType library -on non-Unix systems with the help of GNU Make. Note that if you are -running Cygwin or MSys in Windows, you should follow the instructions -in the file INSTALL.UNIX instead. +This document contains instructions how to build the FreeType library +on non-Unix systems with the help of GNU Make. Note that if you are +running Cygwin or MinGW/MSYS in Windows, you should follow the +instructions in the file `INSTALL.UNIX' instead. FreeType 2 includes a powerful and flexible build system that allows @@ -52,10 +52,10 @@ in the file INSTALL.UNIX instead. The following settings are used: - platform win32 + platform windows compiler gcc - configuration directory .\builds\win32 - configuration rules .\builds\win32\w32-gcc.mk + configuration directory .\builds\windows + configuration rules .\builds\windows\w32-gcc.mk If this does not correspond to your system or settings please remove the file 'config.mk' from this directory then read the @@ -138,15 +138,17 @@ in the file INSTALL.UNIX instead. Final note - The build system builds a statically linked library of the font - engine in the `objs' directory. It does _not_ support the build - of DLLs on Windows and OS/2. If you need these, you have to - either use an IDE-specific project file, or follow the + The above instructions build a _statically_ linked library of the + font engine in the `objs' directory. On Windows, you can build a + DLL either with MinGW (within an MSYS shell, following the + instructions in `INSTALL.UNIX'), or you use one of the Visual C++ + project files; see the subdirectories of `builds/windows'. For + everything else, you are on your own, and you might follow the instructions in `INSTALL.ANY' to create your own Makefiles. ---------------------------------------------------------------------- -Copyright 2003, 2004, 2005, 2006, 2008 by +Copyright 2003-2006, 2008, 2013, 2014 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX index 5dc0764..251c749 100644 --- a/docs/INSTALL.UNIX +++ b/docs/INSTALL.UNIX @@ -23,7 +23,7 @@ or MSys on Win32: fail. It is also fine to have GNU Make under another name (e.g. 'gmake') - if you use the GNUMAKE variable as described below. + if you use the MAKE variable as described below. As a special exception, 'makepp' can also be used to build FreeType 2. See the file docs/MAKEPP for details. @@ -61,11 +61,11 @@ or MSys on Win32: ./configure --prefix=/usr - When using a different command to invoke GNU Make, use the GNUMAKE + When using a different command to invoke GNU Make, use the MAKE variable. For example, if `gmake' is the command to use on your system, do something like: - GNUMAKE=gmake ./configure [options] + MAKE=gmake ./configure [options] gmake gmake install (as root) @@ -81,9 +81,28 @@ or MSys on Win32: make make install + + 3.1 Interdependency with HarfBuzz + ................................. + + Note that there is a chicken-and-egg problem currently since the + HarfBuzz library (used by the auto-hinter to improve support of + OpenType fonts) depends on FreeType, which can be solved as + follows in case HarfBuzz is not yet installed on your system. + + 1. Call FreeType's `configure' script with option + `--without-harfbuzz', then compile and install FreeType. + + 2. Compile and install HarfBuzz. + + 3. Call FreeType's `configure' script without option + `--without-harfbuzz' (after executing `make distclean'), then + compile and install FreeType again. + + ---------------------------------------------------------------------- -Copyright 2003, 2004, 2005, 2006, 2007 by +Copyright 2003-2007, 2013, 2014 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/LICENSE.TXT b/docs/LICENSE.TXT index 62945c8..99dc342 100644 --- a/docs/LICENSE.TXT +++ b/docs/LICENSE.TXT @@ -30,5 +30,8 @@ file src/bdf/README and src/pcf/README). The gzip module uses the zlib license (see src/gzip/zlib.h) which too is compatible to the above two licenses. +The MD5 checksum support (only used for debugging in development builds) +is in the public domain. + --- end of LICENSE.TXT --- diff --git a/docs/VERSION.DLL b/docs/VERSION.DLL index 1dfc8c1..dd49261 100644 --- a/docs/VERSION.DLL +++ b/docs/VERSION.DLL @@ -1,5 +1,5 @@ Due to our use of `libtool' to generate and install the FreeType 2 -libraries on Unix systems, as well as other historical events, it is +libraries on Unix systems, as well as other historical events, it is generally very difficult to know precisely which release of the font engine is installed on a given system. @@ -10,16 +10,16 @@ FreeType on Unix. 1. Version and Release numbers ------------------------------ -For each new public release of FreeType 2, there are generally *three* +For each new public release of FreeType 2, there are generally *three* distinct `version' numbers to consider: - * The official FreeType 2 release number, like 2.0.9 or 2.1.3. + * The official FreeType 2 release number, like 2.3.1 or 2.4.10. - * The libtool (and Unix) specific version number, like 9.2.3. This is - what `freetype-config --version' returns. + * The libtool (and Unix) specific version number, like 13.0.7. This + is what `freetype-config --version' returns. * The platform-specific shared object number, used for example when - the library is installed as `/usr/lib/libfreetype.so.6.3.2'. + the library is installed as `/usr/lib/libfreetype.so.6.7.1'. The platform-specific number is, unsurprisingly, platform-specific and varies with the operating system you are using (several variants of @@ -38,21 +38,29 @@ macros defined in FT_FREETYPE_H: See below for a small autoconf fragment. -The release number is also available at *runtime* through the -`FT_Library_Version' API. Unfortunately, this one wasn't available or -working correctly before the 2.1.3 official release. +The release number is also available at *runtime* through the +`FT_Library_Version' API. 2. History ---------- -The following table gives, for each official release, the corresponding -libtool number, as well as the shared object number found on _most_ -systems, but not all of them: +The following table gives, for all releases since 2.3.0, the +corresponding libtool number, as well as the shared object number found +on _most_ systems, but not all of them: - release libtool so + release libtool so ------------------------------- + 2.5.5 17.4.11 6.11.4 + 2.5.4 17.3.11 6.11.3 + 2.5.3 17.2.11 6.11.2 + 2.5.2 17.1.11 6.11.1 + 2.5.1 17.0.11 6.11.0 + 2.5.0 16.2.10 6.10.2 + 2.4.12 16.1.10 6.10.1 + 2.4.11 16.0.10 6.10.0 + 2.4.10 15.0.9 6.9.0 2.4.9 14.1.8 6.8.1 2.4.8 14.0.8 6.8.0 2.4.7 13.2.7 6.7.2 @@ -76,34 +84,6 @@ systems, but not all of them: 2.3.2 9.13.3 6.3.13 2.3.1 9.12.3 6.3.12 2.3.0 9.11.3 6.3.11 - 2.2.1 9.10.3 6.3.10 - 2.2.0 9.9.3 6.3.9 - 2.1.10 9.8.3 6.3.8 - 2.1.9 9.7.3 6.3.7 - 2.1.8 9.6.3 6.3.6 - 2.1.7 9.5.3 6.3.5 - 2.1.6 9.5.3 6.3.5 - 2.1.5 9.4.3 6.3.4 - 2.1.4 9.3.3 6.3.3 - 2.1.3 9.2.3 6.3.2 - 2.1.2 9.1.3 6.3.1 - 2.1.1 9.0.3 ? - 2.1.0 8.0.2 ? - 2.0.9 9.0.3 ? - 2.0.8 8.0.2 ? - 2.0.4 7.0.1 ? - 2.0.1 6.1.0 ? - -The libtool numbers are a bit inconsistent due to the library's history: - - - 2.1.0 was created as a development branch from 2.0.8 (hence the same - libtool numbers). - - - 2.0.9 was a bug-fix release of the `stable' branch, and we - incorrectly increased its libtool number. - - - 2.1.4 was a development version, however it was stable enough to be - the basis of the 2.2.0 release. 3. Autoconf Code Fragment @@ -135,7 +115,7 @@ other release numbers. ------------------------------------------------------------------------ -Copyright 2002-2012 by +Copyright 2002-2014 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/formats.txt b/docs/formats.txt index 827c894..aed885c 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -153,7 +153,7 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf for a specification given in Appendix D on pgs. 436-450. However, this information might be out of date; unfortunately, there is no - PCF specification available online, and this book is out of print. + PCF specification available online, and this book is out of print. George Williams deduced the font format from the X11 sources and documented it for his FontForge font editor: diff --git a/docs/freetype-config.1 b/docs/freetype-config.1 new file mode 100644 index 0000000..7b4a118 --- /dev/null +++ b/docs/freetype-config.1 @@ -0,0 +1,108 @@ +.TH FREETYPE-CONFIG 1 "December 2014" "FreeType 2.5.5" +. +. +.SH NAME +. +freetype-config \- Get information about a libfreetype installation +. +. +.SH SYNOPSIS +. +.B freetype-config +.RI [ options ] +. +. +.SH DESCRIPTION +. +.B freetype-config +returns information needed for compiling and linking programs with the +FreeType library, such as linker flags and compilation parameters. +. +Alternatively, it can be used to query information about the +FreeType library version installed on the system, such as the +installation (directory path) prefix or the FreeType version number. +. +.PP +This program is part of the FreeType package. +. +. +.SH OPTIONS +. +There are two types of options: output/display selection options, and +path override options. +. +. +.SS Output selection options +. +Only one of the output selection options should be given at each program +invocation. +. +.TP +.B \-\-prefix +Return the prefix value of the installed FreeType library (the default +prefix will be `/usr' in most cases for distribution-installed +packages). +. +.TP +.B \-\-exec-prefix +Return the executable prefix value of the installed FreeType library +(will often be the same as the prefix value). +. +.TP +.B \-\-ftversion +Return the FreeType version number. +. +.TP +.B \-\-version +Return the `libtool version' of the FreeType library. +. +.TP +.B \-\-libtool +Return the library name for linking with libtool. +. +.TP +.B \-\-libs +Return compiler flags for linking with the installed FreeType library. +. +.TP +.B \-\-cflags +Return compiler flags for compiling against the installed FreeType library. +. +.TP +.B \-\-static +Make command line options display flags for static linking. +. +. +.SS Path override options +. +These affect any selected output option, except the libtool version +returned by `--version'. +. +.TP +.BI \-\-prefix= PREFIX +Override `--prefix' value with +.IR PREFIX . +. +.TP +.BI \-\-exec-prefix= EPREFIX +Override `--exec-prefix' value with +.IR EPREFIX . +. +. +.SH BUGS +In case the libraries FreeType links to are located in non-standard +directories, the output from option +.B \-\-libs +might be incomplete. +It is thus recommended to use the +.BR pkg-config (1) +interface instead, which is able to correctly resolve all dependencies. +. +. +.SH AUTHOR +. +This manual page was contributed by Nis Martensen , +with further refinements from the FreeType team. +. +. +.\" eof diff --git a/docs/reference/ft2-base_interface.html b/docs/reference/ft2-base_interface.html deleted file mode 100644 index 8c918ea..0000000 --- a/docs/reference/ft2-base_interface.html +++ /dev/null @@ -1,3608 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - -

    - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Base Interface -

    -

    Synopsis

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FT_LibraryFT_IS_TRICKYFT_Load_Char
    FT_FaceFT_STYLE_FLAG_XXXFT_LOAD_XXX
    FT_SizeFT_Size_InternalFT_LOAD_TARGET_XXX
    FT_GlyphSlotFT_Size_MetricsFT_LOAD_TARGET_MODE
    FT_CharMapFT_SizeRecFT_Set_Transform
    FT_EncodingFT_SubGlyphFT_Render_Mode
    FT_Glyph_MetricsFT_Slot_Internalft_render_mode_xxx
    FT_Bitmap_SizeFT_GlyphSlotRecFT_Render_Glyph
    FT_ModuleFT_Init_FreeTypeFT_Kerning_Mode
    FT_DriverFT_Done_FreeTypeft_kerning_default
    FT_RendererFT_OPEN_XXXft_kerning_unfitted
    FT_ENC_TAGFT_Parameterft_kerning_unscaled
    ft_encoding_xxxFT_Open_ArgsFT_Get_Kerning
    FT_CharMapRecFT_New_FaceFT_Get_Track_Kerning
    FT_Face_InternalFT_New_Memory_FaceFT_Get_Glyph_Name
    FT_FaceRecFT_Open_FaceFT_Get_Postscript_Name
    FT_FACE_FLAG_XXXFT_Attach_FileFT_Select_Charmap
    FT_HAS_HORIZONTALFT_Attach_StreamFT_Set_Charmap
    FT_HAS_VERTICALFT_Reference_FaceFT_Get_Charmap_Index
    FT_HAS_KERNINGFT_Done_FaceFT_Get_Char_Index
    FT_IS_SCALABLEFT_Select_SizeFT_Get_First_Char
    FT_IS_SFNTFT_Size_Request_TypeFT_Get_Next_Char
    FT_IS_FIXED_WIDTHFT_Size_RequestRecFT_Get_Name_Index
    FT_HAS_FIXED_SIZESFT_Size_RequestFT_SUBGLYPH_FLAG_XXX
    FT_HAS_FAST_GLYPHSFT_Request_SizeFT_Get_SubGlyph_Info
    FT_HAS_GLYPH_NAMESFT_Set_Char_SizeFT_FSTYPE_XXX
    FT_HAS_MULTIPLE_MASTERSFT_Set_Pixel_SizesFT_Get_FSType_Flags
    FT_IS_CID_KEYEDFT_Load_Glyph


    - -
    -

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

    -

    -
    -

    FT_Library

    -
    -Defined in FT_FREETYPE_H (freetype/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).

    -

    For multi-threading applications each thread should have its own FT_Library object.

    -

    -
    note
    -

    Library objects are normally created by FT_Init_FreeType, and destroyed with FT_Done_FreeType.

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

    FT_Face

    -
    -Defined in FT_FREETYPE_H (freetype/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
    -

    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
    -

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

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

    FT_Size

    -
    -Defined in FT_FREETYPE_H (freetype/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
    -

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

    -

    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
    -

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

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

    FT_GlyphSlot

    -
    -Defined in FT_FREETYPE_H (freetype/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
    -

    See FT_GlyphSlotRec for the publicly accessible glyph fields.

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

    FT_CharMap

    -
    -Defined in FT_FREETYPE_H (freetype/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
    -

    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
    -

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

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

    FT_Encoding

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

    -
    -
    -  typedef enum  FT_Encoding_
    -  {
    -    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_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_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_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
    -
    -  } FT_Encoding;
    -
    -

    -
    -

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

    -

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

    The encoding value 0 is reserved.

    -
    FT_ENCODING_UNICODE -

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

    -

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

    -
    FT_ENCODING_MS_SYMBOL -

    Corresponds to the Microsoft Symbol encoding, used to encode mathematical symbols in the 32..255 character code range. For more information, see ‘http://www.ceviz.net/symbol.htm’.

    -
    FT_ENCODING_SJIS -

    Corresponds to Japanese SJIS encoding. More info at at ‘http://langsupport.japanreference.com/encoding.shtml’. See note on multi-byte encodings below.

    -
    FT_ENCODING_GB2312 -

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

    -
    FT_ENCODING_BIG5 -

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

    -
    FT_ENCODING_WANSUNG -

    Corresponds to the Korean encoding system known as Wansung. For more information see ‘http://www.microsoft.com/typography/unicode/949.txt’.

    -
    FT_ENCODING_JOHAB -

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

    -
    FT_ENCODING_ADOBE_LATIN_1
    -

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

    -
    FT_ENCODING_ADOBE_STANDARD
    -

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

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

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

    -
    FT_ENCODING_APPLE_ROMAN
    -

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

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

    Same as FT_ENCODING_SJIS. Deprecated.

    -
    FT_ENCODING_MS_GB2312 -

    Same as FT_ENCODING_GB2312. Deprecated.

    -
    FT_ENCODING_MS_BIG5 -

    Same as FT_ENCODING_BIG5. Deprecated.

    -
    FT_ENCODING_MS_WANSUNG -

    Same as FT_ENCODING_WANSUNG. Deprecated.

    -
    FT_ENCODING_MS_JOHAB -

    Same as FT_ENCODING_JOHAB. Deprecated.

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

    -

    FT_ENCODING_NONE is set if ‘platform_id’ is TT_PLATFORM_MACINTOSH and ‘encoding_id’ is not TT_MAC_ID_ROMAN (otherwise it is set to FT_ENCODING_APPLE_ROMAN).

    -

    If ‘platform_id’ is TT_PLATFORM_MACINTOSH, use the function FT_Get_CMap_Language_ID to query the Mac language ID which may 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/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).

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

    FT_Bitmap_Size

    -
    -Defined in FT_FREETYPE_H (freetype/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/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/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/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/freetype.h). -

    -
    -
    -#ifndef FT_ENC_TAG
    -#define FT_ENC_TAG( value, a, b, c, d )         \
    -          value = ( ( (FT_UInt32)(a) << 24 ) |  \
    -                    ( (FT_UInt32)(b) << 16 ) |  \
    -                    ( (FT_UInt32)(c) <<  8 ) |  \
    -                      (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
    -

    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/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/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/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/freetype.h). -

    -
    -
    -  typedef struct  FT_FaceRec_
    -  {
    -    FT_Long           num_faces;
    -    FT_Long           face_index;
    -
    -    FT_Long           face_flags;
    -    FT_Long           style_flags;
    -
    -    FT_Long           num_glyphs;
    -
    -    FT_String*        family_name;
    -    FT_String*        style_name;
    -
    -    FT_Int            num_fixed_sizes;
    -    FT_Bitmap_Size*   available_sizes;
    -
    -    FT_Int            num_charmaps;
    -    FT_CharMap*       charmaps;
    -
    -    FT_Generic        generic;
    -
    -    /*# The following member variables (down to `underline_thickness') */
    -    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */
    -    /*# for bitmap fonts.                                              */
    -    FT_BBox           bbox;
    -
    -    FT_UShort         units_per_EM;
    -    FT_Short          ascender;
    -    FT_Short          descender;
    -    FT_Short          height;
    -
    -    FT_Short          max_advance_width;
    -    FT_Short          max_advance_height;
    -
    -    FT_Short          underline_position;
    -    FT_Short          underline_thickness;
    -
    -    FT_GlyphSlot      glyph;
    -    FT_Size           size;
    -    FT_CharMap        charmap;
    -
    -    /*@private begin */
    -
    -    FT_Driver         driver;
    -    FT_Memory         memory;
    -    FT_Stream         stream;
    -
    -    FT_ListRec        sizes_list;
    -
    -    FT_Generic        autohint;   /* face-specific auto-hinter data */
    -    void*             extensions; /* unused                         */
    -
    -    FT_Face_Internal  internal;
    -
    -    /*@private end */
    -
    -  } FT_FaceRec;
    -
    -

    -
    -

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

    -

    -
    fields
    -

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    num_faces -

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

    -
    face_index -

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

    -
    face_flags -

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

    -
    style_flags -

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

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

    The face's family name. This is an ASCII string, usually in English, which 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 -

    The face's style name. This is an ASCII string, usually in English, which 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 -

    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 -

    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 -

    The number of charmaps in the face.

    -
    charmaps -

    An array of the charmaps of the face.

    -
    generic -

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

    -
    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 ‘maximal ascender’, and ‘bbox.yMin’ as the ‘minimal 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 -

    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 -

    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 -

    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 -

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

    -
    max_advance_width -

    The maximal advance width, in font units, for all glyphs in this face. This can be used to make word wrapping computations faster. Only relevant for scalable formats.

    -
    max_advance_height -

    The maximal advance height, in font units, 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 -

    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 -

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

    -
    glyph -

    The face's associated glyph slot(s).

    -
    size -

    The current active size for this face.

    -
    charmap -

    The current active charmap for this face.

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

    -
    -

    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 which are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the ‘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’ which 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’.

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

    FT_HAS_HORIZONTAL

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

    -
    -
    -#define FT_HAS_HORIZONTAL( face ) \
    -          ( 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
    -

    FT_HAS_VERTICAL can be used to check for vertical metrics.

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

    FT_HAS_VERTICAL

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

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

    -
    -

    A macro that returns true whenever a face object contains vertical metrics.

    -

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

    FT_HAS_KERNING

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

    -
    -
    -#define FT_HAS_KERNING( face ) \
    -          ( 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/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.

    -

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

    FT_IS_SFNT

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

    -
    -
    -#define FT_IS_SFNT( face ) \
    -          ( 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/freetype.h). -

    -
    -
    -#define FT_IS_FIXED_WIDTH( face ) \
    -          ( 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/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/freetype.h). -

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

    -
    -

    Deprecated.

    -

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

    FT_HAS_GLYPH_NAMES

    -
    -Defined in FT_FREETYPE_H (freetype/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/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/freetype.h). -

    -
    -
    -#define FT_IS_CID_KEYED( face ) \
    -          ( 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/freetype.h). -

    -
    -
    -#define FT_IS_TRICKY( face ) \
    -          ( 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_STYLE_FLAG_XXX

    -
    -Defined in FT_FREETYPE_H (freetype/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).

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

    FT_Size_Internal

    -
    -Defined in FT_FREETYPE_H (freetype/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/freetype.h). -

    -
    -
    -  typedef struct  FT_Size_Metrics_
    -  {
    -    FT_UShort  x_ppem;      /* horizontal pixels per EM               */
    -    FT_UShort  y_ppem;      /* vertical pixels per EM                 */
    -
    -    FT_Fixed   x_scale;     /* scaling values used to convert font    */
    -    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */
    -
    -    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */
    -    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */
    -    FT_Pos     height;      /* text height in 26.6 frac. pixels       */
    -    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 -

    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 -

    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 -

    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 -

    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 -

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

    -
    descender -

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

    -
    height -

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

    -
    max_advance -

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

    -
    -
    -
    note
    -

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

    -

    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/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, which is unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each size object.

    -
    metrics -

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

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

    FT_SubGlyph

    -
    -Defined in FT_FREETYPE_H (freetype/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/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/freetype.h). -

    -
    -
    -  typedef struct  FT_GlyphSlotRec_
    -  {
    -    FT_Library        library;
    -    FT_Face           face;
    -    FT_GlyphSlot      next;
    -    FT_UInt           reserved;       /* retained for binary compatibility */
    -    FT_Generic        generic;
    -
    -    FT_Glyph_Metrics  metrics;
    -    FT_Fixed          linearHoriAdvance;
    -    FT_Fixed          linearVertAdvance;
    -    FT_Vector         advance;
    -
    -    FT_Glyph_Format   format;
    -
    -    FT_Bitmap         bitmap;
    -    FT_Int            bitmap_left;
    -    FT_Int            bitmap_top;
    -
    -    FT_Outline        outline;
    -
    -    FT_UInt           num_subglyphs;
    -    FT_SubGlyph       subglyphs;
    -
    -    void*             control_data;
    -    long              control_len;
    -
    -    FT_Pos            lsb_delta;
    -    FT_Pos            rsb_delta;
    -
    -    void*             other;
    -
    -    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 -

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

    -
    face -

    A handle to the parent face object.

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

    A typeless pointer which is unused by the FreeType library or any of its drivers. It can be used by client applications to link their own data to each glyph slot object.

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

    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 -

    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 -

    This shorthand is, depending on FT_LOAD_IGNORE_TRANSFORM, the transformed advance width for the glyph (in 26.6 fractional pixel format). As specified with FT_LOAD_VERTICAL_LAYOUT, it uses either the ‘horiAdvance’ or the ‘vertAdvance’ value of ‘metrics’ field.

    -
    format -

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

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

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

    -
    subglyphs -

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

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

    This is the length in bytes of the control data.

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

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

    -
    rsb_delta -

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

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

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

    -
    -  FT_Pos  origin_x       = 0;                                      
    -  FT_Pos  prev_rsb_delta = 0;                                      
    -                                                                   
    -                                                                   
    -  for all glyphs do                                                
    -    <compute kern between current and previous glyph and add it to 
    -     `origin_x'>                                                   
    -                                                                   
    -    <load glyph with `FT_Load_Glyph'>                              
    -                                                                   
    -    if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           
    -      origin_x -= 64;                                              
    -    else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      
    -      origin_x += 64;                                              
    -                                                                   
    -    prev_rsb_delta = face->glyph->rsb_delta;                       
    -                                                                   
    -    <save glyph image, or render glyph, or ...>                    
    -                                                                   
    -    origin_x += face->glyph->advance.x;                            
    -  endfor                                                           
    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Init_FreeType

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to a new library object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

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

    FT_Done_FreeType

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the target library object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_OPEN_XXX

    -
    -Defined in FT_FREETYPE_H (freetype/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
    -
    -#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 */
    -
    -

    -
    -

    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.

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

    -
    data -

    A pointer to the parameter data.

    -
    -
    -
    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/freetype.h). -

    -
    -
    -  typedef struct  FT_Open_Args_
    -  {
    -    FT_UInt         flags;
    -    const FT_Byte*  memory_base;
    -    FT_Long         memory_size;
    -    FT_String*      pathname;
    -    FT_Stream       stream;
    -    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 -

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

    -
    memory_base -

    The first byte of the file in memory.

    -
    memory_size -

    The size in bytes of the file in memory.

    -
    pathname -

    A pointer to an 8-bit file pathname.

    -
    stream -

    A handle to a source stream object.

    -
    driver -

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

    -
    num_params -

    The number of extra parameters.

    -
    params -

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

    -
    -
    -
    note
    -

    The stream type is determined by the contents of ‘flags’ which 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.

    -

    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/freetype.h). -

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

    -
    -

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

    -

    -
    inout
    -

    - - -
    library -

    A handle to the library resource.

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

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

    FT_New_Memory_Face

    -
    -Defined in FT_FREETYPE_H (freetype/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 which 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/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 which 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 which 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’ which 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/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 -

    The target face object.

    -
    -
    -
    input
    -

    - - -
    filepathname -

    The pathname.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Attach_Stream

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    The target face object.

    -
    -
    -
    input
    -

    - - -
    parameters -

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

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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/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 which reference FT_Face objects.

    -

    -
    input
    -

    - - -
    face -

    A handle to a target face object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    since
    -

    2.4.2

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

    FT_Done_Face

    -
    -Defined in FT_FREETYPE_H (freetype/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.

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

    FT_Select_Size

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

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

    -
    -

    Select a bitmap strike.

    -

    -
    inout
    -

    - - -
    face -

    A handle to a target face object.

    -
    -
    -
    input
    -

    - - -
    strike_index -

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

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Size_Request_Type

    -
    -Defined in FT_FREETYPE_H (freetype/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_MAX
    -
    -  } FT_Size_Request_Type;
    -
    -

    -
    -

    An enumeration type that lists the supported size request types.

    -

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

    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
    -

    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
    -

    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
    -

    Specify the scaling values directly.

    -
    -
    -
    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/freetype.h). -

    -
    -
    -  typedef struct  FT_Size_RequestRec_
    -  {
    -    FT_Size_Request_Type  type;
    -    FT_Long               width;
    -    FT_Long               height;
    -    FT_UInt               horiResolution;
    -    FT_UInt               vertResolution;
    -
    -  } FT_Size_RequestRec;
    -
    -

    -
    -

    A structure used to model a size request.

    -

    -
    fields
    -

    - - - - - - -
    type -

    See FT_Size_Request_Type.

    -
    width -

    The desired width.

    -
    height -

    The desired height.

    -
    horiResolution -

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

    -
    vertResolution -

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

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

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

    FT_Set_Char_Size

    -
    -Defined in FT_FREETYPE_H (freetype/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/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.

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

    FT_Load_Glyph

    -
    -Defined in FT_FREETYPE_H (freetype/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 which 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/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/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 )
    -
    -

    -
    -

    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 outline glyph loaded, but keep it in font units.

    -

    This flag implies FT_LOAD_NO_HINTING and FT_LOAD_NO_BITMAP, and unsets FT_LOAD_RENDER.

    -
    FT_LOAD_NO_HINTING -

    Disable hinting. This generally generates ‘blurrier’ bitmap glyph when the glyph is rendered in any of the anti-aliased modes. See 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. Don't use it as it is problematic currently.

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

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

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

    FT_LOAD_TARGET_XXX

    -
    -Defined in FT_FREETYPE_H (freetype/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 which matches the used algorithm best) unless FT_LOAD_MONOCHROME is set.

    -

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

    -

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

    FT_Set_Transform

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the source face object.

    -
    -
    -
    input
    -

    - - - -
    matrix -

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

    -
    delta -

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

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

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

    FT_Kerning_Mode

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

    -
    -
    -  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/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/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/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/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/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/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 maximal 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 ‘include/freetype/config/ftoptions.h’.

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

    FT_Get_Postscript_Name

    -
    -Defined in FT_FREETYPE_H (freetype/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/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 which covers Unicode best (‘best’ in the sense that a UCS-4 cmap is preferred to a UCS-2 cmap). It is thus preferable to FT_Set_Charmap in this case.

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

    FT_Set_Charmap

    -
    -Defined in FT_FREETYPE_H (freetype/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/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/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 -

    A handle to the source face object.

    -
    charcode -

    The character code.

    -
    -
    -
    return
    -

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

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

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

    FT_Get_First_Char

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the source face object.

    -
    -
    -
    output
    -

    - - -
    agindex -

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

    -
    -
    -
    return
    -

    The charmap's first character code.

    -
    -
    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;                                              
    -  FT_UInt   gindex;                                                
    -                                                                   
    -                                                                   
    -  charcode = FT_Get_First_Char( face, &gindex );                   
    -  while ( gindex != 0 )                                            
    -  {                                                                
    -    ... do something with (charcode,gindex) pair ...               
    -                                                                   
    -    charcode = FT_Get_Next_Char( face, charcode, &gindex );        
    -  }                                                                
    -
    -

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

    A handle to the source face object.

    -
    char_code -

    The starting character code.

    -
    -
    -
    output
    -

    - - -
    agindex -

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

    -
    -
    -
    return
    -

    The charmap's next character code.

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

    A handle to the source face object.

    -
    glyph_name -

    The glyph name.

    -
    -
    -
    return
    -

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

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

    FT_SUBGLYPH_FLAG_XXX

    -
    -Defined in FT_FREETYPE_H (freetype/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
    -

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

    FT_Get_SubGlyph_Info

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

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,
    -                        FT_UInt       sub_index,
    -                        FT_Int       *p_index,
    -                        FT_UInt      *p_flags,
    -                        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 -

    The source glyph slot.

    -
    sub_index -

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

    -
    -
    -
    output
    -

    - - - - - - -
    p_index -

    The glyph index of the subglyph.

    -
    p_flags -

    The subglyph flags, see FT_SUBGLYPH_FLAG_XXX.

    -
    p_arg1 -

    The subglyph's first argument (if any).

    -
    p_arg2 -

    The subglyph's second argument (if any).

    -
    p_transform -

    The subglyph transformation (if any).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    Fonts with no fsType bit set may be embedded and permanently installed on the remote system by an application.

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

    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
    -

    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
    -

    If this bit is set, the font may not be subsetted prior to embedding.

    -
    FT_FSTYPE_BITMAP_EMBEDDING_ONLY
    -

    If this bit is set, only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.

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

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-basic_types.html b/docs/reference/ft2-basic_types.html deleted file mode 100644 index 510d04b..0000000 --- a/docs/reference/ft2-basic_types.html +++ /dev/null @@ -1,1173 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Basic Data Types -

    -

    Synopsis

    - - - - - - - - - - - - - - - -
    FT_ByteFT_OffsetFT_UnitVector
    FT_BytesFT_PtrDistFT_F26Dot6
    FT_CharFT_StringFT_Pixel_Mode
    FT_IntFT_Tagft_pixel_mode_xxx
    FT_UIntFT_ErrorFT_Palette_Mode
    FT_Int16FT_FixedFT_Bitmap
    FT_UInt16FT_PointerFT_IMAGE_TAG
    FT_Int32FT_PosFT_Glyph_Format
    FT_UInt32FT_Vectorft_glyph_format_xxx
    FT_ShortFT_BBoxFT_Data
    FT_UShortFT_MatrixFT_Generic_Finalizer
    FT_LongFT_FWordFT_Generic
    FT_ULongFT_UFWordFT_MAKE_TAG
    FT_BoolFT_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 (freetype/fttypes.h). -

    -
    -
    -  typedef unsigned char  FT_Byte;
    -
    -

    -
    -

    A simple typedef for the unsigned char type.

    -

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

    FT_Bytes

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef const FT_Byte*  FT_Bytes;
    -
    -

    -
    -

    A typedef for constant memory areas.

    -

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

    FT_Char

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef signed char  FT_Char;
    -
    -

    -
    -

    A simple typedef for the signed char type.

    -

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

    FT_Int

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef signed int  FT_Int;
    -
    -

    -
    -

    A typedef for the int type.

    -

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

    FT_UInt

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef unsigned int  FT_UInt;
    -
    -

    -
    -

    A typedef for the unsigned int type.

    -

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

    FT_Int16

    -
    -Defined in FT_CONFIG_CONFIG_H (freetype/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 (freetype/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 (freetype/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 (freetype/config/ftconfig.h). -

    -
    -
    -  typedef unsigned XXX  FT_UInt32;
    -
    -

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

    FT_Short

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef signed short  FT_Short;
    -
    -

    -
    -

    A typedef for signed short.

    -

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

    FT_UShort

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef unsigned short  FT_UShort;
    -
    -

    -
    -

    A typedef for unsigned short.

    -

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

    FT_Long

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef signed long  FT_Long;
    -
    -

    -
    -

    A typedef for signed long.

    -

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

    FT_ULong

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef unsigned long  FT_ULong;
    -
    -

    -
    -

    A typedef for unsigned long.

    -

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

    FT_Bool

    -
    -Defined in FT_TYPES_H (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/fttypes.h). -

    -
    -
    -  typedef signed long  FT_Fixed;
    -
    -

    -
    -

    This type is used to store 16.16 fixed float values, like scaling values or matrix coefficients.

    -

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

    FT_Pointer

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef void*  FT_Pointer;
    -
    -

    -
    -

    A simple typedef for a typeless pointer.

    -

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

    FT_Pos

    -
    -Defined in FT_IMAGE_H (freetype/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 float pixel coordinates.

    -

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

    FT_Vector

    -
    -Defined in FT_IMAGE_H (freetype/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 -

    The horizontal coordinate.

    -
    y -

    The vertical coordinate.

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

    FT_BBox

    -
    -Defined in FT_IMAGE_H (freetype/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 -

    The horizontal minimum (left-most).

    -
    yMin -

    The vertical minimum (bottom-most).

    -
    xMax -

    The horizontal maximum (right-most).

    -
    yMax -

    The vertical maximum (top-most).

    -
    -
    -
    note
    -

    The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called (llx,lly) and (urx,ury), respectively.

    -

    If ‘yMin’ is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if ‘ymax’ is positive, this value gives the glyph's ascender.

    -

    ‘xMin’ gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If ‘xMin’ is negative, the glyph extends to the left of the origin.

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

    FT_Matrix

    -
    -Defined in FT_TYPES_H (freetype/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 float format. The computation performed is:

    -
    -   x' = x*xx + y*xy                                             
    -   y' = x*yx + y*yy                                             
    -
    -

    -
    fields
    -

    - - - - - -
    xx -

    Matrix coefficient.

    -
    xy -

    Matrix coefficient.

    -
    yx -

    Matrix coefficient.

    -
    yy -

    Matrix coefficient.

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

    FT_FWord

    -
    -Defined in FT_TYPES_H (freetype/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 (freetype/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 (freetype/fttypes.h). -

    -
    -
    -  typedef signed short  FT_F2Dot14;
    -
    -

    -
    -

    A signed 2.14 fixed float type used for unit vectors.

    -

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

    FT_UnitVector

    -
    -Defined in FT_TYPES_H (freetype/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 -

    Horizontal coordinate.

    -
    y -

    Vertical coordinate.

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

    FT_F26Dot6

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef signed long  FT_F26Dot6;
    -
    -

    -
    -

    A signed 26.6 fixed float type used for vectorial pixel coordinates.

    -

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

    FT_Pixel_Mode

    -
    -Defined in FT_IMAGE_H (freetype/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_MAX      /* do not remove */
    -
    -  } FT_Pixel_Mode;
    -
    -

    -
    -

    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.

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

    ft_pixel_mode_xxx

    -
    -Defined in FT_IMAGE_H (freetype/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
    -
    -

    -
    -

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

    FT_Palette_Mode

    -
    -Defined in FT_IMAGE_H (freetype/ftimage.h). -

    -
    -
    -  typedef enum  FT_Palette_Mode_
    -  {
    -    ft_palette_mode_rgb = 0,
    -    ft_palette_mode_rgba,
    -
    -    ft_palette_mode_max   /* do not remove */
    -
    -  } FT_Palette_Mode;
    -
    -

    -
    -

    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.

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

    FT_Bitmap

    -
    -Defined in FT_IMAGE_H (freetype/ftimage.h). -

    -
    -
    -  typedef struct  FT_Bitmap_
    -  {
    -    int             rows;
    -    int             width;
    -    int             pitch;
    -    unsigned char*  buffer;
    -    short           num_grays;
    -    char            pixel_mode;
    -    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 -

    The number of bitmap rows.

    -
    width -

    The number of pixels in bitmap row.

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

    A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.

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

    The pixel mode, i.e., how pixel bits are stored. See FT_Pixel_Mode for possible values.

    -
    palette_mode -

    This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.

    -
    palette -

    A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.

    -
    -
    -
    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 (freetype/ftimage.h). -

    -
    -
    -#ifndef FT_IMAGE_TAG
    -#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
    -          value = ( ( (unsigned long)_x1 << 24 ) | \
    -                    ( (unsigned long)_x2 << 16 ) | \
    -                    ( (unsigned long)_x3 << 8  ) | \
    -                      (unsigned long)_x4         )
    -#endif /* FT_IMAGE_TAG */
    -
    -

    -
    -

    This macro converts four-letter tags to an unsigned long type.

    -

    -
    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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 which is under finalization. Its client data is accessed through its ‘generic’ field.

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

    FT_Generic

    -
    -Defined in FT_TYPES_H (freetype/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 (freetype/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 which 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]
    - - - diff --git a/docs/reference/ft2-bdf_fonts.html b/docs/reference/ft2-bdf_fonts.html deleted file mode 100644 index 0f41254..0000000 --- a/docs/reference/ft2-bdf_fonts.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -BDF and PCF Files -

    -

    Synopsis

    - - - -
    FT_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 (freetype/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_PropertyType;
    -
    -

    -
    -

    A list of BDF property types.

    -

    -
    values
    -

    - - - - - - - -
    BDF_PROPERTY_TYPE_NONE -

    Value 0 is used to indicate a missing property.

    -
    BDF_PROPERTY_TYPE_ATOM -

    Property is a string atom.

    -
    BDF_PROPERTY_TYPE_INTEGER
    -

    Property is a 32-bit signed integer.

    -
    BDF_PROPERTY_TYPE_CARDINAL
    -

    Property is a 32-bit unsigned integer.

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

    BDF_Property

    -
    -Defined in FT_BDF_H (freetype/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 (freetype/ftbdf.h). -

    -
    -
    -  typedef struct  BDF_PropertyRec_
    -  {
    -    BDF_PropertyType  type;
    -    union {
    -      const char*     atom;
    -      FT_Int32        integer;
    -      FT_UInt32       cardinal;
    -
    -    } u;
    -
    -  } BDF_PropertyRec;
    -
    -

    -
    -

    This structure models a given BDF/PCF property.

    -

    -
    fields
    -

    - - - - - -
    type -

    The property type.

    -
    u.atom -

    The atom string, if type is BDF_PROPERTY_TYPE_ATOM.

    -
    u.integer -

    A signed integer, if type is BDF_PROPERTY_TYPE_INTEGER.

    -
    u.cardinal -

    An unsigned integer, if type is BDF_PROPERTY_TYPE_CARDINAL.

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

    FT_Get_BDF_Charset_ID

    -
    -Defined in FT_BDF_H (freetype/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 -

    A handle to the input face.

    -
    -
    -
    output
    -

    - - - -
    acharset_encoding -

    Charset encoding, as a C string, owned by the face.

    -
    acharset_registry -

    Charset registry, as a C string, owned by the face.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function only works with BDF faces, returning an error otherwise.

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

    FT_Get_BDF_Property

    -
    -Defined in FT_BDF_H (freetype/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 -

    A handle to the input face.

    -
    name -

    The property name.

    -
    -
    -
    output
    -

    - - -
    aproperty -

    The property.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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]
    - - - diff --git a/docs/reference/ft2-bitmap_handling.html b/docs/reference/ft2-bitmap_handling.html deleted file mode 100644 index db5c763..0000000 --- a/docs/reference/ft2-bitmap_handling.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Bitmap Handling -

    -

    Synopsis

    - - - -
    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 (freetype/ftbitmap.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_Bitmap_New( FT_Bitmap  *abitmap );
    -
    -

    -
    -

    Initialize a pointer to an FT_Bitmap structure.

    -

    -
    inout
    -

    - - -
    abitmap -

    A pointer to the bitmap structure.

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

    FT_Bitmap_Copy

    -
    -Defined in FT_BITMAP_H (freetype/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 -

    A handle to a library object.

    -
    source -

    A handle to the source bitmap.

    -
    -
    -
    output
    -

    - - -
    target -

    A handle to the target bitmap.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Bitmap_Embolden

    -
    -Defined in FT_BITMAP_H (freetype/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 -

    A handle to a library object.

    -
    xStrength -

    How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.

    -
    yStrength -

    How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.

    -
    -
    -
    inout
    -

    - - -
    bitmap -

    A handle to the target bitmap.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Bitmap_Convert

    -
    -Defined in FT_BITMAP_H (freetype/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, or 8bpp to a bitmap object with depth 8bpp, making the number of used bytes per line (a.k.a. the ‘pitch’) a multiple of ‘alignment’.

    -

    -
    input
    -

    - - - - -
    library -

    A handle to a library object.

    -
    source -

    The source bitmap.

    -
    alignment -

    The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.

    -
    -
    -
    output
    -

    - - -
    target -

    The target bitmap.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftbitmap.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );
    -
    -

    -
    -

    Make sure that a glyph slot owns ‘slot->bitmap’.

    -

    -
    input
    -

    - - -
    slot -

    The glyph slot.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function is to be used in combination with FT_Bitmap_Embolden.

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

    FT_Bitmap_Done

    -
    -Defined in FT_BITMAP_H (freetype/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 -

    A handle to a library object.

    -
    bitmap -

    The bitmap object to be freed.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    The ‘library’ argument is taken to have access to FreeType's memory handling functions.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-cache_subsystem.html b/docs/reference/ft2-cache_subsystem.html deleted file mode 100644 index cb7ad05..0000000 --- a/docs/reference/ft2-cache_subsystem.html +++ /dev/null @@ -1,1170 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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:

    -

    First, available or installed font faces are uniquely identified by FTC_FaceID values, provided to the cache by the client. Note that the cache only stores and compares these values, and doesn't try to interpret them in any way.

    -

    Second, the cache calls, only when needed, a client-provided function to convert an FTC_FaceID into a new FT_Face object. The latter is then completely managed by the cache, including its termination through FT_Done_Face. To monitor termination of face objects, the finalizer callback in the ‘generic’ field of the FT_Face object can be used, which might also be used to store the FTC_FaceID of the face.

    -

    Clients are free to map face IDs to anything else. The most simple usage is to associate them to a (pathname,face_index) pair that is used to call FT_New_Face. However, more complex schemes are also possible.

    -

    Note that for the cache to work correctly, the face ID values must be persistent, which means that the contents they point to should not change at runtime, or that their value should not become invalid.

    -

    If this is unavoidable (e.g., when a font is uninstalled at runtime), you should call FTC_Manager_RemoveFaceID as soon as possible, to let the cache get rid of any references to the old FTC_FaceID it may keep internally. Failure to do so will lead to incorrect behaviour or even crashes.

    -

    To use the cache, start with calling FTC_Manager_New to create a new FTC_Manager object, which models a single cache instance. You can then look up FT_Face and FT_Size objects with FTC_Manager_LookupFace and FTC_Manager_LookupSize, respectively.

    -

    If you want to use the charmap caching, call FTC_CMapCache_New, then later use FTC_CMapCache_Lookup to perform the equivalent of FT_Get_Char_Index, only much faster.

    -

    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 (freetype/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 (freetype/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
    -

    Never use NULL as a valid FTC_FaceID.

    -

    Face IDs are passed by the client to the cache manager, which 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 (freetype/ftcache.h). -

    -
    -
    -  typedef FT_Error
    -  (*FTC_Face_Requester)( FTC_FaceID  face_id,
    -                         FT_Library  library,
    -                         FT_Pointer  request_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 -

    The face ID to resolve.

    -
    library -

    A handle to a FreeType library object.

    -
    req_data -

    Application-provided request data (see note below).

    -
    -
    -
    output
    -

    - - -
    aface -

    A new FT_Face handle.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 (freetype/ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_Manager_New( FT_Library          library,
    -                   FT_UInt             max_faces,
    -                   FT_UInt             max_sizes,
    -                   FT_ULong            max_bytes,
    -                   FTC_Face_Requester  requester,
    -                   FT_Pointer          req_data,
    -                   FTC_Manager        *amanager );
    -
    -

    -
    -

    Create a new cache manager.

    -

    -
    input
    -

    - - - - - - - -
    library -

    The parent FreeType library handle to use.

    -
    max_faces -

    Maximum number of opened FT_Face objects managed by this cache instance. Use 0 for defaults.

    -
    max_sizes -

    Maximum number of opened FT_Size objects managed by this cache instance. Use 0 for defaults.

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

    An application-provided callback used to translate face IDs into real FT_Face objects.

    -
    req_data -

    A generic pointer that is passed to the requester each time it is called (see FTC_Face_Requester).

    -
    -
    -
    output
    -

    - - -
    amanager -

    A handle to a new manager object. 0 in case of failure.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FTC_Manager_Reset

    -
    -Defined in FT_CACHE_H (freetype/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 -

    A handle to the manager.

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

    FTC_Manager_Done

    -
    -Defined in FT_CACHE_H (freetype/ftcache.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FTC_Manager_Done( FTC_Manager  manager );
    -
    -

    -
    -

    Destroy a given manager after emptying it.

    -

    -
    input
    -

    - - -
    manager -

    A handle to the target cache manager object.

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

    FTC_Manager_LookupFace

    -
    -Defined in FT_CACHE_H (freetype/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 -

    A handle to the cache manager.

    -
    face_id -

    The ID of the face object.

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to the face object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftcache.h). -

    -
    -
    -  typedef struct  FTC_ScalerRec_
    -  {
    -    FTC_FaceID  face_id;
    -    FT_UInt     width;
    -    FT_UInt     height;
    -    FT_Int      pixel;
    -    FT_UInt     x_res;
    -    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 -

    The source face ID.

    -
    width -

    The character width.

    -
    height -

    The character height.

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

    Only used when ‘pixel’ is value 0 to indicate the horizontal resolution in dpi.

    -
    y_res -

    Only used when ‘pixel’ is value 0 to indicate the vertical resolution in dpi.

    -
    -
    -
    note
    -

    This type is mainly used to retrieve FT_Size objects through the cache manager.

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

    FTC_Scaler

    -
    -Defined in FT_CACHE_H (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/ftcache.h). -

    -
    -
    -  typedef struct  FTC_ImageTypeRec_
    -  {
    -    FTC_FaceID  face_id;
    -    FT_Int      width;
    -    FT_Int      height;
    -    FT_Int32    flags;
    -
    -  } FTC_ImageTypeRec;
    -
    -

    -
    -

    A structure used to model the type of images in a glyph cache.

    -

    -
    fields
    -

    - - - - - -
    face_id -

    The face ID.

    -
    width -

    The width in pixels.

    -
    height -

    The height in pixels.

    -
    flags -

    The load flags, as in FT_Load_Glyph.

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

    FTC_ImageType

    -
    -Defined in FT_CACHE_H (freetype/ftcache.h). -

    -
    -
    -  typedef struct FTC_ImageTypeRec_*  FTC_ImageType;
    -
    -

    -
    -

    A handle to an FTC_ImageTypeRec structure.

    -

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

    FTC_ImageCache

    -
    -Defined in FT_CACHE_H (freetype/ftcache.h). -

    -
    -
    -  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;
    -
    -

    -
    -

    A handle to an 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 (freetype/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 (freetype/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 (freetype/ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,
    -                               FTC_Scaler      scaler,
    -                               FT_ULong        load_flags,
    -                               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 -

    A handle to the source glyph image cache.

    -
    scaler -

    A pointer to a scaler descriptor.

    -
    load_flags -

    The corresponding load flags.

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

    -

    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 (freetype/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 (freetype/ftcache.h). -

    -
    -
    -  typedef struct  FTC_SBitRec_
    -  {
    -    FT_Byte   width;
    -    FT_Byte   height;
    -    FT_Char   left;
    -    FT_Char   top;
    -
    -    FT_Byte   format;
    -    FT_Byte   max_grays;
    -    FT_Short  pitch;
    -    FT_Char   xadvance;
    -    FT_Char   yadvance;
    -
    -    FT_Byte*  buffer;
    -
    -  } FTC_SBitRec;
    -
    -

    -
    -

    A very compact structure used to describe a small glyph bitmap.

    -

    -
    fields
    -

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

    The bitmap width in pixels.

    -
    height -

    The bitmap height in pixels.

    -
    left -

    The horizontal distance from the pen position to the left bitmap border (a.k.a. ‘left side bearing’, or ‘lsb’).

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

    The format of the glyph bitmap (monochrome or gray).

    -
    max_grays -

    Maximum gray level value (in the range 1 to 255).

    -
    pitch -

    The number of bytes per bitmap line. May be positive or negative.

    -
    xadvance -

    The horizontal advance width in pixels.

    -
    yadvance -

    The vertical advance height in pixels.

    -
    buffer -

    A pointer to the bitmap pixels.

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

    FTC_SBitCache

    -
    -Defined in FT_CACHE_H (freetype/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 (freetype/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 (freetype/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 (freetype/ftcache.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,
    -                              FTC_Scaler     scaler,
    -                              FT_ULong       load_flags,
    -                              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 -

    A handle to the source sbit cache.

    -
    scaler -

    A pointer to the scaler descriptor.

    -
    load_flags -

    The corresponding load flags.

    -
    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]
    - - - diff --git a/docs/reference/ft2-cid_fonts.html b/docs/reference/ft2-cid_fonts.html deleted file mode 100644 index cc533b5..0000000 --- a/docs/reference/ft2-cid_fonts.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -CID Fonts -

    -

    Synopsis

    - - - - -
    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 (freetype/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 -

    A handle to the input face.

    -
    -
    -
    output
    -

    - - - - -
    registry -

    The registry, as a C string, owned by the face.

    -
    ordering -

    The ordering, as a C string, owned by the face.

    -
    supplement -

    The supplement.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function only works with CID faces, returning an error otherwise.

    -
    -
    since
    -

    2.3.6

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

    FT_Get_CID_Is_Internally_CID_Keyed

    -
    -Defined in FT_CID_H (freetype/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 -

    A handle to the input face.

    -
    -
    -
    output
    -

    - - -
    is_cid -

    The type of the face as an FT_Bool.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function only works with CID faces and OpenType fonts, returning an error otherwise.

    -
    -
    since
    -

    2.3.9

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

    FT_Get_CID_From_Glyph_Index

    -
    -Defined in FT_CID_H (freetype/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 -

    A handle to the input face.

    -
    glyph_index -

    The input glyph index.

    -
    -
    -
    output
    -

    - - -
    cid -

    The CID as an FT_UInt.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function only works with CID faces and OpenType fonts, returning an error otherwise.

    -
    -
    since
    -

    2.3.9

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-computations.html b/docs/reference/ft2-computations.html deleted file mode 100644 index 82a2a27..0000000 --- a/docs/reference/ft2-computations.html +++ /dev/null @@ -1,832 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

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

    The first multiplier.

    -
    b -

    The second multiplier.

    -
    c -

    The divisor.

    -
    -
    -
    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/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 maximal accuracy. Most of the time this is used to multiply a given value by a 16.16 fixed float factor.

    -

    -
    input
    -

    - - - -
    a -

    The first multiplier.

    -
    b -

    The second multiplier. Use a 16.16 factor here whenever possible (see note below).

    -
    -
    -
    return
    -

    The result of ‘(a*b)/0x10000’.

    -
    -
    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/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 maximal accuracy. Most of the time, this is used to divide a given value by a 16.16 fixed float factor.

    -

    -
    input
    -

    - - - -
    a -

    The first multiplier.

    -
    b -

    The second multiplier. Use a 16.16 factor here whenever possible (see note below).

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

    The number to be rounded.

    -
    -
    -
    return
    -

    The result of ‘(a + 0x8000) & -0x10000’.

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

    FT_CeilFix

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    The number for which the ceiling function is to be computed.

    -
    -
    -
    return
    -

    The result of ‘(a + 0x10000 - 1) & -0x10000’.

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

    FT_FloorFix

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    The number for which the floor function is to be computed.

    -
    -
    -
    return
    -

    The result of ‘a & -0x10000’.

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

    FT_Vector_Transform

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    The target vector to transform.

    -
    -
    -
    input
    -

    - - -
    matrix -

    A pointer to the source 2x2 matrix.

    -
    -
    -
    note
    -

    The result is undefined if either ‘vector’ or ‘matrix’ is invalid.

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

    FT_Matrix_Multiply

    -
    -Defined in FT_GLYPH_H (freetype/ftglyph.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_Matrix_Multiply( const FT_Matrix*  a,
    -                      FT_Matrix*        b );
    -
    -

    -
    -

    Perform the matrix operation ‘b = a*b’.

    -

    -
    input
    -

    - - -
    a -

    A pointer to matrix ‘a’.

    -
    -
    -
    inout
    -

    - - -
    b -

    A pointer to matrix ‘b’.

    -
    -
    -
    note
    -

    The result is undefined if either ‘a’ or ‘b’ is zero.

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

    FT_Matrix_Invert

    -
    -Defined in FT_GLYPH_H (freetype/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 -

    A pointer to the target matrix. Remains untouched in case of error.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Angle

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 float value expressed in degrees.

    -

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

    FT_ANGLE_PI

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/fttrigon.h). -

    -
    -
    -  FT_EXPORT( FT_Fixed )
    -  FT_Sin( FT_Angle  angle );
    -
    -

    -
    -

    Return the sinus of a given angle in fixed point format.

    -

    -
    input
    -

    - - -
    angle -

    The input angle.

    -
    -
    -
    return
    -

    The sinus value.

    -
    -
    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 (freetype/fttrigon.h). -

    -
    -
    -  FT_EXPORT( FT_Fixed )
    -  FT_Cos( FT_Angle  angle );
    -
    -

    -
    -

    Return the cosinus of a given angle in fixed point format.

    -

    -
    input
    -

    - - -
    angle -

    The input angle.

    -
    -
    -
    return
    -

    The cosinus value.

    -
    -
    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 (freetype/fttrigon.h). -

    -
    -
    -  FT_EXPORT( FT_Fixed )
    -  FT_Tan( FT_Angle  angle );
    -
    -

    -
    -

    Return the tangent of a given angle in fixed point format.

    -

    -
    input
    -

    - - -
    angle -

    The input angle.

    -
    -
    -
    return
    -

    The tangent value.

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

    FT_Atan2

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 -

    The horizontal vector coordinate.

    -
    y -

    The vertical vector coordinate.

    -
    -
    -
    return
    -

    The arc-tangent value (i.e. angle).

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

    FT_Angle_Diff

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 -

    First angle.

    -
    angle2 -

    Second angle.

    -
    -
    -
    return
    -

    Constrained value of ‘value2-value1’.

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

    FT_Vector_Unit

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 -

    The address of target vector.

    -
    -
    -
    input
    -

    - - -
    angle -

    The address of angle.

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

    FT_Vector_Rotate

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_Vector_Rotate( FT_Vector*  vec,
    -                    FT_Angle    angle );
    -
    -

    -
    -

    Rotate a vector by a given angle.

    -

    -
    inout
    -

    - - -
    vec -

    The address of target vector.

    -
    -
    -
    input
    -

    - - -
    angle -

    The address of angle.

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

    FT_Vector_Length

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h). -

    -
    -
    -  FT_EXPORT( FT_Fixed )
    -  FT_Vector_Length( FT_Vector*  vec );
    -
    -

    -
    -

    Return the length of a given vector.

    -

    -
    input
    -

    - - -
    vec -

    The address of target vector.

    -
    -
    -
    return
    -

    The vector length, expressed in the same units that the original vector coordinates.

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

    FT_Vector_Polarize

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 -

    The address of source vector.

    -
    -
    -
    output
    -

    - - - -
    length -

    The vector length.

    -
    angle -

    The vector angle.

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

    FT_Vector_From_Polar

    -
    -Defined in FT_TRIGONOMETRY_H (freetype/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 -

    The address of source vector.

    -
    -
    -
    input
    -

    - - - -
    length -

    The vector length.

    -
    angle -

    The vector angle.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-font_formats.html b/docs/reference/ft2-font_formats.html deleted file mode 100644 index 661480e..0000000 --- a/docs/reference/ft2-font_formats.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Font Formats -

    -

    Synopsis

    - - -
    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 (freetype/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 which 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 handle.

    -
    -
    -
    return
    -

    Font format string. NULL in case of error.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-gasp_table.html b/docs/reference/ft2-gasp_table.html deleted file mode 100644 index 8199778..0000000 --- a/docs/reference/ft2-gasp_table.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Gasp Table -

    -

    Synopsis

    - - -
    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 (freetype/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 -

    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 -

    Grid-fitting and hinting should be performed at the specified ppem. This really means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.

    -
    FT_GASP_DO_GRAY -

    Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.

    -
    FT_GASP_SYMMETRIC_SMOOTHING
    -

    If set, smoothing along multiple axes must be used with ClearType.

    -
    FT_GASP_SYMMETRIC_GRIDFIT
    -

    Grid-fitting must be used with ClearType's symmetric smoothing.

    -
    -
    -
    note
    -

    The bit-flags ‘FT_GASP_DO_GRIDFIT’ and ‘FT_GASP_DO_GRAY’ are to be used for standard font rasterization only. Independently of that, ‘FT_GASP_SYMMETRIC_SMOOTHING’ and ‘FT_GASP_SYMMETRIC_GRIDFIT’ are to be used if ClearType is enabled (and ‘FT_GASP_DO_GRIDFIT’ and ‘FT_GASP_DO_GRAY’ are consequently ignored).

    -

    ‘ClearType’ is Microsoft's implementation of LCD rendering, partly protected by patents.

    -
    -
    since
    -

    2.3.0

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

    FT_Get_Gasp

    -
    -Defined in FT_GASP_H (freetype/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 -

    The source face handle.

    -
    ppem -

    The vertical character pixel size.

    -
    -
    -
    return
    -

    Bit flags (see FT_GASP_XXX), or FT_GASP_NO_TABLE if there is no ‘gasp’ table in the face.

    -
    -
    since
    -

    2.3.0

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-glyph_management.html b/docs/reference/ft2-glyph_management.html deleted file mode 100644 index f9ba910..0000000 --- a/docs/reference/ft2-glyph_management.html +++ /dev/null @@ -1,673 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/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
    -

    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 (freetype/ftglyph.h). -

    -
    -
    -  typedef struct  FT_GlyphRec_
    -  {
    -    FT_Library             library;
    -    const FT_Glyph_Class*  clazz;
    -    FT_Glyph_Format        format;
    -    FT_Vector              advance;
    -
    -  } FT_GlyphRec;
    -
    -

    -
    -

    The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed float format.

    -

    -
    fields
    -

    - - - - - -
    library -

    A handle to the FreeType library object.

    -
    clazz -

    A pointer to the glyph's class. Private.

    -
    format -

    The format of the glyph's image.

    -
    advance -

    A 16.16 vector that gives the glyph's advance width.

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

    FT_BitmapGlyph

    -
    -Defined in FT_GLYPH_H (freetype/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 (freetype/ftglyph.h). -

    -
    -
    -  typedef struct  FT_BitmapGlyphRec_
    -  {
    -    FT_GlyphRec  root;
    -    FT_Int       left;
    -    FT_Int       top;
    -    FT_Bitmap    bitmap;
    -
    -  } FT_BitmapGlyphRec;
    -
    -

    -
    -

    A structure used for bitmap glyph images. This really is a ‘sub-class’ of FT_GlyphRec.

    -

    -
    fields
    -

    - - - - - -
    root -

    The root FT_Glyph fields.

    -
    left -

    The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.

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

    A descriptor for the bitmap.

    -
    -
    -
    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 (freetype/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 (freetype/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 -

    The root FT_Glyph fields.

    -
    outline -

    A descriptor for the outline.

    -
    -
    -
    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 (freetype/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 -

    A handle to the source glyph slot.

    -
    -
    -
    output
    -

    - - -
    aglyph -

    A handle to the glyph object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Glyph_Copy

    -
    -Defined in FT_GLYPH_H (freetype/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 -

    A handle to the source glyph object.

    -
    -
    -
    output
    -

    - - -
    target -

    A handle to the target glyph object. 0 in case of error.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Glyph_Transform

    -
    -Defined in FT_GLYPH_H (freetype/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 -

    A handle to the target glyph object.

    -
    -
    -
    input
    -

    - - - -
    matrix -

    A pointer to a 2x2 matrix to apply.

    -
    delta -

    A pointer to a 2d vector to apply. Coordinates are expressed in 1/64th of a pixel.

    -
    -
    -
    return
    -

    FreeType error code (if not 0, the glyph format is not scalable).

    -
    -
    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 (freetype/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_Mode;
    -
    -

    -
    -

    The mode how the values of FT_Glyph_Get_CBox are returned.

    -

    -
    values
    -

    - - - - - - - -
    FT_GLYPH_BBOX_UNSCALED -

    Return unscaled font units.

    -
    FT_GLYPH_BBOX_SUBPIXELS
    -

    Return unfitted 26.6 coordinates.

    -
    FT_GLYPH_BBOX_GRIDFIT -

    Return grid-fitted 26.6 coordinates.

    -
    FT_GLYPH_BBOX_TRUNCATE -

    Return coordinates in integer pixels.

    -
    FT_GLYPH_BBOX_PIXELS -

    Return grid-fitted pixel coordinates.

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

    ft_glyph_bbox_xxx

    -
    -Defined in FT_GLYPH_H (freetype/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 (freetype/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 which 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 -

    A handle to the source glyph object.

    -
    mode -

    The mode which indicates how to interpret the returned bounding box values.

    -
    -
    -
    output
    -

    - - -
    acbox -

    The glyph coordinate bounding box. Coordinates are expressed in 1/64th of pixels if it is grid-fitted.

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

    -

    Note that the maximum coordinates are exclusive, which means that one can compute the width and height of the glyph image (be it in integer or 26.6 pixels) as:

    -
    -  width  = bbox.xMax - bbox.xMin;                                  
    -  height = bbox.yMax - bbox.yMin;                                  
    -
    -

    Note also that for 26.6 coordinates, if ‘bbox_mode’ is set to FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, which corresponds to:

    -
    -  bbox.xMin = FLOOR(bbox.xMin);                                    
    -  bbox.yMin = FLOOR(bbox.yMin);                                    
    -  bbox.xMax = CEILING(bbox.xMax);                                  
    -  bbox.yMax = CEILING(bbox.yMax);                                  
    -
    -

    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 (freetype/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 -

    A pointer to a handle to the target glyph.

    -
    -
    -
    input
    -

    - - - - -
    render_mode -

    An enumeration that describes how the data is rendered.

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

    A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    -

    -
    -  FT_Glyph        glyph;                                         
    -  FT_BitmapGlyph  glyph_bitmap;                                  
    -                                                                 
    -                                                                 
    -  // load glyph                                                  
    -  error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     
    -                                                                 
    -  // extract glyph image                                         
    -  error = FT_Get_Glyph( face->glyph, &glyph );                   
    -                                                                 
    -  // convert to a bitmap (default render mode + destroying old)  
    -  if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )                 
    -  {                                                              
    -    error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,   
    -                                0, 1 );                          
    -    if ( error ) // `glyph' unchanged                            
    -      ...                                                        
    -  }                                                              
    -                                                                 
    -  // access bitmap content by typecasting                        
    -  glyph_bitmap = (FT_BitmapGlyph)glyph;                          
    -                                                                 
    -  // do funny stuff with it, like blitting/drawing               
    -  ...                                                            
    -                                                                 
    -  // discard glyph image (bitmap or not)                         
    -  FT_Done_Glyph( glyph );                                        
    -
    -

    -

    Here another example, again without error handling:

    -

    -
    -  FT_Glyph  glyphs[MAX_GLYPHS]                                   
    -                                                                 
    -                                                                 
    -  ...                                                            
    -                                                                 
    -  for ( idx = 0; i < MAX_GLYPHS; i++ )                           
    -    error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||       
    -            FT_Get_Glyph ( face->glyph, &glyph[idx] );           
    -                                                                 
    -  ...                                                            
    -                                                                 
    -  for ( idx = 0; i < MAX_GLYPHS; i++ )                           
    -  {                                                              
    -    FT_Glyph  bitmap = glyphs[idx];                              
    -                                                                 
    -                                                                 
    -    ...                                                          
    -                                                                 
    -    // after this call, `bitmap' no longer points into           
    -    // the `glyphs' array (and the old value isn't destroyed)    
    -    FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );    
    -                                                                 
    -    ...                                                          
    -                                                                 
    -    FT_Done_Glyph( bitmap );                                     
    -  }                                                              
    -                                                                 
    -  ...                                                            
    -                                                                 
    -  for ( idx = 0; i < MAX_GLYPHS; i++ )                           
    -    FT_Done_Glyph( glyphs[idx] );                                
    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Done_Glyph

    -
    -Defined in FT_GLYPH_H (freetype/ftglyph.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_Done_Glyph( FT_Glyph  glyph );
    -
    -

    -
    -

    Destroy a given glyph.

    -

    -
    input
    -

    - - -
    glyph -

    A handle to the target glyph object.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-glyph_stroker.html b/docs/reference/ft2-glyph_stroker.html deleted file mode 100644 index 441ea6d..0000000 --- a/docs/reference/ft2-glyph_stroker.html +++ /dev/null @@ -1,938 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/ftstroke.h). -

    -
    -
    -  typedef struct FT_StrokerRec_*  FT_Stroker;
    -
    -

    -
    -

    Opaque handler to a path stroker object.

    -

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

    FT_Stroker_LineJoin

    -
    -Defined in FT_STROKER_H (freetype/ftstroke.h). -

    -
    -
    -  typedef enum  FT_Stroker_LineJoin_
    -  {
    -    FT_STROKER_LINEJOIN_ROUND          = 0,
    -    FT_STROKER_LINEJOIN_BEVEL          = 1,
    -    FT_STROKER_LINEJOIN_MITER_VARIABLE = 2,
    -    FT_STROKER_LINEJOIN_MITER          = FT_STROKER_LINEJOIN_MITER_VARIABLE,
    -    FT_STROKER_LINEJOIN_MITER_FIXED    = 3
    -
    -  } FT_Stroker_LineJoin;
    -
    -

    -
    -

    These values determine how two joining lines are rendered in a stroker.

    -

    -
    values
    -

    - - - - - - - - - - - -
    FT_STROKER_LINEJOIN_ROUND
    -

    Used to render rounded line joins. Circular arcs are used to join two lines smoothly.

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

    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
    -

    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 (freetype/ftstroke.h). -

    -
    -
    -  typedef enum  FT_Stroker_LineCap_
    -  {
    -    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
    -

    The end of lines is rendered as a full stop on the last point itself.

    -
    FT_STROKER_LINECAP_ROUND
    -

    The end of lines is rendered as a half-circle around the last point.

    -
    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 (freetype/ftstroke.h). -

    -
    -
    -  typedef enum  FT_StrokerBorder_
    -  {
    -    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 -

    Select the left border, relative to the drawing direction.

    -
    FT_STROKER_BORDER_RIGHT
    -

    Select the right border, relative to the drawing direction.

    -
    -
    -
    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 (freetype/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 -

    The source outline handle.

    -
    -
    -
    return
    -

    The border index. FT_STROKER_BORDER_RIGHT for empty or invalid outlines.

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

    FT_Outline_GetOutsideBorder

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The source outline handle.

    -
    -
    -
    return
    -

    The border index. FT_STROKER_BORDER_LEFT for empty or invalid outlines.

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

    FT_Stroker_New

    -
    -Defined in FT_STROKER_H (freetype/ftstroke.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Stroker_New( FT_Library   library,
    -                  FT_Stroker  *astroker );
    -
    -

    -
    -

    Create a new stroker object.

    -

    -
    input
    -

    - - -
    library -

    FreeType library handle.

    -
    -
    -
    output
    -

    - - -
    astroker -

    A new stroker object handle. NULL in case of error.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Stroker_Set

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

    -
    radius -

    The border radius.

    -
    line_cap -

    The line cap style.

    -
    line_join -

    The line join style.

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

    The radius is expressed in the same units as the outline coordinates.

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

    FT_Stroker_Rewind

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

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

    FT_Stroker_ParseOutline

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

    -
    outline -

    The source outline.

    -
    opened -

    A boolean. If 1, the outline is treated as an open path instead of a closed one.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    The target stroker handle.

    -
    to -

    A pointer to the start vector.

    -
    open -

    A boolean. If 1, the sub-path is treated as an open one.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftstroke.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Stroker_EndSubPath( FT_Stroker  stroker );
    -
    -

    -
    -

    Close the current sub-path in the stroker.

    -

    -
    input
    -

    - - -
    stroker -

    The target stroker handle.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    The target stroker handle.

    -
    to -

    A pointer to the destination point.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    You should call this function between FT_Stroker_BeginSubPath and FT_Stroker_EndSubPath.

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

    FT_Stroker_ConicTo

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

    -
    control -

    A pointer to a Bézier control point.

    -
    to -

    A pointer to the destination point.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    You should call this function between FT_Stroker_BeginSubPath and FT_Stroker_EndSubPath.

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

    FT_Stroker_CubicTo

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

    -
    control1 -

    A pointer to the first Bézier control point.

    -
    control2 -

    A pointer to second Bézier control point.

    -
    to -

    A pointer to the destination point.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    You should call this function between FT_Stroker_BeginSubPath and FT_Stroker_EndSubPath.

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

    FT_Stroker_GetBorderCounts

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

    -
    border -

    The border index.

    -
    -
    -
    output
    -

    - - - -
    anum_points -

    The number of points.

    -
    anum_contours -

    The number of contours.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    The target stroker handle.

    -
    border -

    The border index.

    -
    outline -

    The target outline handle.

    -
    -
    -
    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 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 (freetype/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 -

    The target stroker handle.

    -
    -
    -
    output
    -

    - - - -
    anum_points -

    The number of points.

    -
    anum_contours -

    The number of contours.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Stroker_Export

    -
    -Defined in FT_STROKER_H (freetype/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 -

    The target stroker handle.

    -
    outline -

    The target outline handle.

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

    FT_Stroker_Done

    -
    -Defined in FT_STROKER_H (freetype/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 (freetype/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.

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

    FT_Glyph_StrokeBorder

    -
    -Defined in FT_STROKER_H (freetype/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.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-glyph_variants.html b/docs/reference/ft2-glyph_variants.html deleted file mode 100644 index 04b5f97..0000000 --- a/docs/reference/ft2-glyph_variants.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Glyph Variants -

    -

    Synopsis

    - - - - -
    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 Report #37, the Ideographic Variation Database. To date (October 2007), the character with the most variants is U+908A, having 8 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/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 -

    A handle to the source face object.

    -
    charcode -

    The character code point in Unicode.

    -
    variantSelector -

    The Unicode code point of the variation selector.

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

    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
    -

    2.3.6

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

    FT_Face_GetCharVariantIsDefault

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the source face object.

    -
    charcode -

    The character codepoint in Unicode.

    -
    variantSelector -

    The Unicode codepoint of the variation selector.

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

    This function is only meaningful if the font has a variation selector cmap subtable.

    -
    -
    since
    -

    2.3.6

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

    FT_Face_GetVariantSelectors

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the source face object.

    -
    -
    -
    return
    -

    A pointer to an array of selector code points, or NULL if there is no valid variant selector cmap subtable.

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

    2.3.6

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

    FT_Face_GetVariantsOfChar

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the source face object.

    -
    charcode -

    The character codepoint in Unicode.

    -
    -
    -
    return
    -

    A pointer to an array of variant selector code points which are active for the given character, or NULL if the corresponding list is empty.

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

    2.3.6

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

    FT_Face_GetCharsOfVariant

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A handle to the source face object.

    -
    variantSelector -

    The variant selector code point in Unicode.

    -
    -
    -
    return
    -

    A list of all the code points which are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.

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

    2.3.6

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-gx_validation.html b/docs/reference/ft2-gx_validation.html deleted file mode 100644 index f9a239a..0000000 --- a/docs/reference/ft2-gx_validation.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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 (freetype/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 (freetype/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).

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

    FT_TrueTypeGX_Validate

    -
    -Defined in FT_GX_VALIDATE_H (freetype/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 which actually does the text layout can access those tables without error checking (which can be quite time consuming).

    -

    -
    input
    -

    - - - - -
    face -

    A handle to the input face.

    -
    validation_flags -

    A bit field which specifies the tables to be validated. See FT_VALIDATE_GXXXX for possible values.

    -
    table_length -

    The size of the ‘tables’ array. Normally, FT_VALIDATE_GX_LENGTH should be passed.

    -
    -
    -
    output
    -

    - - -
    tables -

    The array where all validated sfnt tables are stored. The array itself must be allocated by a client.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftgxval.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_TrueTypeGX_Free( FT_Face   face,
    -                      FT_Bytes  table );
    -
    -

    -
    -

    Free the buffer allocated by TrueTypeGX validator.

    -

    -
    input
    -

    - - - -
    face -

    A handle to the input face.

    -
    table -

    The pointer to the buffer allocated by FT_TrueTypeGX_Validate.

    -
    -
    -
    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 (freetype/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 (freetype/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 which 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 -

    A handle to the input face.

    -
    validation_flags -

    A bit field which specifies the dialect to be validated. See FT_VALIDATE_CKERNXXX for possible values.

    -
    -
    -
    output
    -

    - - -
    ckern_table -

    A pointer to the kern table.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftgxval.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_ClassicKern_Free( FT_Face   face,
    -                       FT_Bytes  table );
    -
    -

    -
    -

    Free the buffer allocated by classic Kern validator.

    -

    -
    input
    -

    - - - -
    face -

    A handle to the input face.

    -
    table -

    The pointer to the buffer that is allocated by FT_ClassicKern_Validate.

    -
    -
    -
    note
    -

    This function must be used to free the buffer allocated by FT_ClassicKern_Validate only.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-gzip.html b/docs/reference/ft2-gzip.html deleted file mode 100644 index 698dc74..0000000 --- a/docs/reference/ft2-gzip.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -GZIP Streams -

    -

    Synopsis

    - - -
    FT_Stream_OpenGzip


    - -
    -

    This section contains the declaration of Gzip-specific functions.

    -

    -
    -

    FT_Stream_OpenGzip

    -
    -Defined in FT_GZIP_H (freetype/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 -

    The target embedding stream.

    -
    source -

    The source stream.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    The source stream must be opened before calling this function.

    -

    Calling the internal function ‘FT_Stream_Close’ on the new stream will not call ‘FT_Stream_Close’ on the source stream. None of the stream objects will be released to the heap.

    -

    The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream.

    -

    In certain builds of the library, 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]
    - - - diff --git a/docs/reference/ft2-header_file_macros.html b/docs/reference/ft2-header_file_macros.html deleted file mode 100644 index b94ef5e..0000000 --- a/docs/reference/ft2-header_file_macros.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Header File Macros -

    -

    Synopsis

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    FT_CONFIG_CONFIG_HFT_WINFONTS_H
    FT_CONFIG_STANDARD_LIBRARY_HFT_GLYPH_H
    FT_CONFIG_OPTIONS_HFT_BITMAP_H
    FT_CONFIG_MODULES_HFT_BBOX_H
    FT_FREETYPE_HFT_CACHE_H
    FT_ERRORS_HFT_CACHE_IMAGE_H
    FT_MODULE_ERRORS_HFT_CACHE_SMALL_BITMAPS_H
    FT_SYSTEM_HFT_CACHE_CHARMAP_H
    FT_IMAGE_HFT_MAC_H
    FT_TYPES_HFT_MULTIPLE_MASTERS_H
    FT_LIST_HFT_SFNT_NAMES_H
    FT_OUTLINE_HFT_OPENTYPE_VALIDATE_H
    FT_SIZES_HFT_GX_VALIDATE_H
    FT_MODULE_HFT_PFR_H
    FT_RENDER_HFT_STROKER_H
    FT_TYPE1_TABLES_HFT_SYNTHESIS_H
    FT_TRUETYPE_IDS_HFT_XFREE86_H
    FT_TRUETYPE_TABLES_HFT_TRIGONOMETRY_H
    FT_TRUETYPE_TAGS_HFT_LCD_FILTER_H
    FT_BDF_HFT_UNPATENTED_HINTING_H
    FT_CID_HFT_INCREMENTAL_H
    FT_GZIP_HFT_GASP_H
    FT_LZW_HFT_ADVANCES_H
    FT_BZIP2_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                                           
    -  #include FT_MULTIPLE_MASTERS_H                                   
    -  #include FT_GLYPH_H                                              
    -
    -

    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

    -
    -
    -#ifndef FT_CONFIG_CONFIG_H
    -#define FT_CONFIG_CONFIG_H  <freetype/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

    -
    -
    -#ifndef FT_CONFIG_STANDARD_LIBRARY_H
    -#define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/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

    -
    -
    -#ifndef FT_CONFIG_OPTIONS_H
    -#define FT_CONFIG_OPTIONS_H  <freetype/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

    -
    -
    -#ifndef FT_CONFIG_MODULES_H
    -#define FT_CONFIG_MODULES_H  <freetype/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

    -
    -
    -#define FT_FREETYPE_H  <freetype/freetype.h>
    -
    -

    -
    -

    A macro used in #include statements to name the file containing the base FreeType 2 API.

    -

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

    FT_ERRORS_H

    -
    -
    -#define FT_ERRORS_H  <freetype/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

    -
    -
    -#define FT_MODULE_ERRORS_H  <freetype/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

    -
    -
    -#define FT_SYSTEM_H  <freetype/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

    -
    -
    -#define FT_IMAGE_H  <freetype/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

    -
    -
    -#define FT_TYPES_H  <freetype/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

    -
    -
    -#define FT_LIST_H  <freetype/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

    -
    -
    -#define FT_OUTLINE_H  <freetype/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

    -
    -
    -#define FT_SIZES_H  <freetype/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

    -
    -
    -#define FT_MODULE_H  <freetype/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

    -
    -
    -#define FT_RENDER_H  <freetype/ftrender.h>
    -
    -

    -
    -

    A macro used in #include statements to name the file containing the renderer module management API of FreeType 2.

    -

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

    FT_TYPE1_TABLES_H

    -
    -
    -#define FT_TYPE1_TABLES_H  <freetype/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

    -
    -
    -#define FT_TRUETYPE_IDS_H  <freetype/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

    -
    -
    -#define FT_TRUETYPE_TABLES_H  <freetype/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

    -
    -
    -#define FT_TRUETYPE_TAGS_H  <freetype/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

    -
    -
    -#define FT_BDF_H  <freetype/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

    -
    -
    -#define FT_CID_H  <freetype/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

    -
    -
    -#define FT_GZIP_H  <freetype/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

    -
    -
    -#define FT_LZW_H  <freetype/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

    -
    -
    -#define FT_BZIP2_H  <freetype/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

    -
    -
    -#define FT_WINFONTS_H   <freetype/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

    -
    -
    -#define FT_GLYPH_H  <freetype/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

    -
    -
    -#define FT_BITMAP_H  <freetype/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

    -
    -
    -#define FT_BBOX_H  <freetype/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

    -
    -
    -#define FT_CACHE_H  <freetype/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

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

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

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

    -
    -
    -#define FT_MAC_H  <freetype/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

    -
    -
    -#define FT_MULTIPLE_MASTERS_H  <freetype/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

    -
    -
    -#define FT_SFNT_NAMES_H  <freetype/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

    -
    -
    -#define FT_OPENTYPE_VALIDATE_H  <freetype/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

    -
    -
    -#define FT_GX_VALIDATE_H  <freetype/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

    -
    -
    -#define FT_PFR_H  <freetype/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

    -
    -
    -#define FT_STROKER_H  <freetype/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

    -
    -
    -#define FT_SYNTHESIS_H  <freetype/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

    -
    -
    -#define FT_XFREE86_H  <freetype/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

    -
    -
    -#define FT_TRIGONOMETRY_H  <freetype/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

    -
    -
    -#define FT_LCD_FILTER_H  <freetype/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

    -
    -
    -#define FT_UNPATENTED_HINTING_H  <freetype/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

    -
    -
    -#define FT_INCREMENTAL_H  <freetype/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

    -
    -
    -#define FT_GASP_H  <freetype/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

    -
    -
    -#define FT_ADVANCES_H  <freetype/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/docs/reference/ft2-incremental.html b/docs/reference/ft2-incremental.html deleted file mode 100644 index cb14e16..0000000 --- a/docs/reference/ft2-incremental.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/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
    -

    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 (freetype/ftincrem.h). -

    -
    -
    -  typedef struct  FT_Incremental_MetricsRec_
    -  {
    -    FT_Long  bearing_x;
    -    FT_Long  bearing_y;
    -    FT_Long  advance;
    -    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 -

    Left bearing, in font units.

    -
    bearing_y -

    Top bearing, in font units.

    -
    advance -

    Horizontal component of glyph advance, in font units.

    -
    advance_v -

    Vertical component of glyph advance, in font units.

    -
    -
    -
    note
    -

    These correspond to horizontal or vertical metrics depending on the value of the ‘vertical’ argument to the function FT_Incremental_GetGlyphMetricsFunc.

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

    FT_Incremental_Metrics

    -
    -Defined in FT_INCREMENTAL_H (freetype/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 (freetype/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 -

    Handle to an opaque FT_Incremental handle provided by the client application.

    -
    glyph_index -

    Index of relevant glyph.

    -
    -
    -
    output
    -

    - - -
    adata -

    A structure describing the returned glyph data bytes (which will be accessed as a read-only byte block).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to an opaque FT_Incremental handle provided by the client application.

    -
    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 (freetype/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 -

    A handle to an opaque FT_Incremental handle provided by the client application.

    -
    glyph_index -

    Index of relevant glyph.

    -
    vertical -

    If true, return vertical metrics.

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

    The replacement glyph metrics in font units.

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

    FT_Incremental_FuncsRec

    -
    -Defined in FT_INCREMENTAL_H (freetype/ftincrem.h). -

    -
    -
    -  typedef struct  FT_Incremental_FuncsRec_
    -  {
    -    FT_Incremental_GetGlyphDataFunc     get_glyph_data;
    -    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;
    -    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 -

    The function to get glyph data. Must not be null.

    -
    free_glyph_data -

    The function to release glyph data. Must not be null.

    -
    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 (freetype/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;
    -  FT_Parameter                 parameter;
    -  FT_Open_Args                 open_args;
    -
    -
    -  // set up incremental descriptor
    -  inc_int.funcs  = my_funcs;
    -  inc_int.object = my_object;
    -
    -  // set up optional parameter
    -  parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
    -  parameter.data = &inc_int;
    -
    -  // set up FT_Open_Args structure
    -  open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
    -  open_args.pathname   = my_font_pathname;
    -  open_args.num_params = 1;
    -  open_args.params     = &parameter; // we use one optional argument
    -
    -  // open the font
    -  error = FT_Open_Face( library, &open_args, index, &face );
    -  ...
    -
    -

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

    FT_Incremental_Interface

    -
    -Defined in FT_INCREMENTAL_H (freetype/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 (freetype/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/docs/reference/ft2-index.html b/docs/reference/ft2-index.html deleted file mode 100644 index fb674a2..0000000 --- a/docs/reference/ft2-index.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - -
    [TOC]
    -

    FreeType-2.4.9 API Reference

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    BDF_PROPERTY_TYPE_ATOMFT_LcdFilterFT_Stroker_ParseOutline
    BDF_PROPERTY_TYPE_CARDINALFT_LIST_HFT_Stroker_Rewind
    BDF_PROPERTY_TYPE_INTEGERFT_LibraryFT_Stroker_Set
    BDF_PROPERTY_TYPE_NONEFT_Library_SetLcdFilterFT_StrokerBorder
    BDF_PropertyFT_Library_SetLcdFilterWeightsFT_SUBGLYPH_FLAG_2X2
    BDF_PropertyRecFT_Library_VersionFT_SUBGLYPH_FLAG_ARGS_ARE_WORDS
    CID_FaceDictFT_ListFT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
    CID_FaceDictRecFT_List_AddFT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID
    CID_FaceInfoFT_List_DestructorFT_SUBGLYPH_FLAG_SCALE
    CID_FaceInfoRecFT_List_FinalizeFT_SUBGLYPH_FLAG_USE_MY_METRICS
    CID_InfoFT_List_FindFT_SUBGLYPH_FLAG_XXX
    FREETYPE_MAJORFT_List_InsertFT_SUBGLYPH_FLAG_XY_SCALE
    FREETYPE_MINORFT_List_IterateFT_SubGlyph
    FREETYPE_PATCHFT_List_IteratorFT_SYNTHESIS_H
    FREETYPE_XXXFT_List_RemoveFT_SYSTEM_H
    FT_Activate_SizeFT_List_UpFT_Tag
    FT_ADVANCE_FLAG_FAST_ONLYFT_ListNodeFT_Tan
    FT_ADVANCES_HFT_ListNodeRecFT_TRIGONOMETRY_H
    FT_Add_Default_ModulesFT_ListRecFT_TRUETYPE_ENGINE_TYPE_NONE
    FT_Add_ModuleFT_LOAD_CROP_BITMAPFT_TRUETYPE_ENGINE_TYPE_PATENTED
    FT_Alloc_FuncFT_LOAD_DEFAULTFT_TRUETYPE_ENGINE_TYPE_UNPATENTED
    FT_ANGLE_2PIFT_LOAD_FORCE_AUTOHINTFT_TRUETYPE_IDS_H
    FT_ANGLE_PIFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTHFT_TRUETYPE_TABLES_H
    FT_ANGLE_PI2FT_LOAD_IGNORE_TRANSFORMFT_TRUETYPE_TAGS_H
    FT_ANGLE_PI4FT_LOAD_LINEAR_DESIGNFT_TrueTypeEngineType
    FT_AngleFT_LOAD_MONOCHROMEFT_TrueTypeGX_Free
    FT_Angle_DiffFT_LOAD_NO_AUTOHINTFT_TrueTypeGX_Validate
    FT_Atan2FT_LOAD_NO_BITMAPFT_TYPE1_TABLES_H
    FT_Attach_FileFT_LOAD_NO_HINTINGFT_TYPES_H
    FT_Attach_StreamFT_LOAD_NO_RECURSEFT_UFWord
    FT_BBOX_HFT_LOAD_NO_SCALEFT_UInt
    FT_BBoxFT_LOAD_PEDANTICFT_UInt16
    FT_BDF_HFT_LOAD_RENDERFT_UInt32
    FT_BITMAP_HFT_LOAD_TARGET_LCDFT_ULong
    FT_BitmapFT_LOAD_TARGET_LCD_VFT_UNPATENTED_HINTING_H
    FT_Bitmap_ConvertFT_LOAD_TARGET_LIGHTFT_UnitVector
    FT_Bitmap_CopyFT_LOAD_TARGET_MODEFT_UShort
    FT_Bitmap_DoneFT_LOAD_TARGET_MONOFT_VALIDATE_APPLE
    FT_Bitmap_EmboldenFT_LOAD_TARGET_NORMALFT_VALIDATE_BASE
    FT_Bitmap_NewFT_LOAD_TARGET_XXXFT_VALIDATE_bsln
    FT_Bitmap_SizeFT_LOAD_VERTICAL_LAYOUTFT_VALIDATE_CKERN
    FT_BitmapGlyphFT_LOAD_XXXFT_VALIDATE_CKERNXXX
    FT_BitmapGlyphRecFT_Load_CharFT_VALIDATE_feat
    FT_BoolFT_Load_GlyphFT_VALIDATE_GDEF
    FT_ByteFT_Load_Sfnt_TableFT_VALIDATE_GPOS
    FT_BytesFT_LongFT_VALIDATE_GSUB
    FT_BZIP2_HFT_LZW_HFT_VALIDATE_GX
    FT_CACHE_CHARMAP_HFT_MAC_HFT_VALIDATE_GX_LENGTH
    FT_CACHE_HFT_MAKE_TAGFT_VALIDATE_GXXXX
    FT_CACHE_IMAGE_HFT_MatrixFT_VALIDATE_JSTF
    FT_CACHE_SMALL_BITMAPS_HFT_Matrix_InvertFT_VALIDATE_just
    FT_CeilFixFT_Matrix_MultiplyFT_VALIDATE_kern
    FT_CharFT_MemoryFT_VALIDATE_lcar
    FT_CharMapFT_MemoryRecFT_VALIDATE_MATH
    FT_CharMapRecFT_MM_AxisFT_VALIDATE_MS
    FT_CID_HFT_MM_VarFT_VALIDATE_mort
    FT_ClassicKern_FreeFT_MODULE_ERRORS_HFT_VALIDATE_morx
    FT_ClassicKern_ValidateFT_MODULE_HFT_VALIDATE_OT
    FT_CONFIG_CONFIG_HFT_ModuleFT_VALIDATE_OTXXX
    FT_CONFIG_MODULES_HFT_Module_ClassFT_VALIDATE_opbd
    FT_CONFIG_OPTIONS_HFT_Module_ConstructorFT_VALIDATE_prop
    FT_CONFIG_STANDARD_LIBRARY_HFT_Module_DestructorFT_VALIDATE_trak
    FT_CosFT_Module_RequesterFT_Var_Axis
    FT_DataFT_MULTIPLE_MASTERS_HFT_Var_Named_Style
    FT_DivFixFT_MulDivFT_Vector
    FT_Done_FaceFT_MulFixFT_Vector_From_Polar
    FT_Done_FreeTypeFT_Multi_MasterFT_Vector_Length
    FT_Done_GlyphFT_New_FaceFT_Vector_Polarize
    FT_Done_LibraryFT_New_Face_From_FONDFT_Vector_Rotate
    FT_Done_SizeFT_New_Face_From_FSRefFT_Vector_Transform
    FT_DriverFT_New_Face_From_FSSpecFT_Vector_Unit
    FT_ENC_TAGFT_New_LibraryFT_WINFONTS_H
    FT_ENCODING_ADOBE_CUSTOMFT_New_Memory_FaceFT_WinFNT_Header
    FT_ENCODING_ADOBE_EXPERTFT_New_SizeFT_WinFNT_HeaderRec
    FT_ENCODING_ADOBE_LATIN_1FT_OffsetFT_WinFNT_ID_CP1250
    FT_ENCODING_ADOBE_STANDARDFT_OPEN_DRIVERFT_WinFNT_ID_CP1251
    FT_ENCODING_APPLE_ROMANFT_OPEN_MEMORYFT_WinFNT_ID_CP1252
    FT_ENCODING_BIG5FT_OPEN_PARAMSFT_WinFNT_ID_CP1253
    FT_ENCODING_GB2312FT_OPEN_PATHNAMEFT_WinFNT_ID_CP1254
    FT_ENCODING_JOHABFT_OPEN_STREAMFT_WinFNT_ID_CP1255
    FT_ENCODING_MS_BIG5FT_OPEN_XXXFT_WinFNT_ID_CP1256
    FT_ENCODING_MS_GB2312FT_OPENTYPE_VALIDATE_HFT_WinFNT_ID_CP1257
    FT_ENCODING_MS_JOHABFT_Open_ArgsFT_WinFNT_ID_CP1258
    FT_ENCODING_MS_SJISFT_Open_FaceFT_WinFNT_ID_CP1361
    FT_ENCODING_MS_SYMBOLFT_OpenType_FreeFT_WinFNT_ID_CP874
    FT_ENCODING_MS_WANSUNGFT_OpenType_ValidateFT_WinFNT_ID_CP932
    FT_ENCODING_NONEFT_ORIENTATION_FILL_LEFTFT_WinFNT_ID_CP936
    FT_ENCODING_OLD_LATIN_2FT_ORIENTATION_FILL_RIGHTFT_WinFNT_ID_CP949
    FT_ENCODING_SJISFT_ORIENTATION_NONEFT_WinFNT_ID_CP950
    FT_ENCODING_UNICODEFT_ORIENTATION_POSTSCRIPTFT_WinFNT_ID_DEFAULT
    FT_ENCODING_WANSUNGFT_ORIENTATION_TRUETYPEFT_WinFNT_ID_MAC
    FT_EncodingFT_OrientationFT_WinFNT_ID_OEM
    FT_ERRORS_HFT_OUTLINE_EVEN_ODD_FILLFT_WinFNT_ID_SYMBOL
    FT_ErrorFT_OUTLINE_FLAGSFT_WinFNT_ID_XXX
    FT_F26Dot6FT_OUTLINE_HFT_XFREE86_H
    FT_F2Dot14FT_OUTLINE_HIGH_PRECISIONFTC_CMapCache
    FT_FACE_FLAG_CID_KEYEDFT_OUTLINE_IGNORE_DROPOUTSFTC_CMapCache_Lookup
    FT_FACE_FLAG_EXTERNAL_STREAMFT_OUTLINE_INCLUDE_STUBSFTC_CMapCache_New
    FT_FACE_FLAG_FAST_GLYPHSFT_OUTLINE_NONEFTC_Face_Requester
    FT_FACE_FLAG_FIXED_SIZESFT_OUTLINE_OWNERFTC_FaceID
    FT_FACE_FLAG_FIXED_WIDTHFT_OUTLINE_REVERSE_FILLFTC_ImageCache
    FT_FACE_FLAG_GLYPH_NAMESFT_OUTLINE_SINGLE_PASSFTC_ImageCache_Lookup
    FT_FACE_FLAG_HINTERFT_OUTLINE_SMART_DROPOUTSFTC_ImageCache_LookupScaler
    FT_FACE_FLAG_HORIZONTALFT_OutlineFTC_ImageCache_New
    FT_FACE_FLAG_KERNINGFT_Outline_CheckFTC_ImageType
    FT_FACE_FLAG_MULTIPLE_MASTERSFT_Outline_ConicToFuncFTC_ImageTypeRec
    FT_FACE_FLAG_SCALABLEFT_Outline_CopyFTC_Manager
    FT_FACE_FLAG_SFNTFT_Outline_CubicToFuncFTC_Manager_Done
    FT_FACE_FLAG_TRICKYFT_Outline_DecomposeFTC_Manager_LookupFace
    FT_FACE_FLAG_VERTICALFT_Outline_DoneFTC_Manager_LookupSize
    FT_FACE_FLAG_XXXFT_Outline_EmboldenFTC_Manager_New
    FT_FaceFT_Outline_FuncsFTC_Manager_RemoveFaceID
    FT_Face_CheckTrueTypePatentsFT_Outline_Get_BBoxFTC_Manager_Reset
    FT_Face_GetCharsOfVariantFT_Outline_Get_BitmapFTC_Node
    FT_Face_GetCharVariantIndexFT_Outline_Get_CBoxFTC_Node_Unref
    FT_Face_GetCharVariantIsDefaultFT_Outline_Get_OrientationFTC_SBit
    FT_Face_GetVariantSelectorsFT_Outline_GetInsideBorderFTC_SBitCache
    FT_Face_GetVariantsOfCharFT_Outline_GetOutsideBorderFTC_SBitCache_Lookup
    FT_Face_InternalFT_Outline_LineToFuncFTC_SBitCache_LookupScaler
    FT_Face_SetUnpatentedHintingFT_Outline_MoveToFuncFTC_SBitCache_New
    FT_FaceRecFT_Outline_NewFTC_SBitRec
    FT_FixedFT_Outline_RenderFTC_Scaler
    FT_FloorFixFT_Outline_ReverseFTC_ScalerRec
    FT_FREETYPE_HFT_Outline_Transformft_encoding_xxx
    FT_Free_FuncFT_Outline_Translateft_glyph_bbox_gridfit
    FT_FSTYPE_BITMAP_EMBEDDING_ONLYFT_OutlineGlyphft_glyph_bbox_pixels
    FT_FSTYPE_EDITABLE_EMBEDDINGFT_OutlineGlyphRecft_glyph_bbox_subpixels
    FT_FSTYPE_INSTALLABLE_EMBEDDINGFT_PARAM_TAG_IGNORE_PREFERRED_FAMILYft_glyph_bbox_truncate
    FT_FSTYPE_NO_SUBSETTINGFT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILYft_glyph_bbox_unscaled
    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDINGFT_PARAM_TAG_INCREMENTALft_glyph_bbox_xxx
    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDINGFT_PARAM_TAG_UNPATENTED_HINTINGft_glyph_format_bitmap
    FT_FSTYPE_XXXFT_Palette_Modeft_glyph_format_composite
    FT_FWordFT_Parameterft_glyph_format_none
    FT_GASP_DO_GRAYFT_PFR_Hft_glyph_format_outline
    FT_GASP_DO_GRIDFITFT_PIXEL_MODE_GRAYft_glyph_format_plotter
    FT_GASP_HFT_PIXEL_MODE_GRAY2ft_glyph_format_xxx
    FT_GASP_NO_TABLEFT_PIXEL_MODE_GRAY4ft_kerning_default
    FT_GASP_SYMMETRIC_GRIDFITFT_PIXEL_MODE_LCDft_kerning_unfitted
    FT_GASP_SYMMETRIC_SMOOTHINGFT_PIXEL_MODE_LCD_Vft_kerning_unscaled
    FT_GASP_XXXFT_PIXEL_MODE_MONOft_open_driver
    FT_GenericFT_PIXEL_MODE_NONEft_open_memory
    FT_Generic_FinalizerFT_Pixel_Modeft_open_params
    FT_Get_AdvanceFT_Pointerft_open_pathname
    FT_Get_AdvancesFT_Posft_open_stream
    FT_Get_BDF_Charset_IDFT_PropertyTypeft_outline_even_odd_fill
    FT_Get_BDF_PropertyFT_PtrDistft_outline_flags
    FT_Get_Char_IndexFT_RASTER_FLAG_AAft_outline_high_precision
    FT_Get_Charmap_IndexFT_RASTER_FLAG_CLIPft_outline_ignore_dropouts
    FT_Get_CID_From_Glyph_IndexFT_RASTER_FLAG_DEFAULTft_outline_none
    FT_Get_CID_Is_Internally_CID_KeyedFT_RASTER_FLAG_DIRECTft_outline_owner
    FT_Get_CID_Registry_Ordering_SupplementFT_RASTER_FLAG_XXXft_outline_reverse_fill
    FT_Get_CMap_FormatFT_Rasterft_outline_single_pass
    FT_Get_CMap_Language_IDFT_Raster_BitSet_Funcft_palette_mode_rgb
    FT_Get_First_CharFT_Raster_BitTest_Funcft_palette_mode_rgba
    FT_Get_FSType_FlagsFT_Raster_DoneFuncft_pixel_mode_grays
    FT_Get_GaspFT_Raster_Funcsft_pixel_mode_mono
    FT_Get_GlyphFT_Raster_NewFuncft_pixel_mode_none
    FT_Get_Glyph_NameFT_Raster_Paramsft_pixel_mode_pal2
    FT_Get_KerningFT_Raster_RenderFuncft_pixel_mode_pal4
    FT_Get_MM_VarFT_Raster_ResetFuncft_pixel_mode_xxx
    FT_Get_ModuleFT_Raster_SetModeFuncft_render_mode_mono
    FT_Get_Multi_MasterFT_RENDER_Hft_render_mode_normal
    FT_Get_Name_IndexFT_RENDER_MODE_LCDft_render_mode_xxx
    FT_Get_Next_CharFT_RENDER_MODE_LCD_VPS_Dict_Keys
    FT_Get_PFR_AdvanceFT_RENDER_MODE_LIGHTPS_FontInfo
    FT_Get_PFR_KerningFT_RENDER_MODE_MONOPS_FontInfoRec
    FT_Get_PFR_MetricsFT_RENDER_MODE_NORMALPS_Private
    FT_Get_Postscript_NameFT_Realloc_FuncPS_PrivateRec
    FT_Get_PS_Font_InfoFT_Reference_FaceT1_Blend_Flags
    FT_Get_PS_Font_PrivateFT_Reference_LibraryT1_EncodingType
    FT_Get_PS_Font_ValueFT_Remove_ModuleT1_FontInfo
    FT_Get_RendererFT_Render_GlyphT1_Private
    FT_Get_Sfnt_NameFT_Render_ModeTT_ADOBE_ID_CUSTOM
    FT_Get_Sfnt_Name_CountFT_RendererTT_ADOBE_ID_EXPERT
    FT_Get_Sfnt_TableFT_Renderer_ClassTT_ADOBE_ID_LATIN_1
    FT_Get_SubGlyph_InfoFT_Request_SizeTT_ADOBE_ID_STANDARD
    FT_Get_Track_KerningFT_RoundFixTT_ADOBE_ID_XXX
    FT_Get_TrueType_Engine_TypeFT_Select_CharmapTT_APPLE_ID_DEFAULT
    FT_Get_WinFNT_HeaderFT_Select_SizeTT_APPLE_ID_ISO_10646
    FT_Get_X11_Font_FormatFT_Set_Char_SizeTT_APPLE_ID_UNICODE_1_1
    FT_GetFile_From_Mac_ATS_NameFT_Set_CharmapTT_APPLE_ID_UNICODE_2_0
    FT_GetFile_From_Mac_NameFT_Set_Debug_HookTT_APPLE_ID_UNICODE_32
    FT_GetFilePath_From_Mac_ATS_NameFT_Set_MM_Blend_CoordinatesTT_APPLE_ID_VARIANT_SELECTOR
    FT_GLYPH_BBOX_GRIDFITFT_Set_MM_Design_CoordinatesTT_APPLE_ID_XXX
    FT_GLYPH_BBOX_PIXELSFT_Set_Pixel_SizesTT_Header
    FT_GLYPH_BBOX_SUBPIXELSFT_Set_RendererTT_HoriHeader
    FT_GLYPH_BBOX_TRUNCATEFT_Set_TransformTT_ISO_ID_10646
    FT_GLYPH_BBOX_UNSCALEDFT_Set_Var_Blend_CoordinatesTT_ISO_ID_7BIT_ASCII
    FT_GLYPH_FORMAT_BITMAPFT_Set_Var_Design_CoordinatesTT_ISO_ID_8859_1
    FT_GLYPH_FORMAT_COMPOSITEFT_SFNT_NAMES_HTT_ISO_ID_XXX
    FT_GLYPH_FORMAT_NONEFT_Sfnt_Table_InfoTT_MAC_ID_ARABIC
    FT_GLYPH_FORMAT_OUTLINEFT_Sfnt_TagTT_MAC_ID_ARMENIAN
    FT_GLYPH_FORMAT_PLOTTERFT_SfntNameTT_MAC_ID_BENGALI
    FT_GLYPH_HFT_ShortTT_MAC_ID_BURMESE
    FT_GlyphFT_SIZE_REQUEST_TYPE_BBOXTT_MAC_ID_DEVANAGARI
    FT_Glyph_BBox_ModeFT_SIZE_REQUEST_TYPE_CELLTT_MAC_ID_GEEZ
    FT_Glyph_CopyFT_SIZE_REQUEST_TYPE_NOMINALTT_MAC_ID_GEORGIAN
    FT_Glyph_FormatFT_SIZE_REQUEST_TYPE_REAL_DIMTT_MAC_ID_GREEK
    FT_Glyph_Get_CBoxFT_SIZE_REQUEST_TYPE_SCALESTT_MAC_ID_GUJARATI
    FT_Glyph_MetricsFT_SIZES_HTT_MAC_ID_GURMUKHI
    FT_Glyph_StrokeFT_SinTT_MAC_ID_HEBREW
    FT_Glyph_StrokeBorderFT_SizeTT_MAC_ID_JAPANESE
    FT_Glyph_To_BitmapFT_Size_InternalTT_MAC_ID_KANNADA
    FT_Glyph_TransformFT_Size_MetricsTT_MAC_ID_KHMER
    FT_GlyphRecFT_Size_RequestTT_MAC_ID_KOREAN
    FT_GlyphSlotFT_Size_Request_TypeTT_MAC_ID_LAOTIAN
    FT_GlyphSlot_Own_BitmapFT_Size_RequestRecTT_MAC_ID_MALAYALAM
    FT_GlyphSlotRecFT_SizeRecTT_MAC_ID_MALDIVIAN
    FT_GX_VALIDATE_HFT_Slot_InternalTT_MAC_ID_MONGOLIAN
    FT_GZIP_HFT_SpanTT_MAC_ID_ORIYA
    FT_HAS_FAST_GLYPHSFT_SpanFuncTT_MAC_ID_ROMAN
    FT_HAS_FIXED_SIZESFT_STROKER_BORDER_LEFTTT_MAC_ID_RSYMBOL
    FT_HAS_GLYPH_NAMESFT_STROKER_BORDER_RIGHTTT_MAC_ID_RUSSIAN
    FT_HAS_HORIZONTALFT_STROKER_HTT_MAC_ID_SIMPLIFIED_CHINESE
    FT_HAS_KERNINGFT_STROKER_LINECAP_BUTTTT_MAC_ID_SINDHI
    FT_HAS_MULTIPLE_MASTERSFT_STROKER_LINECAP_ROUNDTT_MAC_ID_SINHALESE
    FT_HAS_VERTICALFT_STROKER_LINECAP_SQUARETT_MAC_ID_SLAVIC
    FT_Has_PS_Glyph_NamesFT_STROKER_LINEJOIN_BEVELTT_MAC_ID_TAMIL
    FT_IMAGE_HFT_STROKER_LINEJOIN_MITERTT_MAC_ID_TELUGU
    FT_IMAGE_TAGFT_STROKER_LINEJOIN_MITER_FIXEDTT_MAC_ID_THAI
    FT_INCREMENTAL_HFT_STROKER_LINEJOIN_MITER_VARIABLETT_MAC_ID_TIBETAN
    FT_IncrementalFT_STROKER_LINEJOIN_ROUNDTT_MAC_ID_TRADITIONAL_CHINESE
    FT_Incremental_FreeGlyphDataFuncFT_STYLE_FLAG_BOLDTT_MAC_ID_UNINTERP
    FT_Incremental_FuncsRecFT_STYLE_FLAG_ITALICTT_MAC_ID_VIETNAMESE
    FT_Incremental_GetGlyphDataFuncFT_STYLE_FLAG_XXXTT_MAC_ID_XXX
    FT_Incremental_GetGlyphMetricsFuncFT_StreamTT_MaxProfile
    FT_Incremental_InterfaceFT_Stream_CloseFuncTT_MS_ID_BIG_5
    FT_Incremental_InterfaceRecFT_Stream_IoFuncTT_MS_ID_GB2312
    FT_Incremental_MetricsFT_Stream_OpenBzip2TT_MS_ID_JOHAB
    FT_Incremental_MetricsRecFT_Stream_OpenGzipTT_MS_ID_SJIS
    FT_Init_FreeTypeFT_Stream_OpenLZWTT_MS_ID_SYMBOL_CS
    FT_IntFT_StreamDescTT_MS_ID_UCS_4
    FT_Int16FT_StreamRecTT_MS_ID_UNICODE_CS
    FT_Int32FT_StringTT_MS_ID_WANSUNG
    FT_IS_CID_KEYEDFT_StrokerTT_MS_ID_XXX
    FT_IS_FIXED_WIDTHFT_Stroker_BeginSubPathTT_OS2
    FT_IS_SCALABLEFT_Stroker_ConicToTT_PCLT
    FT_IS_SFNTFT_Stroker_CubicToTT_PLATFORM_ADOBE
    FT_IS_TRICKYFT_Stroker_DoneTT_PLATFORM_APPLE_UNICODE
    FT_KERNING_DEFAULTFT_Stroker_EndSubPathTT_PLATFORM_CUSTOM
    FT_KERNING_UNFITTEDFT_Stroker_ExportTT_PLATFORM_ISO
    FT_KERNING_UNSCALEDFT_Stroker_ExportBorderTT_PLATFORM_MACINTOSH
    FT_Kerning_ModeFT_Stroker_GetBorderCountsTT_PLATFORM_MICROSOFT
    FT_LCD_FILTER_DEFAULTFT_Stroker_GetCountsTT_PLATFORM_XXX
    FT_LCD_FILTER_HFT_Stroker_LineCapTT_Postscript
    FT_LCD_FILTER_LEGACYFT_Stroker_LineJoinTT_VertHeader
    FT_LCD_FILTER_LIGHTFT_Stroker_LineTo
    FT_LCD_FILTER_NONEFT_Stroker_New
    -
    - -
    [TOC]
    - -
    generated on Thu Mar 8 21:09:06 2012
    - diff --git a/docs/reference/ft2-lcd_filtering.html b/docs/reference/ft2-lcd_filtering.html deleted file mode 100644 index 3e88ceb..0000000 --- a/docs/reference/ft2-lcd_filtering.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -LCD Filtering -

    -

    Synopsis

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

    -

    -
    -

    FT_LcdFilter

    -
    -Defined in FT_LCD_FILTER_H (freetype/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_MAX   /* do not remove */
    -
    -  } FT_LcdFilter;
    -
    -

    -
    -

    A list of values to identify various types of LCD filters.

    -

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

    The default filter reduces color fringes considerably, at the cost of a slight blurriness in the output.

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

    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
    -

    2.3.0

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

    FT_Library_SetLcdFilter

    -
    -Defined in FT_LCD_FILTER_H (freetype/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 -

    A handle to the target library instance.

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

    FreeType error code. 0 means success.

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

    2.3.0

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

    FT_Library_SetLcdFilterWeights

    -
    -Defined in FT_LCD_FILTER_H (freetype/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 -

    A handle to the target library instance.

    -
    weights -

    A pointer to an array; the function copies the first five bytes and uses them to specify the filter weights.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    Due to PATENTS covering subpixel rendering, this function doesn't do anything except returning ‘FT_Err_Unimplemented_Feature’ if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.

    -

    This function must be called after FT_Library_SetLcdFilter to have any effect.

    -
    -
    since
    -

    2.4.0

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-list_processing.html b/docs/reference/ft2-list_processing.html deleted file mode 100644 index 6b4dc31..0000000 --- a/docs/reference/ft2-list_processing.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    This section contains various definitions related to list processing using doubly-linked nodes.

    -

    -
    -

    FT_List

    -
    -Defined in FT_TYPES_H (freetype/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 (freetype/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 (freetype/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 -

    The head (first element) of doubly-linked list.

    -
    tail -

    The tail (last element) of doubly-linked list.

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

    FT_ListNodeRec

    -
    -Defined in FT_TYPES_H (freetype/fttypes.h). -

    -
    -
    -  typedef struct  FT_ListNodeRec_
    -  {
    -    FT_ListNode  prev;
    -    FT_ListNode  next;
    -    void*        data;
    -
    -  } FT_ListNodeRec;
    -
    -

    -
    -

    A structure used to hold a single list element.

    -

    -
    fields
    -

    - - - - -
    prev -

    The previous element in the list. NULL if first.

    -
    next -

    The next element in the list. NULL if last.

    -
    data -

    A typeless pointer to the listed object.

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

    FT_List_Find

    -
    -Defined in FT_LIST_H (freetype/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 (freetype/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 -

    A pointer to the parent list.

    -
    node -

    The node to append.

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

    FT_List_Insert

    -
    -Defined in FT_LIST_H (freetype/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 -

    A pointer to parent list.

    -
    node -

    The node to insert.

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

    FT_List_Remove

    -
    -Defined in FT_LIST_H (freetype/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 -

    The node to remove.

    -
    -
    -
    inout
    -

    - - -
    list -

    A pointer to the parent list.

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

    FT_List_Up

    -
    -Defined in FT_LIST_H (freetype/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 -

    A pointer to the parent list.

    -
    node -

    The node to move.

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

    FT_List_Iterator

    -
    -Defined in FT_LIST_H (freetype/ftlist.h). -

    -
    -
    -  typedef FT_Error
    -  (*FT_List_Iterator)( FT_ListNode  node,
    -                       void*        user );
    -
    -

    -
    -

    An FT_List iterator function which 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 (freetype/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 -

    A handle to the list.

    -
    iterator -

    An iterator function, called on each node of the list.

    -
    user -

    A user-supplied field which is passed as the second argument to the iterator.

    -
    -
    -
    return
    -

    The result (a FreeType error code) of the last iterator call.

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

    FT_List_Destructor

    -
    -Defined in FT_LIST_H (freetype/ftlist.h). -

    -
    -
    -  typedef void
    -  (*FT_List_Destructor)( FT_Memory  memory,
    -                         void*      data,
    -                         void*      user );
    -
    -

    -
    -

    An FT_List iterator function which 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.

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

    FT_List_Finalize

    -
    -Defined in FT_LIST_H (freetype/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 -

    A handle to the list.

    -
    destroy -

    A list destructor that will be applied to each element of the list.

    -
    memory -

    The current memory object which handles deallocation.

    -
    user -

    A user-supplied field which is passed as the last argument to the destructor.

    -
    -
    -
    note
    -

    This function expects that all nodes added by FT_List_Add or FT_List_Insert have been dynamically allocated.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-lzw.html b/docs/reference/ft2-lzw.html deleted file mode 100644 index 4300364..0000000 --- a/docs/reference/ft2-lzw.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -LZW Streams -

    -

    Synopsis

    - - -
    FT_Stream_OpenLZW


    - -
    -

    This section contains the declaration of LZW-specific functions.

    -

    -
    -

    FT_Stream_OpenLZW

    -
    -Defined in FT_LZW_H (freetype/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 -

    The target embedding stream.

    -
    source -

    The source stream.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    The source stream must be opened before calling this function.

    -

    Calling the internal function ‘FT_Stream_Close’ on the new stream will not call ‘FT_Stream_Close’ on the source stream. None of the stream objects will be released to the heap.

    -

    The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream

    -

    In certain builds of the library, 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/docs/reference/ft2-mac_specific.html b/docs/reference/ft2-mac_specific.html deleted file mode 100644 index 2b862ad..0000000 --- a/docs/reference/ft2-mac_specific.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    The following definitions are only available if FreeType is compiled on a Macintosh.

    -

    -
    -

    FT_New_Face_From_FOND

    -
    -Defined in FT_MAC_H (freetype/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 -

    A handle to the library resource.

    -
    -
    -
    input
    -

    - - - -
    fond -

    A FOND resource.

    -
    face_index -

    Only supported for the -1 ‘sanity check’ special case.

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to a new face object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    Mac OS name of the font (e.g., Times New Roman Bold).

    -
    -
    -
    output
    -

    - - - -
    pathSpec -

    FSSpec to the file. For passing to FT_New_Face_From_FSSpec.

    -
    face_index -

    Index of the face. For passing to FT_New_Face_From_FSSpec.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_GetFile_From_Mac_ATS_Name

    -
    -Defined in FT_MAC_H (freetype/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 -

    Mac OS name of the font in ATS framework.

    -
    -
    -
    output
    -

    - - - -
    pathSpec -

    FSSpec to the file. For passing to FT_New_Face_From_FSSpec.

    -
    face_index -

    Index of the face. For passing to FT_New_Face_From_FSSpec.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_GetFilePath_From_Mac_ATS_Name

    -
    -Defined in FT_MAC_H (freetype/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 which is handled by ATS framework.

    -

    -
    input
    -

    - - -
    fontName -

    Mac OS name of the font in ATS framework.

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

    Lengths of the buffer ‘path’ that client allocated.

    -
    face_index -

    Index of the face. For passing to FT_New_Face.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_New_Face_From_FSSpec

    -
    -Defined in FT_MAC_H (freetype/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 -

    A handle to the library resource.

    -
    -
    -
    input
    -

    - - - -
    spec -

    FSSpec to the font file.

    -
    face_index -

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

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to a new face object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to the library resource.

    -
    -
    -
    input
    -

    - - - -
    spec -

    FSRef to the font file.

    -
    face_index -

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

    -
    -
    -
    output
    -

    - - -
    aface -

    A handle to a new face object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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/docs/reference/ft2-module_management.html b/docs/reference/ft2-module_management.html deleted file mode 100644 index da119b6..0000000 --- a/docs/reference/ft2-module_management.html +++ /dev/null @@ -1,667 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Module Management -

    -

    Synopsis

    - - - - - - -
    FT_Module_ConstructorFT_Get_ModuleFT_Set_Debug_Hook
    FT_Module_DestructorFT_Remove_ModuleFT_Add_Default_Modules
    FT_Module_RequesterFT_Reference_LibraryFT_Renderer_Class
    FT_Module_ClassFT_New_LibraryFT_Get_Renderer
    FT_Add_ModuleFT_Done_LibraryFT_Set_Renderer


    - -
    -

    The definitions below are used to manage modules within FreeType. Modules can be added, upgraded, and removed at runtime.

    -

    -
    -

    FT_Module_Constructor

    -
    -Defined in FT_MODULE_H (freetype/ftmodapi.h). -

    -
    -
    -  typedef FT_Error
    -  (*FT_Module_Constructor)( FT_Module  module );
    -
    -

    -
    -

    A function used to initialize (not create) a new module object.

    -

    -
    input
    -

    - - -
    module -

    The module to initialize.

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

    FT_Module_Destructor

    -
    -Defined in FT_MODULE_H (freetype/ftmodapi.h). -

    -
    -
    -  typedef void
    -  (*FT_Module_Destructor)( FT_Module  module );
    -
    -

    -
    -

    A function used to finalize (not destroy) a given module object.

    -

    -
    input
    -

    - - -
    module -

    The module to finalize.

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

    FT_Module_Requester

    -
    -Defined in FT_MODULE_H (freetype/ftmodapi.h). -

    -
    -
    -  typedef FT_Module_Interface
    -  (*FT_Module_Requester)( FT_Module    module,
    -                          const char*  name );
    -
    -

    -
    -

    A function used to query a given module for a specific interface.

    -

    -
    input
    -

    - - - -
    module -

    The module to finalize.

    -
    name -

    The name of the interface in the module.

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

    FT_Module_Class

    -
    -Defined in FT_MODULE_H (freetype/ftmodapi.h). -

    -
    -
    -  typedef struct  FT_Module_Class_
    -  {
    -    FT_ULong               module_flags;
    -    FT_Long                module_size;
    -    const FT_String*       module_name;
    -    FT_Fixed               module_version;
    -    FT_Fixed               module_requires;
    -
    -    const void*            module_interface;
    -
    -    FT_Module_Constructor  module_init;
    -    FT_Module_Destructor   module_done;
    -    FT_Module_Requester    get_interface;
    -
    -  } FT_Module_Class;
    -
    -

    -
    -

    The module class descriptor.

    -

    -
    fields
    -

    - - - - - - - - - -
    module_flags -

    Bit flags describing the module.

    -
    module_size -

    The size of one module object/instance in bytes.

    -
    module_name -

    The name of the module.

    -
    module_version -

    The version, as a 16.16 fixed number (major.minor).

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

    The initializing function.

    -
    module_done -

    The finalizing function.

    -
    get_interface -

    The interface requesting function.

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

    FT_Add_Module

    -
    -Defined in FT_MODULE_H (freetype/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 -

    A handle to the library object.

    -
    -
    -
    input
    -

    - - -
    clazz -

    A pointer to class descriptor for the module.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftmodapi.h). -

    -
    -
    -  FT_EXPORT( FT_Module )
    -  FT_Get_Module( FT_Library   library,
    -                 const char*  module_name );
    -
    -

    -
    -

    Find a module by its name.

    -

    -
    input
    -

    - - - -
    library -

    A handle to the library object.

    -
    module_name -

    The module's name (as an ASCII string).

    -
    -
    -
    return
    -

    A module handle. 0 if none was found.

    -
    -
    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 (freetype/ftmodapi.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Remove_Module( FT_Library  library,
    -                    FT_Module   module );
    -
    -

    -
    -

    Remove a given module from a library instance.

    -

    -
    inout
    -

    - - -
    library -

    A handle to a library object.

    -
    -
    -
    input
    -

    - - -
    module -

    A handle to a module object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    The module object is destroyed by the function in case of success.

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

    FT_Reference_Library

    -
    -Defined in FT_MODULE_H (freetype/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 which reference FT_Library objects.

    -

    -
    input
    -

    - - -
    library -

    A handle to a target library object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    since
    -

    2.4.2

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

    FT_New_Library

    -
    -Defined in FT_MODULE_H (freetype/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 -

    A handle to the original memory object.

    -
    -
    -
    output
    -

    - - -
    alibrary -

    A pointer to handle of a new library object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

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

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

    FT_Done_Library

    -
    -Defined in FT_MODULE_H (freetype/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 -

    A handle to the target library.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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.

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

    FT_Add_Default_Modules

    -
    -Defined in FT_MODULE_H (freetype/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.

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

    FT_Renderer_Class

    -
    -Defined in FT_RENDER_H (freetype/ftrender.h). -

    -
    -
    -  typedef struct  FT_Renderer_Class_
    -  {
    -    FT_Module_Class            root;
    -
    -    FT_Glyph_Format            glyph_format;
    -
    -    FT_Renderer_RenderFunc     render_glyph;
    -    FT_Renderer_TransformFunc  transform_glyph;
    -    FT_Renderer_GetCBoxFunc    get_glyph_cbox;
    -    FT_Renderer_SetModeFunc    set_mode;
    -
    -    FT_Raster_Funcs*           raster_class;
    -
    -  } FT_Renderer_Class;
    -
    -

    -
    -

    The renderer module class descriptor.

    -

    -
    fields
    -

    - - - - - - - - -
    root -

    The root FT_Module_Class fields.

    -
    glyph_format -

    The glyph image format this renderer handles.

    -
    render_glyph -

    A method used to render the image that is in a given glyph slot into a bitmap.

    -
    transform_glyph -

    A method used to transform the image that is in a given glyph slot.

    -
    get_glyph_cbox -

    A method used to access the glyph's cbox.

    -
    set_mode -

    A method used to pass additional parameters.

    -
    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 (freetype/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 -

    A handle to the library object.

    -
    format -

    The glyph format.

    -
    -
    -
    return
    -

    A renderer handle. 0 if none found.

    -
    -
    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 (freetype/ftrender.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Set_Renderer( FT_Library     library,
    -                   FT_Renderer    renderer,
    -                   FT_UInt        num_params,
    -                   FT_Parameter*  parameters );
    -
    -

    -
    -

    Set the current renderer to use, and set additional mode.

    -

    -
    inout
    -

    - - -
    library -

    A handle to the library object.

    -
    -
    -
    input
    -

    - - - - -
    renderer -

    A handle to the renderer object.

    -
    num_params -

    The number of additional parameters.

    -
    parameters -

    Additional parameters.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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]
    - - - diff --git a/docs/reference/ft2-multiple_masters.html b/docs/reference/ft2-multiple_masters.html deleted file mode 100644 index 3f3ad2e..0000000 --- a/docs/reference/ft2-multiple_masters.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/ftmm.h). -

    -
    -
    -  typedef struct  FT_MM_Axis_
    -  {
    -    FT_String*  name;
    -    FT_Long     minimum;
    -    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 -

    The axis's name.

    -
    minimum -

    The axis's minimum design coordinate.

    -
    maximum -

    The axis's maximum design coordinate.

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

    FT_Multi_Master

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h). -

    -
    -
    -  typedef struct  FT_Multi_Master_
    -  {
    -    FT_UInt     num_axis;
    -    FT_UInt     num_designs;
    -    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 -

    Number of axes. Cannot exceed 4.

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

    A table of axis descriptors.

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

    FT_Var_Axis

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h). -

    -
    -
    -  typedef struct  FT_Var_Axis_
    -  {
    -    FT_String*  name;
    -
    -    FT_Fixed    minimum;
    -    FT_Fixed    def;
    -    FT_Fixed    maximum;
    -
    -    FT_ULong    tag;
    -    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 -

    The axis's name. Not always meaningful for GX.

    -
    minimum -

    The axis's minimum design coordinate.

    -
    def -

    The axis's default design coordinate. FreeType computes meaningful default values for MM; it is then an integer value, not in 16.16 format.

    -
    maximum -

    The axis's maximum design coordinate.

    -
    tag -

    The axis's tag (the GX equivalent to ‘name’). FreeType provides default values for MM if possible.

    -
    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 (freetype/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 -

    The design coordinates for this style. This is an array with one entry for each axis.

    -
    strid -

    The entry in ‘name’ table identifying this style.

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

    FT_MM_Var

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h). -

    -
    -
    -  typedef struct  FT_MM_Var_
    -  {
    -    FT_UInt              num_axis;
    -    FT_UInt              num_designs;
    -    FT_UInt              num_namedstyles;
    -    FT_Var_Axis*         axis;
    -    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 -

    The number of axes. The maximum value is 4 for MM; no limit in GX.

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

    The number of named styles; only meaningful for GX which 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 -

    A table of axis descriptors. GX fonts contain slightly more data than MM.

    -
    namedstyles -

    A table of named styles. Only meaningful with GX.

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

    FT_Get_Multi_Master

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/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 -

    A handle to the source face.

    -
    -
    -
    output
    -

    - - -
    amaster -

    The Multiple Masters descriptor.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Get_MM_Var

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/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 -

    A handle to the source face.

    -
    -
    -
    output
    -

    - - -
    amaster -

    The Multiple Masters/GX var descriptor. Allocates a data structure, which the user must free (a single call to FT_FREE will do it).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Set_MM_Design_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/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 -

    A handle to the source face.

    -
    -
    -
    input
    -

    - - - -
    num_coords -

    The number of design coordinates (must be equal to the number of axes in the font).

    -
    coords -

    An array of design coordinates.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Set_Var_Design_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/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 -

    A handle to the source face.

    -
    -
    -
    input
    -

    - - - -
    num_coords -

    The number of design coordinates (must be equal to the number of axes in the font).

    -
    coords -

    An array of design coordinates.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Set_MM_Blend_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/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 -

    A handle to the source face.

    -
    -
    -
    input
    -

    - - - -
    num_coords -

    The number of design coordinates (must be equal to the number of axes in the font).

    -
    coords -

    The design coordinates array (each element must be between 0 and 1.0).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Set_Var_Blend_Coordinates

    -
    -Defined in FT_MULTIPLE_MASTERS_H (freetype/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/docs/reference/ft2-ot_validation.html b/docs/reference/ft2-ot_validation.html deleted file mode 100644 index edc8f76..0000000 --- a/docs/reference/ft2-ot_validation.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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 (freetype/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).

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

    FT_OpenType_Validate

    -
    -Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_OpenType_Validate( FT_Face    face,
    -                        FT_UInt    validation_flags,
    -                        FT_Bytes  *BASE_table,
    -                        FT_Bytes  *GDEF_table,
    -                        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 which actually does the text layout can access those tables without error checking (which can be quite time consuming).

    -

    -
    input
    -

    - - - -
    face -

    A handle to the input face.

    -
    validation_flags -

    A bit field which specifies the tables to be validated. See FT_VALIDATE_OTXXX for possible values.

    -
    -
    -
    output
    -

    - - - - - - -
    BASE_table -

    A pointer to the BASE table.

    -
    GDEF_table -

    A pointer to the GDEF table.

    -
    GPOS_table -

    A pointer to the GPOS table.

    -
    GSUB_table -

    A pointer to the GSUB table.

    -
    JSTF_table -

    A pointer to the JSTF table.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftotval.h). -

    -
    -
    -  FT_EXPORT( void )
    -  FT_OpenType_Free( FT_Face   face,
    -                    FT_Bytes  table );
    -
    -

    -
    -

    Free the buffer allocated by OpenType validator.

    -

    -
    input
    -

    - - - -
    face -

    A handle to the input face.

    -
    table -

    The pointer to the buffer that is allocated by FT_OpenType_Validate.

    -
    -
    -
    note
    -

    This function must be used to free the buffer allocated by FT_OpenType_Validate only.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-outline_processing.html b/docs/reference/ft2-outline_processing.html deleted file mode 100644 index a36f136..0000000 --- a/docs/reference/ft2-outline_processing.html +++ /dev/null @@ -1,1125 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Outline Processing -

    -

    Synopsis

    - - - - - - - - - - - - - -
    FT_OutlineFT_Outline_MoveToFunc
    FT_OUTLINE_FLAGSFT_Outline_LineToFunc
    FT_Outline_NewFT_Outline_ConicToFunc
    FT_Outline_DoneFT_Outline_CubicToFunc
    FT_Outline_CopyFT_Outline_Funcs
    FT_Outline_TranslateFT_Outline_Decompose
    FT_Outline_TransformFT_Outline_Get_CBox
    FT_Outline_EmboldenFT_Outline_Get_Bitmap
    FT_Outline_ReverseFT_Outline_Render
    FT_Outline_CheckFT_Orientation
    FT_Outline_Get_BBoxFT_Outline_Get_Orientation
    ft_outline_flags


    - -
    -

    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 (freetype/ftimage.h). -

    -
    -
    -  typedef struct  FT_Outline_
    -  {
    -    short       n_contours;      /* number of contours in glyph        */
    -    short       n_points;        /* number of points in the glyph      */
    -
    -    FT_Vector*  points;          /* the outline's points               */
    -    char*       tags;            /* the points flags                   */
    -    short*      contours;        /* the contour end points             */
    -
    -    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 -

    The number of contours in the outline.

    -
    n_points -

    The number of points in the outline.

    -
    points -

    A pointer to an array of ‘n_points’ FT_Vector elements, giving the outline's point coordinates.

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

    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.

    -
    -
    -
    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 (freetype/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
    -
    -

    -
    -

    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 (freetype/ftoutln.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Outline_New( FT_Library   library,
    -                  FT_UInt      numPoints,
    -                  FT_Int       numContours,
    -                  FT_Outline  *anoutline );
    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Outline_New_Internal( FT_Memory    memory,
    -                           FT_UInt      numPoints,
    -                           FT_Int       numContours,
    -                           FT_Outline  *anoutline );
    -
    -

    -
    -

    Create a new outline of a given size.

    -

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

    The maximal number of points within the outline.

    -
    numContours -

    The maximal number of contours within the outline.

    -
    -
    -
    output
    -

    - - -
    anoutline -

    A handle to the new outline.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/ftoutln.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Outline_Done( FT_Library   library,
    -                   FT_Outline*  outline );
    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Outline_Done_Internal( FT_Memory    memory,
    -                            FT_Outline*  outline );
    -
    -

    -
    -

    Destroy an outline created with FT_Outline_New.

    -

    -
    input
    -

    - - - -
    library -

    A handle of the library object used to allocate the outline.

    -
    outline -

    A pointer to the outline object to be discarded.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to the source outline.

    -
    -
    -
    output
    -

    - - -
    target -

    A handle to the target outline.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Outline_Translate

    -
    -Defined in FT_OUTLINE_H (freetype/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 -

    A pointer to the target outline descriptor.

    -
    -
    -
    input
    -

    - - - -
    xOffset -

    The horizontal offset.

    -
    yOffset -

    The vertical offset.

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

    FT_Outline_Transform

    -
    -Defined in FT_OUTLINE_H (freetype/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 -

    A pointer to the target outline descriptor.

    -
    -
    -
    input
    -

    - - -
    matrix -

    A pointer to the transformation matrix.

    -
    -
    -
    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 (freetype/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 -

    A handle to the target outline.

    -
    -
    -
    input
    -

    - - -
    strength -

    How strong the glyph is emboldened. Expressed in 26.6 pixel format.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    -
    -  FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   
    -  if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE )             
    -    FT_Outline_Embolden( &face->slot->outline, strength );         
    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Outline_Reverse

    -
    -Defined in FT_OUTLINE_H (freetype/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 -

    A pointer to the target outline descriptor.

    -
    -
    -
    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 (freetype/ftoutln.h). -

    -
    -
    -  FT_EXPORT( FT_Error )
    -  FT_Outline_Check( FT_Outline*  outline );
    -
    -

    -
    -

    Check the contents of an outline descriptor.

    -

    -
    input
    -

    - - -
    outline -

    A handle to a source outline.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Outline_Get_BBox

    -
    -Defined in FT_BBOX_H (freetype/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 which returns very quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.

    -

    -
    input
    -

    - - -
    outline -

    A pointer to the source outline.

    -
    -
    -
    output
    -

    - - -
    abbox -

    The outline's exact bounding box.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    If the font is tricky and the glyph has been loaded with FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get reasonable values for the BBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the BBox which can be eventually converted back to font units.

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

    ft_outline_flags

    -
    -Defined in FT_IMAGE_H (freetype/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
    -
    -

    -
    -

    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.

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

    FT_Outline_MoveToFunc

    -
    -Defined in FT_IMAGE_H (freetype/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.

    -
    -
    -
    return
    -

    Error code. 0 means success.

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

    FT_Outline_LineToFunc

    -
    -Defined in FT_IMAGE_H (freetype/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
    -

    Error code. 0 means success.

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

    FT_Outline_ConicToFunc

    -
    -Defined in FT_IMAGE_H (freetype/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.

    -
    -
    -
    return
    -

    Error code. 0 means success.

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

    FT_Outline_CubicToFunc

    -
    -Defined in FT_IMAGE_H (freetype/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.

    -
    -
    -
    return
    -

    Error code. 0 means success.

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

    FT_Outline_Funcs

    -
    -Defined in FT_IMAGE_H (freetype/ftimage.h). -

    -
    -
    -  typedef struct  FT_Outline_Funcs_
    -  {
    -    FT_Outline_MoveToFunc   move_to;
    -    FT_Outline_LineToFunc   line_to;
    -    FT_Outline_ConicToFunc  conic_to;
    -    FT_Outline_CubicToFunc  cubic_to;
    -
    -    int                     shift;
    -    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 -

    The ‘move to’ emitter.

    -
    line_to -

    The segment emitter.

    -
    conic_to -

    The second-order Bézier arc emitter.

    -
    cubic_to -

    The third-order Bézier arc emitter.

    -
    shift -

    The shift that is applied to coordinates before they are sent to the emitter.

    -
    delta -

    The delta that is applied to coordinates before they are sent to the emitter, but after the shift.

    -
    -
    -
    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 (freetype/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.

    -
    func_interface -

    A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.

    -
    -
    -
    inout
    -

    - - -
    user -

    A typeless pointer which 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.

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

    FT_Outline_Get_CBox

    -
    -Defined in FT_OUTLINE_H (freetype/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 which 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.

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

    FT_Outline_Get_Bitmap

    -
    -Defined in FT_OUTLINE_H (freetype/ftoutln.h). -

    -
    -
    -  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 (freetype/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 (freetype/ftoutln.h). -

    -
    -
    -  typedef enum  FT_Orientation_
    -  {
    -    FT_ORIENTATION_TRUETYPE   = 0,
    -    FT_ORIENTATION_POSTSCRIPT = 1,
    -    FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
    -    FT_ORIENTATION_FILL_LEFT  = FT_ORIENTATION_POSTSCRIPT,
    -    FT_ORIENTATION_NONE
    -
    -  } FT_Orientation;
    -
    -

    -
    -

    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
    -

    According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.

    -
    FT_ORIENTATION_POSTSCRIPT
    -

    According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.

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

    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 -

    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 (freetype/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 computing the direction of each global horizontal and/or vertical extrema within the outline.

    -

    Note that this will return FT_ORIENTATION_TRUETYPE for empty outlines.

    -

    -
    input
    -

    - - -
    outline -

    A handle to the source outline.

    -
    -
    -
    return
    -

    The orientation.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-pfr_fonts.html b/docs/reference/ft2-pfr_fonts.html deleted file mode 100644 index 6a968f3..0000000 --- a/docs/reference/ft2-pfr_fonts.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -PFR Fonts -

    -

    Synopsis

    - - -
    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 (freetype/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 -

    Handle to the input face. It can be a non-PFR face.

    -
    -
    -
    output
    -

    - - - - - -
    aoutline_resolution -

    Outline resolution. This is equivalent to ‘face->units_per_EM’ for non-PFR fonts. Optional (parameter can be NULL).

    -
    ametrics_resolution -

    Metrics resolution. This is equivalent to ‘outline_resolution’ for non-PFR fonts. Optional (parameter can be NULL).

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

    Same as ‘ametrics_x_scale’ but for the vertical direction. optional (parameter can be NULL).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to the input face.

    -
    left -

    Index of the left glyph.

    -
    right -

    Index of the right glyph.

    -
    -
    -
    output
    -

    - - -
    avector -

    A kerning vector.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to the input face.

    -
    gindex -

    The glyph index.

    -
    -
    -
    output
    -

    - - -
    aadvance -

    The glyph advance in metrics units.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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/docs/reference/ft2-quick_advance.html b/docs/reference/ft2-quick_advance.html deleted file mode 100644 index 80efee1..0000000 --- a/docs/reference/ft2-quick_advance.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Quick retrieval of advance values -

    -

    Synopsis

    - - - -
    FT_ADVANCE_FLAG_FAST_ONLYFT_Get_Advances
    FT_Get_Advance


    - -
    -

    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 (freetype/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 which are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.

    -

    Normal and bytecode hinted modes, which require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.

    -

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

    FT_Get_Advance

    -
    -Defined in FT_ADVANCES_H (freetype/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. By default, the unhinted advance is returned in font units.

    -

    -
    input
    -

    - - - - -
    face -

    The source FT_Face handle.

    -
    gindex -

    The glyph index.

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

    The advance value, in either font units or 16.16 format.

    -

    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
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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. By default, the unhinted advances are returned in font units.

    -

    -
    input
    -

    - - - - - -
    face -

    The source FT_Face handle.

    -
    start -

    The first glyph index.

    -
    count -

    The number of advance values you want to retrieve.

    -
    load_flags -

    A set of bit flags similar to those used when calling FT_Load_Glyph.

    -
    -
    -
    output
    -

    - - -
    padvance -

    The advances, in either font units or 16.16 format. This array must contain at least ‘count’ elements.

    -

    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
    -

    FreeType error code. 0 means success.

    -
    -
    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]
    - - - diff --git a/docs/reference/ft2-raster.html b/docs/reference/ft2-raster.html deleted file mode 100644 index 34f2078..0000000 --- a/docs/reference/ft2-raster.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    This section contains technical definitions.

    -

    -
    -

    FT_Raster

    -
    -Defined in FT_IMAGE_H (freetype/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]
    - -
    -

    FT_Span

    -
    -Defined in FT_IMAGE_H (freetype/ftimage.h). -

    -
    -
    -  typedef struct  FT_Span_
    -  {
    -    short           x;
    -    unsigned short  len;
    -    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 -

    The span's horizontal start position.

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

    -
    -
    -
    note
    -

    This structure is used by the span drawing callback type named FT_SpanFunc which takes the y coordinate of the span as a a parameter.

    -

    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 (freetype/ftimage.h). -

    -
    -
    -  typedef void
    -  (*FT_SpanFunc)( int             y,
    -                  int             count,
    -                  const FT_Span*  spans,
    -                  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 -

    The scanline's y coordinate.

    -
    count -

    The number of spans to draw on this scanline.

    -
    spans -

    A table of ‘count’ spans to draw on the scanline.

    -
    user -

    User-supplied data that is passed to the callback.

    -
    -
    -
    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 (freetype/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 (freetype/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 (freetype/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 (freetype/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! */
    -    void*                   user;
    -    FT_BBox                 clip_box;
    -
    -  } FT_Raster_Params;
    -
    -

    -
    -

    A structure to hold the arguments used by a raster's render function.

    -

    -
    fields
    -

    - - - - - - - - - - -
    target -

    The target bitmap.

    -
    source -

    A pointer to the source glyph image (e.g., an FT_Outline).

    -
    flags -

    The rendering flags.

    -
    gray_spans -

    The gray span drawing callback.

    -
    black_spans -

    The black span drawing callback. UNIMPLEMENTED!

    -
    bit_test -

    The bit test callback. UNIMPLEMENTED!

    -
    bit_set -

    The bit set callback. UNIMPLEMENTED!

    -
    user -

    User-supplied data that is passed to each drawing callback.

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

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

    FT_Raster_NewFunc

    -
    -Defined in FT_IMAGE_H (freetype/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 -

    A handle to the memory allocator.

    -
    -
    -
    output
    -

    - - -
    raster -

    A handle to the new raster object.

    -
    -
    -
    return
    -

    Error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to the raster object.

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

    FT_Raster_ResetFunc

    -
    -Defined in FT_IMAGE_H (freetype/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 -

    A handle to the new raster object.

    -
    pool_base -

    The address in memory of the render pool.

    -
    pool_size -

    The size in bytes of the render pool.

    -
    -
    -
    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 (freetype/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 -

    A handle to the new raster object.

    -
    mode -

    A 4-byte tag used to name the mode or property.

    -
    args -

    A pointer to the new mode/property to use.

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

    FT_Raster_RenderFunc

    -
    -Defined in FT_IMAGE_H (freetype/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 -

    A handle to the raster object.

    -
    params -

    A pointer to an FT_Raster_Params structure used to store the rendering parameters.

    -
    -
    -
    return
    -

    Error code. 0 means success.

    -
    -
    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 which support direct composition).

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

    FT_Raster_Funcs

    -
    -Defined in FT_IMAGE_H (freetype/ftimage.h). -

    -
    -
    -  typedef struct  FT_Raster_Funcs_
    -  {
    -    FT_Glyph_Format        glyph_format;
    -    FT_Raster_NewFunc      raster_new;
    -    FT_Raster_ResetFunc    raster_reset;
    -    FT_Raster_SetModeFunc  raster_set_mode;
    -    FT_Raster_RenderFunc   raster_render;
    -    FT_Raster_DoneFunc     raster_done;
    -
    -  } FT_Raster_Funcs;
    -
    -

    -
    -

    A structure used to describe a given raster class to the library.

    -

    -
    fields
    -

    - - - - - - -
    glyph_format -

    The supported glyph format for this raster.

    -
    raster_new -

    The raster constructor.

    -
    raster_reset -

    Used to reset the render pool within the raster.

    -
    raster_render -

    A function to render a glyph into a given bitmap.

    -
    raster_done -

    The raster destructor.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-sfnt_names.html b/docs/reference/ft2-sfnt_names.html deleted file mode 100644 index ab1312a..0000000 --- a/docs/reference/ft2-sfnt_names.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/ftsnames.h). -

    -
    -
    -  typedef struct  FT_SfntName_
    -  {
    -    FT_UShort  platform_id;
    -    FT_UShort  encoding_id;
    -    FT_UShort  language_id;
    -    FT_UShort  name_id;
    -
    -    FT_Byte*   string;      /* this string is *not* null-terminated! */
    -    FT_UInt    string_len;  /* in bytes */
    -
    -  } FT_SfntName;
    -
    -

    -
    -

    A structure used to model an SFNT ‘name’ table entry.

    -

    -
    fields
    -

    - - - - - - - -
    platform_id -

    The platform ID for ‘string’.

    -
    encoding_id -

    The encoding ID for ‘string’.

    -
    language_id -

    The language ID for ‘string’.

    -
    name_id -

    An identifier for ‘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 -

    The length of ‘string’ in bytes.

    -
    -
    -
    note
    -

    Possible values for ‘platform_id’, ‘encoding_id’, ‘language_id’, and ‘name_id’ are given in the file ‘ttnameid.h’. For details please refer to the TrueType or OpenType specification.

    -

    See also TT_PLATFORM_XXX, TT_APPLE_ID_XXX, TT_MAC_ID_XXX, TT_ISO_ID_XXX, and TT_MS_ID_XXX.

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

    FT_Get_Sfnt_Name_Count

    -
    -Defined in FT_SFNT_NAMES_H (freetype/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 -

    A handle to the source face.

    -
    -
    -
    return
    -

    The number of strings in the ‘name’ table.

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

    FT_Get_Sfnt_Name

    -
    -Defined in FT_SFNT_NAMES_H (freetype/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 -

    A handle to the source face.

    -
    idx -

    The index of the ‘name’ string.

    -
    -
    -
    output
    -

    - - -
    aname -

    The indexed FT_SfntName structure.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 which has 4-face-per-family restriction.

    -

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

    FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY

    -
    -Defined in FT_SFNT_NAMES_H (freetype/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 which has 4-face-per-family restriction.

    -

    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-sizes_management.html b/docs/reference/ft2-sizes_management.html deleted file mode 100644 index 104957b..0000000 --- a/docs/reference/ft2-sizes_management.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Size Management -

    -

    Synopsis

    - - -
    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 (freetype/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 -

    A handle to a parent face object.

    -
    -
    -
    output
    -

    - - -
    asize -

    A handle to a new size object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    A handle to a target size object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

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

    FT_Activate_Size

    -
    -Defined in FT_SIZES_H (freetype/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 which 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 -

    A handle to a target size object.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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/docs/reference/ft2-system_interface.html b/docs/reference/ft2-system_interface.html deleted file mode 100644 index 63b55b3..0000000 --- a/docs/reference/ft2-system_interface.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -System Interface -

    -

    Synopsis

    - - - - - -
    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 (freetype/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 (freetype/ftsystem.h). -

    -
    -
    -  typedef void*
    -  (*FT_Alloc_Func)( FT_Memory  memory,
    -                    long       size );
    -
    -

    -
    -

    A function used to allocate ‘size’ bytes from ‘memory’.

    -

    -
    input
    -

    - - - -
    memory -

    A handle to the source memory manager.

    -
    size -

    The size in bytes to allocate.

    -
    -
    -
    return
    -

    Address of new memory block. 0 in case of failure.

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

    FT_Free_Func

    -
    -Defined in FT_SYSTEM_H (freetype/ftsystem.h). -

    -
    -
    -  typedef void
    -  (*FT_Free_Func)( FT_Memory  memory,
    -                   void*      block );
    -
    -

    -
    -

    A function used to release a given block of memory.

    -

    -
    input
    -

    - - - -
    memory -

    A handle to the source memory manager.

    -
    block -

    The address of the target memory block.

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

    FT_Realloc_Func

    -
    -Defined in FT_SYSTEM_H (freetype/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 -

    A handle to the source memory manager.

    -
    cur_size -

    The block's current size in bytes.

    -
    new_size -

    The block's requested new size.

    -
    block -

    The block's current address.

    -
    -
    -
    return
    -

    New block address. 0 in case of memory shortage.

    -
    -
    note
    -

    In case of error, the old block must still be available.

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

    FT_MemoryRec

    -
    -Defined in FT_SYSTEM_H (freetype/ftsystem.h). -

    -
    -
    -  struct  FT_MemoryRec_
    -  {
    -    void*            user;
    -    FT_Alloc_Func    alloc;
    -    FT_Free_Func     free;
    -    FT_Realloc_Func  realloc;
    -  };
    -
    -

    -
    -

    A structure used to describe a given memory manager to FreeType 2.

    -

    -
    fields
    -

    - - - - - -
    user -

    A generic typeless pointer for user data.

    -
    alloc -

    A pointer type to an allocation function.

    -
    free -

    A pointer type to an memory freeing function.

    -
    realloc -

    A pointer type to a reallocation function.

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

    FT_Stream

    -
    -Defined in FT_SYSTEM_H (freetype/ftsystem.h). -

    -
    -
    -  typedef struct FT_StreamRec_*  FT_Stream;
    -
    -

    -
    -

    A handle to an input stream.

    -

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

    FT_StreamDesc

    -
    -Defined in FT_SYSTEM_H (freetype/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 (freetype/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 -

    A handle to the source stream.

    -
    offset -

    The offset of read in stream (always from start).

    -
    buffer -

    The address of the read buffer.

    -
    count -

    The number of bytes to read from the stream.

    -
    -
    -
    return
    -

    The number of bytes effectively read by the stream.

    -
    -
    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 (freetype/ftsystem.h). -

    -
    -
    -  typedef void
    -  (*FT_Stream_CloseFunc)( FT_Stream  stream );
    -
    -

    -
    -

    A function used to close a given input stream.

    -

    -
    input
    -

    - - -
    stream -

    A handle to the target stream.

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

    FT_StreamRec

    -
    -Defined in FT_SYSTEM_H (freetype/ftsystem.h). -

    -
    -
    -  typedef struct  FT_StreamRec_
    -  {
    -    unsigned char*       base;
    -    unsigned long        size;
    -    unsigned long        pos;
    -
    -    FT_StreamDesc        descriptor;
    -    FT_StreamDesc        pathname;
    -    FT_Stream_IoFunc     read;
    -    FT_Stream_CloseFunc  close;
    -
    -    FT_Memory            memory;
    -    unsigned char*       cursor;
    -    unsigned char*       limit;
    -
    -  } FT_StreamRec;
    -
    -

    -
    -

    A structure used to describe an input stream.

    -

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

    The stream size in bytes.

    -
    pos -

    The current position within the stream.

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

    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 -

    The stream's input function.

    -
    close -

    The stream's close function.

    -
    memory -

    The memory manager to use to preload frames. This is set internally by FreeType and shouldn't be touched by stream implementations.

    -
    cursor -

    This field is set and used internally by FreeType when parsing frames.

    -
    limit -

    This field is set and used internally by FreeType when parsing frames.

    -
    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-toc.html b/docs/reference/ft2-toc.html deleted file mode 100644 index 9410b9e..0000000 --- a/docs/reference/ft2-toc.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - -
    [Index]
    -

    FreeType-2.4.9 API Reference

    - -

    Table of Contents

    -

    General Remarks

    • - - -
      -User allocation -

      How client applications should allocate FreeType data structures.

      -
      -
    -

    Core API

    -

    Format-Specific API

    -

    Cache Sub-System

    • - - -
      -Cache Sub-System -

      How to cache face, size, and glyph data with FreeType 2.

      -
      -
    -

    Support API

    -

    Miscellaneous

    -

    Global Index

    -
    - - -
    [Index]
    - -
    generated on Thu Mar 8 21:09:06 2012
    - diff --git a/docs/reference/ft2-truetype_engine.html b/docs/reference/ft2-truetype_engine.html deleted file mode 100644 index 02c67e9..0000000 --- a/docs/reference/ft2-truetype_engine.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -The TrueType Engine -

    -

    Synopsis

    - - -
    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 (freetype/ftmodapi.h). -

    -
    -
    -  typedef enum  FT_TrueTypeEngineType_
    -  {
    -    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
    -

    The library doesn't implement any kind of bytecode interpreter.

    -
    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 which position and scale glyph components with bytecode instructions. It produces bad output for most other fonts.

    -
    FT_TRUETYPE_ENGINE_TYPE_PATENTED
    -

    The library implements a bytecode interpreter that covers the full instruction set of the TrueType virtual machine (this was governed by patents until May 2010, hence the name).

    -
    -
    -
    since
    -

    2.2

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

    FT_Get_TrueType_Engine_Type

    -
    -Defined in FT_MODULE_H (freetype/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 -

    A library instance.

    -
    -
    -
    return
    -

    A value indicating which level is supported.

    -
    -
    since
    -

    2.2

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-truetype_tables.html b/docs/reference/ft2-truetype_tables.html deleted file mode 100644 index a57ba4f..0000000 --- a/docs/reference/ft2-truetype_tables.html +++ /dev/null @@ -1,1223 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/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 (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_Header_
    -  {
    -    FT_Fixed   Table_Version;
    -    FT_Fixed   Font_Revision;
    -
    -    FT_Long    CheckSum_Adjust;
    -    FT_Long    Magic_Number;
    -
    -    FT_UShort  Flags;
    -    FT_UShort  Units_Per_EM;
    -
    -    FT_Long    Created [2];
    -    FT_Long    Modified[2];
    -
    -    FT_Short   xMin;
    -    FT_Short   yMin;
    -    FT_Short   xMax;
    -    FT_Short   yMax;
    -
    -    FT_UShort  Mac_Style;
    -    FT_UShort  Lowest_Rec_PPEM;
    -
    -    FT_Short   Font_Direction;
    -    FT_Short   Index_To_Loc_Format;
    -    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 (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_HoriHeader_
    -  {
    -    FT_Fixed   Version;
    -    FT_Short   Ascender;
    -    FT_Short   Descender;
    -    FT_Short   Line_Gap;
    -
    -    FT_UShort  advance_Width_Max;      /* advance width maximum */
    -
    -    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */
    -    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */
    -    FT_Short   xMax_Extent;            /* xmax extents          */
    -    FT_Short   caret_Slope_Rise;
    -    FT_Short   caret_Slope_Run;
    -    FT_Short   caret_Offset;
    -
    -    FT_Short   Reserved[4];
    -
    -    FT_Short   metric_Data_Format;
    -    FT_UShort  number_Of_HMetrics;
    -
    -    /* The following fields are not defined by the TrueType specification */
    -    /* but they are used to connect the metrics header to the relevant    */
    -    /* `HMTX' table.                                                      */
    -
    -    void*      long_metrics;
    -    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 -

    The table version.

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

    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 -

    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 -

    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 -

    The minimum left side bearing of all glyphs within the font.

    -
    min_Right_Side_Bearing -

    The minimum right side bearing of all glyphs within the font.

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

    The rise coefficient of the cursor's slope of the cursor (slope=rise/run).

    -
    caret_Slope_Run -

    The run coefficient of the cursor's slope.

    -
    Reserved -

    8 reserved bytes.

    -
    metric_Data_Format -

    Always 0.

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

    A pointer into the ‘hmtx’ table.

    -
    short_metrics -

    A pointer into the ‘hmtx’ table.

    -
    -
    -
    note
    -

    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields which are different.

    -

    This ensures that a single function in the ‘ttload’ module is able to read both the horizontal and vertical headers.

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

    TT_VertHeader

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_VertHeader_
    -  {
    -    FT_Fixed   Version;
    -    FT_Short   Ascender;
    -    FT_Short   Descender;
    -    FT_Short   Line_Gap;
    -
    -    FT_UShort  advance_Height_Max;      /* advance height maximum */
    -
    -    FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */
    -    FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */
    -    FT_Short   yMax_Extent;             /* xmax or ymax extents            */
    -    FT_Short   caret_Slope_Rise;
    -    FT_Short   caret_Slope_Run;
    -    FT_Short   caret_Offset;
    -
    -    FT_Short   Reserved[4];
    -
    -    FT_Short   metric_Data_Format;
    -    FT_UShort  number_Of_VMetrics;
    -
    -    /* The following fields are not defined by the TrueType specification */
    -    /* but they're used to connect the metrics header to the relevant     */
    -    /* `HMTX' or `VMTX' table.                                            */
    -
    -    void*      long_metrics;
    -    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 -

    The table version.

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

    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 -

    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 -

    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 -

    The minimum top side bearing of all glyphs within the font.

    -
    min_Bottom_Side_Bearing
    -

    The minimum bottom side bearing of all glyphs within the font.

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

    The rise coefficient of the cursor's slope of the cursor (slope=rise/run).

    -
    caret_Slope_Run -

    The run coefficient of the cursor's slope.

    -
    caret_Offset -

    The cursor's offset for slanted fonts. This value is ‘reserved’ in vmtx version 1.0.

    -
    Reserved -

    8 reserved bytes.

    -
    metric_Data_Format -

    Always 0.

    -
    number_Of_HMetrics -

    Number of VMetrics entries in the ‘vmtx’ table -- this value can be smaller than the total number of glyphs in the font.

    -
    long_metrics -

    A pointer into the ‘vmtx’ table.

    -
    short_metrics -

    A pointer into the ‘vmtx’ table.

    -
    -
    -
    note
    -

    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields which are different.

    -

    This ensures that a single function in the ‘ttload’ module is able to read both the horizontal and vertical headers.

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

    TT_OS2

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_OS2_
    -  {
    -    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
    -    FT_Short   xAvgCharWidth;
    -    FT_UShort  usWeightClass;
    -    FT_UShort  usWidthClass;
    -    FT_Short   fsType;
    -    FT_Short   ySubscriptXSize;
    -    FT_Short   ySubscriptYSize;
    -    FT_Short   ySubscriptXOffset;
    -    FT_Short   ySubscriptYOffset;
    -    FT_Short   ySuperscriptXSize;
    -    FT_Short   ySuperscriptYSize;
    -    FT_Short   ySuperscriptXOffset;
    -    FT_Short   ySuperscriptYOffset;
    -    FT_Short   yStrikeoutSize;
    -    FT_Short   yStrikeoutPosition;
    -    FT_Short   sFamilyClass;
    -
    -    FT_Byte    panose[10];
    -
    -    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */
    -    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */
    -    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */
    -    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */
    -
    -    FT_Char    achVendID[4];
    -
    -    FT_UShort  fsSelection;
    -    FT_UShort  usFirstCharIndex;
    -    FT_UShort  usLastCharIndex;
    -    FT_Short   sTypoAscender;
    -    FT_Short   sTypoDescender;
    -    FT_Short   sTypoLineGap;
    -    FT_UShort  usWinAscent;
    -    FT_UShort  usWinDescent;
    -
    -    /* only version 1 tables: */
    -
    -    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */
    -    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */
    -
    -    /* only version 2 tables: */
    -
    -    FT_Short   sxHeight;
    -    FT_Short   sCapHeight;
    -    FT_UShort  usDefaultChar;
    -    FT_UShort  usBreakChar;
    -    FT_UShort  usMaxContext;
    -
    -  } TT_OS2;
    -
    -

    -
    -

    A structure used to model a TrueType OS/2 table. This is the long table version. All fields comply to the TrueType specification.

    -

    Note that we now support old Mac fonts which do not include an OS/2 table. In this case, the ‘version’ field is always set to 0xFFFF.

    -

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

    TT_Postscript

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_Postscript_
    -  {
    -    FT_Fixed  FormatType;
    -    FT_Fixed  italicAngle;
    -    FT_Short  underlinePosition;
    -    FT_Short  underlineThickness;
    -    FT_ULong  isFixedPitch;
    -    FT_ULong  minMemType42;
    -    FT_ULong  maxMemType42;
    -    FT_ULong  minMemType1;
    -    FT_ULong  maxMemType1;
    -
    -    /* Glyph names follow in the file, but we don't   */
    -    /* load them by default.  See the ttpost.c file.  */
    -
    -  } 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 (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_PCLT_
    -  {
    -    FT_Fixed   Version;
    -    FT_ULong   FontNumber;
    -    FT_UShort  Pitch;
    -    FT_UShort  xHeight;
    -    FT_UShort  Style;
    -    FT_UShort  TypeFamily;
    -    FT_UShort  CapHeight;
    -    FT_UShort  SymbolSet;
    -    FT_Char    TypeFace[16];
    -    FT_Char    CharacterComplement[8];
    -    FT_Char    FileName[6];
    -    FT_Char    StrokeWeight;
    -    FT_Char    WidthType;
    -    FT_Byte    SerifStyle;
    -    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 (freetype/tttables.h). -

    -
    -
    -  typedef struct  TT_MaxProfile_
    -  {
    -    FT_Fixed   version;
    -    FT_UShort  numGlyphs;
    -    FT_UShort  maxPoints;
    -    FT_UShort  maxContours;
    -    FT_UShort  maxCompositePoints;
    -    FT_UShort  maxCompositeContours;
    -    FT_UShort  maxZones;
    -    FT_UShort  maxTwilightPoints;
    -    FT_UShort  maxStorage;
    -    FT_UShort  maxFunctionDefs;
    -    FT_UShort  maxInstructionDefs;
    -    FT_UShort  maxStackElements;
    -    FT_UShort  maxSizeOfInstructions;
    -    FT_UShort  maxComponentElements;
    -    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 -

    The version number.

    -
    numGlyphs -

    The number of glyphs in this TrueType font.

    -
    maxPoints -

    The maximum number of points in a non-composite TrueType glyph. See also the structure element ‘maxCompositePoints’.

    -
    maxContours -

    The maximum number of contours in a non-composite TrueType glyph. See also the structure element ‘maxCompositeContours’.

    -
    maxCompositePoints -

    The maximum number of points in a composite TrueType glyph. See also the structure element ‘maxPoints’.

    -
    maxCompositeContours -

    The maximum number of contours in a composite TrueType glyph. See also the structure element ‘maxContours’.

    -
    maxZones -

    The maximum number of zones used for glyph hinting.

    -
    maxTwilightPoints -

    The maximum number of points in the twilight zone used for glyph hinting.

    -
    maxStorage -

    The maximum number of elements in the storage area used for glyph hinting.

    -
    maxFunctionDefs -

    The maximum number of function definitions in the TrueType bytecode for this font.

    -
    maxInstructionDefs -

    The maximum number of instruction definitions in the TrueType bytecode for this font.

    -
    maxStackElements -

    The maximum number of stack elements used during bytecode interpretation.

    -
    maxSizeOfInstructions -

    The maximum number of TrueType opcodes used for glyph hinting.

    -
    maxComponentElements -

    The maximum number of simple (i.e., non- composite) glyphs in a composite glyph.

    -
    maxComponentDepth -

    The maximum nesting depth of composite glyphs.

    -
    -
    -
    note
    -

    This structure is only used during font loading.

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

    FT_Sfnt_Tag

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/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       */
    -
    -    sfnt_max   /* internal end mark */
    -
    -  } FT_Sfnt_Tag;
    -
    -

    -
    -

    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 (freetype/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 -

    A handle to the source.

    -
    tag -

    The index of the SFNT table.

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

    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.

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

    FT_Load_Sfnt_Table

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/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 -

    A handle to the source face.

    -
    tag -

    The four-byte tag of the table to load. Use the value 0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the FT_TRUETYPE_TAGS_H file, or forge a new one with FT_MAKE_TAG.

    -
    offset -

    The starting offset in the table (or file if tag == 0).

    -
    -
    -
    output
    -

    - - -
    buffer -

    The target buffer address. The client must ensure that the memory array is big enough to hold the data.

    -
    -
    -
    inout
    -

    - - -
    length -

    If the ‘length’ parameter is NULL, then try to load the whole table. Return an error code if it fails.

    -

    Else, if ‘*length’ is 0, exit immediately while returning the table's (or file) full size in it.

    -

    Else the number of bytes to read from the table or file, from the starting offset.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    If you need to determine the table's length you should first call this function with ‘*length’ set to 0, as in the following example:

    -
    -  FT_ULong  length = 0;
    -
    -
    -  error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
    -  if ( error ) { ... table does not exist ... }
    -
    -  buffer = malloc( length );
    -  if ( buffer == NULL ) { ... not enough memory ... }
    -
    -  error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
    -  if ( error ) { ... could not load table ... }
    -
    -
    -
    -
    - - -
    [Index][TOC]
    - -
    -

    FT_Sfnt_Table_Info

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/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 -

    A handle to the source face.

    -
    table_index -

    The index of an SFNT table. The function returns FT_Err_Table_Missing for an invalid value.

    -
    -
    -
    inout
    -

    - - -
    tag -

    The name tag of the SFNT table. If the value is NULL, ‘table_index’ is ignored, and ‘length’ returns the number of SFNT tables in the font.

    -
    -
    -
    output
    -

    - - -
    length -

    The length of the SFNT table (or the number of SFNT tables, depending on ‘tag’).

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    SFNT tables with length zero are treated as missing.

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

    FT_Get_CMap_Language_ID

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/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 ‘freetype/ttnameid.h’.

    -

    -
    input
    -

    - - -
    charmap -

    The target charmap.

    -
    -
    -
    return
    -

    The language ID of ‘charmap’. If ‘charmap’ doesn't belong to a TrueType/sfnt face, just return 0 as the default value.

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

    FT_Get_CMap_Format

    -
    -Defined in FT_TRUETYPE_TABLES_H (freetype/tttables.h). -

    -
    -
    -  FT_EXPORT( FT_Long )
    -  FT_Get_CMap_Format( FT_CharMap  charmap );
    -
    -

    -
    -

    Return TrueType/sfnt specific cmap format.

    -

    -
    input
    -

    - - -
    charmap -

    The target charmap.

    -
    -
    -
    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 (freetype/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]
    - - - diff --git a/docs/reference/ft2-type1_tables.html b/docs/reference/ft2-type1_tables.html deleted file mode 100644 index a7d1197..0000000 --- a/docs/reference/ft2-type1_tables.html +++ /dev/null @@ -1,689 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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


    - -
    -

    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 (freetype/t1tables.h). -

    -
    -
    -  typedef struct  PS_FontInfoRec_
    -  {
    -    FT_String*  version;
    -    FT_String*  notice;
    -    FT_String*  full_name;
    -    FT_String*  family_name;
    -    FT_String*  weight;
    -    FT_Long     italic_angle;
    -    FT_Bool     is_fixed_pitch;
    -    FT_Short    underline_position;
    -    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 (freetype/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 (freetype/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 (freetype/t1tables.h). -

    -
    -
    -  typedef struct  PS_PrivateRec_
    -  {
    -    FT_Int     unique_id;
    -    FT_Int     lenIV;
    -
    -    FT_Byte    num_blue_values;
    -    FT_Byte    num_other_blues;
    -    FT_Byte    num_family_blues;
    -    FT_Byte    num_family_other_blues;
    -
    -    FT_Short   blue_values[14];
    -    FT_Short   other_blues[10];
    -
    -    FT_Short   family_blues      [14];
    -    FT_Short   family_other_blues[10];
    -
    -    FT_Fixed   blue_scale;
    -    FT_Int     blue_shift;
    -    FT_Int     blue_fuzz;
    -
    -    FT_UShort  standard_width[1];
    -    FT_UShort  standard_height[1];
    -
    -    FT_Byte    num_snap_widths;
    -    FT_Byte    num_snap_heights;
    -    FT_Bool    force_bold;
    -    FT_Bool    round_stem_up;
    -
    -    FT_Short   snap_widths [13];  /* including std width  */
    -    FT_Short   snap_heights[13];  /* including std height */
    -
    -    FT_Fixed   expansion_factor;
    -
    -    FT_Long    language_group;
    -    FT_Long    password;
    -
    -    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 (freetype/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 (freetype/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 (freetype/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 (freetype/t1tables.h). -

    -
    -
    -  typedef struct  CID_FaceDictRec_
    -  {
    -    PS_PrivateRec  private_dict;
    -
    -    FT_UInt        len_buildchar;
    -    FT_Fixed       forcebold_threshold;
    -    FT_Pos         stroke_width;
    -    FT_Fixed       expansion_factor;
    -
    -    FT_Byte        paint_type;
    -    FT_Byte        font_type;
    -    FT_Matrix      font_matrix;
    -    FT_Vector      font_offset;
    -
    -    FT_UInt        num_subrs;
    -    FT_ULong       subrmap_offset;
    -    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 (freetype/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 (freetype/t1tables.h). -

    -
    -
    -  typedef struct  CID_FaceInfoRec_
    -  {
    -    FT_String*      cid_font_name;
    -    FT_Fixed        cid_version;
    -    FT_Int          cid_font_type;
    -
    -    FT_String*      registry;
    -    FT_String*      ordering;
    -    FT_Int          supplement;
    -
    -    PS_FontInfoRec  font_info;
    -    FT_BBox         font_bbox;
    -    FT_ULong        uid_base;
    -
    -    FT_Int          num_xuid;
    -    FT_ULong        xuid[16];
    -
    -    FT_ULong        cidmap_offset;
    -    FT_Int          fd_bytes;
    -    FT_Int          gd_bytes;
    -    FT_ULong        cid_count;
    -
    -    FT_Int          num_dicts;
    -    CID_FaceDict    font_dicts;
    -
    -    FT_ULong        data_offset;
    -
    -  } CID_FaceInfoRec;
    -
    -

    -
    -

    A structure used to represent CID Face information.

    -

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

    CID_FaceInfo

    -
    -Defined in FT_TYPE1_TABLES_H (freetype/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 (freetype/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 (freetype/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 -

    face handle

    -
    -
    -
    return
    -

    Boolean. True if glyph names are reliable.

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

    FT_Get_PS_Font_Info

    -
    -Defined in FT_TYPE1_TABLES_H (freetype/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 -

    PostScript face handle.

    -
    -
    -
    output
    -

    - - -
    afont_info -

    Output font info structure pointer.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 -

    PostScript face handle.

    -
    -
    -
    output
    -

    - - -
    afont_private -

    Output private dictionary structure pointer.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    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 (freetype/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 (freetype/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 (freetype/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 -

    PostScript face handle.

    -
    key -

    An enumeration value representing the dictionary key to retrieve.

    -
    idx -

    For array values, this specifies the index to be returned.

    -
    value -

    A pointer to memory into which to write the value.

    -
    valen_len -

    The size, in bytes, of the memory supplied for the value.

    -
    -
    -
    output
    -

    - - -
    value -

    The value matching the above key, if it exists.

    -
    -
    -
    return
    -

    The amount of memory (in bytes) required to hold the requested value (if it exists, -1 otherwise).

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

    -

    The ‘idx’ parameter is used, not only to retrieve elements of, for example, the FontMatrix or FontBBox, but also to retrieve name keys from the CharStrings dictionary, and the charstrings themselves. It is ignored for atomic values.

    -

    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]
    - - - diff --git a/docs/reference/ft2-user_allocation.html b/docs/reference/ft2-user_allocation.html deleted file mode 100644 index 3868a39..0000000 --- a/docs/reference/ft2-user_allocation.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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/docs/reference/ft2-version.html b/docs/reference/ft2-version.html deleted file mode 100644 index 9136441..0000000 --- a/docs/reference/ft2-version.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -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/freetype.h). -

    -
    -
    -#define FREETYPE_MAJOR  2
    -#define FREETYPE_MINOR  4
    -#define FREETYPE_PATCH  9
    -
    -

    -
    -

    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.

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

    FT_Library_Version

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A source library handle.

    -
    -
    -
    output
    -

    - - - - -
    amajor -

    The major version number.

    -
    aminor -

    The minor version number.

    -
    apatch -

    The patch version number.

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

    A face handle.

    -
    -
    -
    return
    -

    1 if this is a TrueType font that uses one of the patented opcodes, 0 otherwise.

    -
    -
    note
    -

    Since May 2010, TrueType hinting is no longer patented.

    -
    -
    since
    -

    2.3.5

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

    FT_Face_SetUnpatentedHinting

    -
    -Defined in FT_FREETYPE_H (freetype/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 -

    A face handle.

    -
    value -

    New boolean setting.

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

    Since May 2010, TrueType hinting is no longer patented.

    -
    -
    since
    -

    2.3.5

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/reference/ft2-winfnt_fonts.html b/docs/reference/ft2-winfnt_fonts.html deleted file mode 100644 index 3c72039..0000000 --- a/docs/reference/ft2-winfnt_fonts.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - -FreeType-2.4.9 API Reference - - - - - - -
    [Index][TOC]
    -

    FreeType-2.4.9 API Reference

    - -

    -Window FNT Files -

    -

    Synopsis

    - - - -
    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 (freetype/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 in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.

    -

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

    There is no known mapping table available.

    -
    FT_WinFNT_ID_MAC -

    Mac Roman encoding.

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

    -

    The ‘IFIMETRICS’ documentation from the ‘Windows Driver Development Kit’ says: This font supports an OEM-specific character set. The OEM character set is system dependent.

    -

    In general OEM, as opposed to ANSI (i.e., cp1252), denotes the second default codepage that most international versions of Windows have. It is one of the OEM codepages from

    -

    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 -

    A superset of Thai TIS 620 and ISO 8859-11.

    -
    FT_WinFNT_ID_CP932 -

    A superset of Japanese Shift-JIS (with minor deviations).

    -
    FT_WinFNT_ID_CP936 -

    A superset of simplified Chinese GB 2312-1980 (with different ordering and minor deviations).

    -
    FT_WinFNT_ID_CP949 -

    A superset of Korean Hangul KS C 5601-1987 (with different ordering and minor deviations).

    -
    FT_WinFNT_ID_CP950 -

    A superset of traditional Chinese Big 5 ETen (with different ordering and minor deviations).

    -
    FT_WinFNT_ID_CP1250 -

    A superset of East European ISO 8859-2 (with slightly different ordering).

    -
    FT_WinFNT_ID_CP1251 -

    A superset of Russian ISO 8859-5 (with different ordering).

    -
    FT_WinFNT_ID_CP1252 -

    ANSI encoding. A superset of ISO 8859-1.

    -
    FT_WinFNT_ID_CP1253 -

    A superset of Greek ISO 8859-7 (with minor modifications).

    -
    FT_WinFNT_ID_CP1254 -

    A superset of Turkish ISO 8859-9.

    -
    FT_WinFNT_ID_CP1255 -

    A superset of Hebrew ISO 8859-8 (with some modifications).

    -
    FT_WinFNT_ID_CP1256 -

    A superset of Arabic ISO 8859-6 (with different ordering).

    -
    FT_WinFNT_ID_CP1257 -

    A superset of Baltic ISO 8859-13 (with some deviations).

    -
    FT_WinFNT_ID_CP1258 -

    For Vietnamese. This encoding doesn't cover all necessary characters.

    -
    FT_WinFNT_ID_CP1361 -

    Korean (Johab).

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

    FT_WinFNT_HeaderRec

    -
    -Defined in FT_WINFONTS_H (freetype/ftwinfnt.h). -

    -
    -
    -  typedef struct  FT_WinFNT_HeaderRec_
    -  {
    -    FT_UShort  version;
    -    FT_ULong   file_size;
    -    FT_Byte    copyright[60];
    -    FT_UShort  file_type;
    -    FT_UShort  nominal_point_size;
    -    FT_UShort  vertical_resolution;
    -    FT_UShort  horizontal_resolution;
    -    FT_UShort  ascent;
    -    FT_UShort  internal_leading;
    -    FT_UShort  external_leading;
    -    FT_Byte    italic;
    -    FT_Byte    underline;
    -    FT_Byte    strike_out;
    -    FT_UShort  weight;
    -    FT_Byte    charset;
    -    FT_UShort  pixel_width;
    -    FT_UShort  pixel_height;
    -    FT_Byte    pitch_and_family;
    -    FT_UShort  avg_width;
    -    FT_UShort  max_width;
    -    FT_Byte    first_char;
    -    FT_Byte    last_char;
    -    FT_Byte    default_char;
    -    FT_Byte    break_char;
    -    FT_UShort  bytes_per_row;
    -    FT_ULong   device_offset;
    -    FT_ULong   face_name_offset;
    -    FT_ULong   bits_pointer;
    -    FT_ULong   bits_offset;
    -    FT_Byte    reserved;
    -    FT_ULong   flags;
    -    FT_UShort  A_space;
    -    FT_UShort  B_space;
    -    FT_UShort  C_space;
    -    FT_UShort  color_table_offset;
    -    FT_ULong   reserved1[4];
    -
    -  } FT_WinFNT_HeaderRec;
    -
    -

    -
    -

    Windows FNT Header info.

    -

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

    FT_WinFNT_Header

    -
    -Defined in FT_WINFONTS_H (freetype/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 (freetype/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 -

    A handle to the input face.

    -
    -
    -
    output
    -

    - - -
    aheader -

    The WinFNT header.

    -
    -
    -
    return
    -

    FreeType error code. 0 means success.

    -
    -
    note
    -

    This function only works with Windows FNT faces, returning an error otherwise.

    -
    -
    -
    - - -
    [Index][TOC]
    - - - diff --git a/docs/release b/docs/release index 28a8235..98f16cd 100644 --- a/docs/release +++ b/docs/release @@ -1,7 +1,7 @@ How to prepare a new release ---------------------------- -. include/freetype/freetype.h: Update FREETYPE_MAJOR, FREETYPE_MINOR, +. include/freetype.h: Update FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH. . Update version numbers in all files where necessary (for example, do @@ -41,7 +41,8 @@ How to prepare a new release . Run src/tools/chktrcmp.py and check that there are no undefined trace_XXXX macros. -. Tag the git repositories (freetype2, freetype2-demos) with +. After pushing the new release, tag the git repositories (freetype2, + freetype2-demos) with git tag VER- -m "" -u @@ -49,16 +50,21 @@ How to prepare a new release git push --tags - TODO: Tag the home page CVS on savannah.nongnu.org. +. Check with + + git clean -ndx + + that the git directory is really clean (and remove extraneous files + if necessary). . Say `make dist' in both the freetype2 and freetype2-demos modules to generate the .tar.gz, .tar.bz2, and .zip files. . Create the doc bundles (freetype-doc-.tar.gz, freetype-doc-.tar.bz2, ftdoc.zip). This is - everything below + everything in - freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/ + /freetype2/docs except the `reference' subdirectory. Do *not* use option `-l' from zip! @@ -70,7 +76,7 @@ How to prepare a new release #!/bin/sh - VERSION=2.4.8 + VERSION=2.5.1 SAVANNAH_USER=wl SOURCEFORGE_USER=wlemb @@ -154,7 +160,7 @@ How to prepare a new release #!/bin/sh - VERSION=2.4.8 + VERSION=2.5.1 SOURCEFORGE_USER=wlemb ##################################################################### @@ -164,39 +170,26 @@ How to prepare a new release # EOF -. On SourceForge, tag the just uploaded `ftXXXX.zip' and +. On SourceForge, tag the just uploaded `ftXXX.zip' and `freetype-XXX.tar.bz2' files as the default files to download for `Windows' and `Others', respectively. . Copy the reference files (generated by `make dist') to - freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/reference - - and - - shell.sf.net:/home/groups/f/fr/freetype/htdocs/freetype2/docs/reference - - TODO: Create FreeType home page CVS on savannah.nongnu.org and - update it accordingly. - - Write script to automatically do this. - - Mirror FreeType's savannah home page everywhere. - -. Update - - freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/index2.html + /freetype2/docs/reference - and copy it to +. Update the `freetype-web' repository. `git push' then automatically + triggers an update of the public web pages within ten minutes, due + to a cron script (on wl@freedesktop.org) that rsyncs with - shell.sf.net:/home/groups/f/fr/freetype/htdocs/index2.html + freedesktop.org://srv/freetype.freedesktop.org/www . Announce new release on freetype-announce@nongnu.org and to relevant newsgroups. ---------------------------------------------------------------------- -Copyright 2003, 2005-2007, 2009, 2011 by +Copyright 2003, 2005-2007, 2009, 2011-2014 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/ft2demos/ftbench b/ft2demos/ftbench deleted file mode 100755 index a53d00237217971f3a9d60c7566ab73b0a0f193f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46956 zcmeFa4R}=5)i%7(oSDhwWC#N!GC@hruOkEyNM|7MB2Shdj6fR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z0bA=SAI67mfREYm4+B1BgTD*dIuC>TJrDSE8~zYr&VO8K68}5Ep4$OPScp#mSJ~?G z8Q?SSX*hc>(V2*!`=+ECp!aCc8_2*Vr$j0x#09)sz5Z@2jZvT$~ zFSXG-aEs7rgZZn)_WI$B$oSbF4whhnsdym-QivXXn!R3JM?Xw6l z*GGrU`quzHZKH1k?1X)IalBjy*t!Tm1lVW8e~0w(`uN2&fHQ3Pp9AKJt(JX$1=u>f zh4uL@VC&o%!bbo*&Xq&aMhq70tpCHqc~% zbbOp`&rsG0mt4M}Xnt9-;Nx=BV)0M&_|d2Nk+Sv0TkSG@t6Eq%x1wxTF;8~{Pn@Jt z7q08*lxD%l)6(h#_LIU3BG*}j5{<3;rj~(RYI)QnKIFd+--d?k+SK%4e1y{P_-Q^8Lx_%hsG4*}4jfjRv)3x^#@Tj=I=V0=0hw`U_|J(-(SIn9`ys4gT(K|d@wRaePgQa9 HNV0`52l^1` diff --git a/ft2demos/ftdiff b/ft2demos/ftdiff deleted file mode 100755 index e25e76a7f8850c9da77863c0db936ede37083203..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 277845 zcmeF44SZZxng8#+B$=c`drMP{A;1L!1}!j!uvV;e`a)Z@;G{25pxOy-poP#5ZNR#8 zb@EbLN(0kZP+KxAxLcLg07Y4aWy*_SMFk3q71uj6y-X=kilSB*$^ZMiGt*wWpe?)Z z?*H>~KA)R&?sJoO5ozc;_ZOpH;jsA!!knT zonoA<{KTk&VT`)M=RS!52|Pi{>#5{X-R5NRaT}yk1!>BssL{-Ob7%1x#=9Qnk?cMM zhLJ2jn|B+A9@STx${2g~5aX#OBRs3vukwM{2$LTsPfs1i^aw8Xp=UDhlRJyg1m5+O z^IDvaxxD_TU%CG2?ei}?y?ySf?eiC0yX3UR3r{<)eMD|y%O=ywFqR5w-{H}M3|V4jba(#yfI zrO3I2fa3l@hcTV!D4q}TRPpF{dNFYEt>_s%ALcoS=kIv*6U-Oz4Ao2NH;V8wp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#|P>jZP0riSC%B%)D$f|=KMXdt3 tTRE(3ZtmsVDPrp7qx0jds*sFx_^Vs}Xyk-AvR8S6YHUqx3+Gs@_#ea~p2z?I diff --git a/ft2demos/ftgamma b/ft2demos/ftgamma deleted file mode 100755 index 46015e8e0ab243b66973f185e8e85694f031d75d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 252489 zcmeFa3z!tung3ta-80iOv{1-kCOFYTM;((<8=Y*3A<|q#OfWV#ohS)C!YC+03z*cnPi%#QTYoP&4%74Z#9fo!oF=mBVZU+t%hxc z`F6T-s=gwcb1-s zr0J=Ao9Zr|%j zZvB7nE5D2-JgXd^K{$nHI8PH#4Uhj%_}1TC1Y+u@Y%JJiUX_e?@l}I@p zSq?u^4uyB&SAVDT#JyPQ-&9{*_?^Qui6>f4e{VTda4OFwJeTT)zl8Vy(7y(vALlu{ zoOBA|^m1Im2YqpqxW@WV{f+12r+KdA5yedA(ch3#@V5UUbK{KimvhUZpIBq%v@zvS z!H0bDO0=yUxuP6K2+u3WKR|dQPhI)Fr5q|apXU?4_exYW?*BX4|3dsEo(VjkIxOAh z{kU>k2jN7X_m|%*!3pKag_Q(Cjiuy)%~OHXiVwQQumVQPNTeQ}@?MLNR%iB}d7*%* zY^zos^U1wyLO~~Nn2_*v`$8k!NxDbo>#vyfN;no?ZyV-B!!oSYcq1IFow({NCm7Xs zI2@}Dht1#>k=n3r51MO)Me~qQas`4kg(4XXk{yxSdp0ChKg%8Cql1=&(&Fjz4bK-T; zc;!!Wr1JOaawI``MJ16?^nVr4^0U7^VfN+?jlYV0v+IZZe!TIz-qCA6^p(s{J~Ly? z#wSSc`03-j%&UJf=FCrg^mk)_HDizY&DQ>&YrbLL`HjeXZd%x19Q$tr51#Pt`7NVk zk#F9+@UpWv@BI6#PWas{%l`7XNk16ue01#RHZNb(@G0Ymr!^LquURr=+xIp!E`N3C z5PQzoUYl_KbFYl}+fRRbQ*&R-rtg3J_=kVId+!ZvRu25V*`ED+a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gFOUJ9eiJsbL|(#Iz6Rla!fTi+Midnp{KQK#$_L#bQ73$6|L&5x_<3s3y`1YyYSKQ zv5dpWa$|mIeT{_Txq&+7CW`Vr-Qu0NQRyqy?uY$A7vH95DXh%NrPb3lUG&RLnQ3x* zS7v~P!X0R7Wf~8Yu{x&PZn!BdWTM@X4H`c)JDq4RWc_AjV)B{N#z@uJ?w;`7HiaRO zd5mqw}7#%+@?{smfB{R+pWj))sv03LWjk+ACOl~`s3yu5OM3x0fMWk@P^SB+_;SIX^ z)c8hSKdkngq-qiCFWb>n6h2f)Cg*H0Q{) zVB8!U-(~%zM9Q|gd#K8=%`GpKi$BGbTfQaB&5V|Hi)f^|5>UsqPv`|Uh+GE@T{o&1 y^*;3J(&)RV1HUmX?d#+Fb8E}g`c`nWVWKU4;-00_@#9A!+^yZdk~3Pulm83w+ehjE diff --git a/ft2demos/ftlint b/ft2demos/ftlint deleted file mode 100755 index d6482b2d4183e61fe3ffaa54e0ed8143a951540c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29199 zcmb__4R}<=x&NF!yPG`_;Q)aEqAVsLD%m6$kyg|WvYPE_rw!OEl*WSzZtJc~U2&vZEmR_y3YMcM>H*;q9B=tVG z_y63JXEO87yz|aG@4WNQ$IhIybw$HU!!U$?JYu0BwCE-wD&QZwMhK4(z6uc(0i>NL z7BIaxQy@gxoxOlKK%wSa54D^~-UPN!Wyl4%F{caP3r z+8y6e+TC8#9Z&T2htkQ=g(|O&93U%JHLaC-$p`byh9hmTBv^N*Uw-i9j1PU`svpca z@#d_1K2#8Ub>KUh`AAy;H`T#A2Ro|G;5t{nK)E8>BQ*Y14k-p-|!`47DQ+#e>bz4-9Rrq)Yu zU;KkVPn~+nS+Vcz|Kp@Bzne1orH$+64BWhDblo5B9C&Q_(_5C^@K0Or_?OjZhMGR| z_Oic>9zFW|15YpgubbyAU-7~lPkrmpQ}2HKwmIMW;-9CACz~$clX&gbDWAA&OR)Ua z)d%`^oblw#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jFY51`#Hz7!bXEdBsAo9qM66F5_l`t2Y diff --git a/ft2demos/ftmulti b/ft2demos/ftmulti deleted file mode 100755 index 3e484749d7662d121545c30a52668f6a164c5eb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229917 zcmeEv3w%`7wf;UclVlP`I7rYDQ#okRXh9DeHEM+6jfy%zz*K3OKqinH$(RHiYYHb1 z9xADWJj4nzR$HyLZHjuYx7FK0C_b9os!-)3wP$8HOhiR&y_Vif$^ZM#BOJL}!Crgs z|M%;_$$sy>_S$Q$z4qGs?6YLz)Jc*g3Fqe#C4!+9YlSF<+kLfHc!bC)6^ig9?Obs- z(_?#|7Gm$klKDJ?419dZ&nFiT%a&@^V^)YlIf!GrmuU!>wp!01g!wQH(dGk32+evn zJR<}jmS-IEh$J8Q@H~ZrMgMNK%XEMu0!R-ajZYBS_z*5+HJ>R6PieKD35et4q)juL zsuBEeKd1Z!b+vOZsH+}XSG#ag^ZAYS=U-%%l~DrKipkf_G|LhWmKlPFbr<4c-;uIeXwoXHEU-_F*@VJZnt6qh&nOrr}{d%r^-SfBh^+`K}ji(IHa6J5-Z#iPL?M{VTWcx3LdoiA?@D$*= z7SAct$w^xRYIe$4mZleiy(q&I#D=xwcFCW1ra{(iPzjwpB0a z2%olE_KTzlgtYkcaY-n-+VfYJ%pLVzp|tz&N>q&v|K%S4BM&GdbXL@VYwSc z_vWHP*2S^l&y5F;yF;s_AC48<yrNN=QPhi*dflNTI(5_cRYjvs%d9nv*vpTCZq ze=Jp8y2<#4mf51ZAUKq!`(%B7c>nh|IuY9o%^MgMRz_p zbNCh4zV+qh3wyE`TzBP16GjJq^5l2_bn->p{&e#G9q;$=3H_vP^xGA?Q@{Ku5MR`G z(xA(~6kT?3T}$Qr_ubxn_wwF3>sA*@zqoGNzjS`k|6jg*^WaB*C_S_6jSof-ykkSl zFLvK>`pY$!{ci7DtBbZg`KOaF`9b2>Zxvm3+t80@%WF%zMpO>C`RuW`|9;PVNdHDf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demos/ftview b/ft2demos/ftview deleted file mode 100755 index 91e725dfde36ae791fef5b99a510c1d57a68d3eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279965 zcmeF44SZZxng8#+B$=c`J8e>kG1yxO7&L_`M6Fusv@*A+ngvqc7s$ZBTe}fHJW*E?kYajyz5aO$@W8F z7>VLD{uRT}qxwoy8RMWHVmzDaaPw!1{VE@LjUf3!^7PbFOpoAFA9|+pKDDd(wDPW} zlsDb#T)^x9^()msqhrx!XLKwW)3IpDH7ibEzV!67igiQOpjl(er)S%B1&8X?@u=+@ z9*tf3XOA3G{gWk2C;V|s_@ih2P+tK}48+j{u^c&7|fgN+kP5iSwBX~aUq?dw| zoXAwd4>|G62z z&h!&rgYkfHsX>wm9Lbgzt6Y3Oac{%@fv(>(}7K#gSJ!@v8_$TaqUxkLVRj zHbc=NH+w@>M#6|Cc29dxh|Ew|`i_PED$hw2So_#<7wx;j@5=-X4`9tS&ou&Fq>ELJ zjh9V+IS>hKG!0Ly5%P>kOfmw#%GR}Cf1goqHm;3S2G*VHyDWHprD+aXU_e&?Q}xpe3&`^&R1K`dG_VHf4KD0Esgz6TORq;dw=+oJ^QY`Va?z_dD_z7 ziVywHoL6tY_Jo1Y{^g^;xuJf}u*Iid@y7E3>pwQtkDWg6KL_@_I`p6Wem(TO-G7>X z?*|u;JpKFswEB&;%hy(a?8Nq)-q+r;_LkYFd~|fCo_oXhb|1Iq=f6Jt z+K28t<6rh(_}-8Icv7(G;7JE(_J02lm6N~tgDIYChW)Dkqo2KT?eyP{$nXBzkYV?H zb zRo_(m=g|m1wZDPr+U@qMjms7E7j(7vQ?hDY^`8W^J6+}X)8AvR{ENt+>+1h>@*}SD z!^vOaYF~1t-Zh>FDc|gR-%R<yzwd*O{VsT_ zslU?oekt!sSNRs+*Sp5^Z{REB>hCY)yXUKe{CZb=m(X9M>%BnvJ6-jE34Hrp{VgMZ z|2>A$&p1Y)A-+oeg|7Zh@}GCL_rW9P^KSBQ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O>oj`vX%%8&Pnkl~tPmQ$Wcs7ic1=QEORB5A^^qB%jA`n#PjMhj{9#E;S%Jw_@dzi7VXX8Dco``A3J=NHr5 z@v2Mm?OH!p^7kH`^~ydi z^;Dbt6s`?~8keqR{*P=<-SSn=&F&|hRusoU&;WV2hc4@l1#j@l=wLoyaf8dU)TYqw z2%LF3f0b+9Qv|x-uQ|G94HYU)#7)PxJWmYbHq0g8=yvFuxn|{&ZgH$MYKKA-hIK1f z7^}Enm5q~iIxdvjIk<6K#eDXLNQ_1yG_Kqhb?~Z{1?-0_<9Lj6FjrgrSgE%q9o7Rs zB_>%M3Gc%(4sTzcCn@StRQ&kJWxN}sa-!62m+qRu7)OU^GSF~C=4qksFjq zNFUl8Y7v?oO}o6WV{e2T#e_W0u?4{x%FBe@x!Hcye5)AXGE{6im(por%UM||mwuFm zuyWs&A0Ma~&roS~ma751$w-9Zix%%JC)gYc7#|9$p27Krw7jXd4RTBT==2VD%TuEL YbmBgZxB+(0-25DglhOC8yTc~`4Maz', and */ - /* contains system-specific files that are always included first when */ - /* building the library. */ + /* The build directory is usually `builds/', and contains */ + /* system-specific files that are always included first when building */ + /* the library. */ /* */ - /* This ANSI version should stay in `include/freetype/config'. */ + /* This ANSI version should stay in `include/config/'. */ /* */ /*************************************************************************/ @@ -53,7 +53,7 @@ FT_BEGIN_HEADER /* These macros can be toggled to suit a specific system. The current */ /* ones are defaults used to compile FreeType in an ANSI C environment */ /* (16bit compilers are also supported). Copy this file to your own */ - /* `freetype/builds/' directory, and edit it to port the engine. */ + /* `builds/' directory, and edit it to port the engine. */ /* */ /*************************************************************************/ @@ -200,6 +200,30 @@ FT_BEGIN_HEADER /* */ typedef unsigned XXX FT_UInt32; + + /*************************************************************************/ + /* */ + /* */ + /* FT_Int64 */ + /* */ + /* A typedef for a 64bit signed integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef signed XXX FT_Int64; + + + /*************************************************************************/ + /* */ + /* */ + /* FT_UInt64 */ + /* */ + /* A typedef for a 64bit unsigned integer type. The size depends on */ + /* the configuration. Only defined if there is real 64bit support; */ + /* otherwise, it gets emulated with a structure (if necessary). */ + /* */ + typedef unsigned XXX FT_UInt64; + /* */ #endif @@ -239,13 +263,24 @@ FT_BEGIN_HEADER /* FT_LONG64 must be defined if a 64-bit type is available */ #define FT_LONG64 -#define FT_INT64 long +#define FT_INT64 long +#define FT_UINT64 unsigned long -#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + /*************************************************************************/ + /* */ + /* A 64-bit data type may create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ + /* types if __STDC__ is defined. You can however ignore this rule */ + /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __BORLANDC__ ) /* Borland C++ */ @@ -254,7 +289,8 @@ FT_BEGIN_HEADER /* this compiler provides the __int64 type */ #define FT_LONG64 -#define FT_INT64 __int64 +#define FT_INT64 __int64 +#define FT_UINT64 unsigned __int64 #elif defined( __WATCOMC__ ) /* Watcom C++ */ @@ -263,35 +299,24 @@ FT_BEGIN_HEADER #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ #define FT_LONG64 -#define FT_INT64 long long int +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int #elif defined( __GNUC__ ) /* GCC provides the `long long' type */ #define FT_LONG64 -#define FT_INT64 long long int - -#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ - - - /*************************************************************************/ - /* */ - /* A 64-bit data type will create compilation problems if you compile */ - /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ - /* is defined. You can however ignore this rule by defining the */ - /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ - /* */ -#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int -#ifdef __STDC__ - - /* undefine the 64-bit macros in strict ANSI compilation mode */ -#undef FT_LONG64 -#undef FT_INT64 +#endif /* _MSC_VER */ -#endif /* __STDC__ */ +#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ -#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ +#ifdef FT_LONG64 + typedef FT_INT64 FT_Int64; + typedef FT_UINT64 FT_UInt64; +#endif #define FT_BEGIN_STMNT do { @@ -299,147 +324,6 @@ FT_BEGIN_HEADER #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT -#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER - /* Provide assembler fragments for performance-critical functions. */ - /* These must be defined `static __inline__' with GCC. */ - -#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 t, t2; - - - __asm - { - smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ - mov a, t, asr #31 /* a = (hi >> 31) */ - add a, a, #0x8000 /* a += 0x8000 */ - adds t2, t2, a /* t2 += a */ - adc t, t, #0 /* t += carry */ - mov a, t2, lsr #16 /* a = t2 >> 16 */ - orr a, a, t, lsl #16 /* a |= t << 16 */ - } - return a; - } - -#endif /* __CC_ARM || __ARMCC__ */ - - -#ifdef __GNUC__ - -#if defined( __arm__ ) && !defined( __thumb__ ) && \ - !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) -#define FT_MULFIX_ASSEMBLER FT_MulFix_arm - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_arm( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 t, t2; - - - __asm__ __volatile__ ( - "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ - "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ - "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ - "adds %1, %1, %0\n\t" /* %1 += %0 */ - "adc %2, %2, #0\n\t" /* %2 += carry */ - "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ - "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ - : "=r"(a), "=&r"(t2), "=&r"(t) - : "r"(a), "r"(b) ); - return a; - } - -#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */ - -#if defined( __i386__ ) -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline__ FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 result; - - - __asm__ __volatile__ ( - "imul %%edx\n" - "movl %%edx, %%ecx\n" - "sarl $31, %%ecx\n" - "addl $0x8000, %%ecx\n" - "addl %%ecx, %%eax\n" - "adcl $0, %%edx\n" - "shrl $16, %%eax\n" - "shll $16, %%edx\n" - "addl %%edx, %%eax\n" - : "=a"(result), "=d"(b) - : "a"(a), "d"(b) - : "%ecx", "cc" ); - return result; - } - -#endif /* i386 */ - -#endif /* __GNUC__ */ - - -#ifdef _MSC_VER /* Visual C++ */ - -#ifdef _M_IX86 - -#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 - - /* documentation is in freetype.h */ - - static __inline FT_Int32 - FT_MulFix_i386( FT_Int32 a, - FT_Int32 b ) - { - register FT_Int32 result; - - __asm - { - mov eax, a - mov edx, b - imul edx - mov ecx, edx - sar ecx, 31 - add ecx, 8000h - add eax, ecx - adc edx, 0 - shr eax, 16 - shl edx, 16 - add eax, edx - mov result, eax - } - return result; - } - -#endif /* _M_IX86 */ - -#endif /* _MSC_VER */ - -#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ - - -#ifdef FT_CONFIG_OPTION_INLINE_MULFIX -#ifdef FT_MULFIX_ASSEMBLER -#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER -#endif -#endif - - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x @@ -457,6 +341,9 @@ FT_BEGIN_HEADER #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ +#define FT_LOCAL_ARRAY( x ) extern const x +#define FT_LOCAL_ARRAY_DEF( x ) const x + #ifndef FT_BASE diff --git a/include/freetype/config/ftheader.h b/include/config/ftheader.h similarity index 87% rename from include/freetype/config/ftheader.h rename to include/config/ftheader.h index 2a7b8c4..b623629 100644 --- a/include/freetype/config/ftheader.h +++ b/include/config/ftheader.h @@ -4,7 +4,7 @@ /* */ /* Build macros of the FreeType 2 library. */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ +/* Copyright 1996-2008, 2010, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -107,7 +107,7 @@ * */ #ifndef FT_CONFIG_CONFIG_H -#define FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H #endif @@ -122,7 +122,7 @@ * */ #ifndef FT_CONFIG_STANDARD_LIBRARY_H -#define FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H #endif @@ -137,7 +137,7 @@ * */ #ifndef FT_CONFIG_OPTIONS_H -#define FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H #endif @@ -153,7 +153,7 @@ * */ #ifndef FT_CONFIG_MODULES_H -#define FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H #endif /* */ @@ -170,7 +170,7 @@ * base FreeType~2 API. * */ -#define FT_FREETYPE_H +#define FT_FREETYPE_H /************************************************************************* @@ -185,7 +185,7 @@ * It is included by @FT_FREETYPE_H. * */ -#define FT_ERRORS_H +#define FT_ERRORS_H /************************************************************************* @@ -198,7 +198,7 @@ * list of FreeType~2 module error offsets (and messages). * */ -#define FT_MODULE_ERRORS_H +#define FT_MODULE_ERRORS_H /************************************************************************* @@ -214,7 +214,7 @@ * It is included by @FT_FREETYPE_H. * */ -#define FT_SYSTEM_H +#define FT_SYSTEM_H /************************************************************************* @@ -230,7 +230,7 @@ * It is included by @FT_FREETYPE_H. * */ -#define FT_IMAGE_H +#define FT_IMAGE_H /************************************************************************* @@ -245,7 +245,7 @@ * It is included by @FT_FREETYPE_H. * */ -#define FT_TYPES_H +#define FT_TYPES_H /************************************************************************* @@ -260,7 +260,7 @@ * (Most applications will never need to include this file.) * */ -#define FT_LIST_H +#define FT_LIST_H /************************************************************************* @@ -273,7 +273,7 @@ * scalable outline management API of FreeType~2. * */ -#define FT_OUTLINE_H +#define FT_OUTLINE_H /************************************************************************* @@ -286,7 +286,7 @@ * API which manages multiple @FT_Size objects per face. * */ -#define FT_SIZES_H +#define FT_SIZES_H /************************************************************************* @@ -299,7 +299,7 @@ * module management API of FreeType~2. * */ -#define FT_MODULE_H +#define FT_MODULE_H /************************************************************************* @@ -312,7 +312,46 @@ * renderer module management API of FreeType~2. * */ -#define FT_RENDER_H +#define FT_RENDER_H + + + /************************************************************************* + * + * @macro: + * FT_AUTOHINTER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the auto-hinting module. + * + */ +#define FT_AUTOHINTER_H + + + /************************************************************************* + * + * @macro: + * FT_CFF_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the CFF driver module. + * + */ +#define FT_CFF_DRIVER_H + + + /************************************************************************* + * + * @macro: + * FT_TRUETYPE_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the TrueType driver module. + * + */ +#define FT_TRUETYPE_DRIVER_H /************************************************************************* @@ -325,7 +364,7 @@ * types and API specific to the Type~1 format. * */ -#define FT_TYPE1_TABLES_H +#define FT_TYPE1_TABLES_H /************************************************************************* @@ -340,7 +379,7 @@ * definitions, taken from the TrueType and OpenType specifications. * */ -#define FT_TRUETYPE_IDS_H +#define FT_TRUETYPE_IDS_H /************************************************************************* @@ -353,7 +392,7 @@ * types and API specific to the TrueType (as well as OpenType) format. * */ -#define FT_TRUETYPE_TABLES_H +#define FT_TRUETYPE_TABLES_H /************************************************************************* @@ -367,7 +406,7 @@ * SFNT-based font formats (i.e., TrueType and OpenType). * */ -#define FT_TRUETYPE_TAGS_H +#define FT_TRUETYPE_TAGS_H /************************************************************************* @@ -381,7 +420,7 @@ * face. * */ -#define FT_BDF_H +#define FT_BDF_H /************************************************************************* @@ -395,7 +434,7 @@ * face. * */ -#define FT_CID_H +#define FT_CID_H /************************************************************************* @@ -408,7 +447,7 @@ * definitions of an API which supports gzip-compressed files. * */ -#define FT_GZIP_H +#define FT_GZIP_H /************************************************************************* @@ -421,7 +460,7 @@ * definitions of an API which supports LZW-compressed files. * */ -#define FT_LZW_H +#define FT_LZW_H /************************************************************************* @@ -434,7 +473,7 @@ * definitions of an API which supports bzip2-compressed files. * */ -#define FT_BZIP2_H +#define FT_BZIP2_H /************************************************************************* @@ -447,7 +486,7 @@ * definitions of an API which supports Windows FNT files. * */ -#define FT_WINFONTS_H +#define FT_WINFONTS_H /************************************************************************* @@ -460,7 +499,7 @@ * API of the optional glyph management component. * */ -#define FT_GLYPH_H +#define FT_GLYPH_H /************************************************************************* @@ -473,7 +512,7 @@ * API of the optional bitmap conversion component. * */ -#define FT_BITMAP_H +#define FT_BITMAP_H /************************************************************************* @@ -486,7 +525,7 @@ * API of the optional exact bounding box computation routines. * */ -#define FT_BBOX_H +#define FT_BBOX_H /************************************************************************* @@ -499,7 +538,7 @@ * API of the optional FreeType~2 cache sub-system. * */ -#define FT_CACHE_H +#define FT_CACHE_H /************************************************************************* @@ -573,7 +612,7 @@ * compiled on the Mac (note that the base API still works though). * */ -#define FT_MAC_H +#define FT_MAC_H /************************************************************************* @@ -586,7 +625,7 @@ * optional multiple-masters management API of FreeType~2. * */ -#define FT_MULTIPLE_MASTERS_H +#define FT_MULTIPLE_MASTERS_H /************************************************************************* @@ -600,7 +639,7 @@ * SFNT-based font formats (i.e., TrueType and OpenType). * */ -#define FT_SFNT_NAMES_H +#define FT_SFNT_NAMES_H /************************************************************************* @@ -614,7 +653,7 @@ * GPOS, GSUB, JSTF). * */ -#define FT_OPENTYPE_VALIDATE_H +#define FT_OPENTYPE_VALIDATE_H /************************************************************************* @@ -628,7 +667,7 @@ * mort, morx, bsln, just, kern, opbd, trak, prop). * */ -#define FT_GX_VALIDATE_H +#define FT_GX_VALIDATE_H /************************************************************************* @@ -641,7 +680,7 @@ * FreeType~2 API which accesses PFR-specific data. * */ -#define FT_PFR_H +#define FT_PFR_H /************************************************************************* @@ -653,7 +692,7 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which provides functions to stroke outline paths. */ -#define FT_STROKER_H +#define FT_STROKER_H /************************************************************************* @@ -665,7 +704,7 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which performs artificial obliquing and emboldening. */ -#define FT_SYNTHESIS_H +#define FT_SYNTHESIS_H /************************************************************************* @@ -678,7 +717,7 @@ * FreeType~2 API which provides functions specific to the XFree86 and * X.Org X11 servers. */ -#define FT_XFREE86_H +#define FT_XFREE86_H /************************************************************************* @@ -691,7 +730,7 @@ * FreeType~2 API which performs trigonometric computations (e.g., * cosines and arc tangents). */ -#define FT_TRIGONOMETRY_H +#define FT_TRIGONOMETRY_H /************************************************************************* @@ -703,7 +742,7 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which performs color filtering for subpixel rendering. */ -#define FT_LCD_FILTER_H +#define FT_LCD_FILTER_H /************************************************************************* @@ -715,7 +754,7 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which performs color filtering for subpixel rendering. */ -#define FT_UNPATENTED_HINTING_H +#define FT_UNPATENTED_HINTING_H /************************************************************************* @@ -727,7 +766,7 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which performs color filtering for subpixel rendering. */ -#define FT_INCREMENTAL_H +#define FT_INCREMENTAL_H /************************************************************************* @@ -739,7 +778,7 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which returns entries from the TrueType GASP table. */ -#define FT_GASP_H +#define FT_GASP_H /************************************************************************* @@ -751,38 +790,38 @@ * A macro used in #include statements to name the file containing the * FreeType~2 API which returns individual and ranged glyph advances. */ -#define FT_ADVANCES_H +#define FT_ADVANCES_H /* */ -#define FT_ERROR_DEFINITIONS_H +#define FT_ERROR_DEFINITIONS_H /* The internals of the cache sub-system are no longer exposed. We */ /* default to FT_CACHE_H at the moment just in case, but we know of */ /* no rogue client that uses them. */ /* */ -#define FT_CACHE_MANAGER_H -#define FT_CACHE_INTERNAL_MRU_H -#define FT_CACHE_INTERNAL_MANAGER_H -#define FT_CACHE_INTERNAL_CACHE_H -#define FT_CACHE_INTERNAL_GLYPH_H -#define FT_CACHE_INTERNAL_IMAGE_H -#define FT_CACHE_INTERNAL_SBITS_H +#define FT_CACHE_MANAGER_H +#define FT_CACHE_INTERNAL_MRU_H +#define FT_CACHE_INTERNAL_MANAGER_H +#define FT_CACHE_INTERNAL_CACHE_H +#define FT_CACHE_INTERNAL_GLYPH_H +#define FT_CACHE_INTERNAL_IMAGE_H +#define FT_CACHE_INTERNAL_SBITS_H -#define FT_INCREMENTAL_H +#define FT_INCREMENTAL_H -#define FT_TRUETYPE_UNPATENTED_H +#define FT_TRUETYPE_UNPATENTED_H /* - * Include internal headers definitions from + * Include internal headers definitions from * only when building the library. */ #ifdef FT2_BUILD_LIBRARY -#define FT_INTERNAL_INTERNAL_H +#define FT_INTERNAL_INTERNAL_H #include FT_INTERNAL_INTERNAL_H #endif /* FT2_BUILD_LIBRARY */ diff --git a/include/freetype/config/ftmodule.h b/include/config/ftmodule.h similarity index 100% rename from include/freetype/config/ftmodule.h rename to include/config/ftmodule.h diff --git a/include/freetype/config/ftoption.h b/include/config/ftoption.h similarity index 86% rename from include/freetype/config/ftoption.h rename to include/config/ftoption.h index 041e24a..12ca25b 100644 --- a/include/freetype/config/ftoption.h +++ b/include/config/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -38,9 +38,9 @@ FT_BEGIN_HEADER /* library from a single source directory. */ /* */ /* - You can put a copy of this file in your build directory, more */ - /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ - /* is the name of a directory that is included _before_ the FreeType */ - /* include path during compilation. */ + /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */ + /* name of a directory that is included _before_ the FreeType include */ + /* path during compilation. */ /* */ /* The default FreeType Makefiles and Jamfiles use the build */ /* directory `builds/' by default, but you can easily change */ @@ -51,7 +51,7 @@ FT_BEGIN_HEADER /* locate this file during the build. For example, */ /* */ /* #define FT_CONFIG_OPTIONS_H */ - /* #include */ + /* #include */ /* */ /* will use `$BUILD/myftoptions.h' instead of this file for macro */ /* definitions. */ @@ -59,9 +59,9 @@ FT_BEGIN_HEADER /* Note also that you can similarly pre-define the macro */ /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ /* that are statically linked to the library at compile time. By */ - /* default, this file is . */ + /* default, this file is . */ /* */ - /* We highly recommend using the third method whenever possible. */ + /* We highly recommend using the third method whenever possible. */ /* */ /*************************************************************************/ @@ -216,6 +216,33 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* PNG bitmap support. */ + /* */ + /* FreeType now handles loading color bitmap glyphs in the PNG format. */ + /* This requires help from the external libpng library. Uncompressed */ + /* color bitmaps do not need any external libraries and will be */ + /* supported regardless of this configuration. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +#define FT_CONFIG_OPTION_USE_PNG + + + /*************************************************************************/ + /* */ + /* HarfBuzz support. */ + /* */ + /* FreeType uses the HarfBuzz library to improve auto-hinting of */ + /* OpenType fonts. If available, many glyphs not directly addressable */ + /* by a font's character map will be hinted also. */ + /* */ + /* Define this macro if you want to enable this `feature'. */ + /* */ +/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + /*************************************************************************/ + /* */ /* DLL export compilation */ /* */ /* When compiling FreeType as a DLL, some systems/compilers need a */ @@ -514,7 +541,7 @@ FT_BEGIN_HEADER /* does not contain any glyph name though. */ /* */ /* Accessing SFNT names is done through the functions declared in */ - /* `freetype/ftsnames.h'. */ + /* `ftsnames.h'. */ /* */ #define TT_CONFIG_OPTION_SFNT_NAMES @@ -560,6 +587,28 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ + /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ + /* replaces the native TrueType hinting mechanism when anything but */ + /* FT_RENDER_MODE_MONO is requested. */ + /* */ + /* Enabling this causes the TrueType driver to ignore instructions under */ + /* certain conditions. This is done in accordance with the guide here, */ + /* with some minor differences: */ + /* */ + /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* */ + /* By undefining this, you only compile the code necessary to hint */ + /* TrueType glyphs with native TT hinting. */ + /* */ + /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ + /* defined. */ + /* */ +/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + + /*************************************************************************/ + /* */ /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ /* of the TrueType bytecode interpreter is used that doesn't implement */ /* any of the patented opcodes and algorithms. The patents related to */ @@ -669,7 +718,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ /* required. */ /* */ @@ -716,6 +765,49 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ /**** ****/ + /**** C F F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */ + /* possible to set up the default values of the four control points that */ + /* define the stem darkening behaviour of the (new) CFF engine. For */ + /* more details please read the documentation of the */ + /* `darkening-parameters' property of the cff driver module (file */ + /* `ftcffdrv.h'), which allows the control at run-time. */ + /* */ + /* Do *not* undefine these macros! */ + /* */ +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 + +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 +#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 + + + /*************************************************************************/ + /* */ + /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the cff driver module. */ + /* */ +/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ @@ -752,37 +844,10 @@ FT_BEGIN_HEADER /* - * Define this variable if you want to keep the layout of internal - * structures that was used prior to FreeType 2.2. This also compiles in - * a few obsolete functions to avoid linking problems on typical Unix - * distributions. - * - * For embedded systems or building a new distribution from scratch, it - * is recommended to disable the macro since it reduces the library's code - * size and activates a few memory-saving optimizations as well. - */ -#define FT_CONFIG_OPTION_OLD_INTERNALS - - - /* - * To detect legacy cache-lookup call from a rogue client (<= 2.1.7), - * we restrict the number of charmaps in a font. The current API of - * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API - * takes charcode only. To determine the passed value is for cmap_index - * or charcode, the possible cmap_index is restricted not to exceed - * the minimum possible charcode by a rogue client. It is also very - * unlikely that a rogue client is interested in Unicode values 0 to 15. - * - * NOTE: The original threshold was 4 deduced from popular number of - * cmap subtables in UCS-4 TrueType fonts, but now it is not - * irregular for OpenType fonts to have more than 4 subtables, - * because variation selector subtables are available for Apple - * and Microsoft platforms. + * This macro is obsolete. Support has been removed in FreeType + * version 2.5. */ - -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS -#define FT_MAX_CHARMAP_CACHEABLE 15 -#endif +/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ /* @@ -796,6 +861,35 @@ FT_BEGIN_HEADER #define TT_USE_BYTECODE_INTERPRETER #endif + + /* + * Check CFF darkening parameters. The checks are the same as in function + * `cff_property_set' in file `cffdrivr.c'. + */ +#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ + \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ + CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 +#error "Invalid CFF darkening parameters!" +#endif + FT_END_HEADER diff --git a/include/freetype/config/ftstdlib.h b/include/config/ftstdlib.h similarity index 98% rename from include/freetype/config/ftstdlib.h rename to include/config/ftstdlib.h index 11d5d0e..b940efc 100644 --- a/include/freetype/config/ftstdlib.h +++ b/include/config/ftstdlib.h @@ -5,7 +5,7 @@ /* ANSI-specific library and header configuration file (specification */ /* only). */ /* */ -/* Copyright 2002-2007, 2009, 2011 by */ +/* Copyright 2002-2007, 2009, 2011-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -159,7 +159,7 @@ /* on certain platforms */ #define ft_longjmp longjmp -#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */ +#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */ /* the following is only used for debugging purposes, i.e., if */ diff --git a/include/freetype/freetype.h b/include/freetype.h similarity index 93% rename from include/freetype/freetype.h rename to include/freetype.h index 63c291a..27fd44b 100644 --- a/include/freetype/freetype.h +++ b/include/freetype.h @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,6 +16,10 @@ /***************************************************************************/ +#ifndef __FREETYPE_H__ +#define __FREETYPE_H__ + + #ifndef FT_FREETYPE_H #error "`ft2build.h' hasn't been included yet!" #error "Please always use macros to include FreeType header files." @@ -25,14 +29,10 @@ #endif -#ifndef __FREETYPE_H__ -#define __FREETYPE_H__ - - #include #include FT_CONFIG_CONFIG_H -#include FT_ERRORS_H #include FT_TYPES_H +#include FT_ERRORS_H FT_BEGIN_HEADER @@ -42,6 +42,38 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /*

    */ + /* 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> */ /* user_allocation */ /* */ /* <Title> */ @@ -81,7 +113,8 @@ FT_BEGIN_HEADER /* The FreeType~2 base font interface. */ /* */ /* <Description> */ - /* This section describes the public high-level API of FreeType~2. */ + /* This section describes the most important public high-level API */ + /* functions of FreeType~2. */ /* */ /* <Order> */ /* FT_Library */ @@ -90,6 +123,7 @@ FT_BEGIN_HEADER /* FT_GlyphSlot */ /* FT_CharMap */ /* FT_Encoding */ + /* FT_ENC_TAG */ /* */ /* FT_FaceRec */ /* */ @@ -98,13 +132,30 @@ FT_BEGIN_HEADER /* FT_FACE_FLAG_FIXED_WIDTH */ /* FT_FACE_FLAG_HORIZONTAL */ /* FT_FACE_FLAG_VERTICAL */ + /* FT_FACE_FLAG_COLOR */ /* FT_FACE_FLAG_SFNT */ + /* FT_FACE_FLAG_CID_KEYED */ + /* FT_FACE_FLAG_TRICKY */ /* FT_FACE_FLAG_KERNING */ /* FT_FACE_FLAG_MULTIPLE_MASTERS */ /* FT_FACE_FLAG_GLYPH_NAMES */ /* FT_FACE_FLAG_EXTERNAL_STREAM */ - /* FT_FACE_FLAG_FAST_GLYPHS */ /* FT_FACE_FLAG_HINTER */ + /* FT_FACE_FLAG_TRICKY */ + /* */ + /* FT_HAS_HORIZONTAL */ + /* FT_HAS_VERTICAL */ + /* FT_HAS_KERNING */ + /* FT_HAS_FIXED_SIZES */ + /* FT_HAS_GLYPH_NAMES */ + /* FT_HAS_MULTIPLE_MASTERS */ + /* FT_HAS_COLOR */ + /* */ + /* FT_IS_SFNT */ + /* FT_IS_SCALABLE */ + /* FT_IS_FIXED_WIDTH */ + /* FT_IS_CID_KEYED */ + /* FT_IS_TRICKY */ /* */ /* FT_STYLE_FLAG_BOLD */ /* FT_STYLE_FLAG_ITALIC */ @@ -123,6 +174,7 @@ FT_BEGIN_HEADER /* */ /* FT_New_Face */ /* FT_Done_Face */ + /* FT_Reference_Face */ /* FT_New_Memory_Face */ /* FT_Open_Face */ /* FT_Open_Args */ @@ -135,10 +187,13 @@ FT_BEGIN_HEADER /* FT_Request_Size */ /* FT_Select_Size */ /* FT_Size_Request_Type */ + /* FT_Size_RequestRec */ /* FT_Size_Request */ /* FT_Set_Transform */ /* FT_Load_Glyph */ /* FT_Get_Char_Index */ + /* FT_Get_First_Char */ + /* FT_Get_Next_Char */ /* FT_Get_Name_Index */ /* FT_Load_Char */ /* */ @@ -155,11 +210,11 @@ FT_BEGIN_HEADER /* FT_LOAD_NO_SCALE */ /* FT_LOAD_NO_HINTING */ /* FT_LOAD_NO_BITMAP */ - /* FT_LOAD_CROP_BITMAP */ + /* FT_LOAD_NO_AUTOHINT */ + /* FT_LOAD_COLOR */ /* */ /* FT_LOAD_VERTICAL_LAYOUT */ /* FT_LOAD_IGNORE_TRANSFORM */ - /* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */ /* FT_LOAD_FORCE_AUTOHINT */ /* FT_LOAD_NO_RECURSE */ /* FT_LOAD_PEDANTIC */ @@ -170,6 +225,8 @@ FT_BEGIN_HEADER /* FT_LOAD_TARGET_LCD */ /* FT_LOAD_TARGET_LCD_V */ /* */ + /* FT_LOAD_TARGET_MODE */ + /* */ /* FT_Render_Glyph */ /* FT_Render_Mode */ /* FT_Get_Kerning */ @@ -183,14 +240,22 @@ FT_BEGIN_HEADER /* FT_Set_Charmap */ /* FT_Get_Charmap_Index */ /* */ - /* FT_FSTYPE_INSTALLABLE_EMBEDDING */ - /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING */ - /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING */ - /* FT_FSTYPE_EDITABLE_EMBEDDING */ - /* FT_FSTYPE_NO_SUBSETTING */ - /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY */ - /* */ /* FT_Get_FSType_Flags */ + /* FT_Get_SubGlyph_Info */ + /* */ + /* FT_Face_Internal */ + /* FT_Size_Internal */ + /* FT_Slot_Internal */ + /* */ + /* FT_FACE_FLAG_XXX */ + /* FT_STYLE_FLAG_XXX */ + /* FT_OPEN_XXX */ + /* FT_LOAD_XXX */ + /* FT_LOAD_TARGET_XXX */ + /* FT_SUBGLYPH_FLAG_XXX */ + /* FT_FSTYPE_XXX */ + /* */ + /* FT_HAS_FAST_GLYPHS */ /* */ /*************************************************************************/ @@ -237,6 +302,10 @@ FT_BEGIN_HEADER /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ /* dimensions of the hinted glyph (in case hinting is applicable). */ /* */ + /* Stroking a glyph with an outside border does not increase */ + /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */ + /* values to account for the added width and height. */ + /* */ typedef struct FT_Glyph_Metrics_ { FT_Pos width; @@ -325,18 +394,27 @@ FT_BEGIN_HEADER /* It also embeds a memory manager (see @FT_Memory), as well as a */ /* scan-line converter object (see @FT_Raster). */ /* */ - /* For multi-threading applications each thread should have its own */ - /* FT_Library object. */ + /* In multi-threaded applications, make sure that the same FT_Library */ + /* object or any of its children doesn't get accessed in parallel. */ /* */ /* <Note> */ /* Library objects are normally created by @FT_Init_FreeType, and */ - /* destroyed with @FT_Done_FreeType. */ + /* destroyed with @FT_Done_FreeType. If you need reference-counting */ + /* (cf. @FT_Reference_Library), use @FT_New_Library and */ + /* @FT_Done_Library. */ /* */ typedef struct FT_LibraryRec_ *FT_Library; /*************************************************************************/ /* */ + /* <Section> */ + /* module_management */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ /* <Type> */ /* FT_Module */ /* */ @@ -376,6 +454,13 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* <Section> */ + /* base_interface */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ /* <Type> */ /* FT_Face */ /* */ @@ -411,7 +496,8 @@ FT_BEGIN_HEADER /* <Note> */ /* Each @FT_Face has an _active_ @FT_Size object that is used by */ /* functions like @FT_Load_Glyph to determine the scaling */ - /* transformation which is used to load and hint glyphs and metrics. */ + /* transformation that in turn is used to load and hint glyphs and */ + /* metrics. */ /* */ /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ /* @FT_Request_Size or even @FT_Select_Size to change the content */ @@ -546,11 +632,12 @@ FT_BEGIN_HEADER /* FT_ENCODING_MS_SYMBOL :: */ /* Corresponds to the Microsoft Symbol encoding, used to encode */ /* mathematical symbols in the 32..255 character code range. For */ - /* more information, see `http://www.ceviz.net/symbol.htm'. */ + /* more information, see */ + /* `http://www.kostis.net/charsets/symbol.htm'. */ /* */ /* FT_ENCODING_SJIS :: */ /* Corresponds to Japanese SJIS encoding. More info at */ - /* at `http://langsupport.japanreference.com/encoding.shtml'. */ + /* at `http://en.wikipedia.org/wiki/Shift_JIS'. */ /* See note on multi-byte encodings below. */ /* */ /* FT_ENCODING_GB2312 :: */ @@ -564,7 +651,7 @@ FT_BEGIN_HEADER /* FT_ENCODING_WANSUNG :: */ /* Corresponds to the Korean encoding system known as Wansung. */ /* For more information see */ - /* `http://www.microsoft.com/typography/unicode/949.txt'. */ + /* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */ /* */ /* FT_ENCODING_JOHAB :: */ /* The Korean standard character set (KS~C 5601-1992), which */ @@ -639,10 +726,10 @@ FT_BEGIN_HEADER /* FT_ENCODING_APPLE_ROMAN). */ /* */ /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ - /* @FT_Get_CMap_Language_ID to query the Mac language ID which may */ + /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */ /* be needed to be able to distinguish Apple encoding variants. See */ /* */ - /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */ + /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */ /* */ /* to get an idea how to do that. Basically, if the language ID */ /* is~0, don't use it, otherwise subtract 1 from the language ID. */ @@ -684,15 +771,8 @@ FT_BEGIN_HEADER } FT_Encoding; - /*************************************************************************/ - /* */ - /* <Enum> */ - /* ft_encoding_xxx */ - /* */ - /* <Description> */ - /* These constants are deprecated; use the corresponding @FT_Encoding */ - /* values instead. */ - /* */ + /* these constants are deprecated; use the corresponding `FT_Encoding' */ + /* values instead */ #define ft_encoding_none FT_ENCODING_NONE #define ft_encoding_unicode FT_ENCODING_UNICODE #define ft_encoding_symbol FT_ENCODING_MS_SYMBOL @@ -802,7 +882,7 @@ FT_BEGIN_HEADER /* highest CID used in the font. */ /* */ /* family_name :: The face's family name. This is an ASCII */ - /* string, usually in English, which describes */ + /* string, usually in English, that describes */ /* the typeface's family (like `Times New */ /* Roman', `Bodoni', `Garamond', etc). This */ /* is a least common denominator used to list */ @@ -814,7 +894,7 @@ FT_BEGIN_HEADER /* PDF file). */ /* */ /* style_name :: The face's style name. This is an ASCII */ - /* string, usually in English, which describes */ + /* string, usually in English, that describes */ /* the typeface's style (like `Italic', */ /* `Bold', `Condensed', etc). Not all font */ /* formats provide a style name, so this field */ @@ -844,8 +924,8 @@ FT_BEGIN_HEADER /* expressed in font units (see */ /* `units_per_EM'). The box is large enough */ /* to contain any glyph from the font. Thus, */ - /* `bbox.yMax' can be seen as the `maximal */ - /* ascender', and `bbox.yMin' as the `minimal */ + /* `bbox.yMax' can be seen as the `maximum */ + /* ascender', and `bbox.yMin' as the `minimum */ /* descender'. Only relevant for scalable */ /* formats. */ /* */ @@ -871,19 +951,22 @@ FT_BEGIN_HEADER /* usually negative. Only relevant for */ /* scalable formats. */ /* */ - /* height :: The height is the vertical distance */ + /* height :: This value is the vertical distance */ /* between two consecutive baselines, */ /* expressed in font units. It is always */ /* positive. Only relevant for scalable */ /* formats. */ /* */ - /* max_advance_width :: The maximal advance width, in font units, */ + /* If you want the global glyph height, use */ + /* `ascender - descender'. */ + /* */ + /* max_advance_width :: The maximum advance width, in font units, */ /* for all glyphs in this face. This can be */ /* used to make word wrapping computations */ /* faster. Only relevant for scalable */ /* formats. */ /* */ - /* max_advance_height :: The maximal advance height, in font units, */ + /* max_advance_height :: The maximum advance height, in font units, */ /* for all glyphs in this face. This is only */ /* relevant for vertical layouts, and is set */ /* to `height' for fonts that do not provide */ @@ -1045,7 +1128,7 @@ FT_BEGIN_HEADER /* exist make FT_Load_Glyph return successfully; in all other cases */ /* you get an `FT_Err_Invalid_Argument' error. */ /* */ - /* Note that CID-keyed fonts which are in an SFNT wrapper don't */ + /* Note that CID-keyed fonts that are in an SFNT wrapper don't */ /* have this flag set since the glyphs are accessed in the normal */ /* way (using contiguous indices); the `CID-ness' isn't visible to */ /* the application. */ @@ -1053,7 +1136,7 @@ FT_BEGIN_HEADER /* FT_FACE_FLAG_TRICKY :: */ /* Set if the font is `tricky', this is, it always needs the */ /* font format's native hinting engine to get a reasonable result. */ - /* A typical example is the Chinese font `mingli.ttf' which uses */ + /* A typical example is the Chinese font `mingli.ttf' that uses */ /* TrueType bytecode instructions to move and scale all of its */ /* subglyphs. */ /* */ @@ -1066,6 +1149,10 @@ FT_BEGIN_HEADER /* Currently, there are about a dozen TrueType fonts in the list of */ /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ /* */ + /* FT_FACE_FLAG_COLOR :: */ + /* Set if the font has color glyph tables. To access color glyphs */ + /* use @FT_LOAD_COLOR. */ + /* */ #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) #define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) @@ -1080,6 +1167,7 @@ FT_BEGIN_HEADER #define FT_FACE_FLAG_HINTER ( 1L << 11 ) #define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) #define FT_FACE_FLAG_TRICKY ( 1L << 13 ) +#define FT_FACE_FLAG_COLOR ( 1L << 14 ) /************************************************************************* @@ -1105,8 +1193,8 @@ FT_BEGIN_HEADER * FT_HAS_VERTICAL( face ) * * @description: - * A macro that returns true whenever a face object contains vertical - * metrics. + * A macro that returns true whenever a face object contains real + * vertical metrics (and not only synthesized ones). * */ #define FT_HAS_VERTICAL( face ) \ @@ -1264,6 +1352,20 @@ FT_BEGIN_HEADER ( face->face_flags & FT_FACE_FLAG_TRICKY ) + /************************************************************************* + * + * @macro: + * FT_HAS_COLOR( face ) + * + * @description: + * A macro that returns true whenever a face object contains + * tables for color glyphs. + * + */ +#define FT_HAS_COLOR( face ) \ + ( face->face_flags & FT_FACE_FLAG_COLOR ) + + /*************************************************************************/ /* */ /* <Const> */ @@ -1338,7 +1440,7 @@ FT_BEGIN_HEADER /* height :: The height in 26.6 fractional pixels. See */ /* @FT_FaceRec for the details. */ /* */ - /* max_advance :: The maximal advance width in 26.6 fractional */ + /* max_advance :: The maximum advance width in 26.6 fractional */ /* pixels. See @FT_FaceRec for the details. */ /* */ /* <Note> */ @@ -1385,9 +1487,9 @@ FT_BEGIN_HEADER /* <Fields> */ /* face :: Handle to the parent face object. */ /* */ - /* generic :: A typeless pointer, which is unused by the FreeType */ - /* library or any of its drivers. It can be used by */ - /* client applications to link their own data to each size */ + /* generic :: A typeless pointer, unused by the FreeType library or */ + /* any of its drivers. It can be used by client */ + /* applications to link their own data to each size */ /* object. */ /* */ /* metrics :: Metrics for this size object. This field is read-only. */ @@ -1455,10 +1557,10 @@ FT_BEGIN_HEADER /* listed through a direct, single-linked list */ /* using its `next' field. */ /* */ - /* generic :: A typeless pointer which is unused by the */ - /* FreeType library or any of its drivers. It */ - /* can be used by client applications to link */ - /* their own data to each glyph slot object. */ + /* generic :: A typeless pointer unused by the FreeType */ + /* library or any of its drivers. It can be */ + /* used by client applications to link their own */ + /* data to each glyph slot object. */ /* */ /* metrics :: The metrics of the last loaded glyph in the */ /* slot. The returned values depend on the last */ @@ -1485,8 +1587,8 @@ FT_BEGIN_HEADER /* */ /* advance :: This shorthand is, depending on */ /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ - /* advance width for the glyph (in 26.6 */ - /* fractional pixel format). As specified with */ + /* (hinted) advance width for the glyph, in 26.6 */ + /* fractional pixel format. As specified with */ /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ /* `horiAdvance' or the `vertAdvance' value of */ /* `metrics' field. */ @@ -1505,15 +1607,15 @@ FT_BEGIN_HEADER /* change between calls of @FT_Load_Glyph and a */ /* few other functions. */ /* */ - /* bitmap_left :: This is the bitmap's left bearing expressed */ - /* in integer pixels. Of course, this is only */ - /* valid if the format is */ - /* @FT_GLYPH_FORMAT_BITMAP. */ + /* bitmap_left :: The bitmap's left bearing expressed in */ + /* integer pixels. Only valid if the format is */ + /* @FT_GLYPH_FORMAT_BITMAP, this is, if the */ + /* glyph slot contains a bitmap. */ /* */ - /* bitmap_top :: This is the bitmap's top bearing expressed in */ - /* integer pixels. Remember that this is the */ - /* distance from the baseline to the top-most */ - /* glyph scanline, upwards y~coordinates being */ + /* bitmap_top :: The bitmap's top bearing expressed in integer */ + /* pixels. Remember that this is the distance */ + /* from the baseline to the top-most glyph */ + /* scanline, upwards y~coordinates being */ /* *positive*. */ /* */ /* outline :: The outline descriptor for the current glyph */ @@ -1527,7 +1629,6 @@ FT_BEGIN_HEADER /* This field is only valid for the composite */ /* glyph format that should normally only be */ /* loaded with the @FT_LOAD_NO_RECURSE flag. */ - /* For now this is internal to FreeType. */ /* */ /* subglyphs :: An array of subglyph descriptors for */ /* composite glyphs. There are `num_subglyphs' */ @@ -1575,7 +1676,7 @@ FT_BEGIN_HEADER /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ /* */ /* <Note> */ - /* Here a small pseudo code fragment which shows how to use */ + /* Here a small pseudo code fragment that shows how to use */ /* `lsb_delta' and `rsb_delta': */ /* */ /* { */ @@ -1671,6 +1772,9 @@ FT_BEGIN_HEADER /* For multi-threading applications each thread should have its own */ /* FT_Library object. */ /* */ + /* If you need reference-counting (cf. @FT_Reference_Library), use */ + /* @FT_New_Library and @FT_Done_Library. */ + /* */ FT_EXPORT( FT_Error ) FT_Init_FreeType( FT_Library *alibrary ); @@ -1715,16 +1819,6 @@ FT_BEGIN_HEADER /* */ /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ /* */ - /* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */ - /* */ - /* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */ - /* */ - /* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */ - /* */ - /* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */ - /* */ - /* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */ - /* */ /* <Note> */ /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ /* flags are mutually exclusive. */ @@ -1735,11 +1829,14 @@ FT_BEGIN_HEADER #define FT_OPEN_DRIVER 0x8 #define FT_OPEN_PARAMS 0x10 -#define ft_open_memory FT_OPEN_MEMORY /* deprecated */ -#define ft_open_stream FT_OPEN_STREAM /* deprecated */ -#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */ -#define ft_open_driver FT_OPEN_DRIVER /* deprecated */ -#define ft_open_params FT_OPEN_PARAMS /* deprecated */ + + /* these constants are deprecated; use the corresponding `FT_OPEN_XXX' */ + /* values instead */ +#define ft_open_memory FT_OPEN_MEMORY +#define ft_open_stream FT_OPEN_STREAM +#define ft_open_pathname FT_OPEN_PATHNAME +#define ft_open_driver FT_OPEN_DRIVER +#define ft_open_params FT_OPEN_PARAMS /*************************************************************************/ @@ -1801,25 +1898,25 @@ FT_BEGIN_HEADER /* opening a new face. */ /* */ /* <Note> */ - /* The stream type is determined by the contents of `flags' which */ + /* The stream type is determined by the contents of `flags' that */ /* are tested in the following order by @FT_Open_Face: */ /* */ - /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */ + /* If the @FT_OPEN_MEMORY bit is set, assume that this is a */ /* memory file of `memory_size' bytes, located at `memory_address'. */ /* The data are are not copied, and the client is responsible for */ /* releasing and destroying them _after_ the corresponding call to */ /* @FT_Done_Face. */ /* */ - /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */ + /* Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a */ /* custom input stream `stream' is used. */ /* */ - /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */ + /* Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this */ /* is a normal file and use `pathname' to open it. */ /* */ - /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to */ + /* If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to */ /* open the file with the driver whose handler is in `driver'. */ /* */ - /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */ + /* If the @FT_OPEN_PARAMS bit is set, the parameters given by */ /* `num_params' and `params' is used. They are ignored otherwise. */ /* */ /* Ideally, both the `pathname' and `params' fields should be tagged */ @@ -1865,6 +1962,10 @@ FT_BEGIN_HEADER /* <Return> */ /* FreeType error code. 0~means success. */ /* */ + /* <Note> */ + /* Use @FT_Done_Face to destroy the created @FT_Face object (along */ + /* with its slot and sizes). */ + /* */ FT_EXPORT( FT_Error ) FT_New_Face( FT_Library library, const char* filepathname, @@ -1878,7 +1979,7 @@ FT_BEGIN_HEADER /* FT_New_Memory_Face */ /* */ /* <Description> */ - /* This function calls @FT_Open_Face to open a font which has been */ + /* This function calls @FT_Open_Face to open a font that has been */ /* loaded into memory. */ /* */ /* <InOut> */ @@ -1924,7 +2025,7 @@ FT_BEGIN_HEADER /* library :: A handle to the library resource. */ /* */ /* <Input> */ - /* args :: A pointer to an `FT_Open_Args' structure which must */ + /* args :: A pointer to an `FT_Open_Args' structure that must */ /* be filled by the caller. */ /* */ /* face_index :: The index of the face within the font. The first */ @@ -1940,7 +2041,7 @@ FT_BEGIN_HEADER /* */ /* <Note> */ /* Unlike FreeType 1.x, this function automatically creates a glyph */ - /* slot for the face object which can be accessed directly through */ + /* slot for the face object that can be accessed directly through */ /* `face->glyph'. */ /* */ /* FT_Open_Face can be used to quickly check whether the font */ @@ -1949,7 +2050,7 @@ FT_BEGIN_HEADER /* if the font format is recognized, or non-zero otherwise; */ /* the function returns a more or less empty face handle in `*aface' */ /* (if `aface' isn't NULL). The only useful field in this special */ - /* case is `face->num_faces' which gives the number of faces within */ + /* case is `face->num_faces' that gives the number of faces within */ /* the font file. After examination, the returned @FT_Face structure */ /* should be deallocated with a call to @FT_Done_Face. */ /* */ @@ -2007,7 +2108,7 @@ FT_BEGIN_HEADER /* face :: The target face object. */ /* */ /* <Input> */ - /* parameters :: A pointer to @FT_Open_Args which must be filled by */ + /* parameters :: A pointer to @FT_Open_Args that must be filled by */ /* the caller. */ /* */ /* <Return> */ @@ -2038,7 +2139,7 @@ FT_BEGIN_HEADER /* then only destroys a face if the counter is~1, otherwise it simply */ /* decrements the counter. */ /* */ - /* This function helps in managing life-cycles of structures which */ + /* This function helps in managing life-cycles of structures that */ /* reference @FT_Face objects. */ /* */ /* <Input> */ @@ -2227,6 +2328,14 @@ FT_BEGIN_HEADER /* particular bitmap strike. Use @FT_Select_Size instead in that */ /* case. */ /* */ + /* The relation between the requested size and the resulting glyph */ + /* size is dependent entirely on how the size is defined in the */ + /* source face. The font designer chooses the final size of each */ + /* glyph relative to this size. For more information refer to */ + /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ FT_EXPORT( FT_Error ) FT_Request_Size( FT_Face face, FT_Size_Request req ); @@ -2296,6 +2405,13 @@ FT_BEGIN_HEADER /* <Return> */ /* FreeType error code. 0~means success. */ /* */ + /* <Note> */ + /* You should not rely on the resulting glyphs matching, or being */ + /* constrained, to this pixel size. Refer to @FT_Request_Size to */ + /* understand how requested sizes relate to actual sizes. */ + /* */ + /* Don't use this function if you are using the FreeType cache API. */ + /* */ FT_EXPORT( FT_Error ) FT_Set_Pixel_Sizes( FT_Face face, FT_UInt pixel_width, @@ -2334,7 +2450,7 @@ FT_BEGIN_HEADER /* the details. */ /* */ /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ - /* returned for invalid CID values (this is, for CID values which */ + /* returned for invalid CID values (this is, for CID values that */ /* don't have a corresponding glyph in the font). See the discussion */ /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ /* */ @@ -2409,14 +2525,20 @@ FT_BEGIN_HEADER * behaviour to more specific and useful cases. * * FT_LOAD_NO_SCALE :: - * Don't scale the outline glyph loaded, but keep it in font units. + * Don't scale the loaded outline glyph but keep it in font units. * * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and * unsets @FT_LOAD_RENDER. * + * If the font is `tricky' (see @FT_FACE_FLAG_TRICKY for more), using + * FT_LOAD_NO_SCALE usually yields meaningless outlines because the + * subglyphs must be scaled and positioned with hinting instructions. + * This can be solved by loading the font without FT_LOAD_NO_SCALE and + * setting the character size to `font->units_per_EM'. + * * FT_LOAD_NO_HINTING :: - * Disable hinting. This generally generates `blurrier' bitmap glyph - * when the glyph is rendered in any of the anti-aliased modes. See + * Disable hinting. This generally generates `blurrier' bitmap glyphs + * when the glyph are rendered in any of the anti-aliased modes. See * also the note below. * * This flag is implied by @FT_LOAD_NO_SCALE. @@ -2435,18 +2557,19 @@ FT_BEGIN_HEADER * @FT_LOAD_NO_SCALE always sets this flag. * * FT_LOAD_VERTICAL_LAYOUT :: - * Load the glyph for vertical text layout. _Don't_ use it as it is - * problematic currently. + * Load the glyph for vertical text layout. In particular, the + * `advance' value in the @FT_GlyphSlotRec structure is set to the + * `vertAdvance' value of the `metrics' field. + * + * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use + * this flag currently. Reason is that in this case vertical metrics + * get synthesized, and those values are not always consistent across + * various font formats. * * FT_LOAD_FORCE_AUTOHINT :: * Indicates that the auto-hinter is preferred over the font's native * hinter. See also the note below. * - * FT_LOAD_CROP_BITMAP :: - * Indicates that the font driver should crop the loaded bitmap glyph - * (i.e., remove all space around its black bits). Not all drivers - * implement this. - * * FT_LOAD_PEDANTIC :: * Indicates that the font driver should perform pedantic verifications * during glyph loading. This is mostly used to detect broken glyphs @@ -2457,18 +2580,12 @@ FT_BEGIN_HEADER * result in partially hinted or distorted glyphs in case a glyph's * bytecode is buggy. * - * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: - * Ignored. Deprecated. - * * FT_LOAD_NO_RECURSE :: - * This flag is only used internally. It merely indicates that the - * font driver should not load composite glyphs recursively. Instead, - * it should set the `num_subglyph' and `subglyphs' values of the - * glyph slot accordingly, and set `glyph->format' to - * @FT_GLYPH_FORMAT_COMPOSITE. - * - * The description of sub-glyphs is not available to client - * applications for now. + * Indicate that the font driver should not load composite glyphs + * recursively. Instead, it should set the `num_subglyph' and + * `subglyphs' values of the glyph slot accordingly, and set + * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of + * subglyphs can then be accessed with @FT_Get_SubGlyph_Info. * * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. * @@ -2493,6 +2610,20 @@ FT_BEGIN_HEADER * FT_LOAD_NO_AUTOHINT :: * Disable auto-hinter. See also the note below. * + * FT_LOAD_COLOR :: + * This flag is used to request loading of color embedded-bitmap + * images. The resulting color bitmaps, if available, will have the + * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color + * bitmaps are found, they will be converted to 256-level gray + * bitmaps transparently. Those bitmaps will be in the + * @FT_PIXEL_MODE_GRAY format. + * + * FT_LOAD_CROP_BITMAP :: + * Ignored. Deprecated. + * + * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: + * Ignored. Deprecated. + * * @note: * By default, hinting is enabled and the font's native hinter (see * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can @@ -2507,6 +2638,13 @@ FT_BEGIN_HEADER * Besides deciding which hinter to use, you can also decide which * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. * + * Note that the auto-hinter needs a valid Unicode cmap (either a native + * one or synthesized by FreeType) for producing correct results. If a + * font provides an incorrect mapping (for example, assigning the + * character code U+005A, LATIN CAPITAL LETTER Z, to a glyph depicting a + * mathematical integral sign), the auto-hinter might produce useless + * results. + * */ #define FT_LOAD_DEFAULT 0x0 #define FT_LOAD_NO_SCALE ( 1L << 0 ) @@ -2523,6 +2661,8 @@ FT_BEGIN_HEADER #define FT_LOAD_MONOCHROME ( 1L << 12 ) #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) #define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) + /* Bits 16..19 are used by `FT_LOAD_TARGET_' */ +#define FT_LOAD_COLOR ( 1L << 20 ) /* */ @@ -2579,8 +2719,9 @@ FT_BEGIN_HEADER * `load_flags'. They can't be ORed. * * If @FT_LOAD_RENDER is also set, the glyph is rendered in the - * corresponding mode (i.e., the mode which matches the used algorithm - * best) unless @FT_LOAD_MONOCHROME is set. + * corresponding mode (i.e., the mode that matches the used algorithm + * best). An exeption is FT_LOAD_TARGET_MONO since it implies + * @FT_LOAD_MONOCHROME. * * You can use a hinting algorithm that doesn't correspond to the same * rendering mode. As an example, it is possible to use the `light' @@ -2719,19 +2860,8 @@ FT_BEGIN_HEADER } FT_Render_Mode; - /*************************************************************************/ - /* */ - /* <Enum> */ - /* ft_render_mode_xxx */ - /* */ - /* <Description> */ - /* These constants are deprecated. Use the corresponding */ - /* @FT_Render_Mode values instead. */ - /* */ - /* <Values> */ - /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */ - /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */ - /* */ + /* these constants are deprecated; use the corresponding */ + /* `FT_Render_Mode' values instead */ #define ft_render_mode_normal FT_RENDER_MODE_NORMAL #define ft_render_mode_mono FT_RENDER_MODE_MONO @@ -2758,6 +2888,10 @@ FT_BEGIN_HEADER /* <Return> */ /* FreeType error code. 0~means success. */ /* */ + /* <Note> */ + /* To get meaningful results, font scaling values must be set with */ + /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* */ FT_EXPORT( FT_Error ) FT_Render_Glyph( FT_GlyphSlot slot, FT_Render_Mode render_mode ); @@ -2791,39 +2925,10 @@ FT_BEGIN_HEADER } FT_Kerning_Mode; - /*************************************************************************/ - /* */ - /* <Const> */ - /* ft_kerning_default */ - /* */ - /* <Description> */ - /* This constant is deprecated. Please use @FT_KERNING_DEFAULT */ - /* instead. */ - /* */ + /* these constants are deprecated; use the corresponding */ + /* `FT_Kerning_Mode' values instead */ #define ft_kerning_default FT_KERNING_DEFAULT - - - /*************************************************************************/ - /* */ - /* <Const> */ - /* ft_kerning_unfitted */ - /* */ - /* <Description> */ - /* This constant is deprecated. Please use @FT_KERNING_UNFITTED */ - /* instead. */ - /* */ #define ft_kerning_unfitted FT_KERNING_UNFITTED - - - /*************************************************************************/ - /* */ - /* <Const> */ - /* ft_kerning_unscaled */ - /* */ - /* <Description> */ - /* This constant is deprecated. Please use @FT_KERNING_UNSCALED */ - /* instead. */ - /* */ #define ft_kerning_unscaled FT_KERNING_UNSCALED @@ -2922,7 +3027,7 @@ FT_BEGIN_HEADER /* */ /* glyph_index :: The glyph index. */ /* */ - /* buffer_max :: The maximal number of bytes available in the */ + /* buffer_max :: The maximum number of bytes available in the */ /* buffer. */ /* */ /* <Output> */ @@ -2944,9 +3049,8 @@ FT_BEGIN_HEADER /* glyph index~0 always corresponds to the `missing glyph' (called */ /* `.notdef'). */ /* */ - /* This function is not compiled within the library if the config */ - /* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */ - /* `include/freetype/config/ftoptions.h'. */ + /* This function always returns an error if the config macro */ + /* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoptions.h'. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Glyph_Name( FT_Face face, @@ -3002,8 +3106,8 @@ FT_BEGIN_HEADER /* */ /* Because many fonts contain more than a single cmap for Unicode */ /* encoding, this function has some special code to select the one */ - /* which covers Unicode best (`best' in the sense that a UCS-4 cmap */ - /* is preferred to a UCS-2 cmap). It is thus preferable to */ + /* that covers Unicode best (`best' in the sense that a UCS-4 cmap is */ + /* preferred to a UCS-2 cmap). It is thus preferable to */ /* @FT_Set_Charmap in this case. */ /* */ FT_EXPORT( FT_Error ) @@ -3081,9 +3185,15 @@ FT_BEGIN_HEADER /* <Note> */ /* If you use FreeType to manipulate the contents of font files */ /* directly, be aware that the glyph index returned by this function */ - /* doesn't always correspond to the internal indices used within */ - /* the file. This is done to ensure that value~0 always corresponds */ - /* to the `missing glyph'. */ + /* doesn't always correspond to the internal indices used within the */ + /* file. This is done to ensure that value~0 always corresponds to */ + /* the `missing glyph'. If the first glyph is not named `.notdef', */ + /* then for Type~1 and Type~42 fonts, `.notdef' will be moved into */ + /* the glyph ID~0 position, and whatever was there will be moved to */ + /* the position `.notdef' had. For Type~1 fonts, if there is no */ + /* `.notdef' glyph at all, then one will be created at index~0 and */ + /* whatever was there will be moved to the last index -- Type~42 */ + /* fonts are considered invalid under this condition. */ /* */ FT_EXPORT( FT_UInt ) FT_Get_Char_Index( FT_Face face, @@ -3351,7 +3461,7 @@ FT_BEGIN_HEADER /* */ /* <Note> */ /* Use this function rather than directly reading the `fs_type' field */ - /* in the @PS_FontInfoRec structure which is only guaranteed to */ + /* in the @PS_FontInfoRec structure, which is only guaranteed to */ /* return the correct results for Type~1 fonts. */ /* */ /* <Since> */ @@ -3383,9 +3493,13 @@ FT_BEGIN_HEADER /* code range for CJK characters. */ /* */ /* An IVS is registered and unique; for further details please refer */ - /* to Unicode Technical Report #37, the Ideographic Variation */ - /* Database. To date (October 2007), the character with the most */ - /* variants is U+908A, having 8~such IVS. */ + /* to Unicode Technical Standard #37, the Ideographic Variation */ + /* Database: */ + /* */ + /* http://www.unicode.org/reports/tr37/ */ + /* */ + /* To date (November 2014), the character with the most variants is */ + /* U+9089, having 32 such IVS. */ /* */ /* Adobe and MS decided to support IVS with a new cmap subtable */ /* (format~14). It is an odd subtable because it is not a mapping of */ @@ -3527,7 +3641,7 @@ FT_BEGIN_HEADER /* The character codepoint in Unicode. */ /* */ /* <Return> */ - /* A pointer to an array of variant selector code points which are */ + /* A pointer to an array of variant selector code points that are */ /* active for the given character, or NULL if the corresponding list */ /* is empty. */ /* */ @@ -3561,7 +3675,7 @@ FT_BEGIN_HEADER /* The variant selector code point in Unicode. */ /* */ /* <Return> */ - /* A list of all the code points which are specified by this selector */ + /* A list of all the code points that are specified by this selector */ /* (both default and non-default codes are returned) or NULL if there */ /* is no valid cmap or the variant selector is invalid. */ /* */ @@ -3614,7 +3728,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* A very simple function used to perform the computation `(a*b)/c' */ - /* with maximal accuracy (it uses a 64-bit intermediate integer */ + /* with maximum accuracy (it uses a 64-bit intermediate integer */ /* whenever necessary). */ /* */ /* This function isn't necessarily as fast as some processor specific */ @@ -3636,12 +3750,6 @@ FT_BEGIN_HEADER FT_Long c ); - /* */ - - /* The following #if 0 ... #endif is for the documentation formatter, */ - /* hiding the internal `FT_MULFIX_INLINED' macro. */ - -#if 0 /*************************************************************************/ /* */ /* <Function> */ @@ -3649,8 +3757,8 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* A very simple function used to perform the computation */ - /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */ - /* used to multiply a given value by a 16.16 fixed float factor. */ + /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */ + /* used to multiply a given value by a 16.16 fixed-point factor. */ /* */ /* <Input> */ /* a :: The first multiplier. */ @@ -3675,17 +3783,6 @@ FT_BEGIN_HEADER FT_MulFix( FT_Long a, FT_Long b ); - /* */ -#endif - -#ifdef FT_MULFIX_INLINED -#define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b ) -#else - FT_EXPORT( FT_Long ) - FT_MulFix( FT_Long a, - FT_Long b ); -#endif - /*************************************************************************/ /* */ @@ -3694,22 +3791,16 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* A very simple function used to perform the computation */ - /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */ - /* used to divide a given value by a 16.16 fixed float factor. */ + /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */ + /* used to divide a given value by a 16.16 fixed-point factor. */ /* */ /* <Input> */ - /* a :: The first multiplier. */ - /* b :: The second multiplier. Use a 16.16 factor here whenever */ - /* possible (see note below). */ + /* a :: The numerator. */ + /* b :: The denominator. Use a 16.16 factor here. */ /* */ /* <Return> */ /* The result of `(a*0x10000)/b'. */ /* */ - /* <Note> */ - /* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */ - /* 32~bits, then the division is computed directly. Otherwise, we */ - /* use a specialized version of @FT_MulDiv. */ - /* */ FT_EXPORT( FT_Long ) FT_DivFix( FT_Long a, FT_Long b ); @@ -3809,6 +3900,18 @@ FT_BEGIN_HEADER /* even a new release of FreeType with only documentation changes */ /* increases the version number. */ /* */ + /* <Order> */ + /* FT_Library_Version */ + /* */ + /* FREETYPE_MAJOR */ + /* FREETYPE_MINOR */ + /* FREETYPE_PATCH */ + /* */ + /* FT_Face_CheckTrueTypePatents */ + /* FT_Face_SetUnpatentedHinting */ + /* */ + /* FREETYPE_XXX */ + /* */ /*************************************************************************/ @@ -3833,8 +3936,8 @@ FT_BEGIN_HEADER * */ #define FREETYPE_MAJOR 2 -#define FREETYPE_MINOR 4 -#define FREETYPE_PATCH 9 +#define FREETYPE_MINOR 5 +#define FREETYPE_PATCH 5 /*************************************************************************/ diff --git a/include/freetype/internal/internal.h b/include/freetype/internal/internal.h deleted file mode 100644 index f500a65..0000000 --- a/include/freetype/internal/internal.h +++ /dev/null @@ -1,51 +0,0 @@ -/***************************************************************************/ -/* */ -/* internal.h */ -/* */ -/* Internal header files (specification only). */ -/* */ -/* Copyright 1996-2001, 2002, 2003, 2004 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file is automatically included by `ft2build.h'. */ - /* Do not include it manually! */ - /* */ - /*************************************************************************/ - - -#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h> -#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h> -#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h> -#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h> -#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h> -#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h> -#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h> -#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h> -#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h> -#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h> -#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h> -#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h> -#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h> - -#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h> -#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h> - -#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h> -#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h> -#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h> - -#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h> - - -/* END */ diff --git a/include/ft2build.h b/include/ft2build.h index 923d887..6f8eb7f 100644 --- a/include/ft2build.h +++ b/include/ft2build.h @@ -3,9 +3,8 @@ /* ft2build.h */ /* */ /* FreeType 2 build and setup macros. */ -/* (Generic version) */ /* */ -/* Copyright 1996-2001, 2006 by */ +/* Copyright 1996-2001, 2006, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -19,21 +18,25 @@ /*************************************************************************/ /* */ - /* This file corresponds to the default `ft2build.h' file for */ - /* FreeType 2. It uses the `freetype' include root. */ + /* This is the `entry point' for FreeType header file inclusions. It is */ + /* the only header file which should be included directly; all other */ + /* FreeType header files should be accessed with macro names (after */ + /* including `ft2build.h'). */ /* */ - /* Note that specific platforms might use a different configuration. */ - /* See builds/unix/ft2unix.h for an example. */ + /* A typical example is */ + /* */ + /* #include <ft2build.h> */ + /* #include FT_FREETYPE_H */ /* */ /*************************************************************************/ -#ifndef __FT2_BUILD_GENERIC_H__ -#define __FT2_BUILD_GENERIC_H__ +#ifndef __FT2BUILD_H__ +#define __FT2BUILD_H__ -#include <freetype/config/ftheader.h> +#include <config/ftheader.h> -#endif /* __FT2_BUILD_GENERIC_H__ */ +#endif /* __FT2BUILD_H__ */ /* END */ diff --git a/include/freetype/ftadvanc.h b/include/ftadvanc.h similarity index 89% rename from include/freetype/ftadvanc.h rename to include/ftadvanc.h index b2451be..955f93f 100644 --- a/include/freetype/ftadvanc.h +++ b/include/ftadvanc.h @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (specification only). */ /* */ -/* Copyright 2008 by */ +/* Copyright 2008, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -48,6 +48,11 @@ FT_BEGIN_HEADER * @description: * This section contains functions to quickly extract advance values * without handling glyph outlines, if possible. + * + * @order: + * FT_Get_Advance + * FT_Get_Advances + * */ @@ -64,11 +69,11 @@ FT_BEGIN_HEADER /* corresponding hinting mode or font driver doesn't allow for very */ /* quick advance computation. */ /* */ - /* Typically, glyphs which are either unscaled, unhinted, bitmapped, */ + /* Typically, glyphs that are either unscaled, unhinted, bitmapped, */ /* or light-hinted can have their advance width computed very */ /* quickly. */ /* */ - /* Normal and bytecode hinted modes, which require loading, scaling, */ + /* Normal and bytecode hinted modes that require loading, scaling, */ /* and hinting of the glyph outline, are extremely slow by */ /* comparison. */ /* */ @@ -82,8 +87,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Retrieve the advance value of a given glyph outline in an */ - /* @FT_Face. By default, the unhinted advance is returned in font */ - /* units. */ + /* @FT_Face. */ /* */ /* <Input> */ /* face :: The source @FT_Face handle. */ @@ -94,8 +98,9 @@ FT_BEGIN_HEADER /* calling @FT_Load_Glyph, used to determine what kind */ /* of advances you need. */ /* <Output> */ - /* padvance :: The advance value, in either font units or 16.16 */ - /* format. */ + /* padvance :: The advance value. If scaling is performed (based on */ + /* the value of `load_flags'), the advance value is in */ + /* 16.16 format. Otherwise, it is in font units. */ /* */ /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ /* vertical advance corresponding to a vertical layout. */ @@ -127,8 +132,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Retrieve the advance values of several glyph outlines in an */ - /* @FT_Face. By default, the unhinted advances are returned in font */ - /* units. */ + /* @FT_Face. */ /* */ /* <Input> */ /* face :: The source @FT_Face handle. */ @@ -141,8 +145,12 @@ FT_BEGIN_HEADER /* calling @FT_Load_Glyph. */ /* */ /* <Output> */ - /* padvance :: The advances, in either font units or 16.16 format. */ - /* This array must contain at least `count' elements. */ + /* padvance :: The advance values. This array, to be provided by the */ + /* caller, must contain at least `count' elements. */ + /* */ + /* If scaling is performed (based on the value of */ + /* `load_flags'), the advance values are in 16.16 format. */ + /* Otherwise, they are in font units. */ /* */ /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ /* vertical advances corresponding to a vertical layout. */ @@ -168,7 +176,7 @@ FT_BEGIN_HEADER FT_Int32 load_flags, FT_Fixed *padvances ); -/* */ + /* */ FT_END_HEADER diff --git a/include/ftautoh.h b/include/ftautoh.h new file mode 100644 index 0000000..59191ab --- /dev/null +++ b/include/ftautoh.h @@ -0,0 +1,402 @@ +/***************************************************************************/ +/* */ +/* ftautoh.h */ +/* */ +/* FreeType API for controlling the auto-hinter (specification only). */ +/* */ +/* Copyright 2012, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTAUTOH_H__ +#define __FTAUTOH_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * auto_hinter + * + * @title: + * The auto-hinter + * + * @abstract: + * Controlling the auto-hinting module. + * + * @description: + * While FreeType's auto-hinter doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. The following lists the available properties + * together with the necessary macros and structures. + * + * Note that the auto-hinter's module name is `autofitter' for + * historical reasons. + * + */ + + + /************************************************************************** + * + * @property: + * glyph-to-script-map + * + * @description: + * *Experimental* *only* + * + * The auto-hinter provides various script modules to hint glyphs. + * Examples of supported scripts are Latin or CJK. Before a glyph is + * auto-hinted, the Unicode character map of the font gets examined, and + * the script is then determined based on Unicode character ranges, see + * below. + * + * OpenType fonts, however, often provide much more glyphs than + * character codes (small caps, superscripts, ligatures, swashes, etc.), + * to be controlled by so-called `features'. Handling OpenType features + * can be quite complicated and thus needs a separate library on top of + * FreeType. + * + * The mapping between glyph indices and scripts (in the auto-hinter + * sense, see the @FT_AUTOHINTER_SCRIPT_XXX values) is stored as an + * array with `num_glyphs' elements, as found in the font's @FT_Face + * structure. The `glyph-to-script-map' property returns a pointer to + * this array, which can be modified as needed. Note that the + * modification should happen before the first glyph gets processed by + * the auto-hinter so that the global analysis of the font shapes + * actually uses the modified mapping. + * + * The following example code demonstrates how to access it (omitting + * the error handling). + * + * { + * FT_Library library; + * FT_Face face; + * FT_Prop_GlyphToScriptMap prop; + * + * + * FT_Init_FreeType( &library ); + * FT_New_Face( library, "foo.ttf", 0, &face ); + * + * prop.face = face; + * + * FT_Property_Get( library, "autofitter", + * "glyph-to-script-map", &prop ); + * + * // adjust `prop.map' as needed right here + * + * FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); + * } + * + */ + + + /************************************************************************** + * + * @enum: + * FT_AUTOHINTER_SCRIPT_XXX + * + * @description: + * *Experimental* *only* + * + * A list of constants used for the @glyph-to-script-map property to + * specify the script submodule the auto-hinter should use for hinting a + * particular glyph. + * + * @values: + * FT_AUTOHINTER_SCRIPT_NONE :: + * Don't auto-hint this glyph. + * + * FT_AUTOHINTER_SCRIPT_LATIN :: + * Apply the latin auto-hinter. For the auto-hinter, `latin' is a + * very broad term, including Cyrillic and Greek also since characters + * from those scripts share the same design constraints. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+0020 - U+007F // Basic Latin (no control characters) + * U+00A0 - U+00FF // Latin-1 Supplement (no control characters) + * U+0100 - U+017F // Latin Extended-A + * U+0180 - U+024F // Latin Extended-B + * U+0250 - U+02AF // IPA Extensions + * U+02B0 - U+02FF // Spacing Modifier Letters + * U+0300 - U+036F // Combining Diacritical Marks + * U+0370 - U+03FF // Greek and Coptic + * U+0400 - U+04FF // Cyrillic + * U+0500 - U+052F // Cyrillic Supplement + * U+1D00 - U+1D7F // Phonetic Extensions + * U+1D80 - U+1DBF // Phonetic Extensions Supplement + * U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement + * U+1E00 - U+1EFF // Latin Extended Additional + * U+1F00 - U+1FFF // Greek Extended + * U+2000 - U+206F // General Punctuation + * U+2070 - U+209F // Superscripts and Subscripts + * U+20A0 - U+20CF // Currency Symbols + * U+2150 - U+218F // Number Forms + * U+2460 - U+24FF // Enclosed Alphanumerics + * U+2C60 - U+2C7F // Latin Extended-C + * U+2DE0 - U+2DFF // Cyrillic Extended-A + * U+2E00 - U+2E7F // Supplemental Punctuation + * U+A640 - U+A69F // Cyrillic Extended-B + * U+A720 - U+A7FF // Latin Extended-D + * U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures) + * U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols + * U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement + * } + * + * FT_AUTOHINTER_SCRIPT_CJK :: + * Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old + * Vietnamese, and some other scripts. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+1100 - U+11FF // Hangul Jamo + * U+2E80 - U+2EFF // CJK Radicals Supplement + * U+2F00 - U+2FDF // Kangxi Radicals + * U+2FF0 - U+2FFF // Ideographic Description Characters + * U+3000 - U+303F // CJK Symbols and Punctuation + * U+3040 - U+309F // Hiragana + * U+30A0 - U+30FF // Katakana + * U+3100 - U+312F // Bopomofo + * U+3130 - U+318F // Hangul Compatibility Jamo + * U+3190 - U+319F // Kanbun + * U+31A0 - U+31BF // Bopomofo Extended + * U+31C0 - U+31EF // CJK Strokes + * U+31F0 - U+31FF // Katakana Phonetic Extensions + * U+3200 - U+32FF // Enclosed CJK Letters and Months + * U+3300 - U+33FF // CJK Compatibility + * U+3400 - U+4DBF // CJK Unified Ideographs Extension A + * U+4DC0 - U+4DFF // Yijing Hexagram Symbols + * U+4E00 - U+9FFF // CJK Unified Ideographs + * U+A960 - U+A97F // Hangul Jamo Extended-A + * U+AC00 - U+D7AF // Hangul Syllables + * U+D7B0 - U+D7FF // Hangul Jamo Extended-B + * U+F900 - U+FAFF // CJK Compatibility Ideographs + * U+FE10 - U+FE1F // Vertical forms + * U+FE30 - U+FE4F // CJK Compatibility Forms + * U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms + * U+1B000 - U+1B0FF // Kana Supplement + * U+1D300 - U+1D35F // Tai Xuan Hing Symbols + * U+1F200 - U+1F2FF // Enclosed Ideographic Supplement + * U+20000 - U+2A6DF // CJK Unified Ideographs Extension B + * U+2A700 - U+2B73F // CJK Unified Ideographs Extension C + * U+2B740 - U+2B81F // CJK Unified Ideographs Extension D + * U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement + * } + * + * FT_AUTOHINTER_SCRIPT_INDIC :: + * Apply the indic auto-hinter, covering all major scripts from the + * Indian sub-continent and some other related scripts like Thai, Lao, + * or Tibetan. + * + * By default, characters from the following Unicode ranges are + * assigned to this submodule. + * + * { + * U+0900 - U+0DFF // Indic Range + * U+0F00 - U+0FFF // Tibetan + * U+1900 - U+194F // Limbu + * U+1B80 - U+1BBF // Sundanese + * U+1C80 - U+1CDF // Meetei Mayak + * U+A800 - U+A82F // Syloti Nagri + * U+11800 - U+118DF // Sharada + * } + * + * Note that currently Indic support is rudimentary only, missing blue + * zone support. + * + */ +#define FT_AUTOHINTER_SCRIPT_NONE 0 +#define FT_AUTOHINTER_SCRIPT_LATIN 1 +#define FT_AUTOHINTER_SCRIPT_CJK 2 +#define FT_AUTOHINTER_SCRIPT_INDIC 3 + + + /************************************************************************** + * + * @struct: + * FT_Prop_GlyphToScriptMap + * + * @description: + * *Experimental* *only* + * + * The data exchange structure for the @glyph-to-script-map property. + * + */ + typedef struct FT_Prop_GlyphToScriptMap_ + { + FT_Face face; + FT_Byte* map; + + } FT_Prop_GlyphToScriptMap; + + + /************************************************************************** + * + * @property: + * fallback-script + * + * @description: + * *Experimental* *only* + * + * If no auto-hinter script module can be assigned to a glyph, a + * fallback script gets assigned to it (see also the + * @glyph-to-script-map property). By default, this is + * @FT_AUTOHINTER_SCRIPT_CJK. Using the `fallback-script' property, + * this fallback value can be changed. + * + * { + * FT_Library library; + * FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "fallback-script", &fallback_script ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * It's important to use the right timing for changing this value: The + * creation of the glyph-to-script map that eventually uses the + * fallback script value gets triggered either by setting or reading a + * face-specific property like @glyph-to-script-map, or by auto-hinting + * any glyph from that face. In particular, if you have already created + * an @FT_Face structure but not loaded any glyph (using the + * auto-hinter), a change of the fallback script will affect this face. + * + */ + + + /************************************************************************** + * + * @property: + * default-script + * + * @description: + * *Experimental* *only* + * + * If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make + * the HarfBuzz library access OpenType features for getting better + * glyph coverages, this property sets the (auto-fitter) script to be + * used for the default (OpenType) script data of a font's GSUB table. + * Features for the default script are intended for all scripts not + * explicitly handled in GSUB; an example is a `dlig' feature, + * containing the combination of the characters `T', `E', and `L' to + * form a `TEL' ligature. + * + * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the + * `default-script' property, this default value can be changed. + * + * { + * FT_Library library; + * FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "autofitter", + * "default-script", &default_script ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * It's important to use the right timing for changing this value: The + * creation of the glyph-to-script map that eventually uses the + * default script value gets triggered either by setting or reading a + * face-specific property like @glyph-to-script-map, or by auto-hinting + * any glyph from that face. In particular, if you have already created + * an @FT_Face structure but not loaded any glyph (using the + * auto-hinter), a change of the default script will affect this face. + * + */ + + + /************************************************************************** + * + * @property: + * increase-x-height + * + * @description: + * For ppem values in the range 6~<= ppem <= `increase-x-height', round + * up the font's x~height much more often than normally. If the value + * is set to~0, which is the default, this feature is switched off. Use + * this property to improve the legibility of small font sizes if + * necessary. + * + * { + * FT_Library library; + * FT_Face face; + * FT_Prop_IncreaseXHeight prop; + * + * + * FT_Init_FreeType( &library ); + * FT_New_Face( library, "foo.ttf", 0, &face ); + * FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 ); + * + * prop.face = face; + * prop.limit = 14; + * + * FT_Property_Set( library, "autofitter", + * "increase-x-height", &prop ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * Set this value right after calling @FT_Set_Char_Size, but before + * loading any glyph (using the auto-hinter). + * + */ + + + /************************************************************************** + * + * @struct: + * FT_Prop_IncreaseXHeight + * + * @description: + * The data exchange structure for the @increase-x-height property. + * + */ + typedef struct FT_Prop_IncreaseXHeight_ + { + FT_Face face; + FT_UInt limit; + + } FT_Prop_IncreaseXHeight; + + /* */ + + +FT_END_HEADER + +#endif /* __FTAUTOH_H__ */ + + +/* END */ diff --git a/include/freetype/ftbbox.h b/include/ftbbox.h similarity index 97% rename from include/freetype/ftbbox.h rename to include/ftbbox.h index 9766919..d6800e2 100644 --- a/include/freetype/ftbbox.h +++ b/include/ftbbox.h @@ -4,7 +4,7 @@ /* */ /* FreeType exact bbox computation (specification). */ /* */ -/* Copyright 1996-2001, 2003, 2007, 2011 by */ +/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -60,7 +60,7 @@ FT_BEGIN_HEADER /* <Description> */ /* Compute the exact bounding box of an outline. This is slower */ /* than computing the control box. However, it uses an advanced */ - /* algorithm which returns _very_ quickly when the two boxes */ + /* algorithm that returns _very_ quickly when the two boxes */ /* coincide. Otherwise, the outline Bézier arcs are traversed to */ /* extract their extrema. */ /* */ @@ -78,14 +78,13 @@ FT_BEGIN_HEADER /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */ /* reasonable values for the BBox it is necessary to load the glyph */ /* at a large ppem value (so that the hinting instructions can */ - /* properly shift and scale the subglyphs), then extracting the BBox */ + /* properly shift and scale the subglyphs), then extracting the BBox, */ /* which can be eventually converted back to font units. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Get_BBox( FT_Outline* outline, FT_BBox *abbox ); - /* */ diff --git a/include/freetype/ftbdf.h b/include/ftbdf.h similarity index 96% rename from include/freetype/ftbdf.h rename to include/ftbdf.h index 4f8baf8..6d262e4 100644 --- a/include/freetype/ftbdf.h +++ b/include/ftbdf.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing BDF-specific strings (specification). */ /* */ -/* Copyright 2002, 2003, 2004, 2006, 2009 by */ +/* Copyright 2002-2004, 2006, 2009, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -53,7 +53,7 @@ FT_BEGIN_HEADER /********************************************************************** * * @enum: - * FT_PropertyType + * BDF_PropertyType * * @description: * A list of BDF property types. @@ -106,7 +106,8 @@ FT_BEGIN_HEADER * The property type. * * u.atom :: - * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. + * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be + * NULL, indicating an empty string. * * u.integer :: * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. @@ -199,7 +200,7 @@ FT_BEGIN_HEADER const char* prop_name, BDF_PropertyRec *aproperty ); - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftbitmap.h b/include/ftbitmap.h similarity index 94% rename from include/freetype/ftbitmap.h rename to include/ftbitmap.h index 9274236..eae7169 100644 --- a/include/freetype/ftbitmap.h +++ b/include/ftbitmap.h @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (specification). */ /* */ -/* Copyright 2004, 2005, 2006, 2008 by */ +/* Copyright 2004-2006, 2008, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,7 +45,9 @@ FT_BEGIN_HEADER /* Handling FT_Bitmap objects. */ /* */ /* <Description> */ - /* This section contains functions for converting FT_Bitmap objects. */ + /* This section contains functions for handling @FT_Bitmap objects. */ + /* Note that none of the functions changes the bitmap's `flow' (as */ + /* indicated by the sign of the `pitch' field in `FT_Bitmap'). */ /* */ /*************************************************************************/ @@ -122,6 +124,9 @@ FT_BEGIN_HEADER /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ /* */ + /* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format */ + /* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). */ + /* */ FT_EXPORT( FT_Error ) FT_Bitmap_Embolden( FT_Library library, FT_Bitmap* bitmap, @@ -135,9 +140,9 @@ FT_BEGIN_HEADER /* FT_Bitmap_Convert */ /* */ /* <Description> */ - /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */ - /* bitmap object with depth 8bpp, making the number of used bytes per */ - /* line (a.k.a. the `pitch') a multiple of `alignment'. */ + /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp */ + /* to a bitmap object with depth 8bpp, making the number of used */ + /* bytes line (a.k.a. the `pitch') a multiple of `alignment'. */ /* */ /* <Input> */ /* library :: A handle to a library object. */ diff --git a/include/freetype/ftbzip2.h b/include/ftbzip2.h similarity index 99% rename from include/freetype/ftbzip2.h rename to include/ftbzip2.h index 1bf81b1..4dce161 100644 --- a/include/freetype/ftbzip2.h +++ b/include/ftbzip2.h @@ -91,7 +91,7 @@ FT_BEGIN_HEADER FT_Stream_OpenBzip2( FT_Stream stream, FT_Stream source ); - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftcache.h b/include/ftcache.h similarity index 94% rename from include/freetype/ftcache.h rename to include/ftcache.h index 6af5306..a30e925 100644 --- a/include/freetype/ftcache.h +++ b/include/ftcache.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ +/* Copyright 1996-2008, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -156,7 +156,7 @@ FT_BEGIN_HEADER * @note: * Never use NULL as a valid @FTC_FaceID. * - * Face IDs are passed by the client to the cache manager, which calls, + * Face IDs are passed by the client to the cache manager that calls, * when needed, the @FTC_Face_Requester to translate them into new * @FT_Face objects. * @@ -209,22 +209,11 @@ FT_BEGIN_HEADER typedef FT_Error (*FTC_Face_Requester)( FTC_FaceID face_id, FT_Library library, - FT_Pointer request_data, + FT_Pointer req_data, FT_Face* aface ); - /* */ - -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* these macros are incompatible with LLP64, should not be used */ - -#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) - -#define FTC_FACE_ID_HASH( i ) \ - ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ - ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) + /* */ -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ /*************************************************************************/ /*************************************************************************/ @@ -381,7 +370,7 @@ FT_BEGIN_HEADER /* should never try to discard it yourself. */ /* */ /* The @FT_Face object doesn't necessarily have a current size object */ - /* (i.e., face->size can be 0). If you need a specific `font size', */ + /* (i.e., face->size can be~0). If you need a specific `font size', */ /* use @FTC_Manager_LookupSize instead. */ /* */ /* Never change the face's transformation matrix (i.e., never call */ @@ -705,17 +694,6 @@ FT_BEGIN_HEADER (d1)->width == (d2)->width && \ (d1)->flags == (d2)->flags ) -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* this macro is incompatible with LLP64, should not be used */ - -#define FTC_IMAGE_TYPE_HASH( d ) \ - (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ - ( (d)->width << 8 ) ^ (d)->height ^ \ - ( (d)->flags << 4 ) ) - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - /*************************************************************************/ /* */ @@ -723,7 +701,7 @@ FT_BEGIN_HEADER /* FTC_ImageCache */ /* */ /* <Description> */ - /* A handle to an glyph image cache object. They are designed to */ + /* A handle to a glyph image cache object. They are designed to */ /* hold many distinct glyph images while not exceeding a certain */ /* memory threshold. */ /* */ @@ -1068,70 +1046,9 @@ FT_BEGIN_HEADER FTC_SBit *sbit, FTC_Node *anode ); - - /* */ - -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /*@***********************************************************************/ - /* */ - /* <Struct> */ - /* FTC_FontRec */ - /* */ - /* <Description> */ - /* A simple structure used to describe a given `font' to the cache */ - /* manager. Note that a `font' is the combination of a given face */ - /* with a given character size. */ - /* */ - /* <Fields> */ - /* face_id :: The ID of the face to use. */ - /* */ - /* pix_width :: The character width in integer pixels. */ - /* */ - /* pix_height :: The character height in integer pixels. */ - /* */ - typedef struct FTC_FontRec_ - { - FTC_FaceID face_id; - FT_UShort pix_width; - FT_UShort pix_height; - - } FTC_FontRec; - - /* */ -#define FTC_FONT_COMPARE( f1, f2 ) \ - ( (f1)->face_id == (f2)->face_id && \ - (f1)->pix_width == (f2)->pix_width && \ - (f1)->pix_height == (f2)->pix_height ) - - /* this macro is incompatible with LLP64, should not be used */ -#define FTC_FONT_HASH( f ) \ - (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ - ((f)->pix_width << 8) ^ \ - ((f)->pix_height) ) - - typedef FTC_FontRec* FTC_Font; - - - FT_EXPORT( FT_Error ) - FTC_Manager_Lookup_Face( FTC_Manager manager, - FTC_FaceID face_id, - FT_Face *aface ); - - FT_EXPORT( FT_Error ) - FTC_Manager_Lookup_Size( FTC_Manager manager, - FTC_Font font, - FT_Face *aface, - FT_Size *asize ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - - /* */ - FT_END_HEADER #endif /* __FTCACHE_H__ */ diff --git a/include/ftcffdrv.h b/include/ftcffdrv.h new file mode 100644 index 0000000..f7031bc --- /dev/null +++ b/include/ftcffdrv.h @@ -0,0 +1,262 @@ +/***************************************************************************/ +/* */ +/* ftcffdrv.h */ +/* */ +/* FreeType API for controlling the CFF driver (specification only). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTCFFDRV_H__ +#define __FTCFFDRV_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * cff_driver + * + * @title: + * The CFF driver + * + * @abstract: + * Controlling the CFF driver module. + * + * @description: + * While FreeType's CFF driver doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. The list below gives the available properties + * together with the necessary macros and structures. + * + * The CFF driver's module name is `cff'. + * + * *Hinting* *and* *antialiasing* *principles* *of* *the* *new* *engine* + * + * The rasterizer is positioning horizontal features (e.g., ascender + * height & x-height, or crossbars) on the pixel grid and minimizing the + * amount of antialiasing applied to them, while placing vertical + * features (vertical stems) on the pixel grid without hinting, thus + * representing the stem position and weight accurately. Sometimes the + * vertical stems may be only partially black. In this context, + * `antialiasing' means that stems are not positioned exactly on pixel + * borders, causing a fuzzy appearance. + * + * There are two principles behind this approach. + * + * 1) No hinting in the horizontal direction: Unlike `superhinted' + * TrueType, which changes glyph widths to accommodate regular + * inter-glyph spacing, Adobe's approach is `faithful to the design' in + * representing both the glyph width and the inter-glyph spacing + * designed for the font. This makes the screen display as close as it + * can be to the result one would get with infinite resolution, while + * preserving what is considered the key characteristics of each glyph. + * Note that the distances between unhinted and grid-fitted positions at + * small sizes are comparable to kerning values and thus would be + * noticeable (and distracting) while reading if hinting were applied. + * + * One of the reasons to not hint horizontally is antialiasing for LCD + * screens: The pixel geometry of modern displays supplies three + * vertical sub-pixels as the eye moves horizontally across each visible + * pixel. On devices where we can be certain this characteristic is + * present a rasterizer can take advantage of the sub-pixels to add + * increments of weight. In Western writing systems this turns out to + * be the more critical direction anyway; the weights and spacing of + * vertical stems (see above) are central to Armenian, Cyrillic, Greek, + * and Latin type designs. Even when the rasterizer uses greyscale + * antialiasing instead of color (a necessary compromise when one + * doesn't know the screen characteristics), the unhinted vertical + * features preserve the design's weight and spacing much better than + * aliased type would. + * + * 2) Aligment in the vertical direction: Weights and spacing along the + * y~axis are less critical; what is much more important is the visual + * alignment of related features (like cap-height and x-height). The + * sense of alignment for these is enhanced by the sharpness of grid-fit + * edges, while the cruder vertical resolution (full pixels instead of + * 1/3 pixels) is less of a problem. + * + * On the technical side, horizontal alignment zones for ascender, + * x-height, and other important height values (traditionally called + * `blue zones') as defined in the font are positioned independently, + * each being rounded to the nearest pixel edge, taking care of + * overshoot suppression at small sizes, stem darkening, and scaling. + * + * Hstems (this is, hint values defined in the font to help align + * horizontal features) that fall within a blue zone are said to be + * `captured' and are aligned to that zone. Uncaptured stems are moved + * in one of four ways, top edge up or down, bottom edge up or down. + * Unless there are conflicting hstems, the smallest movement is taken + * to minimize distortion. + * + * @order: + * hinting-engine + * no-stem-darkening + * darkening-parameters + * + */ + + + /************************************************************************** + * + * @property: + * hinting-engine + * + * @description: + * Thanks to Adobe, which contributed a new hinting (and parsing) + * engine, an application can select between `freetype' and `adobe' if + * compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration + * macro isn't defined, `hinting-engine' does nothing. + * + * The default engine is `freetype' if CFF_CONFIG_OPTION_OLD_ENGINE is + * defined, and `adobe' otherwise. + * + * The following example code demonstrates how to select Adobe's hinting + * engine (omitting the error handling). + * + * { + * FT_Library library; + * FT_UInt hinting_engine = FT_CFF_HINTING_ADOBE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "hinting-engine", &hinting_engine ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + + /************************************************************************** + * + * @enum: + * FT_CFF_HINTING_XXX + * + * @description: + * A list of constants used for the @hinting-engine property to select + * the hinting engine for CFF fonts. + * + * @values: + * FT_CFF_HINTING_FREETYPE :: + * Use the old FreeType hinting engine. + * + * FT_CFF_HINTING_ADOBE :: + * Use the hinting engine contributed by Adobe. + * + */ +#define FT_CFF_HINTING_FREETYPE 0 +#define FT_CFF_HINTING_ADOBE 1 + + + /************************************************************************** + * + * @property: + * no-stem-darkening + * + * @description: + * By default, the Adobe CFF engine darkens stems at smaller sizes, + * regardless of hinting, to enhance contrast. This feature requires + * a rendering system with proper gamma correction. Setting this + * property, stem darkening gets switched off. + * + * Note that stem darkening is never applied if @FT_LOAD_NO_SCALE is set. + * + * { + * FT_Library library; + * FT_Bool no_stem_darkening = TRUE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "no-stem-darkening", &no_stem_darkening ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + + /************************************************************************** + * + * @property: + * darkening-parameters + * + * @description: + * By default, the Adobe CFF engine darkens stems as follows (if the + * `no-stem-darkening' property isn't set): + * + * { + * stem width <= 0.5px: darkening amount = 0.4px + * stem width = 1px: darkening amount = 0.275px + * stem width = 1.667px: darkening amount = 0.275px + * stem width >= 2.333px: darkening amount = 0px + * } + * + * and piecewise linear in-between. At configuration time, these four + * control points can be set with the macro + * `CFF_CONFIG_OPTION_DARKENING_PARAMETERS'. At runtime, the control + * points can be changed using the `darkening-parameters' property, as + * the following example demonstrates. + * + * { + * FT_Library library; + * FT_Int darken_params[8] = { 500, 300, // x1, y1 + * 1000, 200, // x2, y2 + * 1500, 100, // x3, y3 + * 2000, 0 }; // x4, y4 + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "cff", + * "darkening-parameters", darken_params ); + * } + * + * The x~values give the stem width, and the y~values the darkening + * amount. The unit is 1000th of pixels. All coordinate values must be + * positive; the x~values must be monotonically increasing; the + * y~values must be monotonically decreasing and smaller than or + * equal to 500 (corresponding to half a pixel); the slope of each + * linear piece must be shallower than -1 (e.g., -.4). + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + /* */ + + +FT_END_HEADER + + +#endif /* __FTCFFDRV_H__ */ + + +/* END */ diff --git a/include/freetype/ftchapters.h b/include/ftchapters.h similarity index 85% rename from include/freetype/ftchapters.h rename to include/ftchapters.h index 6cdf54e..d333761 100644 --- a/include/freetype/ftchapters.h +++ b/include/ftchapters.h @@ -1,7 +1,7 @@ /***************************************************************************/ /* */ /* This file defines the structure of the FreeType reference. */ -/* It is used by the python script which generates the HTML files. */ +/* It is used by the python script that generates the HTML files. */ /* */ /***************************************************************************/ @@ -15,6 +15,7 @@ /* General Remarks */ /* */ /* <Sections> */ +/* header_inclusion */ /* user_allocation */ /* */ /***************************************************************************/ @@ -67,6 +68,22 @@ /***************************************************************************/ /* */ /* <Chapter> */ +/* module_specific */ +/* */ +/* <Title> */ +/* Controlling FreeType Modules */ +/* */ +/* <Sections> */ +/* auto_hinter */ +/* cff_driver */ +/* tt_driver */ +/* */ +/***************************************************************************/ + + +/***************************************************************************/ +/* */ +/* <Chapter> */ /* cache_subsystem */ /* */ /* <Title> */ diff --git a/include/freetype/ftcid.h b/include/ftcid.h similarity index 99% rename from include/freetype/ftcid.h rename to include/ftcid.h index 203a30c..17550d8 100644 --- a/include/freetype/ftcid.h +++ b/include/ftcid.h @@ -156,7 +156,8 @@ FT_BEGIN_HEADER FT_UInt glyph_index, FT_UInt *cid ); - /* */ + /* */ + FT_END_HEADER diff --git a/include/freetype/fterrdef.h b/include/fterrdef.h similarity index 95% rename from include/freetype/fterrdef.h rename to include/fterrdef.h index fb4b53b..99b2fad 100644 --- a/include/freetype/fterrdef.h +++ b/include/fterrdef.h @@ -4,7 +4,7 @@ /* */ /* FreeType error codes (specification). */ /* */ -/* Copyright 2002, 2004, 2006, 2007, 2010-2011 by */ +/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -31,214 +31,218 @@ /* generic errors */ - FT_NOERRORDEF_( Ok, 0x00, \ + FT_NOERRORDEF_( Ok, 0x00, "no error" ) - FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ + FT_ERRORDEF_( Cannot_Open_Resource, 0x01, "cannot open resource" ) - FT_ERRORDEF_( Unknown_File_Format, 0x02, \ + FT_ERRORDEF_( Unknown_File_Format, 0x02, "unknown file format" ) - FT_ERRORDEF_( Invalid_File_Format, 0x03, \ + FT_ERRORDEF_( Invalid_File_Format, 0x03, "broken file" ) - FT_ERRORDEF_( Invalid_Version, 0x04, \ + FT_ERRORDEF_( Invalid_Version, 0x04, "invalid FreeType version" ) - FT_ERRORDEF_( Lower_Module_Version, 0x05, \ + FT_ERRORDEF_( Lower_Module_Version, 0x05, "module version is too low" ) - FT_ERRORDEF_( Invalid_Argument, 0x06, \ + FT_ERRORDEF_( Invalid_Argument, 0x06, "invalid argument" ) - FT_ERRORDEF_( Unimplemented_Feature, 0x07, \ + FT_ERRORDEF_( Unimplemented_Feature, 0x07, "unimplemented feature" ) - FT_ERRORDEF_( Invalid_Table, 0x08, \ + FT_ERRORDEF_( Invalid_Table, 0x08, "broken table" ) - FT_ERRORDEF_( Invalid_Offset, 0x09, \ + FT_ERRORDEF_( Invalid_Offset, 0x09, "broken offset within table" ) - FT_ERRORDEF_( Array_Too_Large, 0x0A, \ + FT_ERRORDEF_( Array_Too_Large, 0x0A, "array allocation size too large" ) - FT_ERRORDEF_( Missing_Module, 0x0B, \ + FT_ERRORDEF_( Missing_Module, 0x0B, "missing module" ) + FT_ERRORDEF_( Missing_Property, 0x0C, + "missing property" ) /* glyph/character errors */ - FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ + FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, "invalid glyph index" ) - FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ + FT_ERRORDEF_( Invalid_Character_Code, 0x11, "invalid character code" ) - FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ + FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, "unsupported glyph image format" ) - FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ + FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, "cannot render this glyph format" ) - FT_ERRORDEF_( Invalid_Outline, 0x14, \ + FT_ERRORDEF_( Invalid_Outline, 0x14, "invalid outline" ) - FT_ERRORDEF_( Invalid_Composite, 0x15, \ + FT_ERRORDEF_( Invalid_Composite, 0x15, "invalid composite glyph" ) - FT_ERRORDEF_( Too_Many_Hints, 0x16, \ + FT_ERRORDEF_( Too_Many_Hints, 0x16, "too many hints" ) - FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \ + FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, "invalid pixel size" ) /* handle errors */ - FT_ERRORDEF_( Invalid_Handle, 0x20, \ + FT_ERRORDEF_( Invalid_Handle, 0x20, "invalid object handle" ) - FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ + FT_ERRORDEF_( Invalid_Library_Handle, 0x21, "invalid library handle" ) - FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ + FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, "invalid module handle" ) - FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ + FT_ERRORDEF_( Invalid_Face_Handle, 0x23, "invalid face handle" ) - FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ + FT_ERRORDEF_( Invalid_Size_Handle, 0x24, "invalid size handle" ) - FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \ + FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, "invalid glyph slot handle" ) - FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \ + FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, "invalid charmap handle" ) - FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \ + FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, "invalid cache manager handle" ) - FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \ + FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, "invalid stream handle" ) /* driver errors */ - FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ + FT_ERRORDEF_( Too_Many_Drivers, 0x30, "too many modules" ) - FT_ERRORDEF_( Too_Many_Extensions, 0x31, \ + FT_ERRORDEF_( Too_Many_Extensions, 0x31, "too many extensions" ) /* memory errors */ - FT_ERRORDEF_( Out_Of_Memory, 0x40, \ + FT_ERRORDEF_( Out_Of_Memory, 0x40, "out of memory" ) - FT_ERRORDEF_( Unlisted_Object, 0x41, \ + FT_ERRORDEF_( Unlisted_Object, 0x41, "unlisted object" ) /* stream errors */ - FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ + FT_ERRORDEF_( Cannot_Open_Stream, 0x51, "cannot open stream" ) - FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ + FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, "invalid stream seek" ) - FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ + FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, "invalid stream skip" ) - FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ + FT_ERRORDEF_( Invalid_Stream_Read, 0x54, "invalid stream read" ) - FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \ + FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, "invalid stream operation" ) - FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \ + FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, "invalid frame operation" ) - FT_ERRORDEF_( Nested_Frame_Access, 0x57, \ + FT_ERRORDEF_( Nested_Frame_Access, 0x57, "nested frame access" ) - FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \ + FT_ERRORDEF_( Invalid_Frame_Read, 0x58, "invalid frame read" ) /* raster errors */ - FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ + FT_ERRORDEF_( Raster_Uninitialized, 0x60, "raster uninitialized" ) - FT_ERRORDEF_( Raster_Corrupted, 0x61, \ + FT_ERRORDEF_( Raster_Corrupted, 0x61, "raster corrupted" ) - FT_ERRORDEF_( Raster_Overflow, 0x62, \ + FT_ERRORDEF_( Raster_Overflow, 0x62, "raster overflow" ) - FT_ERRORDEF_( Raster_Negative_Height, 0x63, \ + FT_ERRORDEF_( Raster_Negative_Height, 0x63, "negative height while rastering" ) /* cache errors */ - FT_ERRORDEF_( Too_Many_Caches, 0x70, \ + FT_ERRORDEF_( Too_Many_Caches, 0x70, "too many registered caches" ) /* TrueType and SFNT errors */ - FT_ERRORDEF_( Invalid_Opcode, 0x80, \ + FT_ERRORDEF_( Invalid_Opcode, 0x80, "invalid opcode" ) - FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ + FT_ERRORDEF_( Too_Few_Arguments, 0x81, "too few arguments" ) - FT_ERRORDEF_( Stack_Overflow, 0x82, \ + FT_ERRORDEF_( Stack_Overflow, 0x82, "stack overflow" ) - FT_ERRORDEF_( Code_Overflow, 0x83, \ + FT_ERRORDEF_( Code_Overflow, 0x83, "code overflow" ) - FT_ERRORDEF_( Bad_Argument, 0x84, \ + FT_ERRORDEF_( Bad_Argument, 0x84, "bad argument" ) - FT_ERRORDEF_( Divide_By_Zero, 0x85, \ + FT_ERRORDEF_( Divide_By_Zero, 0x85, "division by zero" ) - FT_ERRORDEF_( Invalid_Reference, 0x86, \ + FT_ERRORDEF_( Invalid_Reference, 0x86, "invalid reference" ) - FT_ERRORDEF_( Debug_OpCode, 0x87, \ + FT_ERRORDEF_( Debug_OpCode, 0x87, "found debug opcode" ) - FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ + FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, "found ENDF opcode in execution stream" ) - FT_ERRORDEF_( Nested_DEFS, 0x89, \ + FT_ERRORDEF_( Nested_DEFS, 0x89, "nested DEFS" ) - FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ + FT_ERRORDEF_( Invalid_CodeRange, 0x8A, "invalid code range" ) - FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ + FT_ERRORDEF_( Execution_Too_Long, 0x8B, "execution context too long" ) - FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ + FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, "too many function definitions" ) - FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ + FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, "too many instruction definitions" ) - FT_ERRORDEF_( Table_Missing, 0x8E, \ + FT_ERRORDEF_( Table_Missing, 0x8E, "SFNT font table missing" ) - FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \ + FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, "horizontal header (hhea) table missing" ) - FT_ERRORDEF_( Locations_Missing, 0x90, \ + FT_ERRORDEF_( Locations_Missing, 0x90, "locations (loca) table missing" ) - FT_ERRORDEF_( Name_Table_Missing, 0x91, \ + FT_ERRORDEF_( Name_Table_Missing, 0x91, "name table missing" ) - FT_ERRORDEF_( CMap_Table_Missing, 0x92, \ + FT_ERRORDEF_( CMap_Table_Missing, 0x92, "character map (cmap) table missing" ) - FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \ + FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, "horizontal metrics (hmtx) table missing" ) - FT_ERRORDEF_( Post_Table_Missing, 0x94, \ + FT_ERRORDEF_( Post_Table_Missing, 0x94, "PostScript (post) table missing" ) - FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \ + FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, "invalid horizontal metrics" ) - FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \ + FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, "invalid character map (cmap) format" ) - FT_ERRORDEF_( Invalid_PPem, 0x97, \ + FT_ERRORDEF_( Invalid_PPem, 0x97, "invalid ppem value" ) - FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \ + FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, "invalid vertical metrics" ) - FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \ + FT_ERRORDEF_( Could_Not_Find_Context, 0x99, "could not find context" ) - FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \ + FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, "invalid PostScript (post) table format" ) - FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \ + FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" ) /* CFF, CID, and Type 1 errors */ - FT_ERRORDEF_( Syntax_Error, 0xA0, \ + FT_ERRORDEF_( Syntax_Error, 0xA0, "opcode syntax error" ) - FT_ERRORDEF_( Stack_Underflow, 0xA1, \ + FT_ERRORDEF_( Stack_Underflow, 0xA1, "argument stack underflow" ) - FT_ERRORDEF_( Ignore, 0xA2, \ + FT_ERRORDEF_( Ignore, 0xA2, "ignore" ) - FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \ + FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, "no Unicode glyph name found" ) + FT_ERRORDEF_( Glyph_Too_Big, 0xA4, + "glyph to big for hinting" ) /* BDF errors */ - FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ + FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, "`STARTFONT' field missing" ) - FT_ERRORDEF_( Missing_Font_Field, 0xB1, \ + FT_ERRORDEF_( Missing_Font_Field, 0xB1, "`FONT' field missing" ) - FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ + FT_ERRORDEF_( Missing_Size_Field, 0xB2, "`SIZE' field missing" ) - FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \ + FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, "`FONTBOUNDINGBOX' field missing" ) - FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \ + FT_ERRORDEF_( Missing_Chars_Field, 0xB4, "`CHARS' field missing" ) - FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \ + FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, "`STARTCHAR' field missing" ) - FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \ + FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, "`ENCODING' field missing" ) - FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \ + FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, "`BBX' field missing" ) - FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \ + FT_ERRORDEF_( Bbx_Too_Big, 0xB8, "`BBX' too big" ) - FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \ + FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, "Font header corrupted or missing fields" ) - FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \ + FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, "Font glyphs corrupted or missing fields" ) diff --git a/include/freetype/fterrors.h b/include/fterrors.h similarity index 93% rename from include/freetype/fterrors.h rename to include/fterrors.h index a54699f..0fa3e4d 100644 --- a/include/freetype/fterrors.h +++ b/include/fterrors.h @@ -4,7 +4,7 @@ /* */ /* FreeType error code handling (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2007 by */ +/* Copyright 1996-2002, 2004, 2007, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -28,9 +28,8 @@ /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ /* defined in ftoption.h in order to make the higher byte indicate */ /* the module where the error has happened (this is not compatible */ - /* with standard builds of FreeType 2). You can then use the macro */ - /* FT_ERROR_BASE macro to extract the generic error code from an */ - /* FT_Error value. */ + /* with standard builds of FreeType 2). See the file `ftmoderr.h' for */ + /* more details. */ /* */ /* */ /* II - Error Message strings */ @@ -101,12 +100,6 @@ #undef FT_NEED_EXTERN_C -#undef FT_ERR_XCAT -#undef FT_ERR_CAT - -#define FT_ERR_XCAT( x, y ) x ## y -#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) - /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ /* By default, we use `FT_Err_'. */ @@ -150,11 +143,11 @@ /* this macro is used to define an error */ -#define FT_ERRORDEF_( e, v, s ) \ +#define FT_ERRORDEF_( e, v, s ) \ FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) /* this is only used for <module>_Err_Ok, which must be 0! */ -#define FT_NOERRORDEF_( e, v, s ) \ +#define FT_NOERRORDEF_( e, v, s ) \ FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) @@ -194,11 +187,9 @@ #undef FT_NEED_EXTERN_C #undef FT_ERR_BASE - /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */ -#ifndef FT_KEEP_ERR_PREFIX + /* FT_ERR_PREFIX is needed internally */ +#ifndef FT2_BUILD_LIBRARY #undef FT_ERR_PREFIX -#else -#undef FT_KEEP_ERR_PREFIX #endif #endif /* __FTERRORS_H__ */ diff --git a/include/freetype/ftgasp.h b/include/ftgasp.h similarity index 99% rename from include/freetype/ftgasp.h rename to include/ftgasp.h index 453d4fa..3f3d765 100644 --- a/include/freetype/ftgasp.h +++ b/include/ftgasp.h @@ -120,7 +120,8 @@ FT_Get_Gasp( FT_Face face, FT_UInt ppem ); -/* */ + /* */ + #endif /* _FT_GASP_H_ */ diff --git a/include/freetype/ftglyph.h b/include/ftglyph.h similarity index 95% rename from include/freetype/ftglyph.h rename to include/ftglyph.h index 3de69f7..15fa6a9 100644 --- a/include/freetype/ftglyph.h +++ b/include/ftglyph.h @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (specification). */ /* */ -/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */ +/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -94,7 +94,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* The root glyph structure contains a given glyph image plus its */ - /* advance width in 16.16 fixed float format. */ + /* advance width in 16.16 fixed-point format. */ /* */ /* <Fields> */ /* library :: A handle to the FreeType library object. */ @@ -325,22 +325,8 @@ FT_BEGIN_HEADER } FT_Glyph_BBox_Mode; - /*************************************************************************/ - /* */ - /* <Enum> */ - /* ft_glyph_bbox_xxx */ - /* */ - /* <Description> */ - /* These constants are deprecated. Use the corresponding */ - /* @FT_Glyph_BBox_Mode values instead. */ - /* */ - /* <Values> */ - /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */ - /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */ - /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */ - /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */ - /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */ - /* */ + /* these constants are deprecated; use the corresponding */ + /* `FT_Glyph_BBox_Mode' values instead */ #define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED #define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS #define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT @@ -358,17 +344,17 @@ FT_BEGIN_HEADER /* outline's points, including Bézier control points. Though it */ /* coincides with the exact bounding box for most glyphs, it can be */ /* slightly larger in some situations (like when rotating an outline */ - /* which contains Bézier outside arcs). */ + /* that contains Bézier outside arcs). */ /* */ /* Computing the control box is very fast, while getting the bounding */ /* box can take much more time as it needs to walk over all segments */ /* and arcs in the outline. To get the latter, you can use the */ - /* `ftbbox' component which is dedicated to this single task. */ + /* `ftbbox' component, which is dedicated to this single task. */ /* */ /* <Input> */ /* glyph :: A handle to the source glyph object. */ /* */ - /* mode :: The mode which indicates how to interpret the returned */ + /* mode :: The mode that indicates how to interpret the returned */ /* bounding box values. */ /* */ /* <Output> */ @@ -388,7 +374,7 @@ FT_BEGIN_HEADER /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */ /* reasonable values for the CBox it is necessary to load the glyph */ /* at a large ppem value (so that the hinting instructions can */ - /* properly shift and scale the subglyphs), then extracting the CBox */ + /* properly shift and scale the subglyphs), then extracting the CBox, */ /* which can be eventually converted back to font units. */ /* */ /* Note that the maximum coordinates are exclusive, which means that */ @@ -603,7 +589,6 @@ FT_BEGIN_HEADER FT_EXPORT( FT_Error ) FT_Matrix_Invert( FT_Matrix* matrix ); - /* */ diff --git a/include/freetype/ftgxval.h b/include/ftgxval.h similarity index 91% rename from include/freetype/ftgxval.h rename to include/ftgxval.h index 497015c..88c3d93 100644 --- a/include/freetype/ftgxval.h +++ b/include/ftgxval.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ /* */ -/* Copyright 2004, 2005, 2006 by */ +/* Copyright 2004-2006, 2013 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -57,9 +57,19 @@ FT_BEGIN_HEADER /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ /* trak, prop, lcar). */ /* */ + /* <Order> */ + /* FT_TrueTypeGX_Validate */ + /* FT_TrueTypeGX_Free */ + /* */ + /* FT_ClassicKern_Validate */ + /* FT_ClassicKern_Free */ + /* */ + /* FT_VALIDATE_GX_LENGTH */ + /* FT_VALIDATE_GXXXX */ + /* FT_VALIDATE_CKERNXXX */ + /* */ /*************************************************************************/ - /*************************************************************************/ /* */ /* */ @@ -171,8 +181,6 @@ FT_BEGIN_HEADER FT_VALIDATE_lcar ) - /* */ - /********************************************************************** * * @function: @@ -180,7 +188,7 @@ FT_BEGIN_HEADER * * @description: * Validate various TrueTypeGX tables to assure that all offsets and - * indices are valid. The idea is that a higher-level library which + * indices are valid. The idea is that a higher-level library that * actually does the text layout can access those tables without * error checking (which can be quite time consuming). * @@ -189,7 +197,7 @@ FT_BEGIN_HEADER * A handle to the input face. * * validation_flags :: - * A bit field which specifies the tables to be validated. See + * A bit field that specifies the tables to be validated. See * @FT_VALIDATE_GXXXX for possible values. * * table_length :: @@ -221,8 +229,6 @@ FT_BEGIN_HEADER FT_UInt table_length ); - /* */ - /********************************************************************** * * @function: @@ -248,8 +254,6 @@ FT_BEGIN_HEADER FT_Bytes table ); - /* */ - /********************************************************************** * * @enum: @@ -277,8 +281,6 @@ FT_BEGIN_HEADER #define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) - /* */ - /********************************************************************** * * @function: @@ -286,7 +288,7 @@ FT_BEGIN_HEADER * * @description: * Validate classic (16-bit format) kern table to assure that the offsets - * and indices are valid. The idea is that a higher-level library which + * and indices are valid. The idea is that a higher-level library that * actually does the text layout can access those tables without error * checking (which can be quite time consuming). * @@ -299,7 +301,7 @@ FT_BEGIN_HEADER * A handle to the input face. * * validation_flags :: - * A bit field which specifies the dialect to be validated. See + * A bit field that specifies the dialect to be validated. See * @FT_VALIDATE_CKERNXXX for possible values. * * @output: @@ -320,8 +322,6 @@ FT_BEGIN_HEADER FT_Bytes *ckern_table ); - /* */ - /********************************************************************** * * @function: @@ -346,8 +346,7 @@ FT_BEGIN_HEADER FT_ClassicKern_Free( FT_Face face, FT_Bytes table ); - - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftgzip.h b/include/ftgzip.h similarity index 74% rename from include/freetype/ftgzip.h rename to include/ftgzip.h index acbc4f0..eb346c6 100644 --- a/include/freetype/ftgzip.h +++ b/include/ftgzip.h @@ -4,7 +4,7 @@ /* */ /* Gzip-compressed stream support. */ /* */ -/* Copyright 2002, 2003, 2004, 2006 by */ +/* Copyright 2002-2004, 2006, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -91,7 +91,53 @@ FT_BEGIN_HEADER FT_Stream_OpenGzip( FT_Stream stream, FT_Stream source ); - /* */ + + /************************************************************************ + * + * @function: + * FT_Gzip_Uncompress + * + * @description: + * Decompress a zipped input buffer into an output buffer. This function + * is modeled after zlib's `uncompress' function. + * + * @input: + * memory :: + * A FreeType memory handle. + * + * input :: + * The input buffer. + * + * input_len :: + * The length of the input buffer. + * + * @output: + * output:: + * The output buffer. + * + * @inout: + * output_len :: + * Before calling the function, this is the the total size of the + * output buffer, which must be large enough to hold the entire + * uncompressed data (so the size of the uncompressed data must be + * known in advance). After calling the function, `output_len' is the + * size of the used data in `output'. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * This function may return `FT_Err_Unimplemented_Feature' if your build + * of FreeType was not compiled with zlib support. + */ + FT_EXPORT( FT_Error ) + FT_Gzip_Uncompress( FT_Memory memory, + FT_Byte* output, + FT_ULong* output_len, + const FT_Byte* input, + FT_ULong input_len ); + + /* */ FT_END_HEADER diff --git a/include/freetype/ftimage.h b/include/ftimage.h similarity index 88% rename from include/freetype/ftimage.h rename to include/ftimage.h index 04b5e04..2f7ca2a 100644 --- a/include/freetype/ftimage.h +++ b/include/ftimage.h @@ -5,8 +5,7 @@ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ -/* 2010 by */ +/* Copyright 1996-2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -54,7 +53,7 @@ FT_BEGIN_HEADER /* <Description> */ /* The type FT_Pos is used to store vectorial coordinates. Depending */ /* on the context, these can represent distances in integer font */ - /* units, or 16.16, or 26.6 fixed float pixel coordinates. */ + /* units, or 16.16, or 26.6 fixed-point pixel coordinates. */ /* */ typedef signed long FT_Pos; @@ -169,6 +168,15 @@ FT_BEGIN_HEADER /* times taller than the original glyph image. See also */ /* @FT_RENDER_MODE_LCD_V. */ /* */ + /* FT_PIXEL_MODE_BGRA :: */ + /* An image with four 8-bit channels per pixel, representing a */ + /* color image (such as emoticons) with alpha channel. For each */ + /* pixel, the format is BGRA, which means, the blue channel comes */ + /* first in memory. The color channels are pre-multiplied and in */ + /* the sRGB colorspace. For example, full red at half-translucent */ + /* opacity will be represented as `00,00,80,80', not `00,00,FF,80'. */ + /* See also @FT_LOAD_COLOR. */ + /* */ typedef enum FT_Pixel_Mode_ { FT_PIXEL_MODE_NONE = 0, @@ -178,73 +186,21 @@ FT_BEGIN_HEADER FT_PIXEL_MODE_GRAY4, FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V, + FT_PIXEL_MODE_BGRA, FT_PIXEL_MODE_MAX /* do not remove */ } FT_Pixel_Mode; - /*************************************************************************/ - /* */ - /* <Enum> */ - /* ft_pixel_mode_xxx */ - /* */ - /* <Description> */ - /* A list of deprecated constants. Use the corresponding */ - /* @FT_Pixel_Mode values instead. */ - /* */ - /* <Values> */ - /* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */ - /* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */ - /* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */ - /* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */ - /* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */ - /* */ + /* these constants are deprecated; use the corresponding `FT_Pixel_Mode' */ + /* values instead. */ #define ft_pixel_mode_none FT_PIXEL_MODE_NONE #define ft_pixel_mode_mono FT_PIXEL_MODE_MONO #define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY #define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 #define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 - /* */ - -#if 0 - - /*************************************************************************/ - /* */ - /* <Enum> */ - /* FT_Palette_Mode */ - /* */ - /* <Description> */ - /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */ - /* */ - /* An enumeration type to describe the format of a bitmap palette, */ - /* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */ - /* */ - /* <Values> */ - /* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */ - /* records. */ - /* */ - /* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */ - /* records. */ - /* */ - /* <Note> */ - /* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */ - /* FreeType, these types are not handled by the library itself. */ - /* */ - typedef enum FT_Palette_Mode_ - { - ft_palette_mode_rgb = 0, - ft_palette_mode_rgba, - - ft_palette_mode_max /* do not remove */ - - } FT_Palette_Mode; - - /* */ - -#endif - /*************************************************************************/ /* */ @@ -309,13 +265,13 @@ FT_BEGIN_HEADER /* */ typedef struct FT_Bitmap_ { - int rows; - int width; + unsigned int rows; + unsigned int width; int pitch; unsigned char* buffer; - short num_grays; - char pixel_mode; - char palette_mode; + unsigned short num_grays; + unsigned char pixel_mode; + unsigned char palette_mode; void* palette; } FT_Bitmap; @@ -372,7 +328,7 @@ FT_BEGIN_HEADER /* */ /* flags :: A set of bit flags used to characterize the outline */ /* and give hints to the scan-converter and hinter on */ - /* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */ + /* how to convert/grid-fit it. See @FT_OUTLINE_XXX. */ /* */ /* <Note> */ /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ @@ -393,6 +349,8 @@ FT_BEGIN_HEADER } FT_Outline; + /* */ + /* Following limits must be consistent with */ /* FT_Outline.{n_contours,n_points} */ #define FT_OUTLINE_CONTOURS_MAX SHRT_MAX @@ -402,7 +360,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Enum> */ - /* FT_OUTLINE_FLAGS */ + /* FT_OUTLINE_XXX */ /* */ /* <Description> */ /* A list of bit-field constants use for the flags in an outline's */ @@ -483,24 +441,8 @@ FT_BEGIN_HEADER #define FT_OUTLINE_SINGLE_PASS 0x200 - /************************************************************************* - * - * @enum: - * ft_outline_flags - * - * @description: - * These constants are deprecated. Please use the corresponding - * @FT_OUTLINE_FLAGS values. - * - * @values: - * ft_outline_none :: See @FT_OUTLINE_NONE. - * ft_outline_owner :: See @FT_OUTLINE_OWNER. - * ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL. - * ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL. - * ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS. - * ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION. - * ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS. - */ + /* these constants are deprecated; use the corresponding */ + /* `FT_OUTLINE_XXX' values instead */ #define ft_outline_none FT_OUTLINE_NONE #define ft_outline_owner FT_OUTLINE_OWNER #define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL @@ -546,7 +488,7 @@ FT_BEGIN_HEADER /* <Input> */ /* to :: A pointer to the target point of the `move to'. */ /* */ - /* user :: A typeless pointer which is passed from the caller of the */ + /* user :: A typeless pointer, which is passed from the caller of the */ /* decomposition function. */ /* */ /* <Return> */ @@ -573,7 +515,7 @@ FT_BEGIN_HEADER /* <Input> */ /* to :: A pointer to the target point of the `line to'. */ /* */ - /* user :: A typeless pointer which is passed from the caller of the */ + /* user :: A typeless pointer, which is passed from the caller of the */ /* decomposition function. */ /* */ /* <Return> */ @@ -604,7 +546,7 @@ FT_BEGIN_HEADER /* */ /* to :: A pointer to the target end point of the conic arc. */ /* */ - /* user :: A typeless pointer which is passed from the caller of */ + /* user :: A typeless pointer, which is passed from the caller of */ /* the decomposition function. */ /* */ /* <Return> */ @@ -636,7 +578,7 @@ FT_BEGIN_HEADER /* */ /* to :: A pointer to the target end point. */ /* */ - /* user :: A typeless pointer which is passed from the caller of */ + /* user :: A typeless pointer, which is passed from the caller of */ /* the decomposition function. */ /* */ /* <Return> */ @@ -787,22 +729,8 @@ FT_BEGIN_HEADER } FT_Glyph_Format; - /*************************************************************************/ - /* */ - /* <Enum> */ - /* ft_glyph_format_xxx */ - /* */ - /* <Description> */ - /* A list of deprecated constants. Use the corresponding */ - /* @FT_Glyph_Format values instead. */ - /* */ - /* <Values> */ - /* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */ - /* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */ - /* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */ - /* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */ - /* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */ - /* */ + /* these constants are deprecated; use the corresponding */ + /* `FT_Glyph_Format' values instead. */ #define ft_glyph_format_none FT_GLYPH_FORMAT_NONE #define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE #define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP @@ -827,8 +755,8 @@ FT_BEGIN_HEADER /* a a bitmap. This section contains the public API for rasters. */ /* */ /* Note that in FreeType 2, all rasters are now encapsulated within */ - /* specific modules called `renderers'. See `freetype/ftrender.h' for */ - /* more details on renderers. */ + /* specific modules called `renderers'. See `ftrender.h' for more */ + /* details on renderers. */ /* */ /*************************************************************************/ @@ -847,6 +775,21 @@ FT_BEGIN_HEADER /* <Description> */ /* This section contains technical definitions. */ /* */ + /* <Order> */ + /* FT_Raster */ + /* FT_Span */ + /* FT_SpanFunc */ + /* */ + /* FT_Raster_Params */ + /* FT_RASTER_FLAG_XXX */ + /* */ + /* FT_Raster_NewFunc */ + /* FT_Raster_DoneFunc */ + /* FT_Raster_ResetFunc */ + /* FT_Raster_SetModeFunc */ + /* FT_Raster_RenderFunc */ + /* FT_Raster_Funcs */ + /* */ /*************************************************************************/ @@ -856,8 +799,8 @@ FT_BEGIN_HEADER /* FT_Raster */ /* */ /* <Description> */ - /* A handle (pointer) to a raster object. Each object can be used */ - /* independently to convert an outline into a bitmap or pixmap. */ + /* An opaque handle (pointer) to a raster object. Each object can be */ + /* used independently to convert an outline into a bitmap or pixmap. */ /* */ typedef struct FT_RasterRec_* FT_Raster; @@ -868,8 +811,8 @@ FT_BEGIN_HEADER /* FT_Span */ /* */ /* <Description> */ - /* A structure used to model a single span of gray (or black) pixels */ - /* when rendering a monochrome or anti-aliased bitmap. */ + /* A structure used to model a single span of gray pixels when */ + /* rendering an anti-aliased bitmap. */ /* */ /* <Fields> */ /* x :: The span's horizontal start position. */ @@ -877,13 +820,12 @@ FT_BEGIN_HEADER /* len :: The span's length in pixels. */ /* */ /* coverage :: The span color/coverage, ranging from 0 (background) */ - /* to 255 (foreground). Only used for anti-aliased */ - /* rendering. */ + /* to 255 (foreground). */ /* */ /* <Note> */ /* This structure is used by the span drawing callback type named */ - /* @FT_SpanFunc which takes the y~coordinate of the span as a */ - /* a parameter. */ + /* @FT_SpanFunc that takes the y~coordinate of the span as a */ + /* parameter. */ /* */ /* The coverage value is always between 0 and 255. If you want less */ /* gray values, the callback function has to reduce them. */ @@ -948,22 +890,7 @@ FT_BEGIN_HEADER /* FT_Raster_BitTest_Func */ /* */ /* <Description> */ - /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ - /* */ - /* A function used as a call-back by the monochrome scan-converter */ - /* to test whether a given target pixel is already set to the drawing */ - /* `color'. These tests are crucial to implement drop-out control */ - /* per-se the TrueType spec. */ - /* */ - /* <Input> */ - /* y :: The pixel's y~coordinate. */ - /* */ - /* x :: The pixel's x~coordinate. */ - /* */ - /* user :: User-supplied data that is passed to the callback. */ - /* */ - /* <Return> */ - /* 1~if the pixel is `set', 0~otherwise. */ + /* Deprecated, unimplemented. */ /* */ typedef int (*FT_Raster_BitTest_Func)( int y, @@ -977,21 +904,7 @@ FT_BEGIN_HEADER /* FT_Raster_BitSet_Func */ /* */ /* <Description> */ - /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ - /* */ - /* A function used as a call-back by the monochrome scan-converter */ - /* to set an individual target pixel. This is crucial to implement */ - /* drop-out control according to the TrueType specification. */ - /* */ - /* <Input> */ - /* y :: The pixel's y~coordinate. */ - /* */ - /* x :: The pixel's x~coordinate. */ - /* */ - /* user :: User-supplied data that is passed to the callback. */ - /* */ - /* <Return> */ - /* 1~if the pixel is `set', 0~otherwise. */ + /* Deprecated, unimplemented. */ /* */ typedef void (*FT_Raster_BitSet_Func)( int y, @@ -1025,8 +938,8 @@ FT_BEGIN_HEADER /* pixmap's buffer _must_ be zeroed before */ /* rendering. */ /* */ - /* Note that for now, direct rendering is */ - /* only possible with anti-aliased glyphs. */ + /* Direct rendering is only possible with */ + /* anti-aliased glyphs. */ /* */ /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ /* rendering mode. If set, the output will */ @@ -1044,7 +957,8 @@ FT_BEGIN_HEADER #define FT_RASTER_FLAG_DIRECT 0x2 #define FT_RASTER_FLAG_CLIP 0x4 - /* deprecated */ + /* these constants are deprecated; use the corresponding */ + /* `FT_RASTER_FLAG_XXX' values instead */ #define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT #define ft_raster_flag_aa FT_RASTER_FLAG_AA #define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT @@ -1070,11 +984,11 @@ FT_BEGIN_HEADER /* */ /* gray_spans :: The gray span drawing callback. */ /* */ - /* black_spans :: The black span drawing callback. UNIMPLEMENTED! */ + /* black_spans :: Unused. */ /* */ - /* bit_test :: The bit test callback. UNIMPLEMENTED! */ + /* bit_test :: Unused. */ /* */ - /* bit_set :: The bit set callback. UNIMPLEMENTED! */ + /* bit_set :: Unused. */ /* */ /* user :: User-supplied data that is passed to each drawing */ /* callback. */ @@ -1091,15 +1005,9 @@ FT_BEGIN_HEADER /* */ /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ /* raster will call the `gray_spans' callback to draw gray pixel */ - /* spans, in the case of an aa glyph bitmap, it will call */ - /* `black_spans', and `bit_test' and `bit_set' in the case of a */ - /* monochrome bitmap. This allows direct composition over a */ - /* pre-existing bitmap through user-provided callbacks to perform the */ - /* span drawing/composition. */ - /* */ - /* Note that the `bit_test' and `bit_set' callbacks are required when */ - /* rendering a monochrome bitmap, as they are crucial to implement */ - /* correct drop-out control as defined in the TrueType specification. */ + /* spans. This allows direct composition over a pre-existing bitmap */ + /* through user-provided callbacks to perform the span drawing and */ + /* composition. Not supported by the monochrome rasterizer. */ /* */ typedef struct FT_Raster_Params_ { @@ -1107,9 +1015,9 @@ FT_BEGIN_HEADER const void* source; int flags; FT_SpanFunc gray_spans; - FT_SpanFunc black_spans; /* doesn't work! */ - FT_Raster_BitTest_Func bit_test; /* doesn't work! */ - FT_Raster_BitSet_Func bit_set; /* doesn't work! */ + FT_SpanFunc black_spans; /* unused */ + FT_Raster_BitTest_Func bit_test; /* unused */ + FT_Raster_BitSet_Func bit_set; /* unused */ void* user; FT_BBox clip_box; @@ -1256,7 +1164,7 @@ FT_BEGIN_HEADER /* XXX: For now, the standard raster doesn't support direct */ /* composition but this should change for the final release (see */ /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ - /* for examples of distinct implementations which support direct */ + /* for examples of distinct implementations that support direct */ /* composition). */ /* */ typedef int @@ -1296,7 +1204,6 @@ FT_BEGIN_HEADER } FT_Raster_Funcs; - /* */ diff --git a/include/freetype/ftincrem.h b/include/ftincrem.h similarity index 99% rename from include/freetype/ftincrem.h rename to include/ftincrem.h index aaf689f..4c0246c 100644 --- a/include/freetype/ftincrem.h +++ b/include/ftincrem.h @@ -4,7 +4,7 @@ /* */ /* FreeType incremental loading (specification). */ /* */ -/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */ +/* Copyright 2002, 2003, 2006-2008, 2010, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,7 +45,7 @@ FT_BEGIN_HEADER * @description: * This section contains various functions used to perform so-called * `incremental' glyph loading. This is a mode where all glyphs loaded - * from a given @FT_Face are provided by the client application, + * from a given @FT_Face are provided by the client application. * * Apart from that, all other tables are loaded normally from the font * file. This mode is useful when FreeType is used within another @@ -345,6 +345,7 @@ FT_BEGIN_HEADER /* */ + FT_END_HEADER #endif /* __FTINCREM_H__ */ diff --git a/include/freetype/ftlcdfil.h b/include/ftlcdfil.h similarity index 80% rename from include/freetype/ftlcdfil.h rename to include/ftlcdfil.h index 0b55ebe..e8679c1 100644 --- a/include/freetype/ftlcdfil.h +++ b/include/ftlcdfil.h @@ -5,7 +5,7 @@ /* FreeType API for color filtering of subpixel bitmap glyphs */ /* (specification). */ /* */ -/* Copyright 2006, 2007, 2008, 2010 by */ +/* Copyright 2006-2008, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,14 +45,52 @@ FT_BEGIN_HEADER * * @description: * The @FT_Library_SetLcdFilter API can be used to specify a low-pass - * filter which is then applied to LCD-optimized bitmaps generated + * filter, which is then applied to LCD-optimized bitmaps generated * through @FT_Render_Glyph. This is useful to reduce color fringes - * which would occur with unfiltered rendering. + * that would occur with unfiltered rendering. * * Note that no filter is active by default, and that this function is * *not* implemented in default builds of the library. You need to * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file * in order to activate it. + * + * FreeType generates alpha coverage maps, which are linear by nature. + * For instance, the value 0x80 in bitmap representation means that + * (within numerical precision) 0x80/0xFF fraction of that pixel is + * covered by the glyph's outline. The blending function for placing + * text over a background is + * + * { + * dst = alpha * src + (1 - alpha) * dst , + * } + * + * which is known as OVER. However, when calculating the output of the + * OVER operator, the source colors should first be transformed to a + * linear color space, then alpha blended in that space, and transformed + * back to the output color space. + * + * When linear light blending is used, the default FIR5 filtering + * weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as + * they have been designed for black on white rendering while lacking + * gamma correction. To preserve color neutrality, weights for a FIR5 + * filter should be chosen according to two free parameters `a' and `c', + * and the FIR weights should be + * + * { + * [a - c, a + c, 2 * a, a + c, a - c] . + * } + * + * This formula generates equal weights for all the color primaries + * across the filter kernel, which makes it colorless. One suggested + * set of weights is + * + * { + * [0x10, 0x50, 0x60, 0x50, 0x10] , + * } + * + * where `a' has value 0x30 and `b' value 0x20. The weights in filter + * may have a sum larger than 0x100, which increases coloration slightly + * but also improves contrast. */ diff --git a/include/freetype/ftlist.h b/include/ftlist.h similarity index 96% rename from include/freetype/ftlist.h rename to include/ftlist.h index bb6f7f1..9950a27 100644 --- a/include/freetype/ftlist.h +++ b/include/ftlist.h @@ -4,7 +4,7 @@ /* */ /* Generic list support for FreeType (specification). */ /* */ -/* Copyright 1996-2001, 2003, 2007, 2010 by */ +/* Copyright 1996-2001, 2003, 2007, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -173,7 +173,7 @@ FT_BEGIN_HEADER /* FT_List_Iterator */ /* */ /* <Description> */ - /* An FT_List iterator function which is called during a list parse */ + /* An FT_List iterator function that is called during a list parse */ /* by @FT_List_Iterate. */ /* */ /* <Input> */ @@ -200,7 +200,7 @@ FT_BEGIN_HEADER /* <Input> */ /* list :: A handle to the list. */ /* iterator :: An iterator function, called on each node of the list. */ - /* user :: A user-supplied field which is passed as the second */ + /* user :: A user-supplied field that is passed as the second */ /* argument to the iterator. */ /* */ /* <Return> */ @@ -218,7 +218,7 @@ FT_BEGIN_HEADER /* FT_List_Destructor */ /* */ /* <Description> */ - /* An @FT_List iterator function which is called during a list */ + /* An @FT_List iterator function that is called during a list */ /* finalization by @FT_List_Finalize to destroy all elements in a */ /* given list. */ /* */ @@ -248,11 +248,11 @@ FT_BEGIN_HEADER /* list :: A handle to the list. */ /* */ /* destroy :: A list destructor that will be applied to each element */ - /* of the list. */ + /* of the list. Set this to NULL if not needed. */ /* */ - /* memory :: The current memory object which handles deallocation. */ + /* memory :: The current memory object that handles deallocation. */ /* */ - /* user :: A user-supplied field which is passed as the last */ + /* user :: A user-supplied field that is passed as the last */ /* argument to the destructor. */ /* */ /* <Note> */ @@ -265,7 +265,6 @@ FT_BEGIN_HEADER FT_Memory memory, void* user ); - /* */ diff --git a/include/freetype/ftlzw.h b/include/ftlzw.h similarity index 99% rename from include/freetype/ftlzw.h rename to include/ftlzw.h index 00d4016..857c0c5 100644 --- a/include/freetype/ftlzw.h +++ b/include/ftlzw.h @@ -88,7 +88,7 @@ FT_BEGIN_HEADER FT_Stream_OpenLZW( FT_Stream stream, FT_Stream source ); - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftmac.h b/include/ftmac.h similarity index 98% rename from include/freetype/ftmac.h rename to include/ftmac.h index ab5bab5..42874fe 100644 --- a/include/freetype/ftmac.h +++ b/include/ftmac.h @@ -4,7 +4,7 @@ /* */ /* Additional Mac-specific API. */ /* */ -/* Copyright 1996-2001, 2004, 2006, 2007 by */ +/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,7 +18,7 @@ /***************************************************************************/ /* */ -/* NOTE: Include this file after <freetype/freetype.h> and after any */ +/* NOTE: Include this file after FT_FREETYPE_H and after any */ /* Mac-specific headers (because this header uses Mac types such as */ /* Handle, FSSpec, FSRef, etc.) */ /* */ @@ -168,7 +168,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Return a pathname of the disk file and face index for given font */ - /* name which is handled by ATS framework. */ + /* name that is handled by ATS framework. */ /* */ /* <Input> */ /* fontName :: Mac OS name of the font in ATS framework. */ diff --git a/include/freetype/ftmm.h b/include/ftmm.h similarity index 98% rename from include/freetype/ftmm.h rename to include/ftmm.h index 3aefb9e..2dcfd67 100644 --- a/include/freetype/ftmm.h +++ b/include/ftmm.h @@ -4,7 +4,7 @@ /* */ /* FreeType Multiple Master font interface (specification). */ /* */ -/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -196,7 +196,7 @@ FT_BEGIN_HEADER /* number of designs). */ /* */ /* num_namedstyles :: The number of named styles; only meaningful for */ - /* GX which allows certain design coordinates to */ + /* GX that allows certain design coordinates to */ /* have a string ID (in the `name' table) */ /* associated with them. The font can tell the */ /* user that, for example, Weight=1.5 is `Bold'. */ @@ -218,9 +218,6 @@ FT_BEGIN_HEADER } FT_MM_Var; - /* */ - - /*************************************************************************/ /* */ /* <Function> */ @@ -258,8 +255,7 @@ FT_BEGIN_HEADER /* */ /* <Output> */ /* amaster :: The Multiple Masters/GX var descriptor. */ - /* Allocates a data structure, which the user must free */ - /* (a single call to FT_FREE will do it). */ + /* Allocates a data structure, which the user must free. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ @@ -366,7 +362,6 @@ FT_BEGIN_HEADER FT_UInt num_coords, FT_Fixed* coords ); - /* */ diff --git a/include/freetype/ftmodapi.h b/include/ftmodapi.h similarity index 75% rename from include/freetype/ftmodapi.h rename to include/ftmodapi.h index 8f2e017..980f15d 100644 --- a/include/freetype/ftmodapi.h +++ b/include/ftmodapi.h @@ -4,7 +4,7 @@ /* */ /* FreeType modules public interface (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */ +/* Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -42,11 +42,65 @@ FT_BEGIN_HEADER /* Module Management */ /* */ /* <Abstract> */ - /* How to add, upgrade, and remove modules from FreeType. */ + /* How to add, upgrade, remove, and control modules from FreeType. */ /* */ /* <Description> */ /* The definitions below are used to manage modules within FreeType. */ /* Modules can be added, upgraded, and removed at runtime. */ + /* Additionally, some module properties can be controlled also. */ + /* */ + /* Here is a list of possible values of the `module_name' field in */ + /* the @FT_Module_Class structure. */ + /* */ + /* { */ + /* autofitter */ + /* bdf */ + /* cff */ + /* gxvalid */ + /* otvalid */ + /* pcf */ + /* pfr */ + /* psaux */ + /* pshinter */ + /* psnames */ + /* raster1, raster5 */ + /* sfnt */ + /* smooth, smooth-lcd, smooth-lcdv */ + /* truetype */ + /* type1 */ + /* type42 */ + /* t1cid */ + /* winfonts */ + /* } */ + /* */ + /* Note that the FreeType Cache sub-system is not a FreeType module. */ + /* */ + /* <Order> */ + /* FT_Module */ + /* FT_Module_Constructor */ + /* FT_Module_Destructor */ + /* FT_Module_Requester */ + /* FT_Module_Class */ + /* */ + /* FT_Add_Module */ + /* FT_Get_Module */ + /* FT_Remove_Module */ + /* FT_Add_Default_Modules */ + /* */ + /* FT_Property_Set */ + /* FT_Property_Get */ + /* */ + /* FT_New_Library */ + /* FT_Done_Library */ + /* FT_Reference_Library */ + /* */ + /* FT_Renderer */ + /* FT_Renderer_Class */ + /* */ + /* FT_Get_Renderer */ + /* FT_Set_Renderer */ + /* */ + /* FT_Set_Debug_Hook */ /* */ /*************************************************************************/ @@ -118,7 +172,7 @@ FT_BEGIN_HEADER /* A function used to query a given module for a specific interface. */ /* */ /* <Input> */ - /* module :: The module to finalize. */ + /* module :: The module to be searched. */ /* */ /* name :: The name of the interface in the module. */ /* */ @@ -249,6 +303,137 @@ FT_BEGIN_HEADER FT_Module module ); + /********************************************************************** + * + * @function: + * FT_Property_Set + * + * @description: + * Set a property for a given module. + * + * @input: + * library :: + * A handle to the library the module is part of. + * + * module_name :: + * The module name. + * + * property_name :: + * The property name. Properties are described in the `Synopsis' + * subsection of the module's documentation. + * + * Note that only a few modules have properties. + * + * value :: + * A generic pointer to a variable or structure that gives the new + * value of the property. The exact definition of `value' is + * dependent on the property; see the `Synopsis' subsection of the + * module's documentation. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `module_name' isn't a valid module name, or `property_name' + * doesn't specify a valid property, or if `value' doesn't represent a + * valid value for the given property, an error is returned. + * + * The following example sets property `bar' (a simple integer) in + * module `foo' to value~1. + * + * { + * FT_UInt bar; + * + * + * bar = 1; + * FT_Property_Set( library, "foo", "bar", &bar ); + * } + * + * Note that the FreeType Cache sub-system doesn't recognize module + * property changes. To avoid glyph lookup confusion within the cache + * you should call @FTC_Manager_Reset to completely flush the cache if + * a module property gets changed after @FTC_Manager_New has been + * called. + * + * It is not possible to set properties of the FreeType Cache + * sub-system itself with FT_Property_Set; use @FTC_Property_Set + * instead. + * + * @since: + * 2.4.11 + * + */ + FT_EXPORT( FT_Error ) + FT_Property_Set( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + const void* value ); + + + /********************************************************************** + * + * @function: + * FT_Property_Get + * + * @description: + * Get a module's property value. + * + * @input: + * library :: + * A handle to the library the module is part of. + * + * module_name :: + * The module name. + * + * property_name :: + * The property name. Properties are described in the `Synopsis' + * subsection of the module's documentation. + * + * @inout: + * value :: + * A generic pointer to a variable or structure that gives the + * value of the property. The exact definition of `value' is + * dependent on the property; see the `Synopsis' subsection of the + * module's documentation. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If `module_name' isn't a valid module name, or `property_name' + * doesn't specify a valid property, or if `value' doesn't represent a + * valid value for the given property, an error is returned. + * + * The following example gets property `baz' (a range) in module `foo'. + * + * { + * typedef range_ + * { + * FT_Int32 min; + * FT_Int32 max; + * + * } range; + * + * range baz; + * + * + * FT_Property_Get( library, "foo", "baz", &baz ); + * } + * + * It is not possible to retrieve properties of the FreeType Cache + * sub-system with FT_Property_Get; use @FTC_Property_Get instead. + * + * @since: + * 2.4.11 + * + */ + FT_EXPORT( FT_Error ) + FT_Property_Get( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + void* value ); + + /*************************************************************************/ /* */ /* <Function> */ @@ -260,7 +445,7 @@ FT_BEGIN_HEADER /* @FT_Done_Library then only destroys a library if the counter is~1, */ /* otherwise it simply decrements the counter. */ /* */ - /* This function helps in managing life-cycles of structures which */ + /* This function helps in managing life-cycles of structures that */ /* reference @FT_Library objects. */ /* */ /* <Input> */ @@ -333,7 +518,7 @@ FT_BEGIN_HEADER FT_EXPORT( FT_Error ) FT_Done_Library( FT_Library library ); -/* */ + /* */ typedef void (*FT_DebugHook_Func)( void* arg ); @@ -426,17 +611,17 @@ FT_BEGIN_HEADER * The library implements a bytecode interpreter that doesn't * support the patented operations of the TrueType virtual machine. * - * Its main use is to load certain Asian fonts which position and + * Its main use is to load certain Asian fonts that position and * scale glyph components with bytecode instructions. It produces * bad output for most other fonts. * - * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: + * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: * The library implements a bytecode interpreter that covers * the full instruction set of the TrueType virtual machine (this * was governed by patents until May 2010, hence the name). * * @since: - * 2.2 + * 2.2 * */ typedef enum FT_TrueTypeEngineType_ @@ -471,7 +656,6 @@ FT_BEGIN_HEADER FT_EXPORT( FT_TrueTypeEngineType ) FT_Get_TrueType_Engine_Type( FT_Library library ); - /* */ diff --git a/include/freetype/ftmoderr.h b/include/ftmoderr.h similarity index 63% rename from include/freetype/ftmoderr.h rename to include/ftmoderr.h index 1bf3b38..5a27db1 100644 --- a/include/freetype/ftmoderr.h +++ b/include/ftmoderr.h @@ -4,7 +4,7 @@ /* */ /* FreeType module error offsets (specification). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */ +/* Copyright 2001-2005, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,17 +18,57 @@ /*************************************************************************/ /* */ - /* This file is used to define the FreeType module error offsets. */ + /* This file is used to define the FreeType module error codes. */ /* */ - /* The lower byte gives the error code, the higher byte gives the */ - /* module. The base module has error offset 0. For example, the error */ - /* `FT_Err_Invalid_File_Format' has value 0x003, the error */ - /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */ - /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */ + /* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is */ + /* set, the lower byte of an error value identifies the error code as */ + /* usual. In addition, the higher byte identifies the module. For */ + /* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the */ + /* error `TT_Err_Invalid_File_Format' has value 0x1303, the error */ + /* `T1_Err_Invalid_File_Format' has value 0x1403, etc. */ + /* */ + /* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, */ + /* including the high byte. */ + /* */ + /* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of */ + /* an error value is set to zero. */ + /* */ + /* To hide the various `XXX_Err_' prefixes in the source code, FreeType */ + /* provides some macros in `fttypes.h'. */ + /* */ + /* FT_ERR( err ) */ + /* Add current error module prefix (as defined with the */ + /* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module */ + /* the line */ + /* */ + /* error = FT_ERR( Invalid_Outline ); */ + /* */ + /* expands to */ + /* */ + /* error = BDF_Err_Invalid_Outline; */ + /* */ + /* For simplicity, you can always use `FT_Err_Ok' directly instead */ + /* of `FT_ERR( Ok )'. */ + /* */ + /* FT_ERR_EQ( errcode, err ) */ + /* FT_ERR_NEQ( errcode, err ) */ + /* Compare error code `errcode' with the error `err' for equality */ + /* and inequality, respectively. Example: */ + /* */ + /* if ( FT_ERR_EQ( error, Invalid_Outline ) ) */ + /* ... */ + /* */ + /* Using this macro you don't have to think about error prefixes. */ + /* Of course, if module errors are not active, the above example is */ + /* the same as */ + /* */ + /* if ( error == FT_Err_Invalid_Outline ) */ + /* ... */ + /* */ + /* FT_ERROR_BASE( errcode ) */ + /* FT_ERROR_MODULE( errcode ) */ + /* Get base error and module error code, respectively. */ /* */ - /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */ - /* to make the higher byte always zero (disabling the module error */ - /* mechanism). */ /* */ /* It can also be used to create a module error message table easily */ /* with something like */ @@ -48,9 +88,6 @@ /* #include FT_MODULE_ERRORS_H */ /* } */ /* */ - /* To use such a table, all errors must be ANDed with 0xFF00 to remove */ - /* the error code. */ - /* */ /*************************************************************************/ @@ -124,6 +161,7 @@ FT_MODERRDEF( Type1, 0x1300, "Type 1 module" ) FT_MODERRDEF( Type42, 0x1400, "Type 42 module" ) FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" ) + FT_MODERRDEF( GXvalid, 0x1600, "GX validation module" ) #ifdef FT_MODERR_END_LIST diff --git a/include/freetype/ftotval.h b/include/ftotval.h similarity index 91% rename from include/freetype/ftotval.h rename to include/ftotval.h index 027f2e8..75ba03e 100644 --- a/include/freetype/ftotval.h +++ b/include/ftotval.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating OpenType tables (specification). */ /* */ -/* Copyright 2004, 2005, 2006, 2007 by */ +/* Copyright 2004-2007, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -58,6 +58,12 @@ FT_BEGIN_HEADER /* This section contains the declaration of functions to validate */ /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ /* */ + /* <Order> */ + /* FT_OpenType_Validate */ + /* FT_OpenType_Free */ + /* */ + /* FT_VALIDATE_OTXXX */ + /* */ /*************************************************************************/ @@ -107,8 +113,6 @@ FT_BEGIN_HEADER FT_VALIDATE_JSTF | \ FT_VALIDATE_MATH - /* */ - /********************************************************************** * * @function: @@ -116,7 +120,7 @@ FT_BEGIN_HEADER * * @description: * Validate various OpenType tables to assure that all offsets and - * indices are valid. The idea is that a higher-level library which + * indices are valid. The idea is that a higher-level library that * actually does the text layout can access those tables without * error checking (which can be quite time consuming). * @@ -125,7 +129,7 @@ FT_BEGIN_HEADER * A handle to the input face. * * validation_flags :: - * A bit field which specifies the tables to be validated. See + * A bit field that specifies the tables to be validated. See * @FT_VALIDATE_OTXXX for possible values. * * @output: @@ -165,8 +169,6 @@ FT_BEGIN_HEADER FT_Bytes *GSUB_table, FT_Bytes *JSTF_table ); - /* */ - /********************************************************************** * * @function: @@ -191,8 +193,7 @@ FT_BEGIN_HEADER FT_OpenType_Free( FT_Face face, FT_Bytes table ); - - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftoutln.h b/include/ftoutln.h similarity index 90% rename from include/freetype/ftoutln.h rename to include/ftoutln.h index 1cf3c3f..d3b8fbd 100644 --- a/include/freetype/ftoutln.h +++ b/include/ftoutln.h @@ -5,7 +5,7 @@ /* Support for the FT_Outline type used to store glyph shapes of */ /* most scalable font formats (specification). */ /* */ -/* Copyright 1996-2003, 2005-2011 by */ +/* Copyright 1996-2003, 2005-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -52,13 +52,13 @@ FT_BEGIN_HEADER /* */ /* <Order> */ /* FT_Outline */ - /* FT_OUTLINE_FLAGS */ /* FT_Outline_New */ /* FT_Outline_Done */ /* FT_Outline_Copy */ /* FT_Outline_Translate */ /* FT_Outline_Transform */ /* FT_Outline_Embolden */ + /* FT_Outline_EmboldenXY */ /* FT_Outline_Reverse */ /* FT_Outline_Check */ /* */ @@ -67,13 +67,17 @@ FT_BEGIN_HEADER /* */ /* FT_Outline_Get_Bitmap */ /* FT_Outline_Render */ - /* */ /* FT_Outline_Decompose */ /* FT_Outline_Funcs */ - /* FT_Outline_MoveTo_Func */ - /* FT_Outline_LineTo_Func */ - /* FT_Outline_ConicTo_Func */ - /* FT_Outline_CubicTo_Func */ + /* FT_Outline_MoveToFunc */ + /* FT_Outline_LineToFunc */ + /* FT_Outline_ConicToFunc */ + /* FT_Outline_CubicToFunc */ + /* */ + /* FT_Orientation */ + /* FT_Outline_Get_Orientation */ + /* */ + /* FT_OUTLINE_XXX */ /* */ /*************************************************************************/ @@ -96,7 +100,7 @@ FT_BEGIN_HEADER /* operations. */ /* */ /* <InOut> */ - /* user :: A typeless pointer which is passed to each */ + /* user :: A typeless pointer that is passed to each */ /* emitter during the decomposition. It can be */ /* used to store the state during the */ /* decomposition. */ @@ -104,6 +108,13 @@ FT_BEGIN_HEADER /* <Return> */ /* FreeType error code. 0~means success. */ /* */ + /* <Note> */ + /* A contour that contains a single point only is represented by a */ + /* `move to' operation followed by `line to' to the same point. In */ + /* most cases, it is best to filter this out before using the */ + /* outline for stroking purposes (otherwise it would result in a */ + /* visible dot when round caps are used). */ + /* */ FT_EXPORT( FT_Error ) FT_Outline_Decompose( FT_Outline* outline, const FT_Outline_Funcs* func_interface, @@ -124,9 +135,11 @@ FT_BEGIN_HEADER /* outline will *not* necessarily be *freed*, when */ /* destroying the library, by @FT_Done_FreeType. */ /* */ - /* numPoints :: The maximal number of points within the outline. */ + /* numPoints :: The maximum number of points within the outline. */ + /* Must be smaller than or equal to 0xFFFF (65535). */ /* */ - /* numContours :: The maximal number of contours within the outline. */ + /* numContours :: The maximum number of contours within the outline. */ + /* This value must be in the range 0 to `numPoints'. */ /* */ /* <Output> */ /* anoutline :: A handle to the new outline. */ @@ -214,12 +227,12 @@ FT_BEGIN_HEADER /* the outline's points, including Bézier control points. Though it */ /* coincides with the exact bounding box for most glyphs, it can be */ /* slightly larger in some situations (like when rotating an outline */ - /* which contains Bézier outside arcs). */ + /* that contains Bézier outside arcs). */ /* */ /* Computing the control box is very fast, while getting the bounding */ /* box can take much more time as it needs to walk over all segments */ /* and arcs in the outline. To get the latter, you can use the */ - /* `ftbbox' component which is dedicated to this single task. */ + /* `ftbbox' component, which is dedicated to this single task. */ /* */ /* <Input> */ /* outline :: A pointer to the source outline descriptor. */ @@ -345,6 +358,9 @@ FT_BEGIN_HEADER /* FT_Outline_Embolden( &face->slot->outline, strength ); */ /* } */ /* */ + /* To get meaningful results, font scaling values must be set with */ + /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* */ FT_EXPORT( FT_Error ) FT_Outline_Embolden( FT_Outline* outline, FT_Pos strength ); @@ -353,6 +369,23 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Function> */ + /* FT_Outline_EmboldenXY */ + /* */ + /* <Description> */ + /* Embolden an outline. The new outline will be `xstrength' pixels */ + /* wider and `ystrength' pixels higher. Otherwise, it is similar to */ + /* @FT_Outline_Embolden, which uses the same strength in both */ + /* directions. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Outline_EmboldenXY( FT_Outline* outline, + FT_Pos xstrength, + FT_Pos ystrength ); + + + /*************************************************************************/ + /* */ + /* <Function> */ /* FT_Outline_Reverse */ /* */ /* <Description> */ @@ -505,9 +538,11 @@ FT_BEGIN_HEADER * * @description: * This function analyzes a glyph outline and tries to compute its - * fill orientation (see @FT_Orientation). This is done by computing - * the direction of each global horizontal and/or vertical extrema - * within the outline. + * fill orientation (see @FT_Orientation). This is done by integrating + * the total area covered by the outline. The positive integral + * corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT + * is returned. The negative integral corresponds to the counter-clockwise + * orientation and @FT_ORIENTATION_TRUETYPE is returned. * * Note that this will return @FT_ORIENTATION_TRUETYPE for empty * outlines. @@ -523,7 +558,6 @@ FT_BEGIN_HEADER FT_EXPORT( FT_Orientation ) FT_Outline_Get_Orientation( FT_Outline* outline ); - /* */ diff --git a/include/freetype/ftpfr.h b/include/ftpfr.h similarity index 99% rename from include/freetype/ftpfr.h rename to include/ftpfr.h index 0b7b7d4..7d50353 100644 --- a/include/freetype/ftpfr.h +++ b/include/ftpfr.h @@ -161,7 +161,7 @@ FT_BEGIN_HEADER FT_UInt gindex, FT_Pos *aadvance ); - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftrender.h b/include/ftrender.h similarity index 99% rename from include/freetype/ftrender.h rename to include/ftrender.h index dd0229b..e8d3636 100644 --- a/include/freetype/ftrender.h +++ b/include/ftrender.h @@ -226,7 +226,6 @@ FT_BEGIN_HEADER FT_UInt num_params, FT_Parameter* parameters ); - /* */ diff --git a/include/freetype/ftsizes.h b/include/ftsizes.h similarity index 98% rename from include/freetype/ftsizes.h rename to include/ftsizes.h index 3e548cc..4167045 100644 --- a/include/freetype/ftsizes.h +++ b/include/ftsizes.h @@ -4,7 +4,7 @@ /* */ /* FreeType size objects management (specification). */ /* */ -/* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ +/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -129,7 +129,7 @@ FT_BEGIN_HEADER /* <Description> */ /* Even though it is possible to create several size objects for a */ /* given face (see @FT_New_Size for details), functions like */ - /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */ + /* @FT_Load_Glyph or @FT_Load_Char only use the one that has been */ /* activated last to determine the `current character pixel size'. */ /* */ /* This function can be used to `activate' a previously created size */ diff --git a/include/freetype/ftsnames.h b/include/ftsnames.h similarity index 98% rename from include/freetype/ftsnames.h rename to include/ftsnames.h index 485e4e1..88af440 100644 --- a/include/freetype/ftsnames.h +++ b/include/ftsnames.h @@ -7,7 +7,7 @@ /* */ /* This is _not_ used to retrieve glyph names! */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */ +/* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -169,7 +169,7 @@ FT_BEGIN_HEADER * A constant used as the tag of @FT_Parameter structures to make * FT_Open_Face() ignore preferred family subfamily names in `name' * table since OpenType version 1.4. For backwards compatibility with - * legacy systems which has 4-face-per-family restriction. + * legacy systems that have a 4-face-per-family restriction. * */ #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) @@ -184,7 +184,7 @@ FT_BEGIN_HEADER * A constant used as the tag of @FT_Parameter structures to make * FT_Open_Face() ignore preferred subfamily names in `name' table since * OpenType version 1.4. For backwards compatibility with legacy - * systems which has 4-face-per-family restriction. + * systems that have a 4-face-per-family restriction. * */ #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) diff --git a/include/freetype/ftstroke.h b/include/ftstroke.h similarity index 93% rename from include/freetype/ftstroke.h rename to include/ftstroke.h index 49ae2bc..bd31170 100644 --- a/include/freetype/ftstroke.h +++ b/include/ftstroke.h @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (specification). */ /* */ -/* Copyright 2002-2006, 2008, 2009, 2011 by */ +/* Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -46,6 +46,38 @@ FT_BEGIN_HEADER * This can be useful to generate `bordered' glyph, i.e., glyphs * displayed with a coloured (and anti-aliased) border around their * shape. + * + * @order: + * FT_Stroker + * + * FT_Stroker_LineJoin + * FT_Stroker_LineCap + * FT_StrokerBorder + * + * FT_Outline_GetInsideBorder + * FT_Outline_GetOutsideBorder + * + * FT_Glyph_Stroke + * FT_Glyph_StrokeBorder + * + * FT_Stroker_New + * FT_Stroker_Set + * FT_Stroker_Rewind + * FT_Stroker_ParseOutline + * FT_Stroker_Done + * + * FT_Stroker_BeginSubPath + * FT_Stroker_EndSubPath + * + * FT_Stroker_LineTo + * FT_Stroker_ConicTo + * FT_Stroker_CubicTo + * + * FT_Stroker_GetBorderCounts + * FT_Stroker_ExportBorder + * FT_Stroker_GetCounts + * FT_Stroker_Export + * */ @@ -55,7 +87,7 @@ FT_BEGIN_HEADER * FT_Stroker * * @description: - * Opaque handler to a path stroker object. + * Opaque handle to a path stroker object. */ typedef struct FT_StrokerRec_* FT_Stroker; @@ -271,11 +303,13 @@ FT_BEGIN_HEADER * miter_limit :: * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, - * expressed as 16.16 fixed point value. + * expressed as 16.16 fixed-point value. * * @note: * The radius is expressed in the same units as the outline * coordinates. + * + * This function calls @FT_Stroker_Rewind automatically. */ FT_EXPORT( void ) FT_Stroker_Set( FT_Stroker stroker, @@ -570,10 +604,10 @@ FT_BEGIN_HEADER * receive all new data. * * When an outline, or a sub-path, is `closed', the stroker generates - * two independent `border' outlines, named `left' and `right' + * two independent `border' outlines, named `left' and `right'. * * When the outline, or a sub-path, is `opened', the stroker merges - * the `border' outlines with caps. The `left' border receives all + * the `border' outlines with caps. The `left' border receives all * points, while the `right' border becomes empty. * * Use the function @FT_Stroker_Export instead if you want to @@ -682,6 +716,11 @@ FT_BEGIN_HEADER * * @note: * The source glyph is untouched in case of error. + * + * Adding stroke may yield a significantly wider and taller glyph + * depending on how large of a radius was used to stroke the glyph. You + * may need to manually adjust horizontal and vertical advance amounts + * to account for this added size. */ FT_EXPORT( FT_Error ) FT_Glyph_Stroke( FT_Glyph *pglyph, @@ -719,6 +758,11 @@ FT_BEGIN_HEADER * * @note: * The source glyph is untouched in case of error. + * + * Adding stroke may yield a significantly wider and taller glyph + * depending on how large of a radius was used to stroke the glyph. You + * may need to manually adjust horizontal and vertical advance amounts + * to account for this added size. */ FT_EXPORT( FT_Error ) FT_Glyph_StrokeBorder( FT_Glyph *pglyph, @@ -726,7 +770,7 @@ FT_BEGIN_HEADER FT_Bool inside, FT_Bool destroy ); - /* */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftsynth.h b/include/ftsynth.h similarity index 91% rename from include/freetype/ftsynth.h rename to include/ftsynth.h index a068b79..d0ea730 100644 --- a/include/freetype/ftsynth.h +++ b/include/ftsynth.h @@ -5,7 +5,7 @@ /* FreeType synthesizing code for emboldening and slanting */ /* (specification). */ /* */ -/* Copyright 2000-2001, 2003, 2006, 2008 by */ +/* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -37,7 +37,7 @@ /* Main reason for not lifting the functions in this module to a */ /* `standard' API is that the used parameters for emboldening and */ /* slanting are not configurable. Consider the functions as a */ - /* code resource which should be copied into the application and */ + /* code resource that should be copied into the application and */ /* adapted to the particular needs. */ @@ -61,8 +61,9 @@ FT_BEGIN_HEADER /* taste). This function is actually a convenience function, providing */ /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ /* */ - /* For emboldened outlines the metrics are estimates only; if you need */ - /* precise values you should call @FT_Outline_Get_CBox. */ + /* For emboldened outlines the height, width, and advance metrics are */ + /* increased by the strength of the emboldening. You can also call */ + /* @FT_Outline_Get_CBox to get precise values. */ FT_EXPORT( void ) FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); @@ -72,6 +73,7 @@ FT_BEGIN_HEADER /* */ + FT_END_HEADER #endif /* __FTSYNTH_H__ */ diff --git a/include/freetype/ftsystem.h b/include/ftsystem.h similarity index 95% rename from include/freetype/ftsystem.h rename to include/ftsystem.h index e07460c..7436ed2 100644 --- a/include/freetype/ftsystem.h +++ b/include/ftsystem.h @@ -4,7 +4,7 @@ /* */ /* FreeType low-level system interface definition (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2005, 2010 by */ +/* Copyright 1996-2001, 2002, 2005, 2010, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -192,6 +192,10 @@ FT_BEGIN_HEADER * @description: * A handle to an input stream. * + * @also: + * See @FT_StreamRec for the publicly accessible fields of a given + * stream object. + * */ typedef struct FT_StreamRec_* FT_Stream; @@ -285,6 +289,11 @@ FT_BEGIN_HEADER * size :: * The stream size in bytes. * + * In case of compressed streams where the size is unknown before + * actually doing the decompression, the value is set to 0x7FFFFFFF. + * (Note that this size value can occur for normal streams also; it is + * thus just a hint.) + * * pos :: * The current position within the stream. * @@ -335,7 +344,6 @@ FT_BEGIN_HEADER } FT_StreamRec; - /* */ diff --git a/include/freetype/fttrigon.h b/include/fttrigon.h similarity index 95% rename from include/freetype/fttrigon.h rename to include/fttrigon.h index 6b77d2e..9c7b543 100644 --- a/include/freetype/fttrigon.h +++ b/include/fttrigon.h @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (specification). */ /* */ -/* Copyright 2001, 2003, 2005, 2007 by */ +/* Copyright 2001, 2003, 2005, 2007, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -46,7 +46,7 @@ FT_BEGIN_HEADER * * @description: * This type is used to model angle values in FreeType. Note that the - * angle is a 16.16 fixed float value expressed in degrees. + * angle is a 16.16 fixed-point value expressed in degrees. * */ typedef FT_Fixed FT_Angle; @@ -106,7 +106,7 @@ FT_BEGIN_HEADER * FT_Sin * * @description: - * Return the sinus of a given angle in fixed point format. + * Return the sinus of a given angle in fixed-point format. * * @input: * angle :: @@ -130,7 +130,7 @@ FT_BEGIN_HEADER * FT_Cos * * @description: - * Return the cosinus of a given angle in fixed point format. + * Return the cosinus of a given angle in fixed-point format. * * @input: * angle :: @@ -154,7 +154,7 @@ FT_BEGIN_HEADER * FT_Tan * * @description: - * Return the tangent of a given angle in fixed point format. + * Return the tangent of a given angle in fixed-point format. * * @input: * angle :: @@ -237,7 +237,7 @@ FT_BEGIN_HEADER * * @input: * angle :: - * The address of angle. + * The input angle. * */ FT_EXPORT( void ) @@ -259,7 +259,7 @@ FT_BEGIN_HEADER * * @input: * angle :: - * The address of angle. + * The input angle. * */ FT_EXPORT( void ) diff --git a/include/ftttdrv.h b/include/ftttdrv.h new file mode 100644 index 0000000..3588413 --- /dev/null +++ b/include/ftttdrv.h @@ -0,0 +1,170 @@ +/***************************************************************************/ +/* */ +/* ftttdrv.h */ +/* */ +/* FreeType API for controlling the TrueType driver */ +/* (specification only). */ +/* */ +/* Copyright 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __FTTTDRV_H__ +#define __FTTTDRV_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * tt_driver + * + * @title: + * The TrueType driver + * + * @abstract: + * Controlling the TrueType driver module. + * + * @description: + * While FreeType's TrueType driver doesn't expose API functions by + * itself, it is possible to control its behaviour with @FT_Property_Set + * and @FT_Property_Get. The following lists the available properties + * together with the necessary macros and structures. + * + * The TrueType driver's module name is `truetype'. + * + */ + + + /************************************************************************** + * + * @property: + * interpreter-version + * + * @description: + * Currently, two versions are available, representing the bytecode + * interpreter with and without subpixel hinting support, + * respectively. The default is subpixel support if + * TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel + * support otherwise (since it isn't available then). + * + * If subpixel hinting is on, many TrueType bytecode instructions + * behave differently compared to B/W or grayscale rendering. The + * main idea is to render at a much increased horizontal resolution, + * then sampling down the created output to subpixel precision. + * However, many older fonts are not suited to this and must be + * specially taken care of by applying (hardcoded) font-specific + * tweaks. + * + * Details on subpixel hinting and some of the necessary tweaks can be + * found in Greg Hitchcock's whitepaper at + * `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. + * + * The following example code demonstrates how to activate subpixel + * hinting (omitting the error handling). + * + * { + * FT_Library library; + * FT_Face face; + * FT_UInt interpreter_version = TT_INTERPRETER_VERSION_38; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "truetype", + * "interpreter-version", + * &interpreter_version ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + */ + + + /************************************************************************** + * + * @enum: + * TT_INTERPRETER_VERSION_XXX + * + * @description: + * A list of constants used for the @interpreter-version property to + * select the hinting engine for Truetype fonts. + * + * The numeric value in the constant names represents the version + * number as returned by the `GETINFO' bytecode instruction. + * + * @values: + * TT_INTERPRETER_VERSION_35 :: + * Version~35 corresponds to MS rasterizer v.1.7 as used e.g. in + * Windows~98; only grayscale and B/W rasterizing is supported. + * + * TT_INTERPRETER_VERSION_38 :: + * Version~38 corresponds to MS rasterizer v.1.9; it is roughly + * equivalent to the hinting provided by DirectWrite ClearType (as + * can be found, for example, in the Internet Explorer~9 running on + * Windows~7). + * + * @note: + * This property controls the behaviour of the bytecode interpreter + * and thus how outlines get hinted. It does *not* control how glyph + * get rasterized! In particular, it does not control subpixel color + * filtering. + * + * If FreeType has not been compiled with configuration option + * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 causes an + * `FT_Err_Unimplemented_Feature' error. + * + * Depending on the graphics framework, Microsoft uses different + * bytecode engines. As a consequence, the version numbers returned by + * a call to the `GETINFO[1]' bytecode instruction are more convoluted + * than desired. + * + * { + * framework Windows version result of GETINFO[1] + * ---------------------------------------------------- + * GDI before XP 35 + * GDI XP and later 37 + * GDI+ old before Vista 37 + * GDI+ old Vista, 7 38 + * GDI+ after 7 40 + * DWrite before 8 39 + * DWrite 8 and later 40 + * } + * + * Since FreeType doesn't provide all capabilities of DWrite ClearType, + * using version~38 seems justified. + * + */ +#define TT_INTERPRETER_VERSION_35 35 +#define TT_INTERPRETER_VERSION_38 38 + + /* */ + + +FT_END_HEADER + + +#endif /* __FTTTDRV_H__ */ + + +/* END */ diff --git a/include/freetype/fttypes.h b/include/fttypes.h similarity index 96% rename from include/freetype/fttypes.h rename to include/fttypes.h index 3255527..2c01e87 100644 --- a/include/freetype/fttypes.h +++ b/include/fttypes.h @@ -4,7 +4,7 @@ /* */ /* FreeType simple types definitions (specification only). */ /* */ -/* Copyright 1996-2002, 2004, 2006-2009, 2012 by */ +/* Copyright 1996-2002, 2004, 2006-2009, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -57,6 +57,8 @@ FT_BEGIN_HEADER /* FT_UInt16 */ /* FT_Int32 */ /* FT_UInt32 */ + /* FT_Int64 */ + /* FT_UInt64 */ /* FT_Short */ /* FT_UShort */ /* FT_Long */ @@ -78,7 +80,9 @@ FT_BEGIN_HEADER /* FT_F2Dot14 */ /* FT_UnitVector */ /* FT_F26Dot6 */ + /* FT_Data */ /* */ + /* FT_MAKE_TAG */ /* */ /* FT_Generic */ /* FT_Generic_Finalizer */ @@ -255,7 +259,7 @@ FT_BEGIN_HEADER /* FT_F2Dot14 */ /* */ /* <Description> */ - /* A signed 2.14 fixed float type used for unit vectors. */ + /* A signed 2.14 fixed-point type used for unit vectors. */ /* */ typedef signed short FT_F2Dot14; @@ -266,7 +270,7 @@ FT_BEGIN_HEADER /* FT_F26Dot6 */ /* */ /* <Description> */ - /* A signed 26.6 fixed float type used for vectorial pixel */ + /* A signed 26.6 fixed-point type used for vectorial pixel */ /* coordinates. */ /* */ typedef signed long FT_F26Dot6; @@ -278,7 +282,7 @@ FT_BEGIN_HEADER /* FT_Fixed */ /* */ /* <Description> */ - /* This type is used to store 16.16 fixed float values, like scaling */ + /* This type is used to store 16.16 fixed-point values, like scaling */ /* values or matrix coefficients. */ /* */ typedef signed long FT_Fixed; @@ -362,7 +366,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* A simple structure used to store a 2x2 matrix. Coefficients are */ - /* in 16.16 fixed float format. The computation performed is: */ + /* in 16.16 fixed-point format. The computation performed is: */ /* */ /* { */ /* x' = x*xx + y*xy */ @@ -418,7 +422,7 @@ FT_BEGIN_HEADER /* details of usage. */ /* */ /* <Input> */ - /* The address of the FreeType object which is under finalization. */ + /* The address of the FreeType object that is under finalization. */ /* Its client data is accessed through its `generic' field. */ /* */ typedef void (*FT_Generic_Finalizer)(void* object); @@ -466,8 +470,8 @@ FT_BEGIN_HEADER /* FT_MAKE_TAG */ /* */ /* <Description> */ - /* This macro converts four-letter tags which are used to label */ - /* TrueType tables into an unsigned long to be used within FreeType. */ + /* This macro converts four-letter tags that are used to label */ + /* TrueType tables into an unsigned long, to be used within FreeType. */ /* */ /* <Note> */ /* The produced values *must* be 32-bit integers. Don't redefine */ @@ -567,18 +571,28 @@ FT_BEGIN_HEADER } FT_ListRec; - /* */ + #define FT_IS_EMPTY( list ) ( (list).head == 0 ) +#define FT_BOOL( x ) ( (FT_Bool)( x ) ) - /* return base error code (without module-specific prefix) */ -#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) + /* concatenate C tokens */ +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) - /* return module error code */ + /* see `ftmoderr.h' for descriptions of the following macros */ + +#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e ) + +#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) #define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) -#define FT_BOOL( x ) ( (FT_Bool)( x ) ) +#define FT_ERR_EQ( x, e ) \ + ( FT_ERROR_BASE( x ) == FT_ERROR_BASE( FT_ERR( e ) ) ) +#define FT_ERR_NEQ( x, e ) \ + ( FT_ERROR_BASE( x ) != FT_ERROR_BASE( FT_ERR( e ) ) ) + FT_END_HEADER diff --git a/include/freetype/ftwinfnt.h b/include/ftwinfnt.h similarity index 97% rename from include/freetype/ftwinfnt.h rename to include/ftwinfnt.h index ea33353..5026158 100644 --- a/include/freetype/ftwinfnt.h +++ b/include/ftwinfnt.h @@ -58,9 +58,10 @@ FT_BEGIN_HEADER * @description: * A list of valid values for the `charset' byte in * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX - * encodings (except for cp1361) can be found at ftp://ftp.unicode.org - * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is - * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. + * encodings (except for cp1361) can be found at + * ftp://ftp.unicode.org/public in the MAPPINGS/VENDORS/MICSFT/WINDOWS + * subdirectory. cp1361 is roughly a superset of + * MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. * * @values: * FT_WinFNT_ID_DEFAULT :: @@ -258,9 +259,9 @@ FT_BEGIN_HEADER FT_Get_WinFNT_Header( FT_Face face, FT_WinFNT_HeaderRec *aheader ); - /* */ + FT_END_HEADER #endif /* __FTWINFNT_H__ */ diff --git a/include/freetype/ftxf86.h b/include/ftxf86.h similarity index 96% rename from include/freetype/ftxf86.h rename to include/ftxf86.h index 8c68afd..89d1993 100644 --- a/include/freetype/ftxf86.h +++ b/include/ftxf86.h @@ -4,7 +4,7 @@ /* */ /* Support functions for X11. */ /* */ -/* Copyright 2002, 2003, 2004, 2006, 2007 by */ +/* Copyright 2002-2004, 2006, 2007, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -62,7 +62,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Return a string describing the format of a given face, using values */ - /* which can be used as an X11 FONT_PROPERTY. Possible values are */ + /* that can be used as an X11 FONT_PROPERTY. Possible values are */ /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */ /* `PFR', and `Windows~FNT'. */ /* */ @@ -76,7 +76,8 @@ FT_BEGIN_HEADER FT_EXPORT( const char* ) FT_Get_X11_Font_Format( FT_Face face ); - /* */ + /* */ + FT_END_HEADER diff --git a/include/freetype/internal/autohint.h b/include/internal/autohint.h similarity index 84% rename from include/freetype/internal/autohint.h rename to include/internal/autohint.h index 231bdd4..545de93 100644 --- a/include/freetype/internal/autohint.h +++ b/include/internal/autohint.h @@ -4,7 +4,7 @@ /* */ /* High-level `autohint' module-specific interface (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2007 by */ +/* Copyright 1996-2002, 2007, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -86,20 +86,20 @@ FT_BEGIN_HEADER /* FT_AutoHinter_GlobalGetFunc */ /* */ /* <Description> */ - /* Retrieves the global hints computed for a given face object the */ + /* Retrieve the global hints computed for a given face object. The */ /* resulting data is dissociated from the face and will survive a */ /* call to FT_Done_Face(). It must be discarded through the API */ /* FT_AutoHinter_GlobalDoneFunc(). */ /* */ /* <Input> */ - /* hinter :: A handle to the source auto-hinter. */ + /* hinter :: A handle to the source auto-hinter. */ /* */ - /* face :: A handle to the source face object. */ + /* face :: A handle to the source face object. */ /* */ /* <Output> */ - /* global_hints :: A typeless pointer to the global hints. */ + /* global_hints :: A typeless pointer to the global hints. */ /* */ - /* global_len :: The size in bytes of the global hints. */ + /* global_len :: The size in bytes of the global hints. */ /* */ typedef void (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter, @@ -114,7 +114,7 @@ FT_BEGIN_HEADER /* FT_AutoHinter_GlobalDoneFunc */ /* */ /* <Description> */ - /* Discards the global hints retrieved through */ + /* Discard the global hints retrieved through */ /* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */ /* are freed from memory. */ /* */ @@ -168,8 +168,8 @@ FT_BEGIN_HEADER /* This function is capable of loading composite glyphs by hinting */ /* each sub-glyph independently (which improves quality). */ /* */ - /* It will call the font driver with FT_Load_Glyph(), with */ - /* FT_LOAD_NO_SCALE set. */ + /* It will call the font driver with @FT_Load_Glyph, with */ + /* @FT_LOAD_NO_SCALE set. */ /* */ typedef FT_Error (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter, @@ -182,43 +182,56 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Struct> */ - /* FT_AutoHinter_ServiceRec */ + /* FT_AutoHinter_InterfaceRec */ /* */ /* <Description> */ /* The auto-hinter module's interface. */ /* */ - typedef struct FT_AutoHinter_ServiceRec_ + typedef struct FT_AutoHinter_InterfaceRec_ { FT_AutoHinter_GlobalResetFunc reset_face; FT_AutoHinter_GlobalGetFunc get_global_hints; FT_AutoHinter_GlobalDoneFunc done_global_hints; FT_AutoHinter_GlyphLoadFunc load_glyph; - } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service; + } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \ - done_global_hints_, load_glyph_) \ - FT_CALLBACK_TABLE_DEF \ - const FT_AutoHinter_ServiceRec class_ = \ - { \ - reset_face_, get_global_hints_, done_global_hints_, load_glyph_ \ +#define FT_DEFINE_AUTOHINTER_INTERFACE( \ + class_, \ + reset_face_, \ + get_global_hints_, \ + done_global_hints_, \ + load_glyph_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_AutoHinter_InterfaceRec class_ = \ + { \ + reset_face_, \ + get_global_hints_, \ + done_global_hints_, \ + load_glyph_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \ - done_global_hints_, load_glyph_) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_AutoHinter_ServiceRec* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->reset_face = reset_face_; \ - clazz->get_global_hints = get_global_hints_; \ - clazz->done_global_hints = done_global_hints_; \ - clazz->load_glyph = load_glyph_; \ +#define FT_DEFINE_AUTOHINTER_INTERFACE( \ + class_, \ + reset_face_, \ + get_global_hints_, \ + done_global_hints_, \ + load_glyph_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_AutoHinter_InterfaceRec* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->reset_face = reset_face_; \ + clazz->get_global_hints = get_global_hints_; \ + clazz->done_global_hints = done_global_hints_; \ + clazz->load_glyph = load_glyph_; \ } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/include/freetype/internal/ftcalc.h b/include/internal/ftcalc.h similarity index 51% rename from include/freetype/internal/ftcalc.h rename to include/internal/ftcalc.h index f8b4324..14ec37b 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/internal/ftcalc.h @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */ +/* Copyright 1996-2006, 2008, 2009, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,56 +29,222 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* <Function> */ - /* FT_FixedSqrt */ - /* */ - /* <Description> */ - /* Computes the square root of a 16.16 fixed point value. */ - /* */ - /* <Input> */ - /* x :: The value to compute the root for. */ - /* */ - /* <Return> */ - /* The result of `sqrt(x)'. */ - /* */ - /* <Note> */ - /* This function is not very fast. */ + /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ /* */ - FT_BASE( FT_Int32 ) - FT_SqrtFixed( FT_Int32 x ); + /*************************************************************************/ +#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER + /* Provide assembler fragments for performance-critical functions. */ + /* These must be defined `static __inline__' with GCC. */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS +#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ - /*************************************************************************/ - /* */ - /* <Function> */ - /* FT_Sqrt32 */ - /* */ - /* <Description> */ - /* Computes the square root of an Int32 integer (which will be */ - /* handled as an unsigned long value). */ - /* */ - /* <Input> */ - /* x :: The value to compute the root for. */ - /* */ - /* <Return> */ - /* The result of `sqrt(x)'. */ - /* */ - FT_EXPORT( FT_Int32 ) - FT_Sqrt32( FT_Int32 x ); +#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + /* documentation is in freetype.h */ + static __inline FT_Int32 + FT_MulFix_arm( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 t, t2; + + + __asm + { + smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ + mov a, t, asr #31 /* a = (hi >> 31) */ + add a, a, #0x8000 /* a += 0x8000 */ + adds t2, t2, a /* t2 += a */ + adc t, t, #0 /* t += carry */ + mov a, t2, lsr #16 /* a = t2 >> 16 */ + orr a, a, t, lsl #16 /* a |= t << 16 */ + } + return a; + } + +#endif /* __CC_ARM || __ARMCC__ */ + + +#ifdef __GNUC__ + +#if defined( __arm__ ) && \ + ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ + !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) + +#define FT_MULFIX_ASSEMBLER FT_MulFix_arm + + /* documentation is in freetype.h */ + + static __inline__ FT_Int32 + FT_MulFix_arm( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 t, t2; + + + __asm__ __volatile__ ( + "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ + "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ +#if defined( __clang__ ) && defined( __thumb2__ ) + "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ +#else + "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ +#endif + "adds %1, %1, %0\n\t" /* %1 += %0 */ + "adc %2, %2, #0\n\t" /* %2 += carry */ + "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ + "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ + : "=r"(a), "=&r"(t2), "=&r"(t) + : "r"(a), "r"(b) + : "cc" ); + return a; + } + +#endif /* __arm__ && */ + /* ( __thumb2__ || !__thumb__ ) && */ + /* !( __CC_ARM || __ARMCC__ ) */ + + +#if defined( __i386__ ) + +#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 + + /* documentation is in freetype.h */ + + static __inline__ FT_Int32 + FT_MulFix_i386( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 result; + + + __asm__ __volatile__ ( + "imul %%edx\n" + "movl %%edx, %%ecx\n" + "sarl $31, %%ecx\n" + "addl $0x8000, %%ecx\n" + "addl %%ecx, %%eax\n" + "adcl $0, %%edx\n" + "shrl $16, %%eax\n" + "shll $16, %%edx\n" + "addl %%edx, %%eax\n" + : "=a"(result), "=d"(b) + : "a"(a), "d"(b) + : "%ecx", "cc" ); + return result; + } + +#endif /* i386 */ + +#endif /* __GNUC__ */ + + +#ifdef _MSC_VER /* Visual C++ */ + +#ifdef _M_IX86 + +#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 + + /* documentation is in freetype.h */ + + static __inline FT_Int32 + FT_MulFix_i386( FT_Int32 a, + FT_Int32 b ) + { + register FT_Int32 result; + + __asm + { + mov eax, a + mov edx, b + imul edx + mov ecx, edx + sar ecx, 31 + add ecx, 8000h + add eax, ecx + adc edx, 0 + shr eax, 16 + shl edx, 16 + add eax, edx + mov result, eax + } + return result; + } + +#endif /* _M_IX86 */ + +#endif /* _MSC_VER */ + + +#if defined( __GNUC__ ) && defined( __x86_64__ ) + +#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 + + static __inline__ FT_Int32 + FT_MulFix_x86_64( FT_Int32 a, + FT_Int32 b ) + { + /* Temporarily disable the warning that C90 doesn't support */ + /* `long long'. */ +#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wlong-long" +#endif + +#if 1 + /* Technically not an assembly fragment, but GCC does a really good */ + /* job at inlining it and generating good machine code for it. */ + long long ret, tmp; - /*************************************************************************/ - /* */ - /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ - /* */ - /*************************************************************************/ + ret = (long long)a * b; + tmp = ret >> 63; + ret += 0x8000 + tmp; + + return (FT_Int32)( ret >> 16 ); +#else + + /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ + /* code from the lines below. The main issue is that `wide_a' is not */ + /* properly initialized by sign-extending `a'. Instead, the generated */ + /* machine code assumes that the register that contains `a' on input */ + /* can be used directly as a 64-bit value, which is wrong most of the */ + /* time. */ + long long wide_a = (long long)a; + long long wide_b = (long long)b; + long long result; + + + __asm__ __volatile__ ( + "imul %2, %1\n" + "mov %1, %0\n" + "sar $63, %0\n" + "lea 0x8000(%1, %0), %0\n" + "sar $16, %0\n" + : "=&r"(result), "=&r"(wide_a) + : "r"(wide_b) + : "cc" ); + + return (FT_Int32)result; +#endif + +#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) +#pragma GCC diagnostic pop +#endif + } + +#endif /* __GNUC__ && __x86_64__ */ + +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ + + +#ifdef FT_CONFIG_OPTION_INLINE_MULFIX +#ifdef FT_MULFIX_ASSEMBLER +#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) ) +#endif +#endif -#ifdef TT_USE_BYTECODE_INTERPRETER /*************************************************************************/ /* */ @@ -87,7 +253,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* A very simple function used to perform the computation `(a*b)/c' */ - /* (without rounding) with maximal accuracy (it uses a 64-bit */ + /* (without rounding) with maximum accuracy (it uses a 64-bit */ /* intermediate integer whenever necessary). */ /* */ /* This function isn't necessarily as fast as some processor specific */ @@ -108,8 +274,6 @@ FT_BEGIN_HEADER FT_Long b, FT_Long c ); -#endif /* TT_USE_BYTECODE_INTERPRETER */ - /* * A variant of FT_Matrix_Multiply which scales its result afterwards. @@ -129,7 +293,6 @@ FT_BEGIN_HEADER * A variant of FT_Vector_Transform. See comments for * FT_Matrix_Multiply_Scaled. */ - FT_BASE( void ) FT_Vector_Transform_Scaled( FT_Vector* vector, const FT_Matrix* matrix, @@ -148,10 +311,11 @@ FT_BEGIN_HEADER FT_Pos out_x, FT_Pos out_y ); + /* * Return TRUE if a corner is flat or nearly flat. This is equivalent to - * saying that the angle difference between the `in' and `out' vectors is - * very small. + * saying that the corner point is close to its neighbors, or inside an + * ellipse defined by the neighbor focal points to be more precise. */ FT_BASE( FT_Int ) ft_corner_is_flat( FT_Pos in_x, @@ -160,6 +324,69 @@ FT_BEGIN_HEADER FT_Pos out_y ); + /* + * Return the most significant bit index. + */ + +#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER +#if defined( __GNUC__ ) && \ + ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ) ) + +#if FT_SIZEOF_INT == 4 + +#define FT_MSB( x ) ( 31 - __builtin_clz( x ) ) + +#elif FT_SIZEOF_LONG == 4 + +#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) ) + +#endif + +#endif /* __GNUC__ */ +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ + +#ifndef FT_MSB + + FT_BASE( FT_Int ) + FT_MSB( FT_UInt32 z ); + +#endif + + + /* + * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses + * two fixed-point arguments instead. + */ + FT_BASE( FT_Fixed ) + FT_Hypot( FT_Fixed x, + FT_Fixed y ); + + +#if 0 + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_SqrtFixed */ + /* */ + /* <Description> */ + /* Computes the square root of a 16.16 fixed-point value. */ + /* */ + /* <Input> */ + /* x :: The value to compute the root for. */ + /* */ + /* <Return> */ + /* The result of `sqrt(x)'. */ + /* */ + /* <Note> */ + /* This function is not very fast. */ + /* */ + FT_BASE( FT_Int32 ) + FT_SqrtFixed( FT_Int32 x ); + +#endif /* 0 */ + + #define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) #define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) #define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) diff --git a/include/freetype/internal/ftdebug.h b/include/internal/ftdebug.h similarity index 93% rename from include/freetype/internal/ftdebug.h rename to include/internal/ftdebug.h index 7baae35..58a3916 100644 --- a/include/freetype/internal/ftdebug.h +++ b/include/internal/ftdebug.h @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by */ +/* Copyright 1996-2002, 2004, 2006-2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -185,7 +185,8 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* Define the FT_ASSERT macro. */ + /* Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw' */ + /* makes it possible to easily set a breakpoint at this function. */ /* */ /*************************************************************************/ @@ -199,10 +200,18 @@ FT_BEGIN_HEADER __LINE__, __FILE__ ); \ } while ( 0 ) +#define FT_THROW( e ) \ + ( FT_Throw( FT_ERR_CAT( FT_ERR_PREFIX, e ), \ + __LINE__, \ + __FILE__ ) | \ + FT_ERR_CAT( FT_ERR_PREFIX, e ) ) + #else /* !FT_DEBUG_LEVEL_ERROR */ #define FT_ASSERT( condition ) do { } while ( 0 ) +#define FT_THROW( e ) FT_ERR_CAT( FT_ERR_PREFIX, e ) + #endif /* !FT_DEBUG_LEVEL_ERROR */ @@ -226,22 +235,18 @@ FT_BEGIN_HEADER FT_Panic( const char* fmt, ... ); + /* report file name and line number of an error */ + FT_BASE( int ) + FT_Throw( FT_Error error, + int line, + const char* file ); + #endif /* FT_DEBUG_LEVEL_ERROR */ FT_BASE( void ) ft_debug_init( void ); - -#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ - - /* We disable the warning `conditional expression is constant' here */ - /* in order to compile cleanly with the maximum level of warnings. */ -#pragma warning( disable : 4127 ) - -#endif /* _MSC_VER */ - - FT_END_HEADER #endif /* __FTDEBUG_H__ */ diff --git a/include/freetype/internal/ftdriver.h b/include/internal/ftdriver.h similarity index 54% rename from include/freetype/internal/ftdriver.h rename to include/internal/ftdriver.h index 6f6b206..940218e 100644 --- a/include/freetype/internal/ftdriver.h +++ b/include/internal/ftdriver.h @@ -4,7 +4,7 @@ /* */ /* FreeType font driver interface (specification). */ /* */ -/* Copyright 1996-2003, 2006, 2008, 2011 by */ +/* Copyright 1996-2003, 2006, 2008, 2011-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -60,22 +60,6 @@ FT_BEGIN_HEADER (*FT_Size_SelectFunc)( FT_Size size, FT_ULong size_index ); -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - typedef FT_Error - (*FT_Size_ResetPointsFunc)( FT_Size size, - FT_F26Dot6 char_width, - FT_F26Dot6 char_height, - FT_UInt horz_resolution, - FT_UInt vert_resolution ); - - typedef FT_Error - (*FT_Size_ResetPixelsFunc)( FT_Size size, - FT_UInt pixel_width, - FT_UInt pixel_height ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - typedef FT_Error (*FT_Slot_LoadFunc)( FT_GlyphSlot slot, FT_Size size, @@ -181,72 +165,42 @@ FT_BEGIN_HEADER /* */ typedef struct FT_Driver_ClassRec_ { - FT_Module_Class root; - - FT_Long face_object_size; - FT_Long size_object_size; - FT_Long slot_object_size; - - FT_Face_InitFunc init_face; - FT_Face_DoneFunc done_face; + FT_Module_Class root; - FT_Size_InitFunc init_size; - FT_Size_DoneFunc done_size; + FT_Long face_object_size; + FT_Long size_object_size; + FT_Long slot_object_size; - FT_Slot_InitFunc init_slot; - FT_Slot_DoneFunc done_slot; + FT_Face_InitFunc init_face; + FT_Face_DoneFunc done_face; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_Size_InitFunc init_size; + FT_Size_DoneFunc done_size; - FT_Size_ResetPointsFunc set_char_sizes; - FT_Size_ResetPixelsFunc set_pixel_sizes; + FT_Slot_InitFunc init_slot; + FT_Slot_DoneFunc done_slot; -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + FT_Slot_LoadFunc load_glyph; - FT_Slot_LoadFunc load_glyph; - - FT_Face_GetKerningFunc get_kerning; - FT_Face_AttachFunc attach_file; - FT_Face_GetAdvancesFunc get_advances; + FT_Face_GetKerningFunc get_kerning; + FT_Face_AttachFunc attach_file; + FT_Face_GetAdvancesFunc get_advances; /* since version 2.2 */ - FT_Size_RequestFunc request_size; - FT_Size_SelectFunc select_size; + FT_Size_RequestFunc request_size; + FT_Size_SelectFunc select_size; } FT_Driver_ClassRec, *FT_Driver_Class; - /* - * The following functions are used as stubs for `set_char_sizes' and - * `set_pixel_sizes'; the code uses `request_size' and `select_size' - * functions instead. - * - * Implementation is in `src/base/ftobjs.c'. - */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_BASE( FT_Error ) - ft_stub_set_char_sizes( FT_Size size, - FT_F26Dot6 width, - FT_F26Dot6 height, - FT_UInt horz_res, - FT_UInt vert_res ); - - FT_BASE( FT_Error ) - ft_stub_set_pixel_sizes( FT_Size size, - FT_UInt width, - FT_UInt height ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - /*************************************************************************/ /* */ /* <Macro> */ /* FT_DECLARE_DRIVER */ /* */ /* <Description> */ - /* Used to create a forward declaration of a */ - /* FT_Driver_ClassRec stract instance. */ + /* Used to create a forward declaration of an FT_Driver_ClassRec */ + /* struct instance. */ /* */ /* <Macro> */ /* FT_DEFINE_DRIVER */ @@ -254,160 +208,194 @@ FT_BEGIN_HEADER /* <Description> */ /* Used to initialize an instance of FT_Driver_ClassRec struct. */ /* */ - /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ - /* to called with a pointer where the allocated stracture is returned.*/ - /* And when it is no longer needed a Destroy function needs */ - /* to be called to release that allocation. */ - /* fcinit.c (ft_create_default_module_classes) already contains */ - /* a mechanism to call these functions for the default modules */ - /* described in ftmodule.h */ + /* When FT_CONFIG_OPTION_PIC is defined a `create' function has to be */ + /* called with a pointer where the allocated structure is returned. */ + /* And when it is no longer needed a `destroy' function needs to be */ + /* called to release that allocation. */ + /* */ + /* `fcinit.c' (ft_create_default_module_classes) already contains a */ + /* mechanism to call these functions for the default modules */ + /* described in `ftmodule.h'. */ /* */ - /* Notice that the created Create and Destroy functions call */ - /* pic_init and pic_free function to allow you to manually allocate */ - /* and initialize any additional global data, like module specific */ + /* Notice that the created `create' and `destroy' functions call */ + /* `pic_init' and `pic_free' to allow you to manually allocate and */ + /* initialize any additional global data, like a module specific */ /* interface, and put them in the global pic container defined in */ - /* ftpic.h. if you don't need them just implement the functions as */ - /* empty to resolve the link error. Also the pic_init and pic_free */ - /* functions should be declared in pic.h, to be referred by driver */ - /* definition calling FT_DEFINE_DRIVER() in following. */ + /* `ftpic.h'. If you don't need them just implement the functions as */ + /* empty to resolve the link error. Also the `pic_init' and */ + /* `pic_free' functions should be declared in `pic.h', to be referred */ + /* by driver definition calling `FT_DEFINE_DRIVER' in following. */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ + /* allocated in the global scope (or the scope where the macro is */ + /* used). */ /* */ #ifndef FT_CONFIG_OPTION_PIC -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS -#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ - a_, b_, -#else - #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) -#endif - -#define FT_DECLARE_DRIVER(class_) \ +#define FT_DECLARE_DRIVER( class_ ) \ FT_CALLBACK_TABLE \ const FT_Driver_ClassRec class_; -#define FT_DEFINE_DRIVER(class_, \ - flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_, \ - face_object_size_, size_object_size_, \ - slot_object_size_, init_face_, done_face_, \ - init_size_, done_size_, init_slot_, done_slot_, \ - old_set_char_sizes_, old_set_pixel_sizes_, \ - load_glyph_, get_kerning_, attach_file_, \ - get_advances_, request_size_, select_size_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Driver_ClassRec class_ = \ - { \ - FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \ - init_,done_,get_interface_) \ - \ - face_object_size_, \ - size_object_size_, \ - slot_object_size_, \ - \ - init_face_, \ - done_face_, \ - \ - init_size_, \ - done_size_, \ - \ - init_slot_, \ - done_slot_, \ - \ - FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \ - \ - load_glyph_, \ - \ - get_kerning_, \ - attach_file_, \ - get_advances_, \ - \ - request_size_, \ - select_size_ \ +#define FT_DEFINE_DRIVER( \ + class_, \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_, \ + face_object_size_, \ + size_object_size_, \ + slot_object_size_, \ + init_face_, \ + done_face_, \ + init_size_, \ + done_size_, \ + init_slot_, \ + done_slot_, \ + load_glyph_, \ + get_kerning_, \ + attach_file_, \ + get_advances_, \ + request_size_, \ + select_size_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Driver_ClassRec class_ = \ + { \ + FT_DEFINE_ROOT_MODULE( flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + \ + face_object_size_, \ + size_object_size_, \ + slot_object_size_, \ + \ + init_face_, \ + done_face_, \ + \ + init_size_, \ + done_size_, \ + \ + init_slot_, \ + done_slot_, \ + \ + load_glyph_, \ + \ + get_kerning_, \ + attach_file_, \ + get_advances_, \ + \ + request_size_, \ + select_size_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS -#define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ - clazz->set_char_sizes = a_; \ - clazz->set_pixel_sizes = b_; -#else - #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) -#endif - -#define FT_DECLARE_DRIVER(class_) FT_DECLARE_MODULE(class_) - -#define FT_DEFINE_DRIVER(class_, \ - flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_, \ - face_object_size_, size_object_size_, \ - slot_object_size_, init_face_, done_face_, \ - init_size_, done_size_, init_slot_, done_slot_, \ - old_set_char_sizes_, old_set_pixel_sizes_, \ - load_glyph_, get_kerning_, attach_file_, \ - get_advances_, request_size_, select_size_ ) \ - \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_Module_Class* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \ - class_##_pic_free( library ); \ - if ( dclazz ) \ - FT_FREE( dclazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_Module_Class** output_class ) \ - { \ - FT_Driver_Class clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ - return error; \ - \ - error = class_##_pic_init( library ); \ - if(error) \ - { \ - FT_FREE( clazz ); \ - return error; \ - } \ - \ - FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_,interface_, \ - init_,done_,get_interface_) \ - \ - clazz->face_object_size = face_object_size_; \ - clazz->size_object_size = size_object_size_; \ - clazz->slot_object_size = slot_object_size_; \ - \ - clazz->init_face = init_face_; \ - clazz->done_face = done_face_; \ - \ - clazz->init_size = init_size_; \ - clazz->done_size = done_size_; \ - \ - clazz->init_slot = init_slot_; \ - clazz->done_slot = done_slot_; \ - \ - FT_DEFINE_DRIVERS_OLD_INTERNALS(old_set_char_sizes_, old_set_pixel_sizes_) \ - \ - clazz->load_glyph = load_glyph_; \ - \ - clazz->get_kerning = get_kerning_; \ - clazz->attach_file = attach_file_; \ - clazz->get_advances = get_advances_; \ - \ - clazz->request_size = request_size_; \ - clazz->select_size = select_size_; \ - \ - *output_class = (FT_Module_Class*)clazz; \ - return FT_Err_Ok; \ +#define FT_DECLARE_DRIVER( class_ ) FT_DECLARE_MODULE( class_ ) + +#define FT_DEFINE_DRIVER( \ + class_, \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_, \ + face_object_size_, \ + size_object_size_, \ + slot_object_size_, \ + init_face_, \ + done_face_, \ + init_size_, \ + done_size_, \ + init_slot_, \ + done_slot_, \ + load_glyph_, \ + get_kerning_, \ + attach_file_, \ + get_advances_, \ + request_size_, \ + select_size_ ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + FT_Driver_Class dclazz = (FT_Driver_Class)clazz; \ + \ + \ + class_ ## _pic_free( library ); \ + if ( dclazz ) \ + FT_FREE( dclazz ); \ + } \ + \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Driver_Class clazz = NULL; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ + return error; \ + \ + error = class_ ## _pic_init( library ); \ + if ( error ) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + FT_DEFINE_ROOT_MODULE( flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + \ + clazz->face_object_size = face_object_size_; \ + clazz->size_object_size = size_object_size_; \ + clazz->slot_object_size = slot_object_size_; \ + \ + clazz->init_face = init_face_; \ + clazz->done_face = done_face_; \ + \ + clazz->init_size = init_size_; \ + clazz->done_size = done_size_; \ + \ + clazz->init_slot = init_slot_; \ + clazz->done_slot = done_slot_; \ + \ + clazz->load_glyph = load_glyph_; \ + \ + clazz->get_kerning = get_kerning_; \ + clazz->attach_file = attach_file_; \ + clazz->get_advances = get_advances_; \ + \ + clazz->request_size = request_size_; \ + clazz->select_size = select_size_; \ + \ + *output_class = (FT_Module_Class*)clazz; \ + \ + return FT_Err_Ok; \ } diff --git a/include/freetype/internal/ftgloadr.h b/include/internal/ftgloadr.h similarity index 88% rename from include/freetype/internal/ftgloadr.h rename to include/internal/ftgloadr.h index ce4dc6c..f70774f 100644 --- a/include/freetype/internal/ftgloadr.h +++ b/include/internal/ftgloadr.h @@ -121,20 +121,22 @@ FT_BEGIN_HEADER FT_UInt n_contours ); -#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ - ( (_count) == 0 || ((_loader)->base.outline.n_points + \ - (_loader)->current.outline.n_points + \ - (unsigned long)(_count)) <= (_loader)->max_points ) - -#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ - ( (_count) == 0 || ((_loader)->base.outline.n_contours + \ - (_loader)->current.outline.n_contours + \ - (unsigned long)(_count)) <= (_loader)->max_contours ) - -#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \ - ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ - FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ - ? 0 \ +#define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ + ( (_count) == 0 || \ + ( (_loader)->base.outline.n_points + \ + (_loader)->current.outline.n_points + \ + (unsigned long)(_count) ) <= (_loader)->max_points ) + +#define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ + ( (_count) == 0 || \ + ( (_loader)->base.outline.n_contours + \ + (_loader)->current.outline.n_contours + \ + (unsigned long)(_count)) <= (_loader)->max_contours ) + +#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \ + ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ + FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ + ? 0 \ : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) ) diff --git a/include/freetype/internal/ftmemory.h b/include/internal/ftmemory.h similarity index 71% rename from include/freetype/internal/ftmemory.h rename to include/internal/ftmemory.h index 026aa63..3d51aee 100644 --- a/include/freetype/internal/ftmemory.h +++ b/include/internal/ftmemory.h @@ -4,7 +4,7 @@ /* */ /* The FreeType memory management macros (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2010 by */ +/* Copyright 1996-2002, 2004-2007, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -141,8 +141,10 @@ FT_BEGIN_HEADER const void* P ); -#define FT_MEM_ALLOC( ptr, size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) ) +#define FT_MEM_ALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, \ + (FT_Long)(size), \ + &error ) ) #define FT_MEM_FREE( ptr ) \ FT_BEGIN_STMNT \ @@ -154,45 +156,60 @@ FT_BEGIN_HEADER FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) ) #define FT_MEM_REALLOC( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, 1, \ - (cursz), (newsz), \ - (ptr), &error ) ) - -#define FT_MEM_QALLOC( ptr, size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, (size), &error ) ) + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ + 1, \ + (FT_Long)(cursz), \ + (FT_Long)(newsz), \ + (ptr), \ + &error ) ) + +#define FT_MEM_QALLOC( ptr, size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, \ + (FT_Long)(size), \ + &error ) ) #define FT_MEM_QNEW( ptr ) \ FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) ) -#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, 1, \ - (cursz), (newsz), \ - (ptr), &error ) ) - -#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ - (cursz), (newsz), \ - (ptr), &error ) ) - -#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (item_size), \ - 0, (count), \ - NULL, &error ) ) - -#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (itmsz), \ - (oldcnt), (newcnt), \ - (ptr), &error ) ) - -#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (item_size), \ - 0, (count), \ - NULL, &error ) ) - -#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (itmsz), \ - (oldcnt), (newcnt), \ - (ptr), &error ) ) +#define FT_MEM_QREALLOC( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ + 1, \ + (FT_Long)(cursz), \ + (FT_Long)(newsz), \ + (ptr), \ + &error ) ) + +#define FT_MEM_ALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ + (FT_Long)(item_size), \ + 0, \ + (FT_Long)(count), \ + NULL, \ + &error ) ) + +#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ + (FT_Long)(itmsz), \ + (FT_Long)(oldcnt), \ + (FT_Long)(newcnt), \ + (ptr), \ + &error ) ) + +#define FT_MEM_QALLOC_MULT( ptr, count, item_size ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ + (FT_Long)(item_size), \ + 0, \ + (FT_Long)(count), \ + NULL, \ + &error ) ) + +#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ + (FT_Long)(itmsz), \ + (FT_Long)(oldcnt), \ + (FT_Long)(newcnt), \ + (ptr), \ + &error ) ) #define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 ) @@ -236,26 +253,37 @@ FT_BEGIN_HEADER /* _typed_ in order to automatically compute array element sizes. */ /* */ -#define FT_MEM_NEW_ARRAY( ptr, count ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ - 0, (count), \ - NULL, &error ) ) - -#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \ - (cursz), (newsz), \ - (ptr), &error ) ) - -#define FT_MEM_QNEW_ARRAY( ptr, count ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ - 0, (count), \ - NULL, &error ) ) - -#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ - FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \ - (cursz), (newsz), \ - (ptr), &error ) ) - +#define FT_MEM_NEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ + sizeof ( *(ptr) ), \ + 0, \ + (FT_Long)(count), \ + NULL, \ + &error ) ) + +#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, \ + sizeof ( *(ptr) ), \ + (FT_Long)(cursz), \ + (FT_Long)(newsz), \ + (ptr), \ + &error ) ) + +#define FT_MEM_QNEW_ARRAY( ptr, count ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ + sizeof ( *(ptr) ), \ + 0, \ + (FT_Long)(count), \ + NULL, \ + &error ) ) + +#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz ) \ + FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, \ + sizeof ( *(ptr) ), \ + (FT_Long)(cursz), \ + (FT_Long)(newsz), \ + (ptr), \ + &error ) ) #define FT_ALLOC( ptr, size ) \ FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) ) @@ -303,37 +331,6 @@ FT_BEGIN_HEADER FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) ) -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_BASE( FT_Error ) - FT_Alloc( FT_Memory memory, - FT_Long size, - void* *P ); - - FT_BASE( FT_Error ) - FT_QAlloc( FT_Memory memory, - FT_Long size, - void* *p ); - - FT_BASE( FT_Error ) - FT_Realloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void* *P ); - - FT_BASE( FT_Error ) - FT_QRealloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void* *p ); - - FT_BASE( void ) - FT_Free( FT_Memory memory, - void* *P ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - FT_BASE( FT_Pointer ) ft_mem_strdup( FT_Memory memory, const char* str, @@ -345,6 +342,7 @@ FT_BEGIN_HEADER FT_ULong size, FT_Error *p_error ); + #define FT_MEM_STRDUP( dst, str ) \ (dst) = (char*)ft_mem_strdup( memory, (const char*)(str), &error ) diff --git a/include/freetype/internal/ftobjs.h b/include/internal/ftobjs.h similarity index 72% rename from include/freetype/internal/ftobjs.h rename to include/internal/ftobjs.h index fc18275..b45a5ed 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/internal/ftobjs.h @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (specification). */ /* */ -/* Copyright 1996-2006, 2008, 2010, 2012 by */ +/* Copyright 1996-2006, 2008, 2010, 2012-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -72,6 +72,16 @@ FT_BEGIN_HEADER #define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) ) + /* + * Approximate sqrt(x*x+y*y) using the `alpha max plus beta min' + * algorithm. We use alpha = 1, beta = 3/8, giving us results with a + * largest error less than 7% compared to the exact value. + */ +#define FT_HYPOT( x, y ) \ + ( x = FT_ABS( x ), \ + y = FT_ABS( y ), \ + x > y ? x + ( 3 * y >> 3 ) \ + : y + ( 3 * x >> 3 ) ) #define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) ) #define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n ) @@ -83,14 +93,6 @@ FT_BEGIN_HEADER /* - * Return the highest power of 2 that is <= value; this correspond to - * the highest bit in a given 32-bit value. - */ - FT_BASE( FT_UInt32 ) - ft_highpow2( FT_UInt32 value ); - - - /* * character classification functions -- since these are used to parse * font files, we must not use those in <ctypes.h> which are * locale-dependent @@ -206,46 +208,79 @@ FT_BEGIN_HEADER } FT_CMap_ClassRec; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DECLARE_CMAP_CLASS(class_) \ - FT_CALLBACK_TABLE const FT_CMap_ClassRec class_; - -#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \ - char_next_, char_var_index_, char_var_default_, variant_list_, \ - charvariant_list_, variantchar_list_) \ - FT_CALLBACK_TABLE_DEF \ - const FT_CMap_ClassRec class_ = \ - { \ - size_, init_, done_, char_index_, char_next_, char_var_index_, \ - char_var_default_, variant_list_, charvariant_list_, variantchar_list_ \ +#define FT_DECLARE_CMAP_CLASS( class_ ) \ + FT_CALLBACK_TABLE const FT_CMap_ClassRec class_; + +#define FT_DEFINE_CMAP_CLASS( \ + class_, \ + size_, \ + init_, \ + done_, \ + char_index_, \ + char_next_, \ + char_var_index_, \ + char_var_default_, \ + variant_list_, \ + charvariant_list_, \ + variantchar_list_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_CMap_ClassRec class_ = \ + { \ + size_, \ + init_, \ + done_, \ + char_index_, \ + char_next_, \ + char_var_index_, \ + char_var_default_, \ + variant_list_, \ + charvariant_list_, \ + variantchar_list_ \ }; + #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DECLARE_CMAP_CLASS(class_) \ - void FT_Init_Class_##class_( FT_Library library, FT_CMap_ClassRec* clazz); - -#define FT_DEFINE_CMAP_CLASS(class_, size_, init_, done_, char_index_, \ - char_next_, char_var_index_, char_var_default_, variant_list_, \ - charvariant_list_, variantchar_list_) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_CMap_ClassRec* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->size = size_; \ - clazz->init = init_; \ - clazz->done = done_; \ - clazz->char_index = char_index_; \ - clazz->char_next = char_next_; \ - clazz->char_var_index = char_var_index_; \ - clazz->char_var_default = char_var_default_; \ - clazz->variant_list = variant_list_; \ - clazz->charvariant_list = charvariant_list_; \ - clazz->variantchar_list = variantchar_list_; \ +#define FT_DECLARE_CMAP_CLASS( class_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_CMap_ClassRec* clazz ); + +#define FT_DEFINE_CMAP_CLASS( \ + class_, \ + size_, \ + init_, \ + done_, \ + char_index_, \ + char_next_, \ + char_var_index_, \ + char_var_default_, \ + variant_list_, \ + charvariant_list_, \ + variantchar_list_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_CMap_ClassRec* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->size = size_; \ + clazz->init = init_; \ + clazz->done = done_; \ + clazz->char_index = char_index_; \ + clazz->char_next = char_next_; \ + clazz->char_var_index = char_var_index_; \ + clazz->char_var_default = char_var_default_; \ + clazz->variant_list = variant_list_; \ + clazz->charvariant_list = charvariant_list_; \ + clazz->variantchar_list = variantchar_list_; \ } + #endif /* FT_CONFIG_OPTION_PIC */ + /* create a new charmap and add it to charmap->face */ FT_BASE( FT_Error ) FT_CMap_New( FT_CMap_Class clazz, @@ -270,13 +305,13 @@ FT_BEGIN_HEADER /* */ /* <Fields> */ /* max_points :: */ - /* The maximal number of points used to store the vectorial outline */ + /* The maximum number of points used to store the vectorial outline */ /* of any glyph in this face. If this value cannot be known in */ /* advance, or if the face isn't scalable, this should be set to 0. */ /* Only relevant for scalable formats. */ /* */ /* max_contours :: */ - /* The maximal number of contours used to store the vectorial */ + /* The maximum number of contours used to store the vectorial */ /* outline of any glyph in this face. If this value cannot be */ /* known in advance, or if the face isn't scalable, this should be */ /* set to 0. Only relevant for scalable formats. */ @@ -319,10 +354,6 @@ FT_BEGIN_HEADER /* */ typedef struct FT_Face_InternalRec_ { -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_UShort reserved1; - FT_Short reserved2; -#endif FT_Matrix transform_matrix; FT_Vector transform_delta; FT_Int transform_flags; @@ -334,7 +365,7 @@ FT_BEGIN_HEADER #endif FT_Bool ignore_unpatented_hinter; - FT_UInt refcount; + FT_Int refcount; } FT_Face_InternalRec; @@ -411,6 +442,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ + /*************************************************************************/ /**** ****/ /**** ****/ /**** M O D U L E S ****/ @@ -503,7 +535,7 @@ FT_BEGIN_HEADER ft_module_get_service( FT_Module module, const char* service_id ); - /* */ + /* */ /*************************************************************************/ @@ -511,7 +543,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /**** ****/ /**** ****/ - /**** FACE, SIZE & GLYPH SLOT OBJECTS ****/ + /**** F A C E, S I Z E & G L Y P H S L O T O B J E C T S ****/ /**** ****/ /**** ****/ /*************************************************************************/ @@ -853,7 +885,7 @@ FT_BEGIN_HEADER FT_PIC_Container pic_container; #endif - FT_UInt refcount; + FT_Int refcount; } FT_LibraryRec; @@ -926,12 +958,13 @@ FT_BEGIN_HEADER FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; #endif + /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** ****/ - /**** PIC-Support Macros for ftimage.h ****/ + /**** P I C S U P P O R T ****/ /**** ****/ /**** ****/ /*************************************************************************/ @@ -939,6 +972,9 @@ FT_BEGIN_HEADER /*************************************************************************/ + /* PIC support macros for ftimage.h */ + + /*************************************************************************/ /* */ /* <Macro> */ @@ -947,38 +983,57 @@ FT_BEGIN_HEADER /* <Description> */ /* Used to initialize an instance of FT_Outline_Funcs struct. */ /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ - /* called with a pre-allocated stracture to be filled. */ + /* be called with a pre-allocated structure to be filled. */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ /* is used). */ /* */ #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ - cubic_to_, shift_, delta_) \ - static const FT_Outline_Funcs class_ = \ - { \ - move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_ \ +#define FT_DEFINE_OUTLINE_FUNCS( \ + class_, \ + move_to_, \ + line_to_, \ + conic_to_, \ + cubic_to_, \ + shift_, \ + delta_ ) \ + static const FT_Outline_Funcs class_ = \ + { \ + move_to_, \ + line_to_, \ + conic_to_, \ + cubic_to_, \ + shift_, \ + delta_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ - cubic_to_, shift_, delta_) \ - static FT_Error \ - Init_Class_##class_( FT_Outline_Funcs* clazz ) \ - { \ - clazz->move_to = move_to_; \ - clazz->line_to = line_to_; \ - clazz->conic_to = conic_to_; \ - clazz->cubic_to = cubic_to_; \ - clazz->shift = shift_; \ - clazz->delta = delta_; \ - return FT_Err_Ok; \ +#define FT_DEFINE_OUTLINE_FUNCS( \ + class_, \ + move_to_, \ + line_to_, \ + conic_to_, \ + cubic_to_, \ + shift_, \ + delta_ ) \ + static FT_Error \ + Init_Class_ ## class_( FT_Outline_Funcs* clazz ) \ + { \ + clazz->move_to = move_to_; \ + clazz->line_to = line_to_; \ + clazz->conic_to = conic_to_; \ + clazz->cubic_to = cubic_to_; \ + clazz->shift = shift_; \ + clazz->delta = delta_; \ + \ + return FT_Err_Ok; \ } #endif /* FT_CONFIG_OPTION_PIC */ + /*************************************************************************/ /* */ /* <Macro> */ @@ -987,51 +1042,56 @@ FT_BEGIN_HEADER /* <Description> */ /* Used to initialize an instance of FT_Raster_Funcs struct. */ /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ - /* called with a pre-allocated stracture to be filled. */ + /* be called with a pre-allocated structure to be filled. */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ /* is used). */ /* */ #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ - raster_reset_, raster_set_mode_, \ - raster_render_, raster_done_) \ - const FT_Raster_Funcs class_ = \ - { \ - glyph_format_, raster_new_, raster_reset_, \ - raster_set_mode_, raster_render_, raster_done_ \ +#define FT_DEFINE_RASTER_FUNCS( \ + class_, \ + glyph_format_, \ + raster_new_, \ + raster_reset_, \ + raster_set_mode_, \ + raster_render_, \ + raster_done_ ) \ + const FT_Raster_Funcs class_ = \ + { \ + glyph_format_, \ + raster_new_, \ + raster_reset_, \ + raster_set_mode_, \ + raster_render_, \ + raster_done_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ - raster_reset_, raster_set_mode_, raster_render_, raster_done_) \ - void \ - FT_Init_Class_##class_( FT_Raster_Funcs* clazz ) \ - { \ - clazz->glyph_format = glyph_format_; \ - clazz->raster_new = raster_new_; \ - clazz->raster_reset = raster_reset_; \ - clazz->raster_set_mode = raster_set_mode_; \ - clazz->raster_render = raster_render_; \ - clazz->raster_done = raster_done_; \ +#define FT_DEFINE_RASTER_FUNCS( \ + class_, \ + glyph_format_, \ + raster_new_, \ + raster_reset_, \ + raster_set_mode_, \ + raster_render_, \ + raster_done_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Raster_Funcs* clazz ) \ + { \ + clazz->glyph_format = glyph_format_; \ + clazz->raster_new = raster_new_; \ + clazz->raster_reset = raster_reset_; \ + clazz->raster_set_mode = raster_set_mode_; \ + clazz->raster_render = raster_render_; \ + clazz->raster_done = raster_done_; \ } #endif /* FT_CONFIG_OPTION_PIC */ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** PIC-Support Macros for ftrender.h ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ + /* PIC support macros for ftrender.h */ /*************************************************************************/ @@ -1042,40 +1102,64 @@ FT_BEGIN_HEADER /* <Description> */ /* Used to initialize an instance of FT_Glyph_Class struct. */ /* When FT_CONFIG_OPTION_PIC is defined an init funtion will need to */ - /* called with a pre-allocated stracture to be filled. */ + /* be called with a pre-allocated stcture to be filled. */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ /* is used). */ /* */ #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ - transform_, bbox_, prepare_) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Glyph_Class class_ = \ - { \ - size_, format_, init_, done_, copy_, transform_, bbox_, prepare_ \ +#define FT_DEFINE_GLYPH( \ + class_, \ + size_, \ + format_, \ + init_, \ + done_, \ + copy_, \ + transform_, \ + bbox_, \ + prepare_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Glyph_Class class_ = \ + { \ + size_, \ + format_, \ + init_, \ + done_, \ + copy_, \ + transform_, \ + bbox_, \ + prepare_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ - transform_, bbox_, prepare_) \ - void \ - FT_Init_Class_##class_( FT_Glyph_Class* clazz ) \ - { \ - clazz->glyph_size = size_; \ - clazz->glyph_format = format_; \ - clazz->glyph_init = init_; \ - clazz->glyph_done = done_; \ - clazz->glyph_copy = copy_; \ - clazz->glyph_transform = transform_; \ - clazz->glyph_bbox = bbox_; \ - clazz->glyph_prepare = prepare_; \ +#define FT_DEFINE_GLYPH( \ + class_, \ + size_, \ + format_, \ + init_, \ + done_, \ + copy_, \ + transform_, \ + bbox_, \ + prepare_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Glyph_Class* clazz ) \ + { \ + clazz->glyph_size = size_; \ + clazz->glyph_format = format_; \ + clazz->glyph_init = init_; \ + clazz->glyph_done = done_; \ + clazz->glyph_copy = copy_; \ + clazz->glyph_transform = transform_; \ + clazz->glyph_bbox = bbox_; \ + clazz->glyph_prepare = prepare_; \ } #endif /* FT_CONFIG_OPTION_PIC */ + /*************************************************************************/ /* */ /* <Macro> */ @@ -1083,7 +1167,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Used to create a forward declaration of a */ - /* FT_Renderer_Class stract instance. */ + /* FT_Renderer_Class struct instance. */ /* */ /* <Macro> */ /* FT_DEFINE_RENDERER */ @@ -1091,22 +1175,23 @@ FT_BEGIN_HEADER /* <Description> */ /* Used to initialize an instance of FT_Renderer_Class struct. */ /* */ - /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ - /* to called with a pointer where the allocated stracture is returned.*/ - /* And when it is no longer needed a Destroy function needs */ - /* to be called to release that allocation. */ - /* fcinit.c (ft_create_default_module_classes) already contains */ + /* When FT_CONFIG_OPTION_PIC is defined a `create' funtion will need */ + /* to be called with a pointer where the allocated structure is */ + /* returned. And when it is no longer needed a `destroy' function */ + /* needs to be called to release that allocation. */ + /* `fcinit.c' (ft_create_default_module_classes) already contains */ /* a mechanism to call these functions for the default modules */ - /* described in ftmodule.h */ + /* described in `ftmodule.h'. */ /* */ - /* Notice that the created Create and Destroy functions call */ - /* pic_init and pic_free function to allow you to manually allocate */ - /* and initialize any additional global data, like module specific */ + /* Notice that the created `create' and `destroy' functions call */ + /* `pic_init' and `pic_free' to allow you to manually allocate and */ + /* initialize any additional global data, like a module specific */ /* interface, and put them in the global pic container defined in */ - /* ftpic.h. if you don't need them just implement the functions as */ - /* empty to resolve the link error. Also the pic_init and pic_free */ - /* functions should be declared in pic.h, to be referred by renderer */ - /* definition calling FT_DEFINE_RENDERER() in following. */ + /* `ftpic.h'. If you don't need them just implement the functions as */ + /* empty to resolve the link error. Also the `pic_init' and */ + /* `pic_free' functions should be declared in `pic.h', to be referred */ + /* by the renderer definition calling `FT_DEFINE_RENDERER' in the */ + /* following. */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ @@ -1114,99 +1199,130 @@ FT_BEGIN_HEADER /* */ #ifndef FT_CONFIG_OPTION_PIC -#define FT_DECLARE_RENDERER(class_) \ - FT_EXPORT_VAR( const FT_Renderer_Class ) class_; - -#define FT_DEFINE_RENDERER(class_, \ - flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_, \ - glyph_format_, render_glyph_, transform_glyph_, \ - get_glyph_cbox_, set_mode_, raster_class_ ) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Renderer_Class class_ = \ - { \ - FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \ - interface_,init_,done_,get_interface_) \ - glyph_format_, \ - \ - render_glyph_, \ - transform_glyph_, \ - get_glyph_cbox_, \ - set_mode_, \ - \ - raster_class_ \ +#define FT_DECLARE_RENDERER( class_ ) \ + FT_EXPORT_VAR( const FT_Renderer_Class ) class_; + +#define FT_DEFINE_RENDERER( \ + class_, \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_, \ + glyph_format_, \ + render_glyph_, \ + transform_glyph_, \ + get_glyph_cbox_, \ + set_mode_, \ + raster_class_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Renderer_Class class_ = \ + { \ + FT_DEFINE_ROOT_MODULE( flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + glyph_format_, \ + \ + render_glyph_, \ + transform_glyph_, \ + get_glyph_cbox_, \ + set_mode_, \ + \ + raster_class_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DECLARE_RENDERER(class_) FT_DECLARE_MODULE(class_) - -#define FT_DEFINE_RENDERER(class_, \ - flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_, \ - glyph_format_, render_glyph_, transform_glyph_, \ - get_glyph_cbox_, set_mode_, raster_class_ ) \ - \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_Module_Class* clazz ) \ - { \ - FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \ - FT_Memory memory = library->memory; \ - class_##_pic_free( library ); \ - if ( rclazz ) \ - FT_FREE( rclazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_Module_Class** output_class ) \ - { \ - FT_Renderer_Class* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ - return error; \ - \ - error = class_##_pic_init( library ); \ - if(error) \ - { \ - FT_FREE( clazz ); \ - return error; \ - } \ - \ - FT_DEFINE_ROOT_MODULE(flags_,size_,name_,version_,requires_, \ - interface_,init_,done_,get_interface_) \ - \ - clazz->glyph_format = glyph_format_; \ - \ - clazz->render_glyph = render_glyph_; \ - clazz->transform_glyph = transform_glyph_; \ - clazz->get_glyph_cbox = get_glyph_cbox_; \ - clazz->set_mode = set_mode_; \ - \ - clazz->raster_class = raster_class_; \ - \ - *output_class = (FT_Module_Class*)clazz; \ - return FT_Err_Ok; \ +#define FT_DECLARE_RENDERER( class_ ) FT_DECLARE_MODULE( class_ ) + +#define FT_DEFINE_RENDERER( \ + class_, \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_, \ + glyph_format_, \ + render_glyph_, \ + transform_glyph_, \ + get_glyph_cbox_, \ + set_mode_, \ + raster_class_ ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Renderer_Class* rclazz = (FT_Renderer_Class*)clazz; \ + FT_Memory memory = library->memory; \ + \ + \ + class_ ## _pic_free( library ); \ + if ( rclazz ) \ + FT_FREE( rclazz ); \ + } \ + \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Renderer_Class* clazz = NULL; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ + return error; \ + \ + error = class_ ## _pic_init( library ); \ + if ( error ) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + FT_DEFINE_ROOT_MODULE( flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + \ + clazz->glyph_format = glyph_format_; \ + \ + clazz->render_glyph = render_glyph_; \ + clazz->transform_glyph = transform_glyph_; \ + clazz->get_glyph_cbox = get_glyph_cbox_; \ + clazz->set_mode = set_mode_; \ + \ + clazz->raster_class = raster_class_; \ + \ + *output_class = (FT_Module_Class*)clazz; \ + \ + return FT_Err_Ok; \ } - - #endif /* FT_CONFIG_OPTION_PIC */ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** ****/ - /**** PIC-Support Macros for ftmodapi.h ****/ - /**** ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ + + /* PIC support macros for ftmodapi.h **/ #ifdef FT_CONFIG_OPTION_PIC @@ -1247,6 +1363,7 @@ FT_BEGIN_HEADER #endif + /*************************************************************************/ /* */ /* <Macro> */ @@ -1254,30 +1371,31 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Used to create a forward declaration of a */ - /* FT_Module_Class stract instance. */ + /* FT_Module_Class struct instance. */ /* */ /* <Macro> */ /* FT_DEFINE_MODULE */ /* */ /* <Description> */ - /* Used to initialize an instance of FT_Module_Class struct. */ + /* Used to initialize an instance of an FT_Module_Class struct. */ /* */ - /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ - /* to called with a pointer where the allocated stracture is returned.*/ - /* And when it is no longer needed a Destroy function needs */ - /* to be called to release that allocation. */ - /* fcinit.c (ft_create_default_module_classes) already contains */ + /* When FT_CONFIG_OPTION_PIC is defined a `create' funtion needs to */ + /* be called with a pointer where the allocated structure is */ + /* returned. And when it is no longer needed a `destroy' function */ + /* needs to be called to release that allocation. */ + /* `fcinit.c' (ft_create_default_module_classes) already contains */ /* a mechanism to call these functions for the default modules */ - /* described in ftmodule.h */ + /* described in `ftmodule.h'. */ /* */ - /* Notice that the created Create and Destroy functions call */ - /* pic_init and pic_free function to allow you to manually allocate */ - /* and initialize any additional global data, like module specific */ + /* Notice that the created `create' and `destroy' functions call */ + /* `pic_init' and `pic_free' to allow you to manually allocate and */ + /* initialize any additional global data, like a module specific */ /* interface, and put them in the global pic container defined in */ - /* ftpic.h. if you don't need them just implement the functions as */ - /* empty to resolve the link error. Also the pic_init and pic_free */ - /* functions should be declared in pic.h, to be referred by module */ - /* definition calling FT_DEFINE_MODULE() in following. */ + /* `ftpic.h'. If you don't need them just implement the functions as */ + /* empty to resolve the link error. Also the `pic_init' and */ + /* `pic_free' functions should be declared in `pic.h', to be referred */ + /* by the module definition calling `FT_DEFINE_MODULE' in the */ + /* following. */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ @@ -1287,119 +1405,159 @@ FT_BEGIN_HEADER /* FT_DEFINE_ROOT_MODULE */ /* */ /* <Description> */ - /* Used to initialize an instance of FT_Module_Class struct inside */ - /* another stract that contains it or in a function that initializes */ - /* that containing stract */ + /* Used to initialize an instance of an FT_Module_Class struct inside */ + /* another struct that contains it or in a function that initializes */ + /* that containing struct. */ /* */ #ifndef FT_CONFIG_OPTION_PIC -#define FT_DECLARE_MODULE(class_) \ - FT_CALLBACK_TABLE \ - const FT_Module_Class class_; \ - -#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_) \ - { \ - flags_, \ - size_, \ - \ - name_, \ - version_, \ - requires_, \ - \ - interface_, \ - \ - init_, \ - done_, \ - get_interface_, \ +#define FT_DECLARE_MODULE( class_ ) \ + FT_CALLBACK_TABLE \ + const FT_Module_Class class_; + +#define FT_DEFINE_ROOT_MODULE( \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + { \ + flags_, \ + size_, \ + \ + name_, \ + version_, \ + requires_, \ + \ + interface_, \ + \ + init_, \ + done_, \ + get_interface_, \ }, -#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_) \ - FT_CALLBACK_TABLE_DEF \ - const FT_Module_Class class_ = \ - { \ - flags_, \ - size_, \ - \ - name_, \ - version_, \ - requires_, \ - \ - interface_, \ - \ - init_, \ - done_, \ - get_interface_, \ +#define FT_DEFINE_MODULE( \ + class_, \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + FT_CALLBACK_TABLE_DEF \ + const FT_Module_Class class_ = \ + { \ + flags_, \ + size_, \ + \ + name_, \ + version_, \ + requires_, \ + \ + interface_, \ + \ + init_, \ + done_, \ + get_interface_, \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DECLARE_MODULE(class_) \ - FT_Error FT_Create_Class_##class_( FT_Library library, \ - FT_Module_Class** output_class ); \ - void FT_Destroy_Class_##class_( FT_Library library, \ - FT_Module_Class* clazz ); - -#define FT_DEFINE_ROOT_MODULE(flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_) \ - clazz->root.module_flags = flags_; \ - clazz->root.module_size = size_; \ - clazz->root.module_name = name_; \ - clazz->root.module_version = version_; \ - clazz->root.module_requires = requires_; \ - \ - clazz->root.module_interface = interface_; \ - \ - clazz->root.module_init = init_; \ - clazz->root.module_done = done_; \ - clazz->root.get_interface = get_interface_; - -#define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ - interface_, init_, done_, get_interface_) \ - \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_Module_Class* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - class_##_pic_free( library ); \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_Module_Class** output_class ) \ - { \ - FT_Memory memory = library->memory; \ - FT_Module_Class* clazz; \ - FT_Error error; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz) ) ) \ - return error; \ - error = class_##_pic_init( library ); \ - if(error) \ - { \ - FT_FREE( clazz ); \ - return error; \ - } \ - \ - clazz->module_flags = flags_; \ - clazz->module_size = size_; \ - clazz->module_name = name_; \ - clazz->module_version = version_; \ - clazz->module_requires = requires_; \ - \ - clazz->module_interface = interface_; \ - \ - clazz->module_init = init_; \ - clazz->module_done = done_; \ - clazz->get_interface = get_interface_; \ - \ - *output_class = clazz; \ - return FT_Err_Ok; \ +#define FT_DECLARE_MODULE( class_ ) \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_Module_Class** output_class ); \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_Module_Class* clazz ); + +#define FT_DEFINE_ROOT_MODULE( \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + clazz->root.module_flags = flags_; \ + clazz->root.module_size = size_; \ + clazz->root.module_name = name_; \ + clazz->root.module_version = version_; \ + clazz->root.module_requires = requires_; \ + \ + clazz->root.module_interface = interface_; \ + \ + clazz->root.module_init = init_; \ + clazz->root.module_done = done_; \ + clazz->root.get_interface = get_interface_; + +#define FT_DEFINE_MODULE( \ + class_, \ + flags_, \ + size_, \ + name_, \ + version_, \ + requires_, \ + interface_, \ + init_, \ + done_, \ + get_interface_ ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_Module_Class* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + class_ ## _pic_free( library ); \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_Module_Class** output_class ) \ + { \ + FT_Memory memory = library->memory; \ + FT_Module_Class* clazz = NULL; \ + FT_Error error; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) ) ) \ + return error; \ + error = class_ ## _pic_init( library ); \ + if ( error ) \ + { \ + FT_FREE( clazz ); \ + return error; \ + } \ + \ + clazz->module_flags = flags_; \ + clazz->module_size = size_; \ + clazz->module_name = name_; \ + clazz->module_version = version_; \ + clazz->module_requires = requires_; \ + \ + clazz->module_interface = interface_; \ + \ + clazz->module_init = init_; \ + clazz->module_done = done_; \ + clazz->get_interface = get_interface_; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/include/freetype/internal/ftpic.h b/include/internal/ftpic.h similarity index 80% rename from include/freetype/internal/ftpic.h rename to include/internal/ftpic.h index 5b674e6..485ce7a 100644 --- a/include/freetype/internal/ftpic.h +++ b/include/internal/ftpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services (declaration). */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -31,29 +31,33 @@ FT_BEGIN_HEADER #ifdef FT_CONFIG_OPTION_PIC - typedef struct FT_PIC_Container_ + typedef struct FT_PIC_Container_ { /* pic containers for base */ - void* base; + void* base; + /* pic containers for modules */ - void* autofit; - void* cff; - void* pshinter; - void* psnames; - void* raster; - void* sfnt; - void* smooth; - void* truetype; + void* autofit; + void* cff; + void* pshinter; + void* psnames; + void* raster; + void* sfnt; + void* smooth; + void* truetype; + } FT_PIC_Container; - /* Initialize the various function tables, structs, etc. stored in the container. */ + + /* Initialize the various function tables, structs, etc. */ + /* stored in the container. */ FT_BASE( FT_Error ) - ft_pic_container_init( FT_Library library ); + ft_pic_container_init( FT_Library library ); /* Destroy the contents of the container. */ FT_BASE( void ) - ft_pic_container_destroy( FT_Library library ); + ft_pic_container_destroy( FT_Library library ); #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/include/freetype/internal/ftrfork.h b/include/internal/ftrfork.h similarity index 89% rename from include/freetype/internal/ftrfork.h rename to include/internal/ftrfork.h index 77e1020..d750cbe 100644 --- a/include/freetype/internal/ftrfork.h +++ b/include/internal/ftrfork.h @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (specification). */ /* */ -/* Copyright 2004, 2006, 2007 by */ +/* Copyright 2004, 2006, 2007, 2012, 2013 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -80,26 +80,37 @@ FT_BEGIN_HEADER } ft_raccess_guess_rec; #ifndef FT_CONFIG_OPTION_PIC + /* this array is a storage in non-PIC mode, so ; is needed in END */ -#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ - const type name[] = { -#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ - { raccess_guess_##func_suffix, FT_RFork_Rule_##type_suffix }, -#define CONST_FT_RFORK_RULE_ARRAY_END }; +#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ + const type name[] = { +#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ + { raccess_guess_ ## func_suffix, \ + FT_RFork_Rule_ ## type_suffix }, +#define CONST_FT_RFORK_RULE_ARRAY_END }; + #else /* FT_CONFIG_OPTION_PIC */ + /* this array is a function in PIC mode, so no ; is needed in END */ -#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ - void FT_Init_##name ( type* storage ) { \ - type *local = storage; \ - int i = 0; -#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ - local[i].func = raccess_guess_##func_suffix; \ - local[i].type = FT_RFork_Rule_##type_suffix; \ - i++; -#define CONST_FT_RFORK_RULE_ARRAY_END } +#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ + void \ + FT_Init_Table_ ## name( type* storage ) \ + { \ + type* local = storage; \ + \ + \ + int i = 0; +#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ + local[i].func = raccess_guess_ ## func_suffix; \ + local[i].type = FT_RFork_Rule_ ## type_suffix; \ + i++; +#define CONST_FT_RFORK_RULE_ARRAY_END } + #endif /* FT_CONFIG_OPTION_PIC */ + #endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */ + /*************************************************************************/ /* */ /* <Function> */ @@ -213,6 +224,13 @@ FT_BEGIN_HEADER /* tag :: */ /* The resource tag. */ /* */ + /* sort_by_res_id :: */ + /* A Boolean to sort the fragmented resource by their ids. */ + /* The fragmented resources for `POST' resource should be sorted */ + /* to restore Type1 font properly. For `snft' resources, sorting */ + /* may induce a different order of the faces in comparison to that */ + /* by QuickDraw API. */ + /* */ /* <Output> */ /* offsets :: */ /* The stream offsets for the resource data specified by `tag'. */ @@ -235,6 +253,7 @@ FT_BEGIN_HEADER FT_Long map_offset, FT_Long rdata_pos, FT_Long tag, + FT_Bool sort_by_res_id, FT_Long **offsets, FT_Long *count ); diff --git a/include/freetype/internal/ftserv.h b/include/internal/ftserv.h similarity index 82% rename from include/freetype/internal/ftserv.h rename to include/internal/ftserv.h index 4f481db..1203ec8 100644 --- a/include/freetype/internal/ftserv.h +++ b/include/internal/ftserv.h @@ -4,7 +4,7 @@ /* */ /* The FreeType services (specification only). */ /* */ -/* Copyright 2003-2007, 2009, 2012 by */ +/* Copyright 2003-2007, 2009, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -34,14 +34,6 @@ FT_BEGIN_HEADER -#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ - - /* we disable the warning `conditional expression is constant' here */ - /* in order to compile cleanly with the maximum level of warnings */ -#pragma warning( disable : 4127 ) - -#endif /* _MSC_VER */ - /* * @macro: * FT_FACE_FIND_SERVICE @@ -92,6 +84,7 @@ FT_BEGIN_HEADER #endif /* !C++ */ + /* * @macro: * FT_FACE_FIND_GLOBAL_SERVICE @@ -167,7 +160,13 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Macro> */ - /* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */ + /* FT_DEFINE_SERVICEDESCREC1 */ + /* FT_DEFINE_SERVICEDESCREC2 */ + /* FT_DEFINE_SERVICEDESCREC3 */ + /* FT_DEFINE_SERVICEDESCREC4 */ + /* FT_DEFINE_SERVICEDESCREC5 */ + /* FT_DEFINE_SERVICEDESCREC6 */ + /* FT_DEFINE_SERVICEDESCREC7 */ /* */ /* <Description> */ /* Used to initialize an array of FT_ServiceDescRec structures. */ @@ -264,6 +263,26 @@ FT_BEGIN_HEADER { NULL, NULL } \ }; +#define FT_DEFINE_SERVICEDESCREC7( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6, \ + serv_id_7, serv_data_7 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { serv_id_4, serv_data_4 }, \ + { serv_id_5, serv_data_5 }, \ + { serv_id_6, serv_data_6 }, \ + { serv_id_7, serv_data_7 }, \ + { NULL, NULL } \ + }; + #else /* FT_CONFIG_OPTION_PIC */ #define FT_DEFINE_SERVICEDESCREC1( class_, \ @@ -283,7 +302,7 @@ FT_BEGIN_HEADER FT_Create_Class_ ## class_( FT_Library library, \ FT_ServiceDescRec** output_class ) \ { \ - FT_ServiceDescRec* clazz; \ + FT_ServiceDescRec* clazz = NULL; \ FT_Error error; \ FT_Memory memory = library->memory; \ \ @@ -319,7 +338,7 @@ FT_BEGIN_HEADER FT_Create_Class_ ## class_( FT_Library library, \ FT_ServiceDescRec** output_class ) \ { \ - FT_ServiceDescRec* clazz; \ + FT_ServiceDescRec* clazz = NULL; \ FT_Error error; \ FT_Memory memory = library->memory; \ \ @@ -358,7 +377,7 @@ FT_BEGIN_HEADER FT_Create_Class_ ## class_( FT_Library library, \ FT_ServiceDescRec** output_class ) \ { \ - FT_ServiceDescRec* clazz; \ + FT_ServiceDescRec* clazz = NULL; \ FT_Error error; \ FT_Memory memory = library->memory; \ \ @@ -400,7 +419,7 @@ FT_BEGIN_HEADER FT_Create_Class_ ## class_( FT_Library library, \ FT_ServiceDescRec** output_class ) \ { \ - FT_ServiceDescRec* clazz; \ + FT_ServiceDescRec* clazz = NULL; \ FT_Error error; \ FT_Memory memory = library->memory; \ \ @@ -445,7 +464,7 @@ FT_BEGIN_HEADER FT_Create_Class_ ## class_( FT_Library library, \ FT_ServiceDescRec** output_class ) \ { \ - FT_ServiceDescRec* clazz; \ + FT_ServiceDescRec* clazz = NULL; \ FT_Error error; \ FT_Memory memory = library->memory; \ \ @@ -493,7 +512,7 @@ FT_BEGIN_HEADER FT_Create_Class_ ## class_( FT_Library library, \ FT_ServiceDescRec** output_class) \ { \ - FT_ServiceDescRec* clazz; \ + FT_ServiceDescRec* clazz = NULL; \ FT_Error error; \ FT_Memory memory = library->memory; \ \ @@ -521,6 +540,59 @@ FT_BEGIN_HEADER return FT_Err_Ok; \ } +#define FT_DEFINE_SERVICEDESCREC7( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6, \ + serv_id_7, serv_data_7 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz = NULL; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 8 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = serv_id_6; \ + clazz[5].serv_data = serv_data_6; \ + clazz[6].serv_id = serv_id_7; \ + clazz[6].serv_data = serv_data_7; \ + clazz[7].serv_id = NULL; \ + clazz[7].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + #endif /* FT_CONFIG_OPTION_PIC */ @@ -573,7 +645,9 @@ FT_BEGIN_HEADER /* * A magic number used within the services cache. */ -#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */ + + /* ensure that value `1' has the same width as a pointer */ +#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)~(FT_PtrDist)1) /* @@ -660,23 +734,24 @@ FT_BEGIN_HEADER * The header files containing the services. */ -#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h> -#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h> -#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h> -#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h> -#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h> -#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h> -#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h> -#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h> -#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h> -#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h> -#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h> -#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h> -#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h> -#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h> -#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h> -#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h> -#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h> +#define FT_SERVICE_BDF_H <internal/services/svbdf.h> +#define FT_SERVICE_CID_H <internal/services/svcid.h> +#define FT_SERVICE_GLYPH_DICT_H <internal/services/svgldict.h> +#define FT_SERVICE_GX_VALIDATE_H <internal/services/svgxval.h> +#define FT_SERVICE_KERNING_H <internal/services/svkern.h> +#define FT_SERVICE_MULTIPLE_MASTERS_H <internal/services/svmm.h> +#define FT_SERVICE_OPENTYPE_VALIDATE_H <internal/services/svotval.h> +#define FT_SERVICE_PFR_H <internal/services/svpfr.h> +#define FT_SERVICE_POSTSCRIPT_CMAPS_H <internal/services/svpscmap.h> +#define FT_SERVICE_POSTSCRIPT_INFO_H <internal/services/svpsinfo.h> +#define FT_SERVICE_POSTSCRIPT_NAME_H <internal/services/svpostnm.h> +#define FT_SERVICE_PROPERTIES_H <internal/services/svprop.h> +#define FT_SERVICE_SFNT_H <internal/services/svsfnt.h> +#define FT_SERVICE_TRUETYPE_ENGINE_H <internal/services/svtteng.h> +#define FT_SERVICE_TT_CMAP_H <internal/services/svttcmap.h> +#define FT_SERVICE_WINFNT_H <internal/services/svwinfnt.h> +#define FT_SERVICE_XFREE86_NAME_H <internal/services/svxf86nm.h> +#define FT_SERVICE_TRUETYPE_GLYF_H <internal/services/svttglyf.h> /* */ diff --git a/include/freetype/internal/ftstream.h b/include/internal/ftstream.h similarity index 88% rename from include/freetype/internal/ftstream.h rename to include/internal/ftstream.h index 8b18500..2661858 100644 --- a/include/freetype/internal/ftstream.h +++ b/include/internal/ftstream.h @@ -4,7 +4,7 @@ /* */ /* Stream handling (specification). */ /* */ -/* Copyright 1996-2002, 2004-2006, 2011 by */ +/* Copyright 1996-2002, 2004-2006, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -154,67 +154,60 @@ FT_BEGIN_HEADER /* */ #define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] ) -#define FT_INT8_( p, i ) ( ((const FT_Char*)(p))[(i)] ) #define FT_INT16( x ) ( (FT_Int16)(x) ) #define FT_UINT16( x ) ( (FT_UInt16)(x) ) #define FT_INT32( x ) ( (FT_Int32)(x) ) #define FT_UINT32( x ) ( (FT_UInt32)(x) ) -#define FT_BYTE_I16( p, i, s ) ( FT_INT16( FT_BYTE_( p, i ) ) << (s) ) + #define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) ) -#define FT_BYTE_I32( p, i, s ) ( FT_INT32( FT_BYTE_( p, i ) ) << (s) ) #define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) ) -#define FT_INT8_I16( p, i, s ) ( FT_INT16( FT_INT8_( p, i ) ) << (s) ) -#define FT_INT8_U16( p, i, s ) ( FT_UINT16( FT_INT8_( p, i ) ) << (s) ) -#define FT_INT8_I32( p, i, s ) ( FT_INT32( FT_INT8_( p, i ) ) << (s) ) -#define FT_INT8_U32( p, i, s ) ( FT_UINT32( FT_INT8_( p, i ) ) << (s) ) - -#define FT_PEEK_SHORT( p ) FT_INT16( FT_INT8_I16( p, 0, 8) | \ - FT_BYTE_I16( p, 1, 0) ) +#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8) | \ + FT_BYTE_U16( p, 1, 0) ) #define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \ FT_BYTE_U16( p, 1, 0 ) ) -#define FT_PEEK_LONG( p ) FT_INT32( FT_INT8_I32( p, 0, 24 ) | \ - FT_BYTE_I32( p, 1, 16 ) | \ - FT_BYTE_I32( p, 2, 8 ) | \ - FT_BYTE_I32( p, 3, 0 ) ) +#define FT_PEEK_LONG( p ) FT_INT32( FT_BYTE_U32( p, 0, 24 ) | \ + FT_BYTE_U32( p, 1, 16 ) | \ + FT_BYTE_U32( p, 2, 8 ) | \ + FT_BYTE_U32( p, 3, 0 ) ) #define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \ FT_BYTE_U32( p, 1, 16 ) | \ FT_BYTE_U32( p, 2, 8 ) | \ FT_BYTE_U32( p, 3, 0 ) ) -#define FT_PEEK_OFF3( p ) FT_INT32( FT_INT8_I32( p, 0, 16 ) | \ - FT_BYTE_I32( p, 1, 8 ) | \ - FT_BYTE_I32( p, 2, 0 ) ) +#define FT_PEEK_OFF3( p ) FT_INT32( FT_BYTE_U32( p, 0, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 2, 0 ) ) #define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \ FT_BYTE_U32( p, 1, 8 ) | \ FT_BYTE_U32( p, 2, 0 ) ) -#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_INT8_I16( p, 1, 8 ) | \ - FT_BYTE_I16( p, 0, 0 ) ) +#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_BYTE_U16( p, 1, 8 ) | \ + FT_BYTE_U16( p, 0, 0 ) ) #define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \ FT_BYTE_U16( p, 0, 0 ) ) -#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_INT8_I32( p, 3, 24 ) | \ - FT_BYTE_I32( p, 2, 16 ) | \ - FT_BYTE_I32( p, 1, 8 ) | \ - FT_BYTE_I32( p, 0, 0 ) ) +#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_BYTE_U32( p, 3, 24 ) | \ + FT_BYTE_U32( p, 2, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 0, 0 ) ) #define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \ FT_BYTE_U32( p, 2, 16 ) | \ FT_BYTE_U32( p, 1, 8 ) | \ FT_BYTE_U32( p, 0, 0 ) ) -#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_INT8_I32( p, 2, 16 ) | \ - FT_BYTE_I32( p, 1, 8 ) | \ - FT_BYTE_I32( p, 0, 0 ) ) +#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_BYTE_U32( p, 2, 16 ) | \ + FT_BYTE_U32( p, 1, 8 ) | \ + FT_BYTE_U32( p, 0, 0 ) ) #define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \ FT_BYTE_U32( p, 1, 8 ) | \ @@ -493,37 +486,41 @@ FT_BEGIN_HEADER #define FT_STREAM_POS() \ FT_Stream_Pos( stream ) -#define FT_STREAM_SEEK( position ) \ - FT_SET_ERROR( FT_Stream_Seek( stream, position ) ) +#define FT_STREAM_SEEK( position ) \ + FT_SET_ERROR( FT_Stream_Seek( stream, \ + (FT_ULong)(position) ) ) -#define FT_STREAM_SKIP( distance ) \ - FT_SET_ERROR( FT_Stream_Skip( stream, distance ) ) +#define FT_STREAM_SKIP( distance ) \ + FT_SET_ERROR( FT_Stream_Skip( stream, \ + (FT_Long)(distance) ) ) -#define FT_STREAM_READ( buffer, count ) \ - FT_SET_ERROR( FT_Stream_Read( stream, \ - (FT_Byte*)buffer, \ - count ) ) +#define FT_STREAM_READ( buffer, count ) \ + FT_SET_ERROR( FT_Stream_Read( stream, \ + (FT_Byte*)(buffer), \ + (FT_ULong)(count) ) ) -#define FT_STREAM_READ_AT( position, buffer, count ) \ - FT_SET_ERROR( FT_Stream_ReadAt( stream, \ - position, \ - (FT_Byte*)buffer, \ - count ) ) +#define FT_STREAM_READ_AT( position, buffer, count ) \ + FT_SET_ERROR( FT_Stream_ReadAt( stream, \ + (FT_ULong)(position), \ + (FT_Byte*)buffer, \ + (FT_ULong)(count) ) ) #define FT_STREAM_READ_FIELDS( fields, object ) \ FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) ) -#define FT_FRAME_ENTER( size ) \ - FT_SET_ERROR( \ - FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, size ) ) ) +#define FT_FRAME_ENTER( size ) \ + FT_SET_ERROR( \ + FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, \ + (FT_ULong)(size) ) ) ) -#define FT_FRAME_EXIT() \ +#define FT_FRAME_EXIT() \ FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) ) #define FT_FRAME_EXTRACT( size, bytes ) \ FT_SET_ERROR( \ - FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, size, \ + FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, \ + (FT_ULong)(size), \ (FT_Byte**)&(bytes) ) ) ) #define FT_FRAME_RELEASE( bytes ) \ diff --git a/include/freetype/internal/fttrace.h b/include/internal/fttrace.h similarity index 94% rename from include/freetype/internal/fttrace.h rename to include/internal/fttrace.h index fbefdbd..d5253db 100644 --- a/include/freetype/internal/fttrace.h +++ b/include/internal/fttrace.h @@ -4,7 +4,7 @@ /* */ /* Tracing handling (specification only). */ /* */ -/* Copyright 2002, 2004-2007, 2009, 2011 by */ +/* Copyright 2002, 2004-2007, 2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -38,6 +38,7 @@ FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */ FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */ FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */ FT_TRACE_DEF( synth ) /* bold/slant synthesizer (ftsynth.c) */ +FT_TRACE_DEF( bitmap ) /* bitmap checksum (ftobjs.c) */ /* Cache sub-system */ FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */ @@ -73,6 +74,7 @@ FT_TRACE_DEF( t1parse ) /* PostScript helper module `psaux' */ FT_TRACE_DEF( t1decode ) FT_TRACE_DEF( psobjs ) +FT_TRACE_DEF( psconv ) /* PostScript hinting module `pshinter' */ FT_TRACE_DEF( pshrec ) @@ -86,6 +88,10 @@ FT_TRACE_DEF( cffload ) FT_TRACE_DEF( cffobjs ) FT_TRACE_DEF( cffparse ) +FT_TRACE_DEF( cf2blues ) +FT_TRACE_DEF( cf2hints ) +FT_TRACE_DEF( cf2interp ) + /* Type 42 driver component */ FT_TRACE_DEF( t42 ) @@ -136,9 +142,13 @@ FT_TRACE_DEF( gxvprop ) FT_TRACE_DEF( gxvlcar ) /* autofit components */ +FT_TRACE_DEF( afmodule ) +FT_TRACE_DEF( afhints ) FT_TRACE_DEF( afcjk ) FT_TRACE_DEF( aflatin ) FT_TRACE_DEF( aflatin2 ) FT_TRACE_DEF( afwarp ) +FT_TRACE_DEF( afharfbuzz ) +FT_TRACE_DEF( afglobal ) /* END */ diff --git a/include/freetype/internal/ftvalid.h b/include/internal/ftvalid.h similarity index 88% rename from include/freetype/internal/ftvalid.h rename to include/internal/ftvalid.h index 00cd85e..c281b14 100644 --- a/include/freetype/internal/ftvalid.h +++ b/include/internal/ftvalid.h @@ -4,7 +4,7 @@ /* */ /* FreeType validation support (specification). */ /* */ -/* Copyright 2004 by */ +/* Copyright 2004, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -76,20 +76,31 @@ FT_BEGIN_HEADER } FT_ValidationLevel; +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + /* We disable the warning `structure was padded due to */ + /* __declspec(align())' in order to compile cleanly with */ + /* the maximum level of warnings. */ +#pragma warning( push ) +#pragma warning( disable : 4324 ) +#endif /* _MSC_VER */ + /* validator structure */ typedef struct FT_ValidatorRec_ { + ft_jmp_buf jump_buffer; /* used for exception handling */ + const FT_Byte* base; /* address of table in memory */ const FT_Byte* limit; /* `base' + sizeof(table) in memory */ FT_ValidationLevel level; /* validation level */ FT_Error error; /* error returned. 0 means success */ - ft_jmp_buf jump_buffer; /* used for exception handling */ - } FT_ValidatorRec; +#if defined( _MSC_VER ) +#pragma warning( pop ) +#endif -#define FT_VALIDATOR( x ) ((FT_Validator)( x )) +#define FT_VALIDATOR( x ) ( (FT_Validator)( x ) ) FT_BASE( void ) @@ -115,31 +126,29 @@ FT_BEGIN_HEADER /* Calls ft_validate_error. Assumes that the `valid' local variable */ /* holds a pointer to the current validator object. */ /* */ - /* Use preprocessor prescan to pass FT_ERR_PREFIX. */ - /* */ -#define FT_INVALID( _prefix, _error ) FT_INVALID_( _prefix, _error ) -#define FT_INVALID_( _prefix, _error ) \ - ft_validator_error( valid, _prefix ## _error ) +#define FT_INVALID( _error ) FT_INVALID_( _error ) +#define FT_INVALID_( _error ) \ + ft_validator_error( valid, FT_THROW( _error ) ) /* called when a broken table is detected */ #define FT_INVALID_TOO_SHORT \ - FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + FT_INVALID( Invalid_Table ) /* called when an invalid offset is detected */ #define FT_INVALID_OFFSET \ - FT_INVALID( FT_ERR_PREFIX, Invalid_Offset ) + FT_INVALID( Invalid_Offset ) /* called when an invalid format/value is detected */ #define FT_INVALID_FORMAT \ - FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + FT_INVALID( Invalid_Table ) /* called when an invalid glyph index is detected */ #define FT_INVALID_GLYPH_ID \ - FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index ) + FT_INVALID( Invalid_Glyph_Index ) /* called when an invalid field value is detected */ #define FT_INVALID_DATA \ - FT_INVALID( FT_ERR_PREFIX, Invalid_Table ) + FT_INVALID( Invalid_Table ) FT_END_HEADER diff --git a/include/internal/internal.h b/include/internal/internal.h new file mode 100644 index 0000000..e0ddb06 --- /dev/null +++ b/include/internal/internal.h @@ -0,0 +1,63 @@ +/***************************************************************************/ +/* */ +/* internal.h */ +/* */ +/* Internal header files (specification only). */ +/* */ +/* Copyright 1996-2004, 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /*************************************************************************/ + /* */ + /* This file is automatically included by `ft2build.h'. */ + /* Do not include it manually! */ + /* */ + /*************************************************************************/ + + +#define FT_INTERNAL_OBJECTS_H <internal/ftobjs.h> +#define FT_INTERNAL_PIC_H <internal/ftpic.h> +#define FT_INTERNAL_STREAM_H <internal/ftstream.h> +#define FT_INTERNAL_MEMORY_H <internal/ftmemory.h> +#define FT_INTERNAL_DEBUG_H <internal/ftdebug.h> +#define FT_INTERNAL_CALC_H <internal/ftcalc.h> +#define FT_INTERNAL_DRIVER_H <internal/ftdriver.h> +#define FT_INTERNAL_TRACE_H <internal/fttrace.h> +#define FT_INTERNAL_GLYPH_LOADER_H <internal/ftgloadr.h> +#define FT_INTERNAL_SFNT_H <internal/sfnt.h> +#define FT_INTERNAL_SERVICE_H <internal/ftserv.h> +#define FT_INTERNAL_RFORK_H <internal/ftrfork.h> +#define FT_INTERNAL_VALIDATE_H <internal/ftvalid.h> + +#define FT_INTERNAL_TRUETYPE_TYPES_H <internal/tttypes.h> +#define FT_INTERNAL_TYPE1_TYPES_H <internal/t1types.h> + +#define FT_INTERNAL_POSTSCRIPT_AUX_H <internal/psaux.h> +#define FT_INTERNAL_POSTSCRIPT_HINTS_H <internal/pshints.h> +#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <internal/psglobal.h> + +#define FT_INTERNAL_AUTOHINT_H <internal/autohint.h> + + +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + + /* We disable the warning `conditional expression is constant' here */ + /* in order to compile cleanly with the maximum level of warnings. */ + /* In particular, the warning complains about stuff like `while(0)' */ + /* which is very useful in macro definitions. There is no benefit */ + /* in having it enabled. */ +#pragma warning( disable : 4127 ) + +#endif /* _MSC_VER */ + + +/* END */ diff --git a/include/freetype/internal/psaux.h b/include/internal/psaux.h similarity index 98% rename from include/freetype/internal/psaux.h rename to include/internal/psaux.h index a96e0df..e903114 100644 --- a/include/freetype/internal/psaux.h +++ b/include/internal/psaux.h @@ -5,7 +5,7 @@ /* Auxiliary functions and data structures related to PostScript fonts */ /* (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -101,6 +101,9 @@ FT_BEGIN_HEADER /* capacity :: The current size of the heap block. Increments by */ /* 1kByte chunks. */ /* */ + /* init :: Set to 0xDEADBEEF if `elements' and `lengths' have */ + /* been allocated. */ + /* */ /* max_elems :: The maximum number of elements in table. */ /* */ /* num_elems :: The current number of elements in table. */ @@ -183,6 +186,7 @@ FT_BEGIN_HEADER T1_FIELD_TYPE_STRING, T1_FIELD_TYPE_KEY, T1_FIELD_TYPE_BBOX, + T1_FIELD_TYPE_MM_BBOX, T1_FIELD_TYPE_INTEGER_ARRAY, T1_FIELD_TYPE_FIXED_ARRAY, T1_FIELD_TYPE_CALLBACK, @@ -225,7 +229,7 @@ FT_BEGIN_HEADER T1_Field_ParseFunc reader; FT_UInt offset; /* offset of field in object */ FT_Byte size; /* size of field in bytes */ - FT_UInt array_max; /* maximal number of elements for */ + FT_UInt array_max; /* maximum number of elements for */ /* array */ FT_UInt count_offset; /* offset of element count for */ /* arrays; must not be zero if in */ @@ -531,7 +535,7 @@ FT_BEGIN_HEADER /* */ /* max_points :: maximum points in builder outline */ /* */ - /* max_contours :: Maximal number of contours in builder outline. */ + /* max_contours :: Maximum number of contours in builder outline. */ /* */ /* pos_x :: The horizontal translation (if composite glyph). */ /* */ diff --git a/include/freetype/internal/pshints.h b/include/internal/pshints.h similarity index 93% rename from include/freetype/internal/pshints.h rename to include/internal/pshints.h index 5b7b698..f05ea68 100644 --- a/include/freetype/internal/pshints.h +++ b/include/internal/pshints.h @@ -6,7 +6,7 @@ /* recorders (specification only). These are used to support native */ /* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ /* */ -/* Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 by */ +/* Copyright 2001-2003, 2005-2007, 2009, 2012, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,7 +45,7 @@ FT_BEGIN_HEADER T1_Private* private_dict, PSH_Globals* aglobals ); - typedef FT_Error + typedef void (*PSH_Globals_SetScaleFunc)( PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, @@ -679,27 +679,37 @@ FT_BEGIN_HEADER typedef PSHinter_Interface* PSHinter_Service; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ - get_t1_funcs_, get_t2_funcs_) \ - static const PSHinter_Interface class_ = \ - { \ - get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \ +#define FT_DEFINE_PSHINTER_INTERFACE( \ + class_, \ + get_globals_funcs_, \ + get_t1_funcs_, \ + get_t2_funcs_ ) \ + static const PSHinter_Interface class_ = \ + { \ + get_globals_funcs_, \ + get_t1_funcs_, \ + get_t2_funcs_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ - get_t1_funcs_, get_t2_funcs_) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - PSHinter_Interface* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->get_globals_funcs = get_globals_funcs_; \ - clazz->get_t1_funcs = get_t1_funcs_; \ - clazz->get_t2_funcs = get_t2_funcs_; \ +#define FT_DEFINE_PSHINTER_INTERFACE( \ + class_, \ + get_globals_funcs_, \ + get_t1_funcs_, \ + get_t2_funcs_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + PSHinter_Interface* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->get_globals_funcs = get_globals_funcs_; \ + clazz->get_t1_funcs = get_t1_funcs_; \ + clazz->get_t2_funcs = get_t2_funcs_; \ } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/include/freetype/internal/services/svbdf.h b/include/internal/services/svbdf.h similarity index 100% rename from include/freetype/internal/services/svbdf.h rename to include/internal/services/svbdf.h diff --git a/include/freetype/internal/services/svcid.h b/include/internal/services/svcid.h similarity index 100% rename from include/freetype/internal/services/svcid.h rename to include/internal/services/svcid.h diff --git a/include/freetype/internal/services/svgldict.h b/include/internal/services/svgldict.h similarity index 100% rename from include/freetype/internal/services/svgldict.h rename to include/internal/services/svgldict.h diff --git a/include/freetype/internal/services/svgxval.h b/include/internal/services/svgxval.h similarity index 100% rename from include/freetype/internal/services/svgxval.h rename to include/internal/services/svgxval.h diff --git a/include/freetype/internal/services/svkern.h b/include/internal/services/svkern.h similarity index 100% rename from include/freetype/internal/services/svkern.h rename to include/internal/services/svkern.h diff --git a/include/freetype/internal/services/svmm.h b/include/internal/services/svmm.h similarity index 100% rename from include/freetype/internal/services/svmm.h rename to include/internal/services/svmm.h diff --git a/include/freetype/internal/services/svotval.h b/include/internal/services/svotval.h similarity index 100% rename from include/freetype/internal/services/svotval.h rename to include/internal/services/svotval.h diff --git a/include/freetype/internal/services/svpfr.h b/include/internal/services/svpfr.h similarity index 100% rename from include/freetype/internal/services/svpfr.h rename to include/internal/services/svpfr.h diff --git a/include/freetype/internal/services/svpostnm.h b/include/internal/services/svpostnm.h similarity index 100% rename from include/freetype/internal/services/svpostnm.h rename to include/internal/services/svpostnm.h diff --git a/include/internal/services/svprop.h b/include/internal/services/svprop.h new file mode 100644 index 0000000..22da0bb --- /dev/null +++ b/include/internal/services/svprop.h @@ -0,0 +1,81 @@ +/***************************************************************************/ +/* */ +/* svprop.h */ +/* */ +/* The FreeType property service (specification). */ +/* */ +/* Copyright 2012 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __SVPROP_H__ +#define __SVPROP_H__ + + +FT_BEGIN_HEADER + + +#define FT_SERVICE_ID_PROPERTIES "properties" + + + typedef FT_Error + (*FT_Properties_SetFunc)( FT_Module module, + const char* property_name, + const void* value ); + + typedef FT_Error + (*FT_Properties_GetFunc)( FT_Module module, + const char* property_name, + void* value ); + + + FT_DEFINE_SERVICE( Properties ) + { + FT_Properties_SetFunc set_property; + FT_Properties_GetFunc get_property; + }; + + +#ifndef FT_CONFIG_OPTION_PIC + +#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ + set_property_, \ + get_property_ ) \ + static const FT_Service_PropertiesRec class_ = \ + { \ + set_property_, \ + get_property_ \ + }; + +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ + set_property_, \ + get_property_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Service_PropertiesRec* clazz ) \ + { \ + clazz->set_property = set_property_; \ + clazz->get_property = get_property_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + + /* */ + + +FT_END_HEADER + + +#endif /* __SVPROP_H__ */ + + +/* END */ diff --git a/include/freetype/internal/services/svpscmap.h b/include/internal/services/svpscmap.h similarity index 100% rename from include/freetype/internal/services/svpscmap.h rename to include/internal/services/svpscmap.h diff --git a/include/freetype/internal/services/svpsinfo.h b/include/internal/services/svpsinfo.h similarity index 100% rename from include/freetype/internal/services/svpsinfo.h rename to include/internal/services/svpsinfo.h diff --git a/include/freetype/internal/services/svsfnt.h b/include/internal/services/svsfnt.h similarity index 100% rename from include/freetype/internal/services/svsfnt.h rename to include/internal/services/svsfnt.h diff --git a/include/freetype/internal/services/svttcmap.h b/include/internal/services/svttcmap.h similarity index 97% rename from include/freetype/internal/services/svttcmap.h rename to include/internal/services/svttcmap.h index 83994aa..4370f4c 100644 --- a/include/freetype/internal/services/svttcmap.h +++ b/include/internal/services/svttcmap.h @@ -7,7 +7,7 @@ /* Copyright 2003 by */ /* Masatake YAMATO, Redhat K.K. */ /* */ -/* Copyright 2003, 2008, 2009, 2012 by */ +/* Copyright 2003, 2008, 2009, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -47,7 +47,7 @@ FT_BEGIN_HEADER /* <Fields> */ /* language :: */ /* The language ID used in Mac fonts. Definitions of values are in */ - /* freetype/ttnameid.h. */ + /* `ttnameid.h'. */ /* */ /* format :: */ /* The cmap format. OpenType 1.5 defines the formats 0 (byte */ diff --git a/include/freetype/internal/services/svtteng.h b/include/internal/services/svtteng.h similarity index 100% rename from include/freetype/internal/services/svtteng.h rename to include/internal/services/svtteng.h diff --git a/include/freetype/internal/services/svttglyf.h b/include/internal/services/svttglyf.h similarity index 100% rename from include/freetype/internal/services/svttglyf.h rename to include/internal/services/svttglyf.h diff --git a/include/freetype/internal/services/svwinfnt.h b/include/internal/services/svwinfnt.h similarity index 100% rename from include/freetype/internal/services/svwinfnt.h rename to include/internal/services/svwinfnt.h diff --git a/include/freetype/internal/services/svxf86nm.h b/include/internal/services/svxf86nm.h similarity index 100% rename from include/freetype/internal/services/svxf86nm.h rename to include/internal/services/svxf86nm.h diff --git a/include/freetype/internal/sfnt.h b/include/internal/sfnt.h similarity index 66% rename from include/freetype/internal/sfnt.h rename to include/internal/sfnt.h index 905ca8c..d558e86 100644 --- a/include/freetype/internal/sfnt.h +++ b/include/internal/sfnt.h @@ -4,7 +4,7 @@ /* */ /* High-level `sfnt' driver interface (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2006, 2009, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -125,77 +125,6 @@ FT_BEGIN_HEADER (*TT_Done_Face_Func)( TT_Face face ); -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_SFNT_HeaderRec_Func */ - /* */ - /* <Description> */ - /* Loads the header of a SFNT font file. Supports collections. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* face_index :: The index of the TrueType font, if we are opening a */ - /* collection. */ - /* */ - /* <Output> */ - /* sfnt :: The SFNT header. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The stream cursor must be at the font file's origin. */ - /* */ - /* This function recognizes fonts embedded in a `TrueType */ - /* collection'. */ - /* */ - /* This function checks that the header is valid by looking at the */ - /* values of `search_range', `entry_selector', and `range_shift'. */ - /* */ - typedef FT_Error - (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face, - FT_Stream stream, - FT_Long face_index, - SFNT_Header sfnt ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Load_Directory_Func */ - /* */ - /* <Description> */ - /* Loads the table directory into a face object. */ - /* */ - /* <Input> */ - /* face :: A handle to the target face object. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* sfnt :: The SFNT header. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The stream cursor must be on the first byte after the 4-byte font */ - /* format tag. This is the case just after a call to */ - /* TT_Load_Format_Tag(). */ - /* */ - typedef FT_Error - (*TT_Load_Directory_Func)( TT_Face face, - FT_Stream stream, - SFNT_Header sfnt ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /*************************************************************************/ /* */ /* <FuncType> */ @@ -363,88 +292,6 @@ FT_BEGIN_HEADER TT_SBit_MetricsRec *ametrics ); -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_Set_SBit_Strike_OldFunc */ - /* */ - /* <Description> */ - /* Select an sbit strike for a given size request. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* req :: The size request. */ - /* */ - /* <Output> */ - /* astrike_index :: The index of the sbit strike. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns an error if no */ - /* sbit strike exists for the selected ppem values. */ - /* */ - typedef FT_Error - (*TT_Set_SBit_Strike_OldFunc)( TT_Face face, - FT_UInt x_ppem, - FT_UInt y_ppem, - FT_ULong* astrike_index ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_CharMap_Load_Func */ - /* */ - /* <Description> */ - /* Loads a given TrueType character map into memory. */ - /* */ - /* <Input> */ - /* face :: A handle to the parent face object. */ - /* */ - /* stream :: A handle to the current stream object. */ - /* */ - /* <InOut> */ - /* cmap :: A pointer to a cmap object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The function assumes that the stream is already in use (i.e., */ - /* opened). In case of error, all partially allocated tables are */ - /* released. */ - /* */ - typedef FT_Error - (*TT_CharMap_Load_Func)( TT_Face face, - void* cmap, - FT_Stream input ); - - - /*************************************************************************/ - /* */ - /* <FuncType> */ - /* TT_CharMap_Free_Func */ - /* */ - /* <Description> */ - /* Destroys a character mapping table. */ - /* */ - /* <Input> */ - /* face :: A handle to the parent face object. */ - /* */ - /* cmap :: A handle to a cmap object. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - typedef FT_Error - (*TT_CharMap_Free_Func)( TT_Face face, - void* cmap ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /*************************************************************************/ /* */ /* <FuncType> */ @@ -558,14 +405,18 @@ FT_BEGIN_HEADER /* <Input> */ /* face :: A handle to the target face object. */ /* */ - /* stream :: The input stream. */ - /* */ /* vertical :: A boolean flag. If set, load vertical metrics. */ /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ + /* gindex :: The glyph index. */ /* */ - typedef FT_Error + /* <Output> */ + /* abearing :: The horizontal (or vertical) bearing. Set to zero in */ + /* case of error. */ + /* */ + /* aadvance :: The horizontal (or vertical) advance. Set to zero in */ + /* case of error. */ + /* */ + typedef void (*TT_Get_Metrics_Func)( TT_Face face, FT_Bool vertical, FT_UInt gindex, @@ -657,11 +508,6 @@ FT_BEGIN_HEADER TT_Load_Any_Func load_any; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - TT_Load_SFNT_HeaderRec_Func load_sfnt_header; - TT_Load_Directory_Func load_directory; -#endif - /* these functions are called by `load_face' but they can also */ /* be called from external modules, if there is a need to do so */ TT_Load_Table_Func load_head; @@ -674,12 +520,6 @@ FT_BEGIN_HEADER TT_Load_Table_Func load_name; TT_Free_Table_Func free_name; - /* optional tables */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - TT_Load_Table_Func load_hdmx_stub; - TT_Free_Table_Func free_hdmx_stub; -#endif - /* this field was called `load_kerning' up to version 2.1.10 */ TT_Load_Table_Func load_kern; @@ -690,43 +530,12 @@ FT_BEGIN_HEADER /* version 2.1.10 */ TT_Load_Table_Func load_bhed; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* see `ttsbit.h' */ - TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub; - TT_Load_Table_Func load_sbits_stub; - - /* - * The following two fields appeared in version 2.1.8, and were placed - * between `load_sbits' and `load_sbit_image'. We support them as a - * special exception since they are used by Xfont library within the - * X.Org xserver, and because the probability that other rogue clients - * use the other version 2.1.7 fields below is _extremely_ low. - * - * Note that this forces us to disable an interesting memory-saving - * optimization though... - */ - - TT_Find_SBit_Image_Func find_sbit_image; - TT_Load_SBit_Metrics_Func load_sbit_metrics; - -#endif - TT_Load_SBit_Image_Func load_sbit_image; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - TT_Free_Table_Func free_sbits_stub; -#endif - /* see `ttpost.h' */ TT_Get_PS_Name_Func get_psname; TT_Free_Table_Func free_psnames; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - TT_CharMap_Load_Func load_charmap_stub; - TT_CharMap_Free_Func free_charmap_stub; -#endif - /* starting here, the structure differs from version 2.1.7 */ /* this field was introduced in version 2.1.8, named `get_psname' */ @@ -755,136 +564,141 @@ FT_BEGIN_HEADER #ifndef FT_CONFIG_OPTION_PIC -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS -#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \ - a, -#else - #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) -#endif -#define FT_INTERNAL(a) \ - a, - -#define FT_DEFINE_SFNT_INTERFACE(class_, \ - goto_table_, init_face_, load_face_, done_face_, get_interface_, \ - load_any_, load_sfnt_header_, load_directory_, load_head_, \ - load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ - load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ - load_kern_, load_gasp_, load_pclt_, load_bhed_, \ - set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ - load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ - get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ - get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ - set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ - static const SFNT_Interface class_ = \ - { \ - FT_INTERNAL(goto_table_) \ - FT_INTERNAL(init_face_) \ - FT_INTERNAL(load_face_) \ - FT_INTERNAL(done_face_) \ - FT_INTERNAL(get_interface_) \ - FT_INTERNAL(load_any_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \ - FT_INTERNAL(load_head_) \ - FT_INTERNAL(load_hhea_) \ - FT_INTERNAL(load_cmap_) \ - FT_INTERNAL(load_maxp_) \ - FT_INTERNAL(load_os2_) \ - FT_INTERNAL(load_post_) \ - FT_INTERNAL(load_name_) \ - FT_INTERNAL(free_name_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \ - FT_INTERNAL(load_kern_) \ - FT_INTERNAL(load_gasp_) \ - FT_INTERNAL(load_pclt_) \ - FT_INTERNAL(load_bhed_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \ - FT_INTERNAL(load_sbit_image_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \ - FT_INTERNAL(get_psname_) \ - FT_INTERNAL(free_psnames_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \ - FT_INTERNAL(get_kerning_) \ - FT_INTERNAL(load_font_dir_) \ - FT_INTERNAL(load_hmtx_) \ - FT_INTERNAL(load_eblc_) \ - FT_INTERNAL(free_eblc_) \ - FT_INTERNAL(set_sbit_strike_) \ - FT_INTERNAL(load_strike_metrics_) \ - FT_INTERNAL(get_metrics_) \ +#define FT_DEFINE_SFNT_INTERFACE( \ + class_, \ + goto_table_, \ + init_face_, \ + load_face_, \ + done_face_, \ + get_interface_, \ + load_any_, \ + load_head_, \ + load_hhea_, \ + load_cmap_, \ + load_maxp_, \ + load_os2_, \ + load_post_, \ + load_name_, \ + free_name_, \ + load_kern_, \ + load_gasp_, \ + load_pclt_, \ + load_bhed_, \ + load_sbit_image_, \ + get_psname_, \ + free_psnames_, \ + get_kerning_, \ + load_font_dir_, \ + load_hmtx_, \ + load_eblc_, \ + free_eblc_, \ + set_sbit_strike_, \ + load_strike_metrics_, \ + get_metrics_ ) \ + static const SFNT_Interface class_ = \ + { \ + goto_table_, \ + init_face_, \ + load_face_, \ + done_face_, \ + get_interface_, \ + load_any_, \ + load_head_, \ + load_hhea_, \ + load_cmap_, \ + load_maxp_, \ + load_os2_, \ + load_post_, \ + load_name_, \ + free_name_, \ + load_kern_, \ + load_gasp_, \ + load_pclt_, \ + load_bhed_, \ + load_sbit_image_, \ + get_psname_, \ + free_psnames_, \ + get_kerning_, \ + load_font_dir_, \ + load_hmtx_, \ + load_eblc_, \ + free_eblc_, \ + set_sbit_strike_, \ + load_strike_metrics_, \ + get_metrics_, \ }; #else /* FT_CONFIG_OPTION_PIC */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS -#define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \ - clazz->a = a_; -#else - #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) -#endif -#define FT_INTERNAL(a, a_) \ - clazz->a = a_; - -#define FT_DEFINE_SFNT_INTERFACE(class_, \ - goto_table_, init_face_, load_face_, done_face_, get_interface_, \ - load_any_, load_sfnt_header_, load_directory_, load_head_, \ - load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ - load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ - load_kern_, load_gasp_, load_pclt_, load_bhed_, \ - set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ - load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ - get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ - get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ - set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ - void \ - FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \ - { \ - FT_UNUSED(library); \ - FT_INTERNAL(goto_table,goto_table_) \ - FT_INTERNAL(init_face,init_face_) \ - FT_INTERNAL(load_face,load_face_) \ - FT_INTERNAL(done_face,done_face_) \ - FT_INTERNAL(get_interface,get_interface_) \ - FT_INTERNAL(load_any,load_any_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \ - FT_INTERNAL(load_head,load_head_) \ - FT_INTERNAL(load_hhea,load_hhea_) \ - FT_INTERNAL(load_cmap,load_cmap_) \ - FT_INTERNAL(load_maxp,load_maxp_) \ - FT_INTERNAL(load_os2,load_os2_) \ - FT_INTERNAL(load_post,load_post_) \ - FT_INTERNAL(load_name,load_name_) \ - FT_INTERNAL(free_name,free_name_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \ - FT_INTERNAL(load_kern,load_kern_) \ - FT_INTERNAL(load_gasp,load_gasp_) \ - FT_INTERNAL(load_pclt,load_pclt_) \ - FT_INTERNAL(load_bhed,load_bhed_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \ - FT_INTERNAL(load_sbit_image,load_sbit_image_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \ - FT_INTERNAL(get_psname,get_psname_) \ - FT_INTERNAL(free_psnames,free_psnames_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \ - FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \ - FT_INTERNAL(get_kerning,get_kerning_) \ - FT_INTERNAL(load_font_dir,load_font_dir_) \ - FT_INTERNAL(load_hmtx,load_hmtx_) \ - FT_INTERNAL(load_eblc,load_eblc_) \ - FT_INTERNAL(free_eblc,free_eblc_) \ - FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \ - FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \ - FT_INTERNAL(get_metrics,get_metrics_) \ +#define FT_INTERNAL( a, a_ ) \ + clazz->a = a_; + +#define FT_DEFINE_SFNT_INTERFACE( \ + class_, \ + goto_table_, \ + init_face_, \ + load_face_, \ + done_face_, \ + get_interface_, \ + load_any_, \ + load_head_, \ + load_hhea_, \ + load_cmap_, \ + load_maxp_, \ + load_os2_, \ + load_post_, \ + load_name_, \ + free_name_, \ + load_kern_, \ + load_gasp_, \ + load_pclt_, \ + load_bhed_, \ + load_sbit_image_, \ + get_psname_, \ + free_psnames_, \ + get_kerning_, \ + load_font_dir_, \ + load_hmtx_, \ + load_eblc_, \ + free_eblc_, \ + set_sbit_strike_, \ + load_strike_metrics_, \ + get_metrics_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + SFNT_Interface* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->goto_table = goto_table_; \ + clazz->init_face = init_face_; \ + clazz->load_face = load_face_; \ + clazz->done_face = done_face_; \ + clazz->get_interface = get_interface_; \ + clazz->load_any = load_any_; \ + clazz->load_head = load_head_; \ + clazz->load_hhea = load_hhea_; \ + clazz->load_cmap = load_cmap_; \ + clazz->load_maxp = load_maxp_; \ + clazz->load_os2 = load_os2_; \ + clazz->load_post = load_post_; \ + clazz->load_name = load_name_; \ + clazz->free_name = free_name_; \ + clazz->load_kern = load_kern_; \ + clazz->load_gasp = load_gasp_; \ + clazz->load_pclt = load_pclt_; \ + clazz->load_bhed = load_bhed_; \ + clazz->load_sbit_image = load_sbit_image_; \ + clazz->get_psname = get_psname_; \ + clazz->free_psnames = free_psnames_; \ + clazz->get_kerning = get_kerning_; \ + clazz->load_font_dir = load_font_dir_; \ + clazz->load_hmtx = load_hmtx_; \ + clazz->load_eblc = load_eblc_; \ + clazz->free_eblc = free_eblc_; \ + clazz->set_sbit_strike = set_sbit_strike_; \ + clazz->load_strike_metrics = load_strike_metrics_; \ + clazz->get_metrics = get_metrics_; \ } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/include/freetype/internal/t1types.h b/include/internal/t1types.h similarity index 98% rename from include/freetype/internal/t1types.h rename to include/internal/t1types.h index f859de2..e20237c 100644 --- a/include/freetype/internal/t1types.h +++ b/include/internal/t1types.h @@ -5,7 +5,7 @@ /* Basic Type1/Type2 type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -205,10 +205,6 @@ FT_BEGIN_HEADER FT_CharMapRec charmaprecs[2]; FT_CharMap charmaps[2]; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - PS_Unicodes unicode_map; -#endif - /* support for Multiple Masters fonts */ PS_Blend blend; diff --git a/include/freetype/internal/tttypes.h b/include/internal/tttypes.h similarity index 94% rename from include/freetype/internal/tttypes.h rename to include/internal/tttypes.h index 57b1731..ad302b8 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/internal/tttypes.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2002, 2004-2008, 2012-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -140,6 +140,75 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Struct> */ + /* WOFF_HeaderRec */ + /* */ + /* <Description> */ + /* WOFF file format header. */ + /* */ + /* <Fields> */ + /* See */ + /* */ + /* http://www.w3.org/TR/WOFF/#WOFFHeader */ + /* */ + typedef struct WOFF_HeaderRec_ + { + FT_ULong signature; + FT_ULong flavor; + FT_ULong length; + FT_UShort num_tables; + FT_UShort reserved; + FT_ULong totalSfntSize; + FT_UShort majorVersion; + FT_UShort minorVersion; + FT_ULong metaOffset; + FT_ULong metaLength; + FT_ULong metaOrigLength; + FT_ULong privOffset; + FT_ULong privLength; + + } WOFF_HeaderRec, *WOFF_Header; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* WOFF_TableRec */ + /* */ + /* <Description> */ + /* This structure describes a given table of a WOFF font. */ + /* */ + /* <Fields> */ + /* Tag :: A four-bytes tag describing the table. */ + /* */ + /* Offset :: The offset of the table from the start of the WOFF */ + /* font in its resource. */ + /* */ + /* CompLength :: Compressed table length (in bytes). */ + /* */ + /* OrigLength :: Unompressed table length (in bytes). */ + /* */ + /* CheckSum :: The table checksum. This value can be ignored. */ + /* */ + /* OrigOffset :: The uncompressed table file offset. This value gets */ + /* computed while constructing the (uncompressed) SFNT */ + /* header. It is not contained in the WOFF file. */ + /* */ + typedef struct WOFF_TableRec_ + { + FT_ULong Tag; /* table ID */ + FT_ULong Offset; /* table file offset */ + FT_ULong CompLength; /* compressed table length */ + FT_ULong OrigLength; /* uncompressed table length */ + FT_ULong CheckSum; /* uncompressed checksum */ + + FT_ULong OrigOffset; /* uncompressed table file offset */ + /* (not in the WOFF file) */ + } WOFF_TableRec, *WOFF_Table; + + + /*************************************************************************/ + /* */ + /* <Struct> */ /* TT_LongMetricsRec */ /* */ /* <Description> */ @@ -311,87 +380,6 @@ FT_BEGIN_HEADER } TT_GaspRec; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_HdmxEntryRec */ - /* */ - /* <Description> */ - /* A small structure used to model the pre-computed widths of a given */ - /* size. They are found in the `hdmx' table. */ - /* */ - /* <Fields> */ - /* ppem :: The pixels per EM value at which these metrics apply. */ - /* */ - /* max_width :: The maximum advance width for this metric. */ - /* */ - /* widths :: An array of widths. Note: These are 8-bit bytes. */ - /* */ - typedef struct TT_HdmxEntryRec_ - { - FT_Byte ppem; - FT_Byte max_width; - FT_Byte* widths; - - } TT_HdmxEntryRec, *TT_HdmxEntry; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_HdmxRec */ - /* */ - /* <Description> */ - /* A structure used to model the `hdmx' table, which contains */ - /* pre-computed widths for a set of given sizes/dimensions. */ - /* */ - /* <Fields> */ - /* version :: The version number. */ - /* */ - /* num_records :: The number of hdmx records. */ - /* */ - /* records :: An array of hdmx records. */ - /* */ - typedef struct TT_HdmxRec_ - { - FT_UShort version; - FT_Short num_records; - TT_HdmxEntry records; - - } TT_HdmxRec, *TT_Hdmx; - - - /*************************************************************************/ - /* */ - /* <Struct> */ - /* TT_Kern0_PairRec */ - /* */ - /* <Description> */ - /* A structure used to model a kerning pair for the kerning table */ - /* format 0. The engine now loads this table if it finds one in the */ - /* font file. */ - /* */ - /* <Fields> */ - /* left :: The index of the left glyph in pair. */ - /* */ - /* right :: The index of the right glyph in pair. */ - /* */ - /* value :: The kerning distance. A positive value spaces the */ - /* glyphs, a negative one makes them closer. */ - /* */ - typedef struct TT_Kern0_PairRec_ - { - FT_UShort left; /* index of left glyph in pair */ - FT_UShort right; /* index of right glyph in pair */ - FT_FWord value; /* kerning value */ - - } TT_Kern0_PairRec, *TT_Kern0_Pair; - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ @@ -434,16 +422,16 @@ FT_BEGIN_HEADER /* */ typedef struct TT_SBit_MetricsRec_ { - FT_Byte height; - FT_Byte width; + FT_UShort height; + FT_UShort width; - FT_Char horiBearingX; - FT_Char horiBearingY; - FT_Byte horiAdvance; + FT_Short horiBearingX; + FT_Short horiBearingY; + FT_UShort horiAdvance; - FT_Char vertBearingX; - FT_Char vertBearingY; - FT_Byte vertAdvance; + FT_Short vertBearingX; + FT_Short vertBearingY; + FT_UShort vertAdvance; } TT_SBit_MetricsRec, *TT_SBit_Metrics; @@ -1060,6 +1048,20 @@ FT_BEGIN_HEADER (*TT_Loader_EndGlyphFunc)( TT_Loader loader ); + typedef enum TT_SbitTableType_ + { + TT_SBIT_TABLE_TYPE_NONE = 0, + TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */ + /* `bloc' (Apple) */ + TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google) */ + TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple) */ + + /* do not remove */ + TT_SBIT_TABLE_TYPE_MAX + + } TT_SbitTableType; + + /*************************************************************************/ /* */ /* TrueType Face Type */ @@ -1171,13 +1173,6 @@ FT_BEGIN_HEADER /* */ /* pclt :: The `pclt' SFNT table. */ /* */ - /* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */ - /* sizes, embedded in this font. */ - /* */ - /* sbit_strikes :: An array of sbit strikes embedded in this */ - /* font. This table is optional in a */ - /* TrueType/OpenType font. */ - /* */ /* num_sbit_scales :: The number of sbit scales for this font. */ /* */ /* sbit_scales :: Array of sbit scales embedded in this */ @@ -1269,9 +1264,6 @@ FT_BEGIN_HEADER TT_HoriHeader horizontal; /* TrueType horizontal header */ TT_MaxProfile max_profile; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_ULong max_components; /* stubbed to 0 */ -#endif FT_Bool vertical_info; TT_VertHeader vertical; /* TT Vertical header, if present */ @@ -1308,11 +1300,6 @@ FT_BEGIN_HEADER /* */ /***********************************************************************/ - /* horizontal device metrics */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - TT_HdmxRec hdmx; -#endif - /* grid-fitting and scaling table */ TT_GaspRec gasp; /* the `gasp' table */ @@ -1320,11 +1307,6 @@ FT_BEGIN_HEADER TT_PCLT pclt; /* embedded bitmaps support */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_ULong num_sbit_strikes; - TT_SBit_Strike sbit_strikes; -#endif - FT_ULong num_sbit_scales; TT_SBit_Scale sbit_scales; @@ -1338,12 +1320,6 @@ FT_BEGIN_HEADER /* */ /***********************************************************************/ - /* the glyph locations */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_UShort num_locations_stub; - FT_Long* glyph_locations_stub; -#endif - /* the font program, if any */ FT_ULong font_program_size; FT_Byte* font_program; @@ -1356,13 +1332,6 @@ FT_BEGIN_HEADER FT_ULong cvt_size; FT_Short* cvt; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - /* the format 0 kerning table, if any */ - FT_Int num_kern_pairs; - FT_Int kern_table_index; - TT_Kern0_Pair kern_pairs; -#endif - /* A pointer to the bytecode interpreter to use. This is also */ /* used to hook the debugger for the `ttdebug' utility. */ TT_Interpreter interpreter; @@ -1383,11 +1352,8 @@ FT_BEGIN_HEADER const char* postscript_name; - /* since version 2.1.8, but was originally placed after */ - /* `glyph_locations_stub' */ FT_ULong glyf_len; - /* since version 2.1.8, but was originally placed before `extra' */ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT FT_Bool doblend; GX_Blend blend; @@ -1412,6 +1378,7 @@ FT_BEGIN_HEADER FT_Byte* sbit_table; FT_ULong sbit_table_size; + TT_SbitTableType sbit_table_type; FT_UInt sbit_num_strikes; FT_Byte* kern_table; @@ -1428,6 +1395,13 @@ FT_BEGIN_HEADER FT_ULong horz_metrics_offset; FT_ULong vert_metrics_offset; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* since 2.4.12 */ + FT_ULong sph_found_func_flags; /* special functions found */ + /* for this face */ + FT_Bool sph_compatibility_mode; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + } TT_FaceRec; @@ -1443,7 +1417,7 @@ FT_BEGIN_HEADER /* <Fields> */ /* memory :: A handle to the memory manager. */ /* */ - /* max_points :: The maximal size in points of the zone. */ + /* max_points :: The maximum size in points of the zone. */ /* */ /* max_contours :: Max size in links contours of the zone. */ /* */ @@ -1505,7 +1479,6 @@ FT_BEGIN_HEADER FT_Int advance; FT_Int linear; FT_Bool linear_def; - FT_Bool preserve_pps; FT_Vector pp1; FT_Vector pp2; diff --git a/include/freetype/t1tables.h b/include/t1tables.h similarity index 76% rename from include/freetype/t1tables.h rename to include/t1tables.h index a14255e..61aefdd 100644 --- a/include/freetype/t1tables.h +++ b/include/t1tables.h @@ -5,7 +5,7 @@ /* Basic Type 1/Type 2 tables definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -49,6 +49,26 @@ FT_BEGIN_HEADER /* This section contains the definition of Type 1-specific tables, */ /* including structures related to other PostScript font formats. */ /* */ + /* <Order> */ + /* PS_FontInfoRec */ + /* PS_FontInfo */ + /* PS_PrivateRec */ + /* PS_Private */ + /* */ + /* CID_FaceDictRec */ + /* CID_FaceDict */ + /* CID_FaceInfoRec */ + /* CID_FaceInfo */ + /* */ + /* FT_Has_PS_Glyph_Names */ + /* FT_Get_PS_Font_Info */ + /* FT_Get_PS_Font_Private */ + /* FT_Get_PS_Font_Value */ + /* */ + /* T1_Blend_Flags */ + /* T1_EncodingType */ + /* PS_Dict_Keys */ + /* */ /*************************************************************************/ @@ -190,14 +210,30 @@ FT_BEGIN_HEADER /* given blend dictionary (font info or private). Used to support */ /* Multiple Masters fonts. */ /* */ + /* <Values> */ + /* T1_BLEND_UNDERLINE_POSITION :: */ + /* T1_BLEND_UNDERLINE_THICKNESS :: */ + /* T1_BLEND_ITALIC_ANGLE :: */ + /* T1_BLEND_BLUE_VALUES :: */ + /* T1_BLEND_OTHER_BLUES :: */ + /* T1_BLEND_STANDARD_WIDTH :: */ + /* T1_BLEND_STANDARD_HEIGHT :: */ + /* T1_BLEND_STEM_SNAP_WIDTHS :: */ + /* T1_BLEND_STEM_SNAP_HEIGHTS :: */ + /* T1_BLEND_BLUE_SCALE :: */ + /* T1_BLEND_BLUE_SHIFT :: */ + /* T1_BLEND_FAMILY_BLUES :: */ + /* T1_BLEND_FAMILY_OTHER_BLUES :: */ + /* T1_BLEND_FORCE_BOLD :: */ + /* */ typedef enum T1_Blend_Flags_ { - /*# required fields in a FontInfo blend dictionary */ + /* required fields in a FontInfo blend dictionary */ T1_BLEND_UNDERLINE_POSITION = 0, T1_BLEND_UNDERLINE_THICKNESS, T1_BLEND_ITALIC_ANGLE, - /*# required fields in a Private blend dictionary */ + /* required fields in a Private blend dictionary */ T1_BLEND_BLUE_VALUES, T1_BLEND_OTHER_BLUES, T1_BLEND_STANDARD_WIDTH, @@ -210,15 +246,13 @@ FT_BEGIN_HEADER T1_BLEND_FAMILY_OTHER_BLUES, T1_BLEND_FORCE_BOLD, - /*# never remove */ - T1_BLEND_MAX + T1_BLEND_MAX /* do not remove */ } T1_Blend_Flags; - /* */ - - /*# backwards compatible definitions */ + /* these constants are deprecated; use the corresponding */ + /* `T1_Blend_Flags' values instead */ #define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION #define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS #define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE @@ -235,6 +269,8 @@ FT_BEGIN_HEADER #define t1_blend_force_bold T1_BLEND_FORCE_BOLD #define t1_blend_max T1_BLEND_MAX + /* */ + /* maximum number of Multiple Masters designs, as defined in the spec */ #define T1_MAX_MM_DESIGNS 16 @@ -333,10 +369,17 @@ FT_BEGIN_HEADER /* */ typedef struct CID_FaceDictRec_* CID_FaceDict; - /* */ - - /* backwards-compatible definition */ + /*************************************************************************/ + /* */ + /* <Struct> */ + /* CID_FontDict */ + /* */ + /* <Description> */ + /* This type is equivalent to @CID_FaceDictRec. It is deprecated but */ + /* kept to maintain source compatibility between various versions of */ + /* FreeType. */ + /* */ typedef CID_FaceDictRec CID_FontDict; @@ -503,6 +546,13 @@ FT_BEGIN_HEADER /* An enumeration describing the `Encoding' entry in a Type 1 */ /* dictionary. */ /* */ + /* <Values> */ + /* T1_ENCODING_TYPE_NONE :: */ + /* T1_ENCODING_TYPE_ARRAY :: */ + /* T1_ENCODING_TYPE_STANDARD :: */ + /* T1_ENCODING_TYPE_ISOLATIN1 :: */ + /* T1_ENCODING_TYPE_EXPERT :: */ + /* */ typedef enum T1_EncodingType_ { T1_ENCODING_TYPE_NONE = 0, @@ -523,6 +573,54 @@ FT_BEGIN_HEADER /* An enumeration used in calls to @FT_Get_PS_Font_Value to identify */ /* the Type~1 dictionary entry to retrieve. */ /* */ + /* <Values> */ + /* PS_DICT_FONT_TYPE :: */ + /* PS_DICT_FONT_MATRIX :: */ + /* PS_DICT_FONT_BBOX :: */ + /* PS_DICT_PAINT_TYPE :: */ + /* PS_DICT_FONT_NAME :: */ + /* PS_DICT_UNIQUE_ID :: */ + /* PS_DICT_NUM_CHAR_STRINGS :: */ + /* PS_DICT_CHAR_STRING_KEY :: */ + /* PS_DICT_CHAR_STRING :: */ + /* PS_DICT_ENCODING_TYPE :: */ + /* PS_DICT_ENCODING_ENTRY :: */ + /* PS_DICT_NUM_SUBRS :: */ + /* PS_DICT_SUBR :: */ + /* PS_DICT_STD_HW :: */ + /* PS_DICT_STD_VW :: */ + /* PS_DICT_NUM_BLUE_VALUES :: */ + /* PS_DICT_BLUE_VALUE :: */ + /* PS_DICT_BLUE_FUZZ :: */ + /* PS_DICT_NUM_OTHER_BLUES :: */ + /* PS_DICT_OTHER_BLUE :: */ + /* PS_DICT_NUM_FAMILY_BLUES :: */ + /* PS_DICT_FAMILY_BLUE :: */ + /* PS_DICT_NUM_FAMILY_OTHER_BLUES :: */ + /* PS_DICT_FAMILY_OTHER_BLUE :: */ + /* PS_DICT_BLUE_SCALE :: */ + /* PS_DICT_BLUE_SHIFT :: */ + /* PS_DICT_NUM_STEM_SNAP_H :: */ + /* PS_DICT_STEM_SNAP_H :: */ + /* PS_DICT_NUM_STEM_SNAP_V :: */ + /* PS_DICT_STEM_SNAP_V :: */ + /* PS_DICT_FORCE_BOLD :: */ + /* PS_DICT_RND_STEM_UP :: */ + /* PS_DICT_MIN_FEATURE :: */ + /* PS_DICT_LEN_IV :: */ + /* PS_DICT_PASSWORD :: */ + /* PS_DICT_LANGUAGE_GROUP :: */ + /* PS_DICT_VERSION :: */ + /* PS_DICT_NOTICE :: */ + /* PS_DICT_FULL_NAME :: */ + /* PS_DICT_FAMILY_NAME :: */ + /* PS_DICT_WEIGHT :: */ + /* PS_DICT_IS_FIXED_PITCH :: */ + /* PS_DICT_UNDERLINE_POSITION :: */ + /* PS_DICT_UNDERLINE_THICKNESS :: */ + /* PS_DICT_FS_TYPE :: */ + /* PS_DICT_ITALIC_ANGLE :: */ + /* */ typedef enum PS_Dict_Keys_ { /* conventionally in the font dictionary */ diff --git a/include/freetype/ttnameid.h b/include/ttnameid.h similarity index 86% rename from include/freetype/ttnameid.h rename to include/ttnameid.h index 66aef04..e65b558 100644 --- a/include/freetype/ttnameid.h +++ b/include/ttnameid.h @@ -4,7 +4,7 @@ /* */ /* TrueType name ID definitions (specification only). */ /* */ -/* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */ +/* Copyright 1996-2004, 2006-2008, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -316,11 +316,12 @@ FT_BEGIN_HEADER /* */ /* Possible values of the language identifier field in the name records */ /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MACINTOSH. */ + /* TT_PLATFORM_MACINTOSH. These values are also used as return values */ + /* for function @FT_Get_CMap_Language_ID. */ /* */ /* The canonical source for the Apple assigned Language ID's is at */ /* */ - /* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */ + /* https://developer.apple.com/fonts/TTRefMan/RM06/Chap6name.html */ /* */ #define TT_MAC_LANGID_ENGLISH 0 #define TT_MAC_LANGID_FRENCH 1 @@ -461,45 +462,34 @@ FT_BEGIN_HEADER /* of the TTF `name' table if the `platform' identifier code is */ /* TT_PLATFORM_MICROSOFT. */ /* */ - /* The canonical source for the MS assigned LCID's (seems to) be at */ + /* The canonical source for the MS assigned LCIDs is */ /* */ /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ /* */ - /* It used to be at various places, among them */ - /* */ - /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */ - /* http://www.microsoft.com/globaldev/reference/loclanghome.asp */ - /* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */ - /* http://msdn.microsoft.com/library/en-us/passport25/ */ - /* NET_Passport_VBScript_Documentation/Single_Sign_In/ */ - /* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */ - /* */ - /* Hopefully, it seems now that the Globaldev site prevails... */ - /* (updated by Antoine, 2004-02-17) */ #define TT_MS_LANGID_ARABIC_GENERAL 0x0001 #define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 #define TT_MS_LANGID_ARABIC_IRAQ 0x0801 -#define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 +#define TT_MS_LANGID_ARABIC_EGYPT 0x0C01 #define TT_MS_LANGID_ARABIC_LIBYA 0x1001 #define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 #define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 -#define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 +#define TT_MS_LANGID_ARABIC_TUNISIA 0x1C01 #define TT_MS_LANGID_ARABIC_OMAN 0x2001 #define TT_MS_LANGID_ARABIC_YEMEN 0x2401 #define TT_MS_LANGID_ARABIC_SYRIA 0x2801 -#define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 +#define TT_MS_LANGID_ARABIC_JORDAN 0x2C01 #define TT_MS_LANGID_ARABIC_LEBANON 0x3001 #define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 #define TT_MS_LANGID_ARABIC_UAE 0x3801 -#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 +#define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01 #define TT_MS_LANGID_ARABIC_QATAR 0x4001 #define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 #define TT_MS_LANGID_CATALAN_SPAIN 0x0403 #define TT_MS_LANGID_CHINESE_GENERAL 0x0004 #define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 #define TT_MS_LANGID_CHINESE_PRC 0x0804 -#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 +#define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04 #define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 #if 1 /* this looks like the correct value */ @@ -517,7 +507,7 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_DANISH_DENMARK 0x0406 #define TT_MS_LANGID_GERMAN_GERMANY 0x0407 #define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 -#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 +#define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07 #define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 #define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 #define TT_MS_LANGID_GREEK_GREECE 0x0408 @@ -530,69 +520,69 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 #define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 #define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 -#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 +#define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09 #define TT_MS_LANGID_ENGLISH_CANADA 0x1009 #define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 #define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 -#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 +#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1C09 #define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 #define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 #define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 -#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 +#define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09 #define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 #define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 #define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 -#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 #define TT_MS_LANGID_ENGLISH_INDIA 0x4009 #define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 #define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 -#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a -#define TT_MS_LANGID_SPANISH_MEXICO 0x080a -#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a -#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a -#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a -#define TT_MS_LANGID_SPANISH_PANAMA 0x180a -#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a -#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a -#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a -#define TT_MS_LANGID_SPANISH_PERU 0x280a -#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a -#define TT_MS_LANGID_SPANISH_ECUADOR 0x300a -#define TT_MS_LANGID_SPANISH_CHILE 0x340a -#define TT_MS_LANGID_SPANISH_URUGUAY 0x380a -#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a -#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a -#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a -#define TT_MS_LANGID_SPANISH_HONDURAS 0x480a -#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a -#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a -#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a +#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A +#define TT_MS_LANGID_SPANISH_MEXICO 0x080A +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A +#define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A +#define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A +#define TT_MS_LANGID_SPANISH_PANAMA 0x180A +#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1C0A +#define TT_MS_LANGID_SPANISH_VENEZUELA 0x200A +#define TT_MS_LANGID_SPANISH_COLOMBIA 0x240A +#define TT_MS_LANGID_SPANISH_PERU 0x280A +#define TT_MS_LANGID_SPANISH_ARGENTINA 0x2C0A +#define TT_MS_LANGID_SPANISH_ECUADOR 0x300A +#define TT_MS_LANGID_SPANISH_CHILE 0x340A +#define TT_MS_LANGID_SPANISH_URUGUAY 0x380A +#define TT_MS_LANGID_SPANISH_PARAGUAY 0x3C0A +#define TT_MS_LANGID_SPANISH_BOLIVIA 0x400A +#define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440A +#define TT_MS_LANGID_SPANISH_HONDURAS 0x480A +#define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A +#define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A +#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A /* The following ID blatantly violate MS specs by using a */ /* sublanguage > 0x1F. */ -#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU -#define TT_MS_LANGID_FINNISH_FINLAND 0x040b -#define TT_MS_LANGID_FRENCH_FRANCE 0x040c -#define TT_MS_LANGID_FRENCH_BELGIUM 0x080c -#define TT_MS_LANGID_FRENCH_CANADA 0x0c0c -#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c -#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c -#define TT_MS_LANGID_FRENCH_MONACO 0x180c -#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c -#define TT_MS_LANGID_FRENCH_REUNION 0x200c -#define TT_MS_LANGID_FRENCH_CONGO 0x240c +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU +#define TT_MS_LANGID_FINNISH_FINLAND 0x040B +#define TT_MS_LANGID_FRENCH_FRANCE 0x040C +#define TT_MS_LANGID_FRENCH_BELGIUM 0x080C +#define TT_MS_LANGID_FRENCH_CANADA 0x0C0C +#define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C +#define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C +#define TT_MS_LANGID_FRENCH_MONACO 0x180C +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C +#define TT_MS_LANGID_FRENCH_REUNION 0x200C +#define TT_MS_LANGID_FRENCH_CONGO 0x240C /* which was formerly: */ #define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO -#define TT_MS_LANGID_FRENCH_SENEGAL 0x280c -#define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c -#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c -#define TT_MS_LANGID_FRENCH_MALI 0x340c -#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c -#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c - /* and another violation of the spec (see 0xE40aU) */ -#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU -#define TT_MS_LANGID_HEBREW_ISRAEL 0x040d -#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e -#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C +#define TT_MS_LANGID_FRENCH_MALI 0x340C +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C +#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C + /* and another violation of the spec (see 0xE40AU) */ +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU +#define TT_MS_LANGID_HEBREW_ISRAEL 0x040D +#define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E +#define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F #define TT_MS_LANGID_ITALIAN_ITALY 0x0410 #define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 #define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 @@ -610,27 +600,27 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 #define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 #define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 -#define TT_MS_LANGID_CROATIAN_CROATIA 0x041a -#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a -#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a +#define TT_MS_LANGID_CROATIAN_CROATIA 0x041A +#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A +#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A #if 0 /* this used to be this value, but it looks like we were wrong */ -#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A #else /* current sources say */ -#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a -#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a +#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A /* and XPsp2 Platform SDK added (2004-07-26) */ /* Names are shortened to be significant within 40 chars. */ -#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a -#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A #endif -#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b -#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c -#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d -#define TT_MS_LANGID_SWEDISH_FINLAND 0x081d -#define TT_MS_LANGID_THAI_THAILAND 0x041e -#define TT_MS_LANGID_TURKISH_TURKEY 0x041f +#define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B +#define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C +#define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D +#define TT_MS_LANGID_SWEDISH_FINLAND 0x081D +#define TT_MS_LANGID_THAI_THAILAND 0x041E +#define TT_MS_LANGID_TURKISH_TURKEY 0x041F #define TT_MS_LANGID_URDU_PAKISTAN 0x0420 #define TT_MS_LANGID_URDU_INDIA 0x0820 #define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 @@ -643,13 +633,13 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 #define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 #define TT_MS_LANGID_FARSI_IRAN 0x0429 -#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a -#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b -#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c -#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c -#define TT_MS_LANGID_BASQUE_SPAIN 0x042d -#define TT_MS_LANGID_SORBIAN_GERMANY 0x042e -#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f +#define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A +#define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B +#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C +#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C +#define TT_MS_LANGID_BASQUE_SPAIN 0x042D +#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F #define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 #define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 #define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 @@ -660,32 +650,32 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 #define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 #define TT_MS_LANGID_HINDI_INDIA 0x0439 -#define TT_MS_LANGID_MALTESE_MALTA 0x043a +#define TT_MS_LANGID_MALTESE_MALTA 0x043A /* Added by XPsp2 Platform SDK (2004-07-26) */ -#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b -#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b -#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b -#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b -#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b -#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b -#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b -#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b -#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b +#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B +#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B +#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B +#define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103B +#define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143B +#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183B +#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B +#define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B +#define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B /* ... and we also keep our old identifier... */ -#define TT_MS_LANGID_SAAMI_LAPONIA 0x043b +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B #if 0 /* this seems to be a previous inversion */ -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C #else -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C #endif -#define TT_MS_LANGID_YIDDISH_GERMANY 0x043d -#define TT_MS_LANGID_MALAY_MALAYSIA 0x043e -#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e -#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_MALAY_MALAYSIA 0x043E +#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E +#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F #define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 /* alias declared in Windows 2000 */ #define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ @@ -703,12 +693,12 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_GUJARATI_INDIA 0x0447 #define TT_MS_LANGID_ORIYA_INDIA 0x0448 #define TT_MS_LANGID_TAMIL_INDIA 0x0449 -#define TT_MS_LANGID_TELUGU_INDIA 0x044a -#define TT_MS_LANGID_KANNADA_INDIA 0x044b -#define TT_MS_LANGID_MALAYALAM_INDIA 0x044c -#define TT_MS_LANGID_ASSAMESE_INDIA 0x044d -#define TT_MS_LANGID_MARATHI_INDIA 0x044e -#define TT_MS_LANGID_SANSKRIT_INDIA 0x044f +#define TT_MS_LANGID_TELUGU_INDIA 0x044A +#define TT_MS_LANGID_KANNADA_INDIA 0x044B +#define TT_MS_LANGID_MALAYALAM_INDIA 0x044C +#define TT_MS_LANGID_ASSAMESE_INDIA 0x044D +#define TT_MS_LANGID_MARATHI_INDIA 0x044E +#define TT_MS_LANGID_SANSKRIT_INDIA 0x044F #define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 #define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 #define TT_MS_LANGID_TIBETAN_CHINA 0x0451 @@ -742,13 +732,13 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 #define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 /* Missing a LCID for Sindhi in Devanagari script */ -#define TT_MS_LANGID_SYRIAC_SYRIA 0x045a -#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b -#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c -#define TT_MS_LANGID_INUKTITUT_CANADA 0x045d -#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f +#define TT_MS_LANGID_SYRIAC_SYRIA 0x045A +#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_INUKTITUT_CANADA 0x045D +#define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F /* Missing a LCID for Tifinagh script */ #define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ @@ -768,15 +758,15 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 #define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 #define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 -#define TT_MS_LANGID_YORUBA_NIGERIA 0x046a -#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b -#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b -#define TT_MS_LANGID_QUECHUA_PERU 0x0c6b -#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c +#define TT_MS_LANGID_YORUBA_NIGERIA 0x046A +#define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B +#define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B +#define TT_MS_LANGID_QUECHUA_PERU 0x0C6B +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ #define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ TT_MS_LANGID_SEPEDI_SOUTH_AFRICA - /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */ + /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */ #define TT_MS_LANGID_IGBO_NIGERIA 0x0470 #define TT_MS_LANGID_KANURI_NIGERIA 0x0471 #define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 @@ -793,12 +783,12 @@ FT_BEGIN_HEADER /* studying). */ #define TT_MS_LANGID_YI_CHINA 0x0478 #define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 - /* language codes from 0x047a to 0x047f are (still) unknown. */ + /* language codes from 0x047A to 0x047F are (still) unknown. */ #define TT_MS_LANGID_UIGHUR_CHINA 0x0480 #define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 #if 0 /* not deemed useful for fonts */ -#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff +#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF #endif @@ -1218,7 +1208,7 @@ FT_BEGIN_HEADER /* */ /* Here some alias #defines in order to be clearer. */ /* */ - /* These are not always #defined to stay within the 31~character limit */ + /* These are not always #defined to stay within the 31~character limit, */ /* which some compilers have. */ /* */ /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ diff --git a/include/freetype/tttables.h b/include/tttables.h similarity index 87% rename from include/freetype/tttables.h rename to include/tttables.h index 02236c2..e1d8b05 100644 --- a/include/freetype/tttables.h +++ b/include/tttables.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType tables definitions and interface */ /* (specification only). */ /* */ -/* Copyright 1996-2005, 2008-2011 by */ +/* Copyright 1996-2005, 2008-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -48,6 +48,25 @@ FT_BEGIN_HEADER /* This section contains the definition of TrueType-specific tables */ /* as well as some routines used to access and process them. */ /* */ + /* <Order> */ + /* TT_Header */ + /* TT_HoriHeader */ + /* TT_VertHeader */ + /* TT_OS2 */ + /* TT_Postscript */ + /* TT_PCLT */ + /* TT_MaxProfile */ + /* */ + /* FT_Sfnt_Tag */ + /* FT_Get_Sfnt_Table */ + /* FT_Load_Sfnt_Table */ + /* FT_Sfnt_Table_Info */ + /* */ + /* FT_Get_CMap_Language_ID */ + /* FT_Get_CMap_Format */ + /* */ + /* FT_PARAM_TAG_UNPATENTED_HINTING */ + /* */ /*************************************************************************/ @@ -170,8 +189,8 @@ FT_BEGIN_HEADER /* */ /* <Note> */ /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields which */ - /* are different. */ + /* be identical except for the names of their fields, */ + /* which are different. */ /* */ /* This ensures that a single function in the `ttload' */ /* module is able to read both the horizontal and vertical */ @@ -296,8 +315,8 @@ FT_BEGIN_HEADER /* */ /* <Note> */ /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields which */ - /* are different. */ + /* be identical except for the names of their fields, */ + /* which are different. */ /* */ /* This ensures that a single function in the `ttload' */ /* module is able to read both the horizontal and vertical */ @@ -340,12 +359,11 @@ FT_BEGIN_HEADER /* TT_OS2 */ /* */ /* <Description> */ - /* A structure used to model a TrueType OS/2 table. This is the long */ - /* table version. All fields comply to the TrueType specification. */ + /* A structure used to model a TrueType OS/2 table. All fields */ + /* comply to the OpenType specification. */ /* */ - /* Note that we now support old Mac fonts which do not include an */ - /* OS/2 table. In this case, the `version' field is always set to */ - /* 0xFFFF. */ + /* Note that we now support old Mac fonts that do not include an OS/2 */ + /* table. In this case, the `version' field is always set to 0xFFFF. */ /* */ typedef struct TT_OS2_ { @@ -384,12 +402,12 @@ FT_BEGIN_HEADER FT_UShort usWinAscent; FT_UShort usWinDescent; - /* only version 1 tables: */ + /* only version 1 and higher: */ FT_ULong ulCodePageRange1; /* Bits 0-31 */ FT_ULong ulCodePageRange2; /* Bits 32-63 */ - /* only version 2 tables: */ + /* only version 2 and higher: */ FT_Short sxHeight; FT_Short sCapHeight; @@ -397,6 +415,11 @@ FT_BEGIN_HEADER FT_UShort usBreakChar; FT_UShort usMaxContext; + /* only version 5 and higher: */ + + FT_UShort usLowerOpticalPointSize; /* in twips (1/20th points) */ + FT_UShort usUpperOpticalPointSize; /* in twips (1/20th points) */ + } TT_OS2; @@ -465,7 +488,7 @@ FT_BEGIN_HEADER /* TT_MaxProfile */ /* */ /* <Description> */ - /* The maximum profile is a table containing many max values which */ + /* The maximum profile is a table containing many max values, which */ /* can be used to pre-allocate arrays. This ensures that no memory */ /* allocation occurs during a glyph load. */ /* */ @@ -555,21 +578,44 @@ FT_BEGIN_HEADER /* An enumeration used to specify the index of an SFNT table. */ /* Used in the @FT_Get_Sfnt_Table API function. */ /* */ + /* <Values> */ + /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ + /* */ + /* FT_SFNT_MAXP :: To access the font's @TT_MaxProfile structure. */ + /* */ + /* FT_SFNT_OS2 :: To access the font's @TT_OS2 structure. */ + /* */ + /* FT_SFNT_HHEA :: To access the font's @TT_HoriHeader structure. */ + /* */ + /* FT_SFNT_VHEA :: To access the font's @TT_VertHeader struture. */ + /* */ + /* FT_SFNT_POST :: To access the font's @TT_Postscript structure. */ + /* */ + /* FT_SFNT_PCLT :: To access the font's @TT_PCLT structure. */ + /* */ typedef enum FT_Sfnt_Tag_ { - ft_sfnt_head = 0, /* TT_Header */ - ft_sfnt_maxp = 1, /* TT_MaxProfile */ - ft_sfnt_os2 = 2, /* TT_OS2 */ - ft_sfnt_hhea = 3, /* TT_HoriHeader */ - ft_sfnt_vhea = 4, /* TT_VertHeader */ - ft_sfnt_post = 5, /* TT_Postscript */ - ft_sfnt_pclt = 6, /* TT_PCLT */ + FT_SFNT_HEAD, + FT_SFNT_MAXP, + FT_SFNT_OS2, + FT_SFNT_HHEA, + FT_SFNT_VHEA, + FT_SFNT_POST, + FT_SFNT_PCLT, - sfnt_max /* internal end mark */ + FT_SFNT_MAX } FT_Sfnt_Tag; - /* */ + /* these constants are deprecated; use the corresponding `FT_Sfnt_Tag' */ + /* values instead */ +#define ft_sfnt_head FT_SFNT_HEAD +#define ft_sfnt_maxp FT_SFNT_MAXP +#define ft_sfnt_os2 FT_SFNT_OS2 +#define ft_sfnt_hhea FT_SFNT_HHEA +#define ft_sfnt_vhea FT_SFNT_VHEA +#define ft_sfnt_post FT_SFNT_POST +#define ft_sfnt_pclt FT_SFNT_PCLT /*************************************************************************/ @@ -600,6 +646,16 @@ FT_BEGIN_HEADER /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ /* a list. */ /* */ + /* Here an example how to access the `vhea' table: */ + /* */ + /* { */ + /* TT_VertHeader* vert_header; */ + /* */ + /* */ + /* vert_header = */ + /* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); */ + /* } */ + /* */ FT_EXPORT( void* ) FT_Get_Sfnt_Table( FT_Face face, FT_Sfnt_Tag tag ); @@ -662,6 +718,12 @@ FT_BEGIN_HEADER * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); * if ( error ) { ... could not load table ... } * } + * + * Note that structures like @TT_Header or @TT_OS2 can't be used with + * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that + * those structures depend on the processor architecture, with varying + * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). + * */ FT_EXPORT( FT_Error ) FT_Load_Sfnt_Table( FT_Face face, @@ -702,7 +764,8 @@ FT_BEGIN_HEADER * FreeType error code. 0~means success. * * @note: - * SFNT tables with length zero are treated as missing. + * While parsing fonts, FreeType handles SFNT tables with length zero as + * missing. * */ FT_EXPORT( FT_Error ) @@ -719,7 +782,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Return TrueType/sfnt specific cmap language ID. Definitions of */ - /* language ID values are in `freetype/ttnameid.h'. */ + /* language ID values are in `ttnameid.h'. */ /* */ /* <Input> */ /* charmap :: */ @@ -729,6 +792,9 @@ FT_BEGIN_HEADER /* The language ID of `charmap'. If `charmap' doesn't belong to a */ /* TrueType/sfnt face, just return~0 as the default value. */ /* */ + /* For a format~14 cmap (to access Unicode IVS), the return value is */ + /* 0xFFFFFFFF. */ + /* */ FT_EXPORT( FT_ULong ) FT_Get_CMap_Language_ID( FT_CharMap charmap ); diff --git a/include/freetype/tttags.h b/include/tttags.h similarity index 94% rename from include/freetype/tttags.h rename to include/tttags.h index 307ce4b..d59aa19 100644 --- a/include/freetype/tttags.h +++ b/include/tttags.h @@ -4,7 +4,7 @@ /* */ /* Tags for TrueType and OpenType tables (specification only). */ /* */ -/* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */ +/* Copyright 1996-2001, 2004, 2005, 2007, 2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -40,6 +40,8 @@ FT_BEGIN_HEADER #define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) #define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) #define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) +#define TTAG_CBDT FT_MAKE_TAG( 'C', 'B', 'D', 'T' ) +#define TTAG_CBLC FT_MAKE_TAG( 'C', 'B', 'L', 'C' ) #define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) #define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) #define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) @@ -86,6 +88,7 @@ FT_BEGIN_HEADER #define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) #define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) #define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) +#define TTAG_sbix FT_MAKE_TAG( 's', 'b', 'i', 'x' ) #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) @@ -97,6 +100,7 @@ FT_BEGIN_HEADER #define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) #define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) #define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) +#define TTAG_wOFF FT_MAKE_TAG( 'w', 'O', 'F', 'F' ) FT_END_HEADER diff --git a/include/freetype/ttunpat.h b/include/ttunpat.h similarity index 99% rename from include/freetype/ttunpat.h rename to include/ttunpat.h index a016275..bf53ddd 100644 --- a/include/freetype/ttunpat.h +++ b/include/ttunpat.h @@ -48,7 +48,8 @@ FT_BEGIN_HEADER */ #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) - /* */ + /* */ + FT_END_HEADER diff --git a/modules.cfg b/modules.cfg index a85378e..4e52594 100644 --- a/modules.cfg +++ b/modules.cfg @@ -1,6 +1,6 @@ # modules.cfg # -# Copyright 2005-2007, 2009-2011 by +# Copyright 2005-2007, 2009-2011, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -19,7 +19,7 @@ # activate a module, remove the comment character. # # Note that many modules and components are further controlled with macros -# in the file `include/freetype/config/ftoption.h'. +# in the file `include/config/ftoption.h'. #### @@ -85,7 +85,7 @@ HINTING_MODULES += autofit HINTING_MODULES += pshinter # The TrueType hinting engine doesn't have a module of its own but is -# controlled in file include/freetype/config/ftoption.h +# controlled in file include/config/ftoption.h # (TT_CONFIG_OPTION_BYTECODE_INTERPRETER and friends). @@ -106,7 +106,7 @@ RASTER_MODULES += smooth # FreeType's cache sub-system (quite stable but still in beta -- this means # that its public API is subject to change if necessary). See -# include/freetype/ftcache.h. Needs ftglyph.c. +# include/ftcache.h. Needs ftglyph.c. AUX_MODULES += cache # TrueType GX/AAT table validation. Needs ftgxval.c below. @@ -114,17 +114,17 @@ AUX_MODULES += cache # Support for streams compressed with gzip (files with suffix .gz). # -# See include/freetype/ftgzip.h for the API. +# See include/ftgzip.h for the API. AUX_MODULES += gzip # Support for streams compressed with LZW (files with suffix .Z). # -# See include/freetype/ftlzw.h for the API. +# See include/ftlzw.h for the API. AUX_MODULES += lzw # Support for streams compressed with bzip2 (files with suffix .bz2). # -# See include/freetype/ftbzip2.h for the API. +# See include/ftbzip2.h for the API. AUX_MODULES += bzip2 # OpenType table validation. Needs ftotval.c below. @@ -149,95 +149,95 @@ AUX_MODULES += psnames # Exact bounding box calculation. # -# See include/freetype/ftbbox.h for the API. +# See include/ftbbox.h for the API. BASE_EXTENSIONS += ftbbox.c # Access BDF-specific strings. Needs BDF font driver. # -# See include/freetype/ftbdf.h for the API. +# See include/ftbdf.h for the API. BASE_EXTENSIONS += ftbdf.c # Utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp bitmaps into # 8bpp format, and for emboldening of bitmap glyphs. # -# See include/freetype/ftbitmap.h for the API. +# See include/ftbitmap.h for the API. BASE_EXTENSIONS += ftbitmap.c # Access CID font information. # -# See include/freetype/ftcid.h for the API. +# See include/ftcid.h for the API. BASE_EXTENSIONS += ftcid.c # Access FSType information. Needs fttype1.c. # -# See include/freetype/freetype.h for the API. +# See include/freetype.h for the API. BASE_EXTENSIONS += ftfstype.c # Support for GASP table queries. # -# See include/freetype/ftgasp.h for the API. +# See include/ftgasp.h for the API. BASE_EXTENSIONS += ftgasp.c # Convenience functions to handle glyphs. Needs ftbitmap.c. # -# See include/freetype/ftglyph.h for the API. +# See include/ftglyph.h for the API. BASE_EXTENSIONS += ftglyph.c # Interface for gxvalid module. # -# See include/freetype/ftgxval.h for the API. +# See include/ftgxval.h for the API. BASE_EXTENSIONS += ftgxval.c # Support for LCD color filtering of subpixel bitmaps. # -# See include/freetype/ftlcdfil.h for the API. +# See include/ftlcdfil.h for the API. BASE_EXTENSIONS += ftlcdfil.c # Multiple Master font interface. # -# See include/freetype/ftmm.h for the API. +# See include/ftmm.h for the API. BASE_EXTENSIONS += ftmm.c # Interface for otvalid module. # -# See include/freetype/ftotval.h for the API. +# See include/ftotval.h for the API. BASE_EXTENSIONS += ftotval.c # Support for FT_Face_CheckTrueTypePatents. # -# See include/freetype/freetype.h for the API. +# See include/freetype.h for the API. BASE_EXTENSIONS += ftpatent.c # Interface for accessing PFR-specific data. Needs PFR font driver. # -# See include/freetype/ftpfr.h for the API. +# See include/ftpfr.h for the API. BASE_EXTENSIONS += ftpfr.c # Path stroker. Needs ftglyph.c. # -# See include/freetype/ftstroke.h for the API. +# See include/ftstroke.h for the API. BASE_EXTENSIONS += ftstroke.c # Support for synthetic embolding and slanting of fonts. Needs ftbitmap.c. # -# See include/freetype/ftsynth.h for the API. +# See include/ftsynth.h for the API. BASE_EXTENSIONS += ftsynth.c # Interface to access data specific to PostScript Type 1 and Type 2 (CFF) # fonts. # -# See include/freetype/t1tables.h for the API. +# See include/t1tables.h for the API. BASE_EXTENSIONS += fttype1.c # Interface for accessing data specific to Windows FNT files. Needs winfnt # driver. # -# See include/freetype/ftwinfnt.h for the API. +# See include/ftwinfnt.h for the API. BASE_EXTENSIONS += ftwinfnt.c # Support functions for X11. # -# See include/freetype/ftxf86.h for the API. +# See include/ftxf86.h for the API. BASE_EXTENSIONS += ftxf86.c #### diff --git a/objs/.gitignore b/objs/.gitignore index ad264ce..21b67f6 100644 --- a/objs/.gitignore +++ b/objs/.gitignore @@ -7,3 +7,9 @@ ftoption.h libfreetype.la .libs *.lo +*.o +*.a +debug*/ +release*/ +win32/ +win64/ diff --git a/packaging/freetype.manifest b/packaging/freetype.manifest new file mode 100644 index 0000000..97e8c31 --- /dev/null +++ b/packaging/freetype.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/freetype.spec b/packaging/freetype.spec index b0187f1..7c32def 100644 --- a/packaging/freetype.spec +++ b/packaging/freetype.spec @@ -1,11 +1,14 @@ Name: freetype Summary: A free and portable font rendering engine -Version: 2.4.9 +Version: 2.5.5 Release: 1 Group: System/Libraries -License: FTL or GPLv2+ +License: FTL or GPL-2.0+ URL: http://www.freetype.org Source0: http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-%{version}.tar.gz +Source1001: packaging/freetype.manifest +BuildRequires: which +BuildRequires: pkgconfig(libpng) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Provides: %{name}-bytecode @@ -41,6 +44,7 @@ FreeType. %setup -q %build +cp %{SOURCE1001} . %configure --disable-static sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool @@ -51,6 +55,8 @@ make %{?_smp_mflags} rm -rf %{buildroot} %makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale +mkdir -p %{buildroot}/usr/share/license +cat docs/FTL.TXT > %{buildroot}/usr/share/license/%{name} # fix multilib issues @@ -60,9 +66,9 @@ rm -rf %{buildroot} %define wordsize 32 %endif -mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \ -$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h -cat >$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h <<EOF +mv $RPM_BUILD_ROOT%{_includedir}/freetype2/config/ftconfig.h \ +$RPM_BUILD_ROOT%{_includedir}/freetype2/config/ftconfig-%{wordsize}.h +cat >$RPM_BUILD_ROOT%{_includedir}/freetype2/config/ftconfig.h <<EOF #ifndef __FTCONFIG_H__MULTILIB #define __FTCONFIG_H__MULTILIB @@ -88,16 +94,19 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %postun -p /sbin/ldconfig %files +%manifest freetype.manifest %defattr(-,root,root,-) %{_libdir}/libfreetype.so.* +/usr/share/license/%{name} %files devel +%manifest freetype.manifest %defattr(-,root,root,-) %dir %{_includedir}/freetype2 %{_datadir}/aclocal/freetype2.m4 %{_includedir}/freetype2/* -%{_includedir}/*.h %{_libdir}/libfreetype.so %{_bindir}/freetype-config %{_libdir}/pkgconfig/*.pc +%{_datadir}/man/man1/* diff --git a/src/Jamfile b/src/Jamfile index 76ee0f4..1cc0685 100644 --- a/src/Jamfile +++ b/src/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 src Jamfile # -# Copyright 2001, 2002 by +# Copyright 2001, 2002, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -11,7 +11,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) ; -# The file <freetype/internal/internal.h> is used to define macros that are +# The file <internal/internal.h> is used to define macros that are # later used in #include statements. It needs to be parsed in order to # record these definitions. # diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c index 790af17..f8b095b 100644 --- a/src/autofit/afangles.c +++ b/src/autofit/afangles.c @@ -5,7 +5,7 @@ /* Routines used to compute vector angles with limited accuracy */ /* and very high speed. It also contains sorting routines (body). */ /* */ -/* Copyright 2003-2006, 2011 by */ +/* Copyright 2003-2006, 2011-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,66 +20,6 @@ #include "aftypes.h" -#if 0 - - FT_LOCAL_DEF( FT_Int ) - af_corner_is_flat( FT_Pos x_in, - FT_Pos y_in, - FT_Pos x_out, - FT_Pos y_out ) - { - FT_Pos ax = x_in; - FT_Pos ay = y_in; - - FT_Pos d_in, d_out, d_corner; - - - if ( ax < 0 ) - ax = -ax; - if ( ay < 0 ) - ay = -ay; - d_in = ax + ay; - - ax = x_out; - if ( ax < 0 ) - ax = -ax; - ay = y_out; - if ( ay < 0 ) - ay = -ay; - d_out = ax + ay; - - ax = x_out + x_in; - if ( ax < 0 ) - ax = -ax; - ay = y_out + y_in; - if ( ay < 0 ) - ay = -ay; - d_corner = ax + ay; - - return ( d_in + d_out - d_corner ) < ( d_corner >> 4 ); - } - - - FT_LOCAL_DEF( FT_Int ) - af_corner_orientation( FT_Pos x_in, - FT_Pos y_in, - FT_Pos x_out, - FT_Pos y_out ) - { - FT_Pos delta; - - - delta = x_in * y_out - y_in * x_out; - - if ( delta == 0 ) - return 0; - else - return 1 - 2 * ( delta < 0 ); - } - -#endif /* 0 */ - - /* * We are not using `af_angle_atan' anymore, but we keep the source * code below just in case... @@ -255,7 +195,7 @@ { for ( j = i; j > 0; j-- ) { - if ( table[j] > table[j - 1] ) + if ( table[j] >= table[j - 1] ) break; swap = table[j]; @@ -267,18 +207,26 @@ FT_LOCAL_DEF( void ) - af_sort_widths( FT_UInt count, - AF_Width table ) + af_sort_and_quantize_widths( FT_UInt* count, + AF_Width table, + FT_Pos threshold ) { FT_UInt i, j; + FT_UInt cur_idx; + FT_Pos cur_val; + FT_Pos sum; AF_WidthRec swap; - for ( i = 1; i < count; i++ ) + if ( *count == 1 ) + return; + + /* sort */ + for ( i = 1; i < *count; i++ ) { for ( j = i; j > 0; j-- ) { - if ( table[j].org > table[j - 1].org ) + if ( table[j].org >= table[j - 1].org ) break; swap = table[j]; @@ -286,6 +234,51 @@ table[j - 1] = swap; } } + + cur_idx = 0; + cur_val = table[cur_idx].org; + + /* compute and use mean values for clusters not larger than */ + /* `threshold'; this is very primitive and might not yield */ + /* the best result, but normally, using reference character */ + /* `o', `*count' is 2, so the code below is fully sufficient */ + for ( i = 1; i < *count; i++ ) + { + if ( table[i].org - cur_val > threshold || + i == *count - 1 ) + { + sum = 0; + + /* fix loop for end of array */ + if ( table[i].org - cur_val <= threshold && + i == *count - 1 ) + i++; + + for ( j = cur_idx; j < i; j++ ) + { + sum += table[j].org; + table[j].org = 0; + } + table[cur_idx].org = sum / j; + + if ( i < *count - 1 ) + { + cur_idx = i + 1; + cur_val = table[cur_idx].org; + } + } + } + + cur_idx = 1; + + /* compress array to remove zero values */ + for ( i = 1; i < *count; i++ ) + { + if ( table[i].org ) + table[cur_idx++] = table[i]; + } + + *count = cur_idx; } diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c new file mode 100644 index 0000000..811226e --- /dev/null +++ b/src/autofit/afblue.c @@ -0,0 +1,177 @@ +/* This file has been generated by the Perl script `afblue.pl', */ +/* using data from file `afblue.dat'. */ + +/***************************************************************************/ +/* */ +/* afblue.c */ +/* */ +/* Auto-fitter data for blue strings (body). */ +/* */ +/* Copyright 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#include "aftypes.h" + + + FT_LOCAL_ARRAY_DEF( char ) + af_blue_strings[] = + { + /* */ + '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */ + '\0', + '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */ + '\0', + '\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* хпншезос */ + '\0', + '\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */ + '\0', + '\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */ + '\0', + '\xE0', '\xA4', '\x88', '\xE0', '\xA4', '\x90', '\xE0', '\xA4', '\x93', '\xE0', '\xA4', '\x94', '\xE0', '\xA4', '\xBF', '\xE0', '\xA5', '\x80', '\xE0', '\xA5', '\x8B', '\xE0', '\xA5', '\x8C', /* ई ऐ ओ औ ि ी ो ौ */ + '\0', + '\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */ + '\0', + '\xE0', '\xA5', '\x81', '\xE0', '\xA5', '\x83', /* ु ृ */ + '\0', + '\xCE', '\x93', '\xCE', '\x92', '\xCE', '\x95', '\xCE', '\x96', '\xCE', '\x98', '\xCE', '\x9F', '\xCE', '\xA9', /* ΓΒΕΖΘΟΩ */ + '\0', + '\xCE', '\x92', '\xCE', '\x94', '\xCE', '\x96', '\xCE', '\x9E', '\xCE', '\x98', '\xCE', '\x9F', /* ΒΔΖΞΘΟ */ + '\0', + '\xCE', '\xB2', '\xCE', '\xB8', '\xCE', '\xB4', '\xCE', '\xB6', '\xCE', '\xBB', '\xCE', '\xBE', /* βθδζλξ */ + '\0', + '\xCE', '\xB1', '\xCE', '\xB5', '\xCE', '\xB9', '\xCE', '\xBF', '\xCF', '\x80', '\xCF', '\x83', '\xCF', '\x84', '\xCF', '\x89', /* αειοπστω */ + '\0', + '\xCE', '\xB2', '\xCE', '\xB3', '\xCE', '\xB7', '\xCE', '\xBC', '\xCF', '\x81', '\xCF', '\x86', '\xCF', '\x87', '\xCF', '\x88', /* βγημρφχψ */ + '\0', + '\xD7', '\x91', '\xD7', '\x93', '\xD7', '\x94', '\xD7', '\x97', '\xD7', '\x9A', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', /* בדהחךכםס */ + '\0', + '\xD7', '\x91', '\xD7', '\x98', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', '\xD7', '\xA6', /* בטכםסצ */ + '\0', + '\xD7', '\xA7', '\xD7', '\x9A', '\xD7', '\x9F', '\xD7', '\xA3', '\xD7', '\xA5', /* קךןףץ */ + '\0', + 'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S', /* THEZOCQS */ + '\0', + 'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S', /* HEZLOCUS */ + '\0', + 'f', 'i', 'j', 'k', 'd', 'b', 'h', /* fijkdbh */ + '\0', + 'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */ + '\0', + 'p', 'q', 'g', 'j', 'y', /* pqgjy */ + '\0', + '\xE0', '\xB0', '\x87', '\xE0', '\xB0', '\x8C', '\xE0', '\xB0', '\x99', '\xE0', '\xB0', '\x9E', '\xE0', '\xB0', '\xA3', '\xE0', '\xB0', '\xB1', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ à°£ à°± ౯ */ + '\0', + '\xE0', '\xB0', '\x85', '\xE0', '\xB0', '\x95', '\xE0', '\xB0', '\x9A', '\xE0', '\xB0', '\xB0', '\xE0', '\xB0', '\xBD', '\xE0', '\xB1', '\xA8', '\xE0', '\xB1', '\xAC', /* అ క చ à°° à°½ ౨ ౬ */ +#ifdef AF_CONFIG_OPTION_CJK + '\0', + '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 他们你來們到和地 */ + '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', '\xE5', '\xB8', '\xAD', '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x83', /* 对對就席我时時會 */ + '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\x83', '\xBD', '\xE8', '\x88', '\xB0', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 来為能舰說说这這 */ + '\xE9', '\xBD', '\x8A', '|', /* 齊 | */ + '\xE5', '\x86', '\x9B', '\xE5', '\x90', '\x8C', '\xE5', '\xB7', '\xB2', '\xE6', '\x84', '\xBF', '\xE6', '\x97', '\xA2', '\xE6', '\x98', '\x9F', '\xE6', '\x98', '\xAF', '\xE6', '\x99', '\xAF', /* 军同已愿既星是景 */ + '\xE6', '\xB0', '\x91', '\xE7', '\x85', '\xA7', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\xA8', '\xE7', '\xBD', '\xAE', '\xE8', '\xA6', '\x81', /* 民照现現理用置要 */ + '\xE8', '\xBB', '\x8D', '\xE9', '\x82', '\xA3', '\xE9', '\x85', '\x8D', '\xE9', '\x87', '\x8C', '\xE9', '\x96', '\x8B', '\xE9', '\x9B', '\xB7', '\xE9', '\x9C', '\xB2', '\xE9', '\x9D', '\xA2', /* 軍那配里開雷露面 */ + '\xE9', '\xA1', '\xBE', /* 顾 */ + '\0', + '\xE4', '\xB8', '\xAA', '\xE4', '\xB8', '\xBA', '\xE4', '\xBA', '\xBA', '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xA5', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', /* 个为人他以们你來 */ + '\xE5', '\x80', '\x8B', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\xA4', '\xA7', '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', /* 個們到和大对對就 */ + '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x89', '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\xA6', '\x81', '\xE8', '\xAA', '\xAA', /* 我时時有来為要說 */ + '\xE8', '\xAF', '\xB4', '|', /* 说 | */ + '\xE4', '\xB8', '\xBB', '\xE4', '\xBA', '\x9B', '\xE5', '\x9B', '\xA0', '\xE5', '\xAE', '\x83', '\xE6', '\x83', '\xB3', '\xE6', '\x84', '\x8F', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\x9F', /* 主些因它想意理生 */ + '\xE7', '\x95', '\xB6', '\xE7', '\x9C', '\x8B', '\xE7', '\x9D', '\x80', '\xE7', '\xBD', '\xAE', '\xE8', '\x80', '\x85', '\xE8', '\x87', '\xAA', '\xE8', '\x91', '\x97', '\xE8', '\xA3', '\xA1', /* 當看着置者自著裡 */ + '\xE8', '\xBF', '\x87', '\xE8', '\xBF', '\x98', '\xE8', '\xBF', '\x9B', '\xE9', '\x80', '\xB2', '\xE9', '\x81', '\x8E', '\xE9', '\x81', '\x93', '\xE9', '\x82', '\x84', '\xE9', '\x87', '\x8C', /* 过还进進過道還里 */ + '\xE9', '\x9D', '\xA2', /* 面 */ +#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT + '\0', + '\xE4', '\xBA', '\x9B', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 些们你來們到和地 */ + '\xE5', '\xA5', '\xB9', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE5', '\xB0', '\xB1', '\xE5', '\xB9', '\xB4', '\xE5', '\xBE', '\x97', '\xE6', '\x83', '\x85', '\xE6', '\x9C', '\x80', /* 她将將就年得情最 */ + '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE7', '\x90', '\x86', '\xE8', '\x83', '\xBD', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 样樣理能說说这這 */ + '\xE9', '\x80', '\x9A', '|', /* 通 | */ + '\xE5', '\x8D', '\xB3', '\xE5', '\x90', '\x97', '\xE5', '\x90', '\xA7', '\xE5', '\x90', '\xAC', '\xE5', '\x91', '\xA2', '\xE5', '\x93', '\x81', '\xE5', '\x93', '\x8D', '\xE5', '\x97', '\x8E', /* 即吗吧听呢品响嗎 */ + '\xE5', '\xB8', '\x88', '\xE5', '\xB8', '\xAB', '\xE6', '\x94', '\xB6', '\xE6', '\x96', '\xAD', '\xE6', '\x96', '\xB7', '\xE6', '\x98', '\x8E', '\xE7', '\x9C', '\xBC', '\xE9', '\x96', '\x93', /* 师師收断斷明眼間 */ + '\xE9', '\x97', '\xB4', '\xE9', '\x99', '\x85', '\xE9', '\x99', '\x88', '\xE9', '\x99', '\x90', '\xE9', '\x99', '\xA4', '\xE9', '\x99', '\xB3', '\xE9', '\x9A', '\x8F', '\xE9', '\x9A', '\x9B', /* 间际陈限除陳随際 */ + '\xE9', '\x9A', '\xA8', /* 隨 */ + '\0', + '\xE4', '\xBA', '\x8B', '\xE5', '\x89', '\x8D', '\xE5', '\xAD', '\xB8', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE6', '\x83', '\x85', '\xE6', '\x83', '\xB3', '\xE6', '\x88', '\x96', /* 事前學将將情想或 */ + '\xE6', '\x94', '\xBF', '\xE6', '\x96', '\xAF', '\xE6', '\x96', '\xB0', '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE6', '\xB0', '\x91', '\xE6', '\xB2', '\x92', '\xE6', '\xB2', '\xA1', /* 政斯新样樣民沒没 */ + '\xE7', '\x84', '\xB6', '\xE7', '\x89', '\xB9', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x83', '\xE7', '\xAC', '\xAC', '\xE7', '\xB6', '\x93', '\xE8', '\xB0', '\x81', /* 然特现現球第經谁 */ + '\xE8', '\xB5', '\xB7', '|', /* èµ· | */ + '\xE4', '\xBE', '\x8B', '\xE5', '\x88', '\xA5', '\xE5', '\x88', '\xAB', '\xE5', '\x88', '\xB6', '\xE5', '\x8A', '\xA8', '\xE5', '\x8B', '\x95', '\xE5', '\x90', '\x97', '\xE5', '\x97', '\x8E', /* 例別别制动動吗嗎 */ + '\xE5', '\xA2', '\x9E', '\xE6', '\x8C', '\x87', '\xE6', '\x98', '\x8E', '\xE6', '\x9C', '\x9D', '\xE6', '\x9C', '\x9F', '\xE6', '\x9E', '\x84', '\xE7', '\x89', '\xA9', '\xE7', '\xA1', '\xAE', /* 增指明朝期构物确 */ + '\xE7', '\xA7', '\x8D', '\xE8', '\xAA', '\xBF', '\xE8', '\xB0', '\x83', '\xE8', '\xB2', '\xBB', '\xE8', '\xB4', '\xB9', '\xE9', '\x82', '\xA3', '\xE9', '\x83', '\xBD', '\xE9', '\x96', '\x93', /* 种調调費费那都間 */ + '\xE9', '\x97', '\xB4', /* 间 */ +#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ +#endif /* AF_CONFIG_OPTION_CJK */ + '\0', + + }; + + + /* stringsets are specific to styles */ + FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec ) + af_blue_stringsets[] = + { + /* */ + { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }, + { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_NEUTRAL | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }, + { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_GREEK_SMALL, 0 }, + { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_LONG }, + { AF_BLUE_STRING_HEBREW_BOTTOM, 0 }, + { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }, + { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, + { AF_BLUE_STRING_LATIN_SMALL, 0 }, + { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, + { AF_BLUE_STRING_MAX, 0 }, + { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_TELUGU_BOTTOM, 0 }, + { AF_BLUE_STRING_MAX, 0 }, +#ifdef AF_CONFIG_OPTION_CJK + { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }, + { AF_BLUE_STRING_CJK_BOTTOM, 0 }, +#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT + { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ }, + { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | + AF_BLUE_PROPERTY_CJK_RIGHT }, +#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ + { AF_BLUE_STRING_MAX, 0 }, +#endif /* AF_CONFIG_OPTION_CJK */ + + }; + + +/* END */ diff --git a/src/autofit/afblue.cin b/src/autofit/afblue.cin new file mode 100644 index 0000000..c6762be --- /dev/null +++ b/src/autofit/afblue.cin @@ -0,0 +1,39 @@ +/***************************************************************************/ +/* */ +/* afblue.c */ +/* */ +/* Auto-fitter data for blue strings (body). */ +/* */ +/* Copyright 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#include "aftypes.h" + + + FT_LOCAL_ARRAY_DEF( char ) + af_blue_strings[] = + { + /* */ +@AF_BLUE_STRINGS_ARRAY@ + }; + + + /* stringsets are specific to styles */ + FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec ) + af_blue_stringsets[] = + { + /* */ +@AF_BLUE_STRINGSETS_ARRAY@ + }; + + +/* END */ diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat new file mode 100644 index 0000000..3f98c13 --- /dev/null +++ b/src/autofit/afblue.dat @@ -0,0 +1,337 @@ +// afblue.dat +// +// Auto-fitter data for blue strings. +// +// Copyright 2013, 2014 by +// David Turner, Robert Wilhelm, and Werner Lemberg. +// +// This file is part of the FreeType project, and may only be used, +// modified, and distributed under the terms of the FreeType project +// license, LICENSE.TXT. By continuing to use, modify, or distribute +// this file you indicate that you have read the license and +// understand and accept it fully. + + +// This file contains data specific to blue zones. It gets processed by +// a script to simulate `jagged arrays', with enumeration values holding +// offsets into the arrays. +// +// The format of the file is rather simple: A section starts with three +// labels separated by whitespace and followed by a colon (everything in a +// single line); the first label gives the name of the enumeration template, +// the second the name of the array template, and the third the name of the +// `maximum' template, holding the size of the largest array element. The +// script then fills the corresponding templates (indicated by `@' +// characters around the name). +// +// A section contains one or more data records. Each data record consists +// of two or more lines. The first line holds the enumeration name, and the +// remaining lines the corresponding array data. +// +// There are two possible representations for array data. +// +// - A string of characters in UTF-8 encoding enclosed in double quotes, +// using C syntax. There can be only one string per line, thus the +// starting and ending double quote must be the first and last character +// in the line, respectively, ignoring whitespace before and after the +// string. Space characters within the string are ignored too. If there +// are multiple strings (in multiple lines), they are concatenated to a +// single string. In the output, a string gets represented as a series of +// singles bytes, followed by a zero byte. The enumeration values simply +// hold byte offsets to the start of the corresponding strings. +// +// - Data blocks enclosed in balanced braces, which get copied verbatim and +// which can span multiple lines. The opening brace of a block must be +// the first character of a line (ignoring whitespace), and the closing +// brace the last (ignoring whitespace also). The script appends a comma +// character after each block and counts the number of blocks to set the +// enumeration values. +// +// A section can contain either strings only or data blocks only. +// +// A comment line starts with `//'; it gets removed. A preprocessor +// directive line (using the standard syntax of `cpp') starts with `#' and +// gets copied verbatim to both the enumeration and the array. Whitespace +// outside of a string is insignificant. +// +// Preprocessor directives are ignored while the script computes maximum +// values; this essentially means that the maximum values can easily be too +// large. Given that the purpose of those values is to create local +// fixed-size arrays at compile time for further processing of the blue zone +// data, this isn't a problem. Note the the final zero byte of a string is +// not counted. Note also that the count holds the number of UTF-8 encoded +// characters, not bytes. + + +// The blue zone string data, to be used in the blue stringsets below. + +AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: + + AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP + "БВЕПЗОСЭ" + AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM + "БВЕШЗОСЭ" + AF_BLUE_STRING_CYRILLIC_SMALL + "хпншезос" + AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER + "руф" + + // we separate the letters with spaces to avoid ligatures; + // this is just for convenience to simplify reading + AF_BLUE_STRING_DEVANAGARI_BASE + "क म अ आ थ ध भ श" + AF_BLUE_STRING_DEVANAGARI_TOP + "ई ऐ ओ औ ि ी ो ौ" + // note that some fonts have extreme variation in the height of the + // round head elements; for this reason we also define the `base' + // blue zone, which must be always present + AF_BLUE_STRING_DEVANAGARI_HEAD + "क म अ आ थ ध भ श" + AF_BLUE_STRING_DEVANAGARI_BOTTOM + "ु ृ" + + AF_BLUE_STRING_GREEK_CAPITAL_TOP + "ΓΒΕΖΘΟΩ" + AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM + "ΒΔΖΞΘΟ" + AF_BLUE_STRING_GREEK_SMALL_BETA_TOP + "βθδζλξ" + AF_BLUE_STRING_GREEK_SMALL + "αειοπστω" + AF_BLUE_STRING_GREEK_SMALL_DESCENDER + "βγημρφχψ" + + AF_BLUE_STRING_HEBREW_TOP + "בדהחךכםס" + AF_BLUE_STRING_HEBREW_BOTTOM + "בטכםסצ" + AF_BLUE_STRING_HEBREW_DESCENDER + "קךןףץ" + + AF_BLUE_STRING_LATIN_CAPITAL_TOP + "THEZOCQS" + AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM + "HEZLOCUS" + AF_BLUE_STRING_LATIN_SMALL_F_TOP + "fijkdbh" + AF_BLUE_STRING_LATIN_SMALL + "xzroesc" + AF_BLUE_STRING_LATIN_SMALL_DESCENDER + "pqgjy" + + // we separate the letters with spaces to avoid ligatures; + // this is just for convenience to simplify reading + AF_BLUE_STRING_TELUGU_TOP + "ఇ ఌ ఙ ఞ à°£ à°± ౯" + + AF_BLUE_STRING_TELUGU_BOTTOM + "అ క చ à°° à°½ ౨ ౬" + +#ifdef AF_CONFIG_OPTION_CJK + + AF_BLUE_STRING_CJK_TOP + "他们你來們到和地" + "对對就席我时時會" + "来為能舰說说这這" + "齊 |" + "军同已愿既星是景" + "民照现現理用置要" + "軍那配里開雷露面" + "顾" + AF_BLUE_STRING_CJK_BOTTOM + "个为人他以们你來" + "個們到和大对對就" + "我时時有来為要說" + "说 |" + "主些因它想意理生" + "當看着置者自著裡" + "过还进進過道還里" + "面" + +#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT + + AF_BLUE_STRING_CJK_LEFT + "些们你來們到和地" + "她将將就年得情最" + "样樣理能說说这這" + "通 |" + "即吗吧听呢品响嗎" + "师師收断斷明眼間" + "间际陈限除陳随際" + "隨" + AF_BLUE_STRING_CJK_RIGHT + "事前學将將情想或" + "政斯新样樣民沒没" + "然特现現球第經谁" + "èµ· |" + "例別别制动動吗嗎" + "增指明朝期构物确" + "种調调費费那都間" + "间" + +#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ + +#endif /* AF_CONFIG_OPTION_CJK */ + + +// The blue zone stringsets, as used in the script styles, cf. `afstyles.h'. +// +// The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some +// explanations. +// +// A blue zone in general is defined by a reference and an overshoot line. +// During the hinting process, all coordinate values between those two lines +// are set equal to the reference value, provided that the blue zone is not +// wider than 0.75 pixels (otherwise the blue zone gets ignored). All +// entries must have `AF_BLUE_STRING_MAX' as the final line. +// +// During the glyph analysis, edges are sorted from bottom to top, and then +// sequentially checked, edge by edge, against the blue zones in the order +// given below. +// +// +// latin auto-hinter +// ----------------- +// +// Characters in a blue string are automatically classified as having a flat +// (reference) or a round (overshoot) extremum. The blue zone is then set +// up by the mean values of all flat extrema and all round extrema, +// respectively. Only horizontal blue zones (i.e., adjusting vertical +// coordinate values) are supported. +// +// For the latin auto-hinter, the overshoot should be larger than the +// reference for top zones, and vice versa for bottom zones. +// +// LATIN_TOP +// Take the maximum flat and round coordinate values of the blue string +// characters for computing the blue zone's reference and overshoot +// values. +// +// If not set, take the minimum values. +// +// LATIN_NEUTRAL +// Ignore round extrema and define the blue zone with flat values only. +// Both top and bottom of contours can match. This is useful for +// scripts like Devanagari where vowel signs attach to the base +// character and are implemented as components of composite glyphs. +// +// If not set, both round and flat extrema are taken into account. +// Additionally, only the top or the bottom of a contour can match, +// depending on the LATIN_TOP flag. +// +// Neutral blue zones should always follow non-neutral blue zones. +// +// LATIN_X_HEIGHT +// Scale all glyphs vertically from the corresponding script to make the +// reference line of this blue zone align on the grid. The scaling +// takes place before all other blue zones get aligned to the grid. +// Only one blue character string of a script style can have this flag. +// +// LATIN_LONG +// Apply an additional constraint for blue zone values: Don't +// necessarily use the extremum as-is but a segment of the topmost (or +// bottommost) contour that is longer than a heuristic threshold, and +// which is not too far away vertically from the real extremum. This +// ensures that small bumps in the outline are ignored (for example, the +// `vertical serifs' found in many Hebrew glyph designs). +// +// The segment must be at least EM/25 font units long, and the distance +// to the extremum must be smaller than EM/4. +// +// +// cjk auto-hinter +// --------------- +// +// Characters in a blue string are *not* automatically classified. Instead, +// first come the characters used for the overshoot value, then the +// character `|', then the characters used for the reference value. The +// blue zone is then set up by the mean values of all reference values and +// all overshoot values, respectively. Both horizontal and vertical blue +// zones (i.e., adjusting vertical and horizontal coordinate values, +// respectively) are supported. +// +// For the cjk auto-hinter, the overshoot should be smaller than the +// reference for top zones, and vice versa for bottom zones. +// +// CJK_TOP +// Take the maximum flat and round coordinate values of the blue string +// characters. If not set, take the minimum values. +// +// CJK_RIGHT +// A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the +// right blue zone, taking horizontal maximum values. +// +// CJK_HORIZ +// Define a blue zone for horizontal hinting (i.e., vertical blue +// zones). If not set, this is a blue zone for vertical hinting. + + +AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: + + AF_BLUE_STRINGSET_CYRL + { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } + { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_DEVA + { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_NEUTRAL | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_DEVANAGARI_BASE, 0 } + { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_GREK + { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GREEK_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_GREEK_SMALL, 0 } + { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_HEBR + { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_LONG } + { AF_BLUE_STRING_HEBREW_BOTTOM, 0 } + { AF_BLUE_STRING_HEBREW_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_LATN + { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } + { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | + AF_BLUE_PROPERTY_LATIN_X_HEIGHT } + { AF_BLUE_STRING_LATIN_SMALL, 0 } + { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } + { AF_BLUE_STRING_MAX, 0 } + + AF_BLUE_STRINGSET_TELU + { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_TELUGU_BOTTOM, 0 } + { AF_BLUE_STRING_MAX, 0 } + +#ifdef AF_CONFIG_OPTION_CJK + + AF_BLUE_STRINGSET_HANI + { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP } + { AF_BLUE_STRING_CJK_BOTTOM, 0 } +#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT + { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ } + { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | + AF_BLUE_PROPERTY_CJK_RIGHT } +#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ + { AF_BLUE_STRING_MAX, 0 } + +#endif /* AF_CONFIG_OPTION_CJK */ + + +// END diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h new file mode 100644 index 0000000..a861841 --- /dev/null +++ b/src/autofit/afblue.h @@ -0,0 +1,203 @@ +/* This file has been generated by the Perl script `afblue.pl', */ +/* using data from file `afblue.dat'. */ + +/***************************************************************************/ +/* */ +/* afblue.h */ +/* */ +/* Auto-fitter data for blue strings (specification). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __AFBLUE_H__ +#define __AFBLUE_H__ + + +FT_BEGIN_HEADER + + + /* an auxiliary macro to decode a UTF-8 character -- since we only use */ + /* hard-coded, self-converted data, no error checking is performed */ +#define GET_UTF8_CHAR( ch, p ) \ + ch = (unsigned char)*p++; \ + if ( ch >= 0x80 ) \ + { \ + FT_UInt len; \ + \ + \ + if ( ch < 0xE0 ) \ + { \ + len = 1; \ + ch &= 0x1F; \ + } \ + else if ( ch < 0xF0 ) \ + { \ + len = 2; \ + ch &= 0x0F; \ + } \ + else \ + { \ + len = 3; \ + ch &= 0x07; \ + } \ + \ + for ( ; len > 0; len-- ) \ + ch = ( ch << 6 ) | ( *p++ & 0x3F ); \ + } + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** B L U E S T R I N G S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* At the bottommost level, we define strings for finding blue zones. */ + + +#define AF_BLUE_STRING_MAX_LEN 51 + + /* The AF_Blue_String enumeration values are offsets into the */ + /* `af_blue_strings' array. */ + + typedef enum AF_Blue_String_ + { + AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 0, + AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 17, + AF_BLUE_STRING_CYRILLIC_SMALL = 34, + AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 51, + AF_BLUE_STRING_DEVANAGARI_BASE = 58, + AF_BLUE_STRING_DEVANAGARI_TOP = 83, + AF_BLUE_STRING_DEVANAGARI_HEAD = 108, + AF_BLUE_STRING_DEVANAGARI_BOTTOM = 133, + AF_BLUE_STRING_GREEK_CAPITAL_TOP = 140, + AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 155, + AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 168, + AF_BLUE_STRING_GREEK_SMALL = 181, + AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 198, + AF_BLUE_STRING_HEBREW_TOP = 215, + AF_BLUE_STRING_HEBREW_BOTTOM = 232, + AF_BLUE_STRING_HEBREW_DESCENDER = 245, + AF_BLUE_STRING_LATIN_CAPITAL_TOP = 256, + AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 265, + AF_BLUE_STRING_LATIN_SMALL_F_TOP = 274, + AF_BLUE_STRING_LATIN_SMALL = 282, + AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 290, + AF_BLUE_STRING_TELUGU_TOP = 296, + AF_BLUE_STRING_TELUGU_BOTTOM = 318, + af_blue_1_1 = 339, +#ifdef AF_CONFIG_OPTION_CJK + AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1, + AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153, + af_blue_1_1_1 = af_blue_1_1 + 304, +#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT + AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1, + AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 153, + af_blue_1_1_2 = af_blue_1_1_1 + 304, +#else + af_blue_1_1_2 = af_blue_1_1_1 + 0, +#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ + af_blue_1_2 = af_blue_1_1_2 + 0, +#else + af_blue_1_2 = af_blue_1_1 + 0, +#endif /* AF_CONFIG_OPTION_CJK */ + + + AF_BLUE_STRING_MAX /* do not remove */ + + } AF_Blue_String; + + + FT_LOCAL_ARRAY( char ) + af_blue_strings[]; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** B L U E S T R I N G S E T S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* The next level is to group blue strings into style-specific sets. */ + + + /* Properties are specific to a writing system. We assume that a given */ + /* blue string can't be used in more than a single writing system, which */ + /* is a safe bet. */ +#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */ +#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 ) +#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 ) +#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 ) + +#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */ +#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */ +#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP + + +#define AF_BLUE_STRINGSET_MAX_LEN 7 + + /* The AF_Blue_Stringset enumeration values are offsets into the */ + /* `af_blue_stringsets' array. */ + + typedef enum AF_Blue_Stringset_ + { + AF_BLUE_STRINGSET_CYRL = 0, + AF_BLUE_STRINGSET_DEVA = 6, + AF_BLUE_STRINGSET_GREK = 12, + AF_BLUE_STRINGSET_HEBR = 19, + AF_BLUE_STRINGSET_LATN = 23, + AF_BLUE_STRINGSET_TELU = 30, + af_blue_2_1 = 33, +#ifdef AF_CONFIG_OPTION_CJK + AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0, + af_blue_2_1_1 = af_blue_2_1 + 2, +#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT + af_blue_2_1_2 = af_blue_2_1_1 + 2, +#else + af_blue_2_1_2 = af_blue_2_1_1 + 0, +#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ + af_blue_2_2 = af_blue_2_1_2 + 1, +#else + af_blue_2_2 = af_blue_2_1 + 0, +#endif /* AF_CONFIG_OPTION_CJK */ + + + AF_BLUE_STRINGSET_MAX /* do not remove */ + + } AF_Blue_Stringset; + + + typedef struct AF_Blue_StringRec_ + { + AF_Blue_String string; + FT_UShort properties; + + } AF_Blue_StringRec; + + + FT_LOCAL_ARRAY( AF_Blue_StringRec ) + af_blue_stringsets[]; + +/* */ + +FT_END_HEADER + + +#endif /* __AFBLUE_H__ */ + + +/* END */ diff --git a/src/autofit/afblue.hin b/src/autofit/afblue.hin new file mode 100644 index 0000000..0b4b48d --- /dev/null +++ b/src/autofit/afblue.hin @@ -0,0 +1,142 @@ +/***************************************************************************/ +/* */ +/* afblue.h */ +/* */ +/* Auto-fitter data for blue strings (specification). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __AFBLUE_H__ +#define __AFBLUE_H__ + + +FT_BEGIN_HEADER + + + /* an auxiliary macro to decode a UTF-8 character -- since we only use */ + /* hard-coded, self-converted data, no error checking is performed */ +#define GET_UTF8_CHAR( ch, p ) \ + ch = (unsigned char)*p++; \ + if ( ch >= 0x80 ) \ + { \ + FT_UInt len; \ + \ + \ + if ( ch < 0xE0 ) \ + { \ + len = 1; \ + ch &= 0x1F; \ + } \ + else if ( ch < 0xF0 ) \ + { \ + len = 2; \ + ch &= 0x0F; \ + } \ + else \ + { \ + len = 3; \ + ch &= 0x07; \ + } \ + \ + for ( ; len > 0; len-- ) \ + ch = ( ch << 6 ) | ( *p++ & 0x3F ); \ + } + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** B L U E S T R I N G S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* At the bottommost level, we define strings for finding blue zones. */ + + +#define AF_BLUE_STRING_MAX_LEN @AF_BLUE_STRING_MAX_LEN@ + + /* The AF_Blue_String enumeration values are offsets into the */ + /* `af_blue_strings' array. */ + + typedef enum AF_Blue_String_ + { +@AF_BLUE_STRING_ENUM@ + + AF_BLUE_STRING_MAX /* do not remove */ + + } AF_Blue_String; + + + FT_LOCAL_ARRAY( char ) + af_blue_strings[]; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** B L U E S T R I N G S E T S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* The next level is to group blue strings into style-specific sets. */ + + + /* Properties are specific to a writing system. We assume that a given */ + /* blue string can't be used in more than a single writing system, which */ + /* is a safe bet. */ +#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */ +#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 ) +#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 ) +#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 ) + +#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */ +#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */ +#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP + + +#define AF_BLUE_STRINGSET_MAX_LEN @AF_BLUE_STRINGSET_MAX_LEN@ + + /* The AF_Blue_Stringset enumeration values are offsets into the */ + /* `af_blue_stringsets' array. */ + + typedef enum AF_Blue_Stringset_ + { +@AF_BLUE_STRINGSET_ENUM@ + + AF_BLUE_STRINGSET_MAX /* do not remove */ + + } AF_Blue_Stringset; + + + typedef struct AF_Blue_StringRec_ + { + AF_Blue_String string; + FT_UShort properties; + + } AF_Blue_StringRec; + + + FT_LOCAL_ARRAY( AF_Blue_StringRec ) + af_blue_stringsets[]; + +/* */ + +FT_END_HEADER + + +#endif /* __AFBLUE_H__ */ + + +/* END */ diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c index 8e407c8..048e0e7 100644 --- a/src/autofit/afcjk.c +++ b/src/autofit/afcjk.c @@ -2,9 +2,9 @@ /* */ /* afcjk.c */ /* */ -/* Auto-fitter hinting routines for CJK script (body). */ +/* Auto-fitter hinting routines for CJK writing system (body). */ /* */ -/* Copyright 2006-2012 by */ +/* Copyright 2006-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -26,7 +26,8 @@ #include FT_ADVANCES_H #include FT_INTERNAL_DEBUG_H -#include "aftypes.h" +#include "afglobal.h" +#include "afpic.h" #include "aflatin.h" @@ -67,13 +68,18 @@ FT_LOCAL_DEF( void ) af_cjk_metrics_init_widths( AF_CJKMetrics metrics, - FT_Face face, - FT_ULong charcode ) + FT_Face face ) { /* scan the array of segments in each direction */ AF_GlyphHintsRec hints[1]; + FT_TRACE5(( "\n" + "cjk standard widths computation (style `%s')\n" + "===================================================\n" + "\n", + af_style_names[metrics->root.style_class->style] )); + af_glyph_hints_init( hints, face->memory ); metrics->axis[AF_DIMENSION_HORZ].width_count = 0; @@ -81,15 +87,59 @@ { FT_Error error; - FT_UInt glyph_index; + FT_ULong glyph_index; + FT_Long y_offset; int dim; AF_CJKMetricsRec dummy[1]; AF_Scaler scaler = &dummy->root.scaler; +#ifdef FT_CONFIG_OPTION_PIC + AF_FaceGlobals globals = metrics->root.globals; +#endif - glyph_index = FT_Get_Char_Index( face, charcode ); - if ( glyph_index == 0 ) - goto Exit; + AF_StyleClass style_class = metrics->root.style_class; + AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET + [style_class->script]; + + FT_UInt32 standard_char; + + + standard_char = script_class->standard_char1; + af_get_char_index( &metrics->root, + standard_char, + &glyph_index, + &y_offset ); + if ( !glyph_index ) + { + if ( script_class->standard_char2 ) + { + standard_char = script_class->standard_char2; + af_get_char_index( &metrics->root, + standard_char, + &glyph_index, + &y_offset ); + if ( !glyph_index ) + { + if ( script_class->standard_char3 ) + { + standard_char = script_class->standard_char3; + af_get_char_index( &metrics->root, + standard_char, + &glyph_index, + &y_offset ); + if ( !glyph_index ) + goto Exit; + } + else + goto Exit; + } + } + else + goto Exit; + } + + FT_TRACE5(( "standard character: U+%04lX (glyph index %d)\n", + standard_char, glyph_index )); error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); if ( error || face->glyph->outline.n_points <= 0 ) @@ -108,7 +158,7 @@ scaler->render_mode = FT_RENDER_MODE_NORMAL; scaler->flags = 0; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy ); error = af_glyph_hints_reload( hints, &face->glyph->outline ); if ( error ) @@ -122,11 +172,15 @@ FT_UInt num_widths = 0; - error = af_latin_hints_compute_segments( hints, (AF_Dimension)dim ); + error = af_latin_hints_compute_segments( hints, + (AF_Dimension)dim ); if ( error ) goto Exit; - af_latin_hints_link_segments( hints, (AF_Dimension)dim ); + af_latin_hints_link_segments( hints, + 0, + NULL, + (AF_Dimension)dim ); seg = axhints->segments; limit = seg + axhints->num_segments; @@ -150,7 +204,10 @@ } } - af_sort_widths( num_widths, axis->widths ); + /* this also replaces multiple almost identical stem widths */ + /* with a single one (the value 100 is heuristic) */ + af_sort_and_quantize_widths( &num_widths, axis->widths, + dummy->units_per_em / 100 ); axis->width_count = num_widths; } @@ -168,263 +225,212 @@ axis->edge_distance_threshold = stdw / 5; axis->standard_width = stdw; axis->extra_light = 0; + +#ifdef FT_DEBUG_LEVEL_TRACE + { + FT_UInt i; + + + FT_TRACE5(( "%s widths:\n", + dim == AF_DIMENSION_VERT ? "horizontal" + : "vertical" )); + + FT_TRACE5(( " %d (standard)", axis->standard_width )); + for ( i = 1; i < axis->width_count; i++ ) + FT_TRACE5(( " %d", axis->widths[i].org )); + + FT_TRACE5(( "\n" )); + } +#endif } } + FT_TRACE5(( "\n" )); + af_glyph_hints_done( hints ); } -#define AF_CJK_MAX_TEST_CHARACTERS 32 + /* Find all blue zones. */ - - /* Each blue zone has two types of fill and unfill, this is, */ - /* filling the entire glyph square or not. */ - - enum + static void + af_cjk_metrics_init_blues( AF_CJKMetrics metrics, + FT_Face face ) { - AF_CJK_BLUE_TYPE_FILL, - AF_CJK_BLUE_TYPE_UNFILL, - AF_CJK_BLUE_TYPE_MAX - }; + FT_Pos fills[AF_BLUE_STRING_MAX_LEN]; + FT_Pos flats[AF_BLUE_STRING_MAX_LEN]; + FT_Int num_fills; + FT_Int num_flats; - /* Put some common and representative Han Ideographs characters here. */ - static const FT_ULong af_cjk_hani_blue_chars[AF_CJK_BLUE_MAX] - [AF_CJK_BLUE_TYPE_MAX] - [AF_CJK_MAX_TEST_CHARACTERS] = - { - { - { - 0x4ED6, 0x4EEC, 0x4F60, 0x4F86, 0x5011, 0x5230, 0x548C, 0x5730, - 0x5BF9, 0x5C0D, 0x5C31, 0x5E2D, 0x6211, 0x65F6, 0x6642, 0x6703, - 0x6765, 0x70BA, 0x80FD, 0x8230, 0x8AAA, 0x8BF4, 0x8FD9, 0x9019, - 0x9F4A /* top fill */ - }, - { - 0x519B, 0x540C, 0x5DF2, 0x613F, 0x65E2, 0x661F, 0x662F, 0x666F, - 0x6C11, 0x7167, 0x73B0, 0x73FE, 0x7406, 0x7528, 0x7F6E, 0x8981, - 0x8ECD, 0x90A3, 0x914D, 0x91CC, 0x958B, 0x96F7, 0x9732, 0x9762, - 0x987E /* top unfill */ - } - }, - { - { - 0x4E2A, 0x4E3A, 0x4EBA, 0x4ED6, 0x4EE5, 0x4EEC, 0x4F60, 0x4F86, - 0x500B, 0x5011, 0x5230, 0x548C, 0x5927, 0x5BF9, 0x5C0D, 0x5C31, - 0x6211, 0x65F6, 0x6642, 0x6709, 0x6765, 0x70BA, 0x8981, 0x8AAA, - 0x8BF4 /* bottom fill */ - }, - { - 0x4E3B, 0x4E9B, 0x56E0, 0x5B83, 0x60F3, 0x610F, 0x7406, 0x751F, - 0x7576, 0x770B, 0x7740, 0x7F6E, 0x8005, 0x81EA, 0x8457, 0x88E1, - 0x8FC7, 0x8FD8, 0x8FDB, 0x9032, 0x904E, 0x9053, 0x9084, 0x91CC, - 0x9762 /* bottom unfill */ - } - }, -#ifndef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - { {0x0000}, {0x0000} }, - { {0x0000}, {0x0000} } -#else - { - { - 0x4E9B, 0x4EEC, 0x4F60, 0x4F86, 0x5011, 0x5230, 0x548C, 0x5730, - 0x5979, 0x5C06, 0x5C07, 0x5C31, 0x5E74, 0x5F97, 0x60C5, 0x6700, - 0x6837, 0x6A23, 0x7406, 0x80FD, 0x8AAA, 0x8BF4, 0x8FD9, 0x9019, - 0x901A /* left fill */ - }, - { - 0x5373, 0x5417, 0x5427, 0x542C, 0x5462, 0x54C1, 0x54CD, 0x55CE, - 0x5E08, 0x5E2B, 0x6536, 0x65AD, 0x65B7, 0x660E, 0x773C, 0x9593, - 0x95F4, 0x9645, 0x9648, 0x9650, 0x9664, 0x9673, 0x968F, 0x969B, - 0x96A8 /* left unfill */ - } - }, - { - { - 0x4E8B, 0x524D, 0x5B78, 0x5C06, 0x5C07, 0x60C5, 0x60F3, 0x6216, - 0x653F, 0x65AF, 0x65B0, 0x6837, 0x6A23, 0x6C11, 0x6C92, 0x6CA1, - 0x7136, 0x7279, 0x73B0, 0x73FE, 0x7403, 0x7B2C, 0x7D93, 0x8C01, - 0x8D77 /* right fill */ - }, - { - 0x4F8B, 0x5225, 0x522B, 0x5236, 0x52A8, 0x52D5, 0x5417, 0x55CE, - 0x589E, 0x6307, 0x660E, 0x671D, 0x671F, 0x6784, 0x7269, 0x786E, - 0x79CD, 0x8ABF, 0x8C03, 0x8CBB, 0x8D39, 0x90A3, 0x90FD, 0x9593, - 0x95F4 /* right unfill */ - } - } -#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ - }; + FT_Bool fill; + AF_CJKBlue blue; + FT_Error error; + AF_CJKAxis axis; + FT_Outline outline; - /* Calculate blue zones for all the CJK_BLUE_XXX's. */ + AF_StyleClass sc = metrics->root.style_class; - static void - af_cjk_metrics_init_blues( AF_CJKMetrics metrics, - FT_Face face, - const FT_ULong blue_chars - [AF_CJK_BLUE_MAX] - [AF_CJK_BLUE_TYPE_MAX] - [AF_CJK_MAX_TEST_CHARACTERS] ) - { - FT_Pos fills[AF_CJK_MAX_TEST_CHARACTERS]; - FT_Pos flats[AF_CJK_MAX_TEST_CHARACTERS]; + AF_Blue_Stringset bss = sc->blue_stringset; + const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; - FT_Int num_fills; - FT_Int num_flats; - FT_Int bb; - AF_CJKBlue blue; - FT_Error error; - AF_CJKAxis axis; - FT_GlyphSlot glyph = face->glyph; + /* we walk over the blue character strings as specified in the */ + /* style's entry in the `af_blue_stringset' array, computing its */ + /* extremum points (depending on the string properties) */ -#ifdef FT_DEBUG_LEVEL_TRACE - FT_String* cjk_blue_name[AF_CJK_BLUE_MAX] = { - (FT_String*)"top", - (FT_String*)"bottom", - (FT_String*)"left", - (FT_String*)"right" - }; - FT_String* cjk_blue_type_name[AF_CJK_BLUE_TYPE_MAX] = { - (FT_String*)"filled", - (FT_String*)"unfilled" - }; -#endif + FT_TRACE5(( "cjk blue zones computation\n" + "==========================\n" + "\n" )); + for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ ) + { + const char* p = &af_blue_strings[bs->string]; + FT_Pos* blue_ref; + FT_Pos* blue_shoot; - /* We compute the blues simply by loading each character from the */ - /* `blue_chars[blues]' string, then computing its extreme points */ - /* (depending blue zone type etc.). */ - FT_TRACE5(( "cjk blue zones computation\n" )); - FT_TRACE5(( "------------------------------------------------\n" )); + if ( AF_CJK_IS_HORIZ_BLUE( bs ) ) + axis = &metrics->axis[AF_DIMENSION_HORZ]; + else + axis = &metrics->axis[AF_DIMENSION_VERT]; + +#ifdef FT_DEBUG_LEVEL_TRACE + { + FT_String* cjk_blue_name[4] = + { + (FT_String*)"bottom", /* -- , -- */ + (FT_String*)"top", /* -- , TOP */ + (FT_String*)"left", /* HORIZ, -- */ + (FT_String*)"right" /* HORIZ, TOP */ + }; - for ( bb = 0; bb < AF_CJK_BLUE_MAX; bb++ ) - { - FT_Int fill_type; - FT_Pos* blue_ref; - FT_Pos* blue_shoot; + FT_TRACE5(( "blue zone %d (%s):\n", + axis->blue_count, + cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | + AF_CJK_IS_TOP_BLUE( bs ) ] )); + } +#endif /* FT_DEBUG_LEVEL_TRACE */ num_fills = 0; num_flats = 0; - for ( fill_type = 0; fill_type < AF_CJK_BLUE_TYPE_MAX; fill_type++ ) - { - const FT_ULong* p = blue_chars[bb][fill_type]; - const FT_ULong* limit = p + AF_CJK_MAX_TEST_CHARACTERS; - FT_Bool fill = FT_BOOL( - fill_type == AF_CJK_BLUE_TYPE_FILL ); + fill = 1; /* start with characters that define fill values */ + FT_TRACE5(( " [overshoot values]\n" )); + while ( *p ) + { + FT_ULong ch; + FT_ULong glyph_index; + FT_Long y_offset; + FT_Pos best_pos; /* same as points.y or points.x, resp. */ + FT_Int best_point; + FT_Vector* points; - FT_TRACE5(( "cjk blue %s/%s\n", cjk_blue_name[bb], - cjk_blue_type_name[fill_type] )); + GET_UTF8_CHAR( ch, p ); - for ( ; p < limit && *p; p++ ) + /* switch to characters that define flat values */ + if ( ch == '|' ) { - FT_UInt glyph_index; - FT_Pos best_pos; /* same as points.y */ - FT_Int best_point; - FT_Vector* points; + fill = 0; + FT_TRACE5(( " [reference values]\n" )); + continue; + } + /* load the character in the face -- skip unknown or empty ones */ + af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); + if ( glyph_index == 0 ) + { + FT_TRACE5(( " U+%04lX unavailable\n", ch )); + continue; + } - FT_TRACE5(( " U+%lX...", *p )); + error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); + outline = face->glyph->outline; + if ( error || outline.n_points <= 0 ) + { + FT_TRACE5(( " U+%04lX contains no outlines\n", ch )); + continue; + } - /* load the character in the face -- skip unknown or empty ones */ - glyph_index = FT_Get_Char_Index( face, *p ); - if ( glyph_index == 0 ) - { - FT_TRACE5(( "unavailable\n" )); - continue; - } + /* now compute min or max point indices and coordinates */ + points = outline.points; + best_point = -1; + best_pos = 0; /* make compiler happy */ - error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); - if ( error || glyph->outline.n_points <= 0 ) - { - FT_TRACE5(( "no outline\n" )); - continue; - } + { + FT_Int nn; + FT_Int first = 0; + FT_Int last = -1; - /* now compute min or max point indices and coordinates */ - points = glyph->outline.points; - best_point = -1; - best_pos = 0; /* make compiler happy */ + for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ ) { - FT_Int nn; - FT_Int first = 0; - FT_Int last = -1; - - - for ( nn = 0; - nn < glyph->outline.n_contours; - first = last + 1, nn++ ) - { - FT_Int pp; + FT_Int pp; - last = glyph->outline.contours[nn]; + last = outline.contours[nn]; - /* Avoid single-point contours since they are never */ - /* rasterized. In some fonts, they correspond to mark */ - /* attachment points which are way outside of the glyph's */ - /* real outline. */ - if ( last <= first ) - continue; + /* Avoid single-point contours since they are never rasterized. */ + /* In some fonts, they correspond to mark attachment points */ + /* which are way outside of the glyph's real outline. */ + if ( last <= first ) + continue; - switch ( bb ) + if ( AF_CJK_IS_HORIZ_BLUE( bs ) ) + { + if ( AF_CJK_IS_RIGHT_BLUE( bs ) ) { - case AF_CJK_BLUE_TOP: for ( pp = first; pp <= last; pp++ ) - if ( best_point < 0 || points[pp].y > best_pos ) + if ( best_point < 0 || points[pp].x > best_pos ) { best_point = pp; - best_pos = points[pp].y; + best_pos = points[pp].x; } - break; - - case AF_CJK_BLUE_BOTTOM: + } + else + { for ( pp = first; pp <= last; pp++ ) - if ( best_point < 0 || points[pp].y < best_pos ) + if ( best_point < 0 || points[pp].x < best_pos ) { best_point = pp; - best_pos = points[pp].y; + best_pos = points[pp].x; } - break; - - case AF_CJK_BLUE_LEFT: + } + } + else + { + if ( AF_CJK_IS_TOP_BLUE( bs ) ) + { for ( pp = first; pp <= last; pp++ ) - if ( best_point < 0 || points[pp].x < best_pos ) + if ( best_point < 0 || points[pp].y > best_pos ) { best_point = pp; - best_pos = points[pp].x; + best_pos = points[pp].y; } - break; - - case AF_CJK_BLUE_RIGHT: + } + else + { for ( pp = first; pp <= last; pp++ ) - if ( best_point < 0 || points[pp].x > best_pos ) + if ( best_point < 0 || points[pp].y < best_pos ) { best_point = pp; - best_pos = points[pp].x; + best_pos = points[pp].y; } - break; - - default: - ; } } - FT_TRACE5(( "best_pos=%5ld\n", best_pos )); } - if ( fill ) - fills[num_fills++] = best_pos; - else - flats[num_flats++] = best_pos; + FT_TRACE5(( " U+%04lX: best_pos = %5ld\n", ch, best_pos )); } + + if ( fill ) + fills[num_fills++] = best_pos; + else + flats[num_flats++] = best_pos; } if ( num_flats == 0 && num_fills == 0 ) @@ -433,34 +439,30 @@ * we couldn't find a single glyph to compute this blue zone, * we will simply ignore it then */ - FT_TRACE5(( "empty\n" )); + FT_TRACE5(( " empty\n" )); continue; } - /* we have computed the contents of the `fill' and `flats' tables, */ - /* now determine the reference position of the blue -- */ - /* we simply take the median value after a simple sort */ - af_sort_pos( num_flats, flats ); + /* we have computed the contents of the `fill' and `flats' tables, */ + /* now determine the reference and overshoot position of the blue -- */ + /* we simply take the median value after a simple sort */ af_sort_pos( num_fills, fills ); + af_sort_pos( num_flats, flats ); - if ( AF_CJK_BLUE_TOP == bb || AF_CJK_BLUE_BOTTOM == bb ) - axis = &metrics->axis[AF_DIMENSION_VERT]; - else - axis = &metrics->axis[AF_DIMENSION_HORZ]; - - blue = & axis->blues[axis->blue_count]; - blue_ref = & blue->ref.org; - blue_shoot = & blue->shoot.org; + blue = &axis->blues[axis->blue_count]; + blue_ref = &blue->ref.org; + blue_shoot = &blue->shoot.org; axis->blue_count++; + if ( num_flats == 0 ) { - *blue_ref = fills[num_fills / 2]; + *blue_ref = *blue_shoot = fills[num_fills / 2]; } else if ( num_fills == 0 ) { - *blue_ref = flats[num_flats / 2]; + *blue_ref = *blue_shoot = flats[num_flats / 2]; } else @@ -478,25 +480,34 @@ FT_Bool under_ref = FT_BOOL( shoot < ref ); - if ( (AF_CJK_BLUE_TOP == bb || AF_CJK_BLUE_RIGHT == bb) ^ under_ref ) - *blue_shoot = *blue_ref = ( shoot + ref ) / 2; + /* AF_CJK_IS_TOP_BLUE covers `right' and `top' */ + if ( AF_CJK_IS_TOP_BLUE( bs ) ^ under_ref ) + { + *blue_ref = + *blue_shoot = ( shoot + ref ) / 2; + + FT_TRACE5(( " [reference smaller than overshoot," + " taking mean value]\n" )); + } } blue->flags = 0; - if ( AF_CJK_BLUE_TOP == bb ) - blue->flags |= AF_CJK_BLUE_IS_TOP; - else if ( AF_CJK_BLUE_RIGHT == bb ) - blue->flags |= AF_CJK_BLUE_IS_RIGHT; + if ( AF_CJK_IS_TOP_BLUE( bs ) ) + blue->flags |= AF_CJK_BLUE_TOP; - FT_TRACE5(( "-- cjk %s bluezone ref = %ld shoot = %ld\n", - cjk_blue_name[bb], *blue_ref, *blue_shoot )); + FT_TRACE5(( " -> reference = %ld\n" + " overshoot = %ld\n", + *blue_ref, *blue_shoot )); } + FT_TRACE5(( "\n" )); + return; } /* Basically the Latin version with type AF_CJKMetrics for metrics. */ + FT_LOCAL_DEF( void ) af_cjk_metrics_check_digits( AF_CJKMetrics metrics, FT_Face face ) @@ -506,14 +517,14 @@ FT_Fixed advance, old_advance = 0; - /* check whether all ASCII digits have the same advance width; */ - /* digit `0' is 0x30 in all supported charmaps */ + /* digit `0' is 0x30 in all supported charmaps */ for ( i = 0x30; i <= 0x39; i++ ) { - FT_UInt glyph_index; + FT_ULong glyph_index; + FT_Long y_offset; - glyph_index = FT_Get_Char_Index( face, i ); + af_get_char_index( &metrics->root, i, &glyph_index, &y_offset ); if ( glyph_index == 0 ) continue; @@ -543,6 +554,8 @@ } + /* Initialize global metrics. */ + FT_LOCAL_DEF( FT_Error ) af_cjk_metrics_init( AF_CJKMetrics metrics, FT_Face face ) @@ -552,21 +565,21 @@ metrics->units_per_em = face->units_per_EM; - if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) ) - face->charmap = NULL; - else + if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) ) { - af_cjk_metrics_init_widths( metrics, face, 0x7530 ); - af_cjk_metrics_init_blues( metrics, face, af_cjk_hani_blue_chars ); + af_cjk_metrics_init_widths( metrics, face ); + af_cjk_metrics_init_blues( metrics, face ); af_cjk_metrics_check_digits( metrics, face ); } FT_Set_Charmap( face, oldmap ); - - return AF_Err_Ok; + return FT_Err_Ok; } + /* Adjust scaling value, then scale and shift widths */ + /* and blue zones (if applicable) for given dimension. */ + static void af_cjk_metrics_scale_dim( AF_CJKMetrics metrics, AF_Scaler scaler, @@ -578,8 +591,6 @@ FT_UInt nn; - axis = &metrics->axis[dim]; - if ( dim == AF_DIMENSION_HORZ ) { scale = scaler->x_scale; @@ -591,6 +602,8 @@ delta = scaler->y_delta; } + axis = &metrics->axis[dim]; + if ( axis->org_scale == scale && axis->org_delta == delta ) return; @@ -646,12 +659,13 @@ blue->shoot.fit = blue->ref.fit - delta2; - FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]: " - "ref: cur=%.2f fit=%.2f shoot: cur=%.2f fit=%.2f\n", - ( dim == AF_DIMENSION_HORZ ) ? 'H' : 'V', - nn, blue->ref.org, blue->shoot.org, - blue->ref.cur / 64.0, blue->ref.fit / 64.0, - blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 )); + FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]:\n" + " ref: cur=%.2f fit=%.2f\n" + " shoot: cur=%.2f fit=%.2f\n", + ( dim == AF_DIMENSION_HORZ ) ? 'H' : 'V', + nn, blue->ref.org, blue->shoot.org, + blue->ref.cur / 64.0, blue->ref.fit / 64.0, + blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 )); blue->flags |= AF_CJK_BLUE_ACTIVE; } @@ -659,10 +673,14 @@ } + /* Scale global values in both directions. */ + FT_LOCAL_DEF( void ) af_cjk_metrics_scale( AF_CJKMetrics metrics, AF_Scaler scaler ) { + /* we copy the whole structure since the x and y scaling values */ + /* are not modified, contrary to e.g. the `latin' auto-hinter */ metrics->root.scaler = *scaler; af_cjk_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ ); @@ -678,6 +696,9 @@ /*************************************************************************/ /*************************************************************************/ + + /* Walk over all contours and compute its segments. */ + static FT_Error af_cjk_hints_compute_segments( AF_GlyphHints hints, AF_Dimension dim ) @@ -699,7 +720,7 @@ { AF_Point pt = seg->first; AF_Point last = seg->last; - AF_Flags f0 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL); + AF_Flags f0 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL ); AF_Flags f1; @@ -708,7 +729,7 @@ for ( ; pt != last; f0 = f1 ) { pt = pt->next; - f1 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL); + f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL ); if ( !f0 && !f1 ) break; @@ -718,7 +739,7 @@ } } - return AF_Err_Ok; + return FT_Err_Ok; } @@ -744,10 +765,6 @@ /* now compare each segment to the others */ for ( seg1 = segments; seg1 < segment_limit; seg1++ ) { - /* the fake segments are for metrics hinting only */ - if ( seg1->first == seg1->last ) - continue; - if ( seg1->dir != major_dir ) continue; @@ -892,7 +909,7 @@ AF_Dimension dim ) { AF_AxisHints axis = &hints->axis[dim]; - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = hints->memory; AF_CJKAxis laxis = &((AF_CJKMetrics)hints->metrics)->axis[dim]; @@ -934,7 +951,7 @@ for ( seg = segments; seg < segment_limit; seg++ ) { - AF_Edge found = 0; + AF_Edge found = NULL; FT_Pos best = 0xFFFFU; FT_Int ee; @@ -962,14 +979,15 @@ /* can make a single edge. */ if ( link ) { - AF_Segment seg1 = edge->first; - AF_Segment link1; + AF_Segment seg1 = edge->first; FT_Pos dist2 = 0; do { - link1 = seg1->link; + AF_Segment link1 = seg1->link; + + if ( link1 ) { dist2 = AF_SEGMENT_DIST( link, link1 ); @@ -1006,10 +1024,11 @@ edge->first = seg; edge->last = seg; + edge->dir = seg->dir; edge->fpos = seg->pos; - edge->opos = edge->pos = FT_MulFix( seg->pos, scale ); + edge->opos = FT_MulFix( seg->pos, scale ); + edge->pos = edge->opos; seg->edge_next = seg; - edge->dir = seg->dir; } else { @@ -1021,25 +1040,26 @@ } } - /*********************************************************************/ - /* */ - /* Good, we now compute each edge's properties according to segments */ - /* found on its position. Basically, these are as follows. */ - /* */ - /* - edge's main direction */ - /* - stem edge, serif edge or both (which defaults to stem then) */ - /* - rounded edge, straight or both (which defaults to straight) */ - /* - link for edge */ - /* */ - /*********************************************************************/ - - /* first of all, set the `edge' field in each segment -- this is */ - /* required in order to compute edge links */ - /* */ - /* Note that removing this loop and setting the `edge' field of each */ - /* segment directly in the code above slows down execution speed for */ - /* some reasons on platforms like the Sun. */ + /******************************************************************/ + /* */ + /* Good, we now compute each edge's properties according to the */ + /* segments found on its position. Basically, these are */ + /* */ + /* - the edge's main direction */ + /* - stem edge, serif edge or both (which defaults to stem then) */ + /* - rounded edge, straight or both (which defaults to straight) */ + /* - link for edge */ + /* */ + /******************************************************************/ + + /* first of all, set the `edge' field in each segment -- this is */ + /* required in order to compute edge links */ + /* + * Note that removing this loop and setting the `edge' field of each + * segment directly in the code above slows down execution speed for + * some reasons on platforms like the Sun. + */ { AF_Edge edges = axis->edges; AF_Edge edge_limit = edges + axis->num_edges; @@ -1148,6 +1168,8 @@ } + /* Detect segments and edges for given dimension. */ + static FT_Error af_cjk_hints_detect_features( AF_GlyphHints hints, AF_Dimension dim ) @@ -1166,6 +1188,8 @@ } + /* Compute all edges which lie within blue zones. */ + FT_LOCAL_DEF( void ) af_cjk_hints_compute_blue_edges( AF_GlyphHints hints, AF_CJKMetrics metrics, @@ -1213,10 +1237,10 @@ /* zone, check for left edges */ /* */ /* of course, that's for TrueType */ - is_top_right_blue = - FT_BOOL( ( ( blue->flags & AF_CJK_BLUE_IS_TOP ) != 0 ) || - ( ( blue->flags & AF_CJK_BLUE_IS_RIGHT ) != 0 ) ); - is_major_dir = FT_BOOL( edge->dir == axis->major_dir ); + is_top_right_blue = + (FT_Byte)( ( blue->flags & AF_CJK_BLUE_TOP ) != 0 ); + is_major_dir = + FT_BOOL( edge->dir == axis->major_dir ); /* if it is a top zone, the edge must be against the major */ /* direction; if it is a bottom zone, it must be in the major */ @@ -1253,6 +1277,8 @@ } + /* Initalize hinting engine. */ + FT_LOCAL_DEF( FT_Error ) af_cjk_hints_init( AF_GlyphHints hints, AF_CJKMetrics metrics ) @@ -1261,7 +1287,7 @@ FT_UInt32 scaler_flags, other_flags; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics ); /* * correct x_scale and y_scale when needed, since they may have @@ -1311,7 +1337,7 @@ hints->scaler_flags = scaler_flags; hints->other_flags = other_flags; - return 0; + return FT_Err_Ok; } @@ -1323,8 +1349,8 @@ /*************************************************************************/ /*************************************************************************/ - /* snap a given width in scaled coordinates to one of the */ - /* current standard widths */ + /* Snap a given width in scaled coordinates to one of the */ + /* current standard widths. */ static FT_Pos af_cjk_snap_width( AF_Width widths, @@ -1371,7 +1397,9 @@ } - /* compute the snapped width of a given stem */ + /* Compute the snapped width of a given stem. */ + /* There is a lot of voodoo in this function; changing the hard-coded */ + /* parameters influence the whole hinting process. */ static FT_Pos af_cjk_compute_stem_width( AF_GlyphHints hints, @@ -1380,8 +1408,8 @@ AF_Edge_Flags base_flags, AF_Edge_Flags stem_flags ) { - AF_CJKMetrics metrics = (AF_CJKMetrics) hints->metrics; - AF_CJKAxis axis = & metrics->axis[dim]; + AF_CJKMetrics metrics = (AF_CJKMetrics)hints->metrics; + AF_CJKAxis axis = &metrics->axis[dim]; FT_Pos dist = width; FT_Int sign = 0; FT_Bool vertical = FT_BOOL( dim == AF_DIMENSION_VERT ); @@ -1492,7 +1520,7 @@ } - /* align one stem edge relative to the previous stem edge */ + /* Align one stem edge relative to the previous stem edge. */ static void af_cjk_align_linked_edge( AF_GlyphHints hints, @@ -1509,9 +1537,18 @@ stem_edge->pos = base_edge->pos + fitted_width; + + FT_TRACE5(( " CJKLINK: edge %d @%d (opos=%.2f) linked to %.2f," + " dist was %.2f, now %.2f\n", + stem_edge - hints->axis[dim].edges, stem_edge->fpos, + stem_edge->opos / 64.0, stem_edge->pos / 64.0, + dist / 64.0, fitted_width / 64.0 )); } + /* Shift the coordinates of the `serif' edge by the same amount */ + /* as the corresponding `base' edge has been moved already. */ + static void af_cjk_align_serif_edge( AF_GlyphHints hints, AF_Edge base, @@ -1665,6 +1702,8 @@ } + /* The main grid-fitting routine. */ + static void af_cjk_hint_edges( AF_GlyphHints hints, AF_Dimension dim ) @@ -1680,10 +1719,16 @@ FT_Bool has_last_stem = FALSE; FT_Pos last_stem_pos = 0; +#ifdef FT_DEBUG_LEVEL_TRACE + FT_UInt num_actions = 0; +#endif + + + FT_TRACE5(( "cjk %s edge hinting (style `%s')\n", + dim == AF_DIMENSION_VERT ? "horizontal" : "vertical", + af_style_names[hints->metrics->style_class->style] )); /* we begin by aligning all stems relative to the blue zone */ - FT_TRACE5(( "==== cjk hinting %s edges =====\n", - dim == AF_DIMENSION_HORZ ? "vertical" : "horizontal" )); if ( AF_HINTS_DO_BLUES( hints ) ) { @@ -1714,10 +1759,14 @@ if ( !edge1 ) continue; - FT_TRACE5(( "CJKBLUE: edge %d @%d (opos=%.2f) snapped to (%.2f), " - "was (%.2f)\n", - edge1-edges, edge1->fpos, edge1->opos / 64.0, blue->fit / 64.0, - edge1->pos / 64.0 )); +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE5(( " CJKBLUE: edge %d @%d (opos=%.2f) snapped to %.2f," + " was %.2f\n", + edge1 - edges, edge1->fpos, edge1->opos / 64.0, + blue->fit / 64.0, edge1->pos / 64.0 )); + + num_actions++; +#endif edge1->pos = blue->fit; edge1->flags |= AF_EDGE_DONE; @@ -1726,6 +1775,10 @@ { af_cjk_align_linked_edge( hints, dim, edge1, edge2 ); edge2->flags |= AF_EDGE_DONE; + +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif } if ( !anchor ) @@ -1767,6 +1820,7 @@ } /* now align the stem */ + /* this should not happen, but it's better to be safe */ if ( edge2->blue_edge ) { @@ -1774,6 +1828,11 @@ af_cjk_align_linked_edge( hints, dim, edge2, edge ); edge->flags |= AF_EDGE_DONE; + +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif + continue; } @@ -1781,6 +1840,11 @@ { af_cjk_align_linked_edge( hints, dim, edge2, edge ); edge->flags |= AF_EDGE_DONE; + +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif + /* We rarely reaches here it seems; * usually the two edges belonging * to one stem are marked as DONE together @@ -1948,7 +2012,7 @@ } if ( !skipped ) - return; + goto Exit; /* * now hint the remaining edges (serifs and single) in order @@ -1968,7 +2032,7 @@ } if ( !skipped ) - return; + goto Exit; for ( edge = edges; edge < edge_limit; edge++ ) { @@ -2006,6 +2070,16 @@ } } } + + Exit: + +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !num_actions ) + FT_TRACE5(( " (none)\n" )); + FT_TRACE5(( "\n" )); +#endif + + return; } @@ -2099,6 +2173,8 @@ } + /* Apply the complete hinting algorithm to a CJK glyph. */ + FT_LOCAL_DEF( FT_Error ) af_cjk_hints_apply( AF_GlyphHints hints, FT_Outline* outline, @@ -2186,81 +2262,41 @@ /*************************************************************************/ - /* this corresponds to Unicode 6.0 */ + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_cjk_writing_system_class, - static const AF_Script_UniRangeRec af_cjk_uniranges[] = - { - AF_UNIRANGE_REC( 0x2E80UL, 0x2EFFUL ), /* CJK Radicals Supplement */ - AF_UNIRANGE_REC( 0x2F00UL, 0x2FDFUL ), /* Kangxi Radicals */ - AF_UNIRANGE_REC( 0x2FF0UL, 0x2FFFUL ), /* Ideographic Description Characters */ - AF_UNIRANGE_REC( 0x3000UL, 0x303FUL ), /* CJK Symbols and Punctuation */ - AF_UNIRANGE_REC( 0x3040UL, 0x309FUL ), /* Hiragana */ - AF_UNIRANGE_REC( 0x30A0UL, 0x30FFUL ), /* Katakana */ - AF_UNIRANGE_REC( 0x3100UL, 0x312FUL ), /* Bopomofo */ - AF_UNIRANGE_REC( 0x3130UL, 0x318FUL ), /* Hangul Compatibility Jamo */ - AF_UNIRANGE_REC( 0x3190UL, 0x319FUL ), /* Kanbun */ - AF_UNIRANGE_REC( 0x31A0UL, 0x31BFUL ), /* Bopomofo Extended */ - AF_UNIRANGE_REC( 0x31C0UL, 0x31EFUL ), /* CJK Strokes */ - AF_UNIRANGE_REC( 0x31F0UL, 0x31FFUL ), /* Katakana Phonetic Extensions */ - AF_UNIRANGE_REC( 0x3200UL, 0x32FFUL ), /* Enclosed CJK Letters and Months */ - AF_UNIRANGE_REC( 0x3300UL, 0x33FFUL ), /* CJK Compatibility */ - AF_UNIRANGE_REC( 0x3400UL, 0x4DBFUL ), /* CJK Unified Ideographs Extension A */ - AF_UNIRANGE_REC( 0x4DC0UL, 0x4DFFUL ), /* Yijing Hexagram Symbols */ - AF_UNIRANGE_REC( 0x4E00UL, 0x9FFFUL ), /* CJK Unified Ideographs */ - AF_UNIRANGE_REC( 0xA960UL, 0xA97FUL ), /* Hangul Jamo Extended-A */ - AF_UNIRANGE_REC( 0xAC00UL, 0xD7AFUL ), /* Hangul Syllables */ - AF_UNIRANGE_REC( 0xD7B0UL, 0xD7FFUL ), /* Hangul Jamo Extended-B */ - AF_UNIRANGE_REC( 0xF900UL, 0xFAFFUL ), /* CJK Compatibility Ideographs */ - AF_UNIRANGE_REC( 0xFE10UL, 0xFE1FUL ), /* Vertical forms */ - AF_UNIRANGE_REC( 0xFE30UL, 0xFE4FUL ), /* CJK Compatibility Forms */ - AF_UNIRANGE_REC( 0xFF00UL, 0xFFEFUL ), /* Halfwidth and Fullwidth Forms */ - AF_UNIRANGE_REC( 0x1B000UL, 0x1B0FFUL ), /* Kana Supplement */ - AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ), /* Tai Xuan Hing Symbols */ - AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ), /* Enclosed Ideographic Supplement */ - AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ), /* CJK Unified Ideographs Extension B */ - AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ), /* CJK Unified Ideographs Extension C */ - AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ), /* CJK Unified Ideographs Extension D */ - AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ), /* CJK Compatibility Ideographs Supplement */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - - - AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class, - AF_SCRIPT_CJK, - af_cjk_uniranges, + AF_WRITING_SYSTEM_CJK, sizeof ( AF_CJKMetricsRec ), - (AF_Script_InitMetricsFunc) af_cjk_metrics_init, - (AF_Script_ScaleMetricsFunc)af_cjk_metrics_scale, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) af_cjk_metrics_init, + (AF_WritingSystem_ScaleMetricsFunc)af_cjk_metrics_scale, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) af_cjk_hints_init, - (AF_Script_ApplyHintsFunc) af_cjk_hints_apply + (AF_WritingSystem_InitHintsFunc) af_cjk_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_cjk_hints_apply ) + #else /* !AF_CONFIG_OPTION_CJK */ - static const AF_Script_UniRangeRec af_cjk_uniranges[] = - { - AF_UNIRANGE_REC( 0UL, 0UL ) - }; + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_cjk_writing_system_class, - AF_DEFINE_SCRIPT_CLASS( af_cjk_script_class, - AF_SCRIPT_CJK, - af_cjk_uniranges, + AF_WRITING_SYSTEM_CJK, sizeof ( AF_CJKMetricsRec ), - (AF_Script_InitMetricsFunc) NULL, - (AF_Script_ScaleMetricsFunc)NULL, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) NULL, + (AF_WritingSystem_ScaleMetricsFunc)NULL, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) NULL, - (AF_Script_ApplyHintsFunc) NULL + (AF_WritingSystem_InitHintsFunc) NULL, + (AF_WritingSystem_ApplyHintsFunc) NULL ) + #endif /* !AF_CONFIG_OPTION_CJK */ diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h index 8416c0d..4dd4f39 100644 --- a/src/autofit/afcjk.h +++ b/src/autofit/afcjk.h @@ -2,9 +2,9 @@ /* */ /* afcjk.h */ /* */ -/* Auto-fitter hinting routines for CJK script (specification). */ +/* Auto-fitter hinting routines for CJK writing system (specification). */ /* */ -/* Copyright 2006, 2007, 2011 by */ +/* Copyright 2006, 2007, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -26,39 +26,41 @@ FT_BEGIN_HEADER - /* the CJK-specific script class */ + /* the CJK-specific writing system */ - AF_DECLARE_SCRIPT_CLASS(af_cjk_script_class) + AF_DECLARE_WRITING_SYSTEM_CLASS( af_cjk_writing_system_class ) + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** C J K G L O B A L M E T R I C S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ - /* CJK (global) metrics management */ /* * CJK glyphs tend to fill the square. So we have both vertical and * horizontal blue zones. But some glyphs have flat bounding strokes that * leave some space between neighbour glyphs. */ - enum - { - AF_CJK_BLUE_TOP, - AF_CJK_BLUE_BOTTOM, - AF_CJK_BLUE_LEFT, - AF_CJK_BLUE_RIGHT, - - AF_CJK_BLUE_MAX - }; +#define AF_CJK_IS_TOP_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_CJK_TOP ) +#define AF_CJK_IS_HORIZ_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_CJK_HORIZ ) +#define AF_CJK_IS_RIGHT_BLUE AF_CJK_IS_TOP_BLUE #define AF_CJK_MAX_WIDTHS 16 -#define AF_CJK_MAX_BLUES AF_CJK_BLUE_MAX enum { - AF_CJK_BLUE_ACTIVE = 1 << 0, - AF_CJK_BLUE_IS_TOP = 1 << 1, - AF_CJK_BLUE_IS_RIGHT = 1 << 2, - AF_CJK_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */ - /* optimization */ + AF_CJK_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */ + AF_CJK_BLUE_TOP = 1 << 1, /* result of AF_CJK_IS_TOP_BLUE */ + AF_CJK_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */ + /* optimization */ AF_CJK_BLUE_FLAG_MAX }; @@ -77,16 +79,16 @@ FT_BEGIN_HEADER FT_Fixed scale; FT_Pos delta; - FT_UInt width_count; - AF_WidthRec widths[AF_CJK_MAX_WIDTHS]; - FT_Pos edge_distance_threshold; - FT_Pos standard_width; - FT_Bool extra_light; + FT_UInt width_count; /* number of used widths */ + AF_WidthRec widths[AF_CJK_MAX_WIDTHS]; /* widths array */ + FT_Pos edge_distance_threshold; /* used for creating edges */ + FT_Pos standard_width; /* the default stem thickness */ + FT_Bool extra_light; /* is standard width very light? */ /* used for horizontal metrics too for CJK */ FT_Bool control_overshoot; FT_UInt blue_count; - AF_CJKBlueRec blues[AF_CJK_BLUE_MAX]; + AF_CJKBlueRec blues[AF_BLUE_STRINGSET_MAX]; FT_Fixed org_scale; FT_Pos org_delta; @@ -96,13 +98,14 @@ FT_BEGIN_HEADER typedef struct AF_CJKMetricsRec_ { - AF_ScriptMetricsRec root; - FT_UInt units_per_em; - AF_CJKAxisRec axis[AF_DIMENSION_MAX]; + AF_StyleMetricsRec root; + FT_UInt units_per_em; + AF_CJKAxisRec axis[AF_DIMENSION_MAX]; } AF_CJKMetricsRec, *AF_CJKMetrics; +#ifdef AF_CONFIG_OPTION_CJK FT_LOCAL( FT_Error ) af_cjk_metrics_init( AF_CJKMetrics metrics, FT_Face face ); @@ -120,15 +123,15 @@ FT_BEGIN_HEADER FT_Outline* outline, AF_CJKMetrics metrics ); - /* Shared. called from afindic.c */ + /* shared; called from afindic.c */ FT_LOCAL( void ) af_cjk_metrics_check_digits( AF_CJKMetrics metrics, FT_Face face ); FT_LOCAL( void ) af_cjk_metrics_init_widths( AF_CJKMetrics metrics, - FT_Face face, - FT_ULong charcode ); + FT_Face face ); +#endif /* AF_CONFIG_OPTION_CJK */ /* */ diff --git a/src/autofit/afcover.h b/src/autofit/afcover.h new file mode 100644 index 0000000..d5ac969 --- /dev/null +++ b/src/autofit/afcover.h @@ -0,0 +1,105 @@ +/***************************************************************************/ +/* */ +/* afcover.h */ +/* */ +/* Auto-fitter coverages (specification only). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /* This header file can be included multiple times. */ + /* Define `COVERAGE' as needed. */ + + + /* Add new coverages here. The first and second arguments are the */ + /* coverage name in lowercase and uppercase, respectively, followed */ + /* by a description string. The last four arguments are the four */ + /* characters defining the corresponding OpenType feature. */ + +#if 0 + /* XXX: It's not possible to define blue zone characters in advance. */ + COVERAGE( alternative_fractions, ALTERNATIVE_FRACTIONS, + "alternative fractions", + 'a', 'f', 'r', 'c' ) +#endif + + COVERAGE( petite_capitals_from_capitals, PETITE_CAPITALS_FROM_CAPITALS, + "petite capitals from capitals", + 'c', '2', 'c', 'p' ) + + COVERAGE( small_capitals_from_capitals, SMALL_CAPITALS_FROM_CAPITALS, + "small capitals from capitals", + 'c', '2', 's', 'c' ) + +#if 0 + /* XXX: Only digits are in this coverage, however, both normal style */ + /* and oldstyle representation forms are possible. */ + COVERAGE( denominators, DENOMINATORS, + "denominators", + 'd', 'n', 'o', 'm' ) +#endif + +#if 0 + /* XXX: It's not possible to define blue zone characters in advance. */ + COVERAGE( fractions, FRACTIONS, + "fractions", + 'f', 'r', 'a', 'c' ) +#endif + +#if 0 + /* XXX: Only digits are in this coverage, however, both normal style */ + /* and oldstyle representation forms are possible. */ + COVERAGE( numerators, NUMERATORS, + "numerators", + 'n', 'u', 'm', 'r' ) +#endif + + COVERAGE( ordinals, ORDINALS, + "ordinals", + 'o', 'r', 'd', 'n' ) + + COVERAGE( petite_capitals, PETITE_CAPITALS, + "petite capitals", + 'p', 'c', 'a', 'p' ) + + COVERAGE( ruby, RUBY, + "ruby", + 'r', 'u', 'b', 'y' ) + + COVERAGE( scientific_inferiors, SCIENTIFIC_INFERIORS, + "scientific inferiors", + 's', 'i', 'n', 'f' ) + + COVERAGE( small_capitals, SMALL_CAPITALS, + "small capitals", + 's', 'm', 'c', 'p' ) + + COVERAGE( subscript, SUBSCRIPT, + "subscript", + 's', 'u', 'b', 's' ) + + COVERAGE( superscript, SUPERSCRIPT, + "superscript", + 's', 'u', 'p', 's' ) + + COVERAGE( titling, TITLING, + "titling", + 't', 'i', 't', 'l' ) + +#if 0 + /* to be always excluded */ + COVERAGE(nalt, 'n', 'a', 'l', 't'); /* Alternate Annotation Forms (?) */ + COVERAGE(ornm, 'o', 'r', 'n', 'm'); /* Ornaments (?) */ +#endif + + +/* END */ diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c index 4bf278c..f8702a1 100644 --- a/src/autofit/afdummy.c +++ b/src/autofit/afdummy.c @@ -5,7 +5,7 @@ /* Auto-fitter dummy routines to be used if no hinting should be */ /* performed (body). */ /* */ -/* Copyright 2003-2005, 2011 by */ +/* Copyright 2003-2005, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,12 +23,17 @@ static FT_Error - af_dummy_hints_init( AF_GlyphHints hints, - AF_ScriptMetrics metrics ) + af_dummy_hints_init( AF_GlyphHints hints, + AF_StyleMetrics metrics ) { - af_glyph_hints_rescale( hints, - metrics ); - return AF_Err_Ok; + af_glyph_hints_rescale( hints, metrics ); + + hints->x_scale = metrics->scaler.x_scale; + hints->y_scale = metrics->scaler.y_scale; + hints->x_delta = metrics->scaler.x_delta; + hints->y_delta = metrics->scaler.y_delta; + + return FT_Err_Ok; } @@ -36,25 +41,30 @@ af_dummy_hints_apply( AF_GlyphHints hints, FT_Outline* outline ) { - FT_UNUSED( hints ); - FT_UNUSED( outline ); + FT_Error error; + - return AF_Err_Ok; + error = af_glyph_hints_reload( hints, outline ); + if ( !error ) + af_glyph_hints_save( hints, outline ); + + return error; } - AF_DEFINE_SCRIPT_CLASS( af_dummy_script_class, - AF_SCRIPT_NONE, - NULL, + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_dummy_writing_system_class, + + AF_WRITING_SYSTEM_DUMMY, - sizeof ( AF_ScriptMetricsRec ), + sizeof ( AF_StyleMetricsRec ), - (AF_Script_InitMetricsFunc) NULL, - (AF_Script_ScaleMetricsFunc)NULL, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) NULL, + (AF_WritingSystem_ScaleMetricsFunc)NULL, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) af_dummy_hints_init, - (AF_Script_ApplyHintsFunc) af_dummy_hints_apply + (AF_WritingSystem_InitHintsFunc) af_dummy_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_dummy_hints_apply ) diff --git a/src/autofit/afdummy.h b/src/autofit/afdummy.h index 95d8f8c..ad1b0d3 100644 --- a/src/autofit/afdummy.h +++ b/src/autofit/afdummy.h @@ -5,7 +5,7 @@ /* Auto-fitter dummy routines to be used if no hinting should be */ /* performed (specification). */ /* */ -/* Copyright 2003-2005, 2011 by */ +/* Copyright 2003-2005, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,11 +25,9 @@ FT_BEGIN_HEADER - /* A dummy script metrics class used when no hinting should - * be performed. This is the default for non-latin glyphs! - */ + /* A dummy writing system used when no hinting should be performed. */ - AF_DECLARE_SCRIPT_CLASS( af_dummy_script_class ) + AF_DECLARE_WRITING_SYSTEM_CLASS( af_dummy_writing_system_class ) /* */ diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index 3e0c02d..a54c20c 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter routines to compute global hinting values (body). */ /* */ -/* Copyright 2003-2011 by */ +/* Copyright 2003-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,129 +17,215 @@ #include "afglobal.h" -#include "afdummy.h" -#include "aflatin.h" -#include "afcjk.h" -#include "afindic.h" -#include "afpic.h" +#include "afranges.h" +#include "hbshim.h" +#include FT_INTERNAL_DEBUG_H + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_afglobal + + + /* get writing system specific header files */ +#undef WRITING_SYSTEM +#define WRITING_SYSTEM( ws, WS ) /* empty */ +#include "afwrtsys.h" #include "aferrors.h" +#include "afpic.h" + + +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + AF_DEFINE_SCRIPT_CLASS( \ + af_ ## s ## _script_class, \ + AF_SCRIPT_ ## S, \ + af_ ## s ## _uniranges, \ + sc1, sc2, sc3 ) + +#include "afscript.h" + + +#undef STYLE +#define STYLE( s, S, d, ws, sc, ss, c ) \ + AF_DEFINE_STYLE_CLASS( \ + af_ ## s ## _style_class, \ + AF_STYLE_ ## S, \ + ws, \ + sc, \ + ss, \ + c ) + +#include "afstyles.h" -#ifdef FT_OPTION_AUTOFIT2 -#include "aflatin2.h" -#endif #ifndef FT_CONFIG_OPTION_PIC - /* when updating this table, don't forget to update */ - /* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */ +#undef WRITING_SYSTEM +#define WRITING_SYSTEM( ws, WS ) \ + &af_ ## ws ## _writing_system_class, - /* populate this list when you add new scripts */ - static AF_ScriptClass const af_script_classes[] = + FT_LOCAL_ARRAY_DEF( AF_WritingSystemClass ) + af_writing_system_classes[] = { - &af_dummy_script_class, -#ifdef FT_OPTION_AUTOFIT2 - &af_latin2_script_class, -#endif - &af_latin_script_class, - &af_cjk_script_class, - &af_indic_script_class, + +#include "afwrtsys.h" + + NULL /* do not remove */ + }; + + +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + &af_ ## s ## _script_class, + + FT_LOCAL_ARRAY_DEF( AF_ScriptClass ) + af_script_classes[] = + { + +#include "afscript.h" + + NULL /* do not remove */ + }; + + +#undef STYLE +#define STYLE( s, S, d, ws, sc, ss, c ) \ + &af_ ## s ## _style_class, + + FT_LOCAL_ARRAY_DEF( AF_StyleClass ) + af_style_classes[] = + { + +#include "afstyles.h" + NULL /* do not remove */ }; #endif /* !FT_CONFIG_OPTION_PIC */ - /* index of default script in `af_script_classes' */ -#define AF_SCRIPT_LIST_DEFAULT 2 - /* a bit mask indicating an uncovered glyph */ -#define AF_SCRIPT_LIST_NONE 0x7F - /* if this flag is set, we have an ASCII digit */ -#define AF_DIGIT 0x80 +#ifdef FT_DEBUG_LEVEL_TRACE + +#undef STYLE +#define STYLE( s, S, d, ws, sc, ss, c ) #s, - /* - * Note that glyph_scripts[] is used to map each glyph into - * an index into the `af_script_classes' array. - * - */ - typedef struct AF_FaceGlobalsRec_ + FT_LOCAL_ARRAY_DEF( char* ) + af_style_names[] = { - FT_Face face; - FT_Long glyph_count; /* same as face->num_glyphs */ - FT_Byte* glyph_scripts; - AF_ScriptMetrics metrics[AF_SCRIPT_MAX]; +#include "afstyles.h" + + }; - } AF_FaceGlobalsRec; +#endif /* FT_DEBUG_LEVEL_TRACE */ - /* Compute the script index of each glyph within a given face. */ + /* Compute the style index of each glyph within a given face. */ static FT_Error - af_face_globals_compute_script_coverage( AF_FaceGlobals globals ) + af_face_globals_compute_style_coverage( AF_FaceGlobals globals ) { - FT_Error error = AF_Err_Ok; + FT_Error error; FT_Face face = globals->face; FT_CharMap old_charmap = face->charmap; - FT_Byte* gscripts = globals->glyph_scripts; - FT_UInt ss, i; + FT_Byte* gstyles = globals->glyph_styles; + FT_UInt ss; + FT_UInt i; + FT_UInt dflt = ~0U; /* a non-valid value */ - /* the value AF_SCRIPT_LIST_NONE means `uncovered glyph' */ - FT_MEM_SET( globals->glyph_scripts, - AF_SCRIPT_LIST_NONE, + /* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */ + FT_MEM_SET( globals->glyph_styles, + AF_STYLE_UNASSIGNED, globals->glyph_count ); error = FT_Select_Charmap( face, FT_ENCODING_UNICODE ); if ( error ) { - /* - * Ignore this error; we simply use the default script. - * XXX: Shouldn't we rather disable hinting? - */ - error = AF_Err_Ok; + /* + * Ignore this error; we simply use the fallback style. + * XXX: Shouldn't we rather disable hinting? + */ + error = FT_Err_Ok; goto Exit; } - /* scan each script in a Unicode charmap */ - for ( ss = 0; AF_SCRIPT_CLASSES_GET[ss]; ss++ ) + /* scan each style in a Unicode charmap */ + for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ ) { - AF_ScriptClass clazz = AF_SCRIPT_CLASSES_GET[ss]; + AF_StyleClass style_class = + AF_STYLE_CLASSES_GET[ss]; + AF_ScriptClass script_class = + AF_SCRIPT_CLASSES_GET[style_class->script]; AF_Script_UniRange range; - if ( clazz->script_uni_ranges == NULL ) + if ( script_class->script_uni_ranges == NULL ) continue; /* - * Scan all unicode points in the range and set the corresponding - * glyph script index. + * Scan all Unicode points in the range and set the corresponding + * glyph style index. */ - for ( range = clazz->script_uni_ranges; range->first != 0; range++ ) + if ( style_class->coverage == AF_COVERAGE_DEFAULT ) { - FT_ULong charcode = range->first; - FT_UInt gindex; + if ( (FT_UInt)style_class->script == + globals->module->default_script ) + dflt = ss; + for ( range = script_class->script_uni_ranges; + range->first != 0; + range++ ) + { + FT_ULong charcode = range->first; + FT_UInt gindex; - gindex = FT_Get_Char_Index( face, charcode ); - if ( gindex != 0 && - gindex < (FT_ULong)globals->glyph_count && - gscripts[gindex] == AF_SCRIPT_LIST_NONE ) - gscripts[gindex] = (FT_Byte)ss; + gindex = FT_Get_Char_Index( face, charcode ); - for (;;) - { - charcode = FT_Get_Next_Char( face, charcode, &gindex ); + if ( gindex != 0 && + gindex < (FT_ULong)globals->glyph_count && + gstyles[gindex] == AF_STYLE_UNASSIGNED ) + gstyles[gindex] = (FT_Byte)ss; + + for (;;) + { + charcode = FT_Get_Next_Char( face, charcode, &gindex ); - if ( gindex == 0 || charcode > range->last ) - break; + if ( gindex == 0 || charcode > range->last ) + break; - if ( gindex < (FT_ULong)globals->glyph_count && - gscripts[gindex] == AF_SCRIPT_LIST_NONE ) - gscripts[gindex] = (FT_Byte)ss; + if ( gindex < (FT_ULong)globals->glyph_count && + gstyles[gindex] == AF_STYLE_UNASSIGNED ) + gstyles[gindex] = (FT_Byte)ss; + } } } + else + { + /* get glyphs not directly addressable by cmap */ + af_get_coverage( globals, style_class, gstyles ); + } + } + + /* handle the default OpenType features of the default script ... */ + af_get_coverage( globals, AF_STYLE_CLASSES_GET[dflt], gstyles ); + + /* ... and the remaining default OpenType features */ + for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ ) + { + AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss]; + + + if ( ss != dflt && style_class->coverage == AF_COVERAGE_DEFAULT ) + af_get_coverage( globals, style_class, gstyles ); } /* mark ASCII digits */ @@ -149,28 +235,68 @@ if ( gindex != 0 && gindex < (FT_ULong)globals->glyph_count ) - gscripts[gindex] |= AF_DIGIT; + gstyles[gindex] |= AF_DIGIT; } Exit: /* - * By default, all uncovered glyphs are set to the latin script. + * By default, all uncovered glyphs are set to the fallback style. * XXX: Shouldn't we disable hinting or do something similar? */ + if ( globals->module->fallback_style != AF_STYLE_UNASSIGNED ) { FT_Long nn; for ( nn = 0; nn < globals->glyph_count; nn++ ) { - if ( ( gscripts[nn] & ~AF_DIGIT ) == AF_SCRIPT_LIST_NONE ) + if ( ( gstyles[nn] & ~AF_DIGIT ) == AF_STYLE_UNASSIGNED ) { - gscripts[nn] &= ~AF_SCRIPT_LIST_NONE; - gscripts[nn] |= AF_SCRIPT_LIST_DEFAULT; + gstyles[nn] &= ~AF_STYLE_UNASSIGNED; + gstyles[nn] |= globals->module->fallback_style; } } } +#ifdef FT_DEBUG_LEVEL_TRACE + + FT_TRACE4(( "\n" + "style coverage\n" + "==============\n" + "\n" )); + + for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ ) + { + AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss]; + FT_UInt count = 0; + FT_Long idx; + + + FT_TRACE4(( "%s:\n", af_style_names[style_class->style] )); + + for ( idx = 0; idx < globals->glyph_count; idx++ ) + { + if ( ( gstyles[idx] & ~AF_DIGIT ) == style_class->style ) + { + if ( !( count % 10 ) ) + FT_TRACE4(( " " )); + + FT_TRACE4(( " %d", idx )); + count++; + + if ( !( count % 10 ) ) + FT_TRACE4(( "\n" )); + } + } + + if ( !count ) + FT_TRACE4(( " (none)\n" )); + if ( count % 10 ) + FT_TRACE4(( "\n" )); + } + +#endif /* FT_DEBUG_LEVEL_TRACE */ + FT_Set_Charmap( face, old_charmap ); return error; } @@ -178,7 +304,8 @@ FT_LOCAL_DEF( FT_Error ) af_face_globals_new( FT_Face face, - AF_FaceGlobals *aglobals ) + AF_FaceGlobals *aglobals, + AF_Module module ) { FT_Error error; FT_Memory memory; @@ -187,21 +314,29 @@ memory = face->memory; - if ( !FT_ALLOC( globals, sizeof ( *globals ) + - face->num_glyphs * sizeof ( FT_Byte ) ) ) - { - globals->face = face; - globals->glyph_count = face->num_glyphs; - globals->glyph_scripts = (FT_Byte*)( globals + 1 ); + if ( FT_ALLOC( globals, sizeof ( *globals ) + + face->num_glyphs * sizeof ( FT_Byte ) ) ) + goto Exit; - error = af_face_globals_compute_script_coverage( globals ); - if ( error ) - { - af_face_globals_free( globals ); - globals = NULL; - } + globals->face = face; + globals->glyph_count = face->num_glyphs; + globals->glyph_styles = (FT_Byte*)( globals + 1 ); + globals->module = module; + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + globals->hb_font = hb_ft_font_create( face, NULL ); +#endif + + error = af_face_globals_compute_style_coverage( globals ); + if ( error ) + { + af_face_globals_free( globals ); + globals = NULL; } + else + globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX; + Exit: *aglobals = globals; return error; } @@ -216,25 +351,31 @@ FT_UInt nn; - for ( nn = 0; nn < AF_SCRIPT_MAX; nn++ ) + for ( nn = 0; nn < AF_STYLE_MAX; nn++ ) { if ( globals->metrics[nn] ) { - AF_ScriptClass clazz = AF_SCRIPT_CLASSES_GET[nn]; - + AF_StyleClass style_class = + AF_STYLE_CLASSES_GET[nn]; + AF_WritingSystemClass writing_system_class = + AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; - FT_ASSERT( globals->metrics[nn]->clazz == clazz ); - if ( clazz->script_metrics_done ) - clazz->script_metrics_done( globals->metrics[nn] ); + if ( writing_system_class->style_metrics_done ) + writing_system_class->style_metrics_done( globals->metrics[nn] ); FT_FREE( globals->metrics[nn] ); } } - globals->glyph_count = 0; - globals->glyph_scripts = NULL; /* no need to free this one! */ - globals->face = NULL; +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + hb_font_destroy( globals->hb_font ); + globals->hb_font = NULL; +#endif + + globals->glyph_count = 0; + globals->glyph_styles = NULL; /* no need to free this one! */ + globals->face = NULL; FT_FREE( globals ); } @@ -242,60 +383,64 @@ FT_LOCAL_DEF( FT_Error ) - af_face_globals_get_metrics( AF_FaceGlobals globals, - FT_UInt gindex, - FT_UInt options, - AF_ScriptMetrics *ametrics ) + af_face_globals_get_metrics( AF_FaceGlobals globals, + FT_UInt gindex, + FT_UInt options, + AF_StyleMetrics *ametrics ) { - AF_ScriptMetrics metrics = NULL; - FT_UInt gidx; - AF_ScriptClass clazz; - FT_UInt script = options & 15; - const FT_Offset script_max = sizeof ( AF_SCRIPT_CLASSES_GET ) / - sizeof ( AF_SCRIPT_CLASSES_GET[0] ); - FT_Error error = AF_Err_Ok; + AF_StyleMetrics metrics = NULL; + + AF_Style style = (AF_Style)options; + AF_WritingSystemClass writing_system_class; + AF_StyleClass style_class; + + FT_Error error = FT_Err_Ok; if ( gindex >= (FT_ULong)globals->glyph_count ) { - error = AF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } - gidx = script; - if ( gidx == 0 || gidx + 1 >= script_max ) - gidx = globals->glyph_scripts[gindex] & AF_SCRIPT_LIST_NONE; + /* if we have a forced style (via `options'), use it, */ + /* otherwise look into `glyph_styles' array */ + if ( style == AF_STYLE_NONE_DFLT || style + 1 >= AF_STYLE_MAX ) + style = (AF_Style)( globals->glyph_styles[gindex] & + AF_STYLE_UNASSIGNED ); - clazz = AF_SCRIPT_CLASSES_GET[gidx]; - if ( script == 0 ) - script = clazz->script; + style_class = AF_STYLE_CLASSES_GET[style]; + writing_system_class = AF_WRITING_SYSTEM_CLASSES_GET + [style_class->writing_system]; - metrics = globals->metrics[clazz->script]; + metrics = globals->metrics[style]; if ( metrics == NULL ) { - /* create the global metrics object when needed */ + /* create the global metrics object if necessary */ FT_Memory memory = globals->face->memory; - if ( FT_ALLOC( metrics, clazz->script_metrics_size ) ) + if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) ) goto Exit; - metrics->clazz = clazz; + metrics->style_class = style_class; + metrics->globals = globals; - if ( clazz->script_metrics_init ) + if ( writing_system_class->style_metrics_init ) { - error = clazz->script_metrics_init( metrics, globals->face ); + error = writing_system_class->style_metrics_init( metrics, + globals->face ); if ( error ) { - if ( clazz->script_metrics_done ) - clazz->script_metrics_done( metrics ); + if ( writing_system_class->style_metrics_done ) + writing_system_class->style_metrics_done( metrics ); FT_FREE( metrics ); goto Exit; } } - globals->metrics[clazz->script] = metrics; + globals->metrics[style] = metrics; } Exit: @@ -310,7 +455,7 @@ FT_UInt gindex ) { if ( gindex < (FT_ULong)globals->glyph_count ) - return (FT_Bool)( globals->glyph_scripts[gindex] & AF_DIGIT ); + return (FT_Bool)( globals->glyph_styles[gindex] & AF_DIGIT ); return (FT_Bool)0; } diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h index cc6860b..38d8d69 100644 --- a/src/autofit/afglobal.h +++ b/src/autofit/afglobal.h @@ -5,7 +5,7 @@ /* Auto-fitter routines to compute global hinting values */ /* (specification). */ /* */ -/* Copyright 2003-2005, 2007, 2009, 2011 by */ +/* Copyright 2003-2005, 2007, 2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,11 +22,66 @@ #include "aftypes.h" +#include "afmodule.h" +#include "hbshim.h" FT_BEGIN_HEADER + FT_LOCAL_ARRAY( AF_WritingSystemClass ) + af_writing_system_classes[]; + + +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class ) + +#include "afscript.h" + + FT_LOCAL_ARRAY( AF_ScriptClass ) + af_script_classes[]; + + +#undef STYLE +#define STYLE( s, S, d, ws, sc, ss, c ) \ + AF_DECLARE_STYLE_CLASS( af_ ## s ## _style_class ) + +#include "afstyles.h" + + FT_LOCAL_ARRAY( AF_StyleClass ) + af_style_classes[]; + + +#ifdef FT_DEBUG_LEVEL_TRACE + FT_LOCAL_ARRAY( char* ) + af_style_names[]; +#endif + + + /* + * Default values and flags for both autofitter globals (found in + * AF_ModuleRec) and face globals (in AF_FaceGlobalsRec). + */ + + /* index of fallback style in `af_style_classes' */ +#ifdef AF_CONFIG_OPTION_CJK +#define AF_STYLE_FALLBACK AF_STYLE_HANI_DFLT +#else +#define AF_STYLE_FALLBACK AF_STYLE_NONE_DFLT +#endif + /* default script for OpenType; ignored if HarfBuzz isn't used */ +#define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN + /* a bit mask indicating an uncovered glyph */ +#define AF_STYLE_UNASSIGNED 0x7F + /* if this flag is set, we have an ASCII digit */ +#define AF_DIGIT 0x80 + + /* `increase-x-height' property */ +#define AF_PROP_INCREASE_X_HEIGHT_MIN 6 +#define AF_PROP_INCREASE_X_HEIGHT_MAX 0 + + /************************************************************************/ /************************************************************************/ /***** *****/ @@ -37,21 +92,45 @@ FT_BEGIN_HEADER /* - * model the global hints data for a given face, decomposed into - * script-specific items + * Note that glyph_styles[] maps each glyph to an index into the + * `af_style_classes' array. + * */ - typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals; + typedef struct AF_FaceGlobalsRec_ + { + FT_Face face; + FT_Long glyph_count; /* same as face->num_glyphs */ + FT_Byte* glyph_styles; + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + hb_font_t* hb_font; +#endif + + /* per-face auto-hinter properties */ + FT_UInt increase_x_height; + AF_StyleMetrics metrics[AF_STYLE_MAX]; + + AF_Module module; /* to access global properties */ + + } AF_FaceGlobalsRec; + + + /* + * model the global hints data for a given face, decomposed into + * style-specific items + */ FT_LOCAL( FT_Error ) af_face_globals_new( FT_Face face, - AF_FaceGlobals *aglobals ); + AF_FaceGlobals *aglobals, + AF_Module module ); FT_LOCAL( FT_Error ) - af_face_globals_get_metrics( AF_FaceGlobals globals, - FT_UInt gindex, - FT_UInt options, - AF_ScriptMetrics *ametrics ); + af_face_globals_get_metrics( AF_FaceGlobals globals, + FT_UInt gindex, + FT_UInt options, + AF_StyleMetrics *ametrics ); FT_LOCAL( void ) af_face_globals_free( AF_FaceGlobals globals ); diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index f51066f..f3cc50f 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines (body). */ /* */ -/* Copyright 2003-2007, 2009-2011 by */ +/* Copyright 2003-2007, 2009-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -19,6 +19,17 @@ #include "afhints.h" #include "aferrors.h" #include FT_INTERNAL_CALC_H +#include FT_INTERNAL_DEBUG_H + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_afhints /* Get new segment for given axis. */ @@ -28,7 +39,7 @@ FT_Memory memory, AF_Segment *asegment ) { - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; AF_Segment segment = NULL; @@ -41,7 +52,7 @@ if ( old_max >= big_max ) { - error = AF_Err_Out_Of_Memory; + error = FT_THROW( Out_Of_Memory ); goto Exit; } @@ -63,16 +74,17 @@ } - /* Get new edge for given axis, direction, and position. */ + /* Get new edge for given axis, direction, and position, */ + /* without initializing the edge itself. */ FT_LOCAL( FT_Error ) af_axis_hints_new_edge( AF_AxisHints axis, FT_Int fpos, AF_Direction dir, FT_Memory memory, - AF_Edge *aedge ) + AF_Edge *anedge ) { - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; AF_Edge edge = NULL; AF_Edge edges; @@ -86,7 +98,7 @@ if ( old_max >= big_max ) { - error = AF_Err_Out_Of_Memory; + error = FT_THROW( Out_Of_Memory ); goto Exit; } @@ -119,12 +131,8 @@ axis->num_edges++; - FT_ZERO( edge ); - edge->fpos = (FT_Short)fpos; - edge->dir = (FT_Char)dir; - Exit: - *aedge = edge; + *anedge = edge; return error; } @@ -133,6 +141,17 @@ #include FT_CONFIG_STANDARD_LIBRARY_H + /* The dump functions are used in the `ftgrid' demo program, too. */ +#define AF_DUMP( varformat ) \ + do \ + { \ + if ( to_stdout ) \ + printf varformat; \ + else \ + FT_TRACE7( varformat ); \ + } while ( 0 ) + + static const char* af_dir_str( AF_Direction dir ) { @@ -161,43 +180,37 @@ } -#define AF_INDEX_NUM( ptr, base ) ( (ptr) ? ( (ptr) - (base) ) : -1 ) +#define AF_INDEX_NUM( ptr, base ) (int)( (ptr) ? ( (ptr) - (base) ) : -1 ) #ifdef __cplusplus extern "C" { #endif void - af_glyph_hints_dump_points( AF_GlyphHints hints ) + af_glyph_hints_dump_points( AF_GlyphHints hints, + FT_Bool to_stdout ) { AF_Point points = hints->points; AF_Point limit = points + hints->num_points; AF_Point point; - printf( "Table of points:\n" ); - printf( " [ index | xorg | yorg | xscale | yscale" - " | xfit | yfit | flags ]\n" ); + AF_DUMP(( "Table of points:\n" + " [ index | xorg | yorg | xscale | yscale" + " | xfit | yfit | flags ]\n" )); for ( point = points; point < limit; point++ ) - { - printf( " [ %5d | %5d | %5d | %6.2f | %6.2f" - " | %5.2f | %5.2f | %c%c%c%c%c%c ]\n", - point - points, - point->fx, - point->fy, - point->ox / 64.0, - point->oy / 64.0, - point->x / 64.0, - point->y / 64.0, - ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' ', - ( point->flags & AF_FLAG_INFLECTION ) ? 'i' : ' ', - ( point->flags & AF_FLAG_EXTREMA_X ) ? '<' : ' ', - ( point->flags & AF_FLAG_EXTREMA_Y ) ? 'v' : ' ', - ( point->flags & AF_FLAG_ROUND_X ) ? '(' : ' ', - ( point->flags & AF_FLAG_ROUND_Y ) ? 'u' : ' '); - } - printf( "\n" ); + AF_DUMP(( " [ %5d | %5d | %5d | %6.2f | %6.2f" + " | %5.2f | %5.2f | %c ]\n", + AF_INDEX_NUM( point, points ), + point->fx, + point->fy, + point->ox / 64.0, + point->oy / 64.0, + point->x / 64.0, + point->y / 64.0, + ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' ')); + AF_DUMP(( "\n" )); } #ifdef __cplusplus } @@ -226,7 +239,7 @@ if ( pos == 0 ) return "normal"; - temp[pos] = 0; + temp[pos] = '\0'; return temp; } @@ -238,7 +251,8 @@ extern "C" { #endif void - af_glyph_hints_dump_segments( AF_GlyphHints hints ) + af_glyph_hints_dump_segments( AF_GlyphHints hints, + FT_Bool to_stdout ) { FT_Int dimension; @@ -246,30 +260,41 @@ for ( dimension = 1; dimension >= 0; dimension-- ) { AF_AxisHints axis = &hints->axis[dimension]; + AF_Point points = hints->points; + AF_Edge edges = axis->edges; AF_Segment segments = axis->segments; AF_Segment limit = segments + axis->num_segments; AF_Segment seg; - printf ( "Table of %s segments:\n", - dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" ); - printf ( " [ index | pos | dir | link | serif |" - " height | extra | flags ]\n" ); + AF_DUMP(( "Table of %s segments:\n", + dimension == AF_DIMENSION_HORZ ? "vertical" + : "horizontal" )); + if ( axis->num_segments ) + AF_DUMP(( " [ index | pos | dir | from" + " | to | link | serif | edge" + " | height | extra | flags ]\n" )); + else + AF_DUMP(( " (none)\n" )); for ( seg = segments; seg < limit; seg++ ) - { - printf ( " [ %5d | %5.2g | %5s | %4d | %5d | %6d | %5d | %11s ]\n", - seg - segments, - dimension == AF_DIMENSION_HORZ ? (int)seg->first->ox / 64.0 - : (int)seg->first->oy / 64.0, - af_dir_str( (AF_Direction)seg->dir ), - AF_INDEX_NUM( seg->link, segments ), - AF_INDEX_NUM( seg->serif, segments ), - seg->height, - seg->height - ( seg->max_coord - seg->min_coord ), - af_edge_flags_to_string( (AF_Edge_Flags)seg->flags ) ); - } - printf( "\n" ); + AF_DUMP(( " [ %5d | %5.2g | %5s | %4d" + " | %4d | %4d | %5d | %4d" + " | %6d | %5d | %11s ]\n", + AF_INDEX_NUM( seg, segments ), + dimension == AF_DIMENSION_HORZ + ? (int)seg->first->ox / 64.0 + : (int)seg->first->oy / 64.0, + af_dir_str( (AF_Direction)seg->dir ), + AF_INDEX_NUM( seg->first, points ), + AF_INDEX_NUM( seg->last, points ), + AF_INDEX_NUM( seg->link, segments ), + AF_INDEX_NUM( seg->serif, segments ), + AF_INDEX_NUM( seg->edge, edges ), + seg->height, + seg->height - ( seg->max_coord - seg->min_coord ), + af_edge_flags_to_string( (AF_Edge_Flags)seg->flags ) )); + AF_DUMP(( "\n" )); } } #ifdef __cplusplus @@ -296,7 +321,7 @@ axis = &hints->axis[dim]; *num_segments = axis->num_segments; - return AF_Err_Ok; + return FT_Err_Ok; } #ifdef __cplusplus } @@ -312,7 +337,9 @@ af_glyph_hints_get_segment_offset( AF_GlyphHints hints, FT_Int dimension, FT_Int idx, - FT_Pos* offset ) + FT_Pos *offset, + FT_Bool *is_blue, + FT_Pos *blue_offset ) { AF_Dimension dim; AF_AxisHints axis; @@ -320,20 +347,29 @@ if ( !offset ) - return AF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); dim = ( dimension == 0 ) ? AF_DIMENSION_HORZ : AF_DIMENSION_VERT; axis = &hints->axis[dim]; if ( idx < 0 || idx >= axis->num_segments ) - return AF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); + + seg = &axis->segments[idx]; + *offset = ( dim == AF_DIMENSION_HORZ ) ? seg->first->ox + : seg->first->oy; + if ( seg->edge ) + *is_blue = (FT_Bool)( seg->edge->blue_edge != 0 ); + else + *is_blue = FALSE; - seg = &axis->segments[idx]; - *offset = (dim == AF_DIMENSION_HORZ) ? seg->first->ox - : seg->first->oy; + if ( *is_blue ) + *blue_offset = seg->edge->blue_edge->cur; + else + *blue_offset = 0; - return AF_Err_Ok; + return FT_Err_Ok; } #ifdef __cplusplus } @@ -346,7 +382,8 @@ extern "C" { #endif void - af_glyph_hints_dump_edges( AF_GlyphHints hints ) + af_glyph_hints_dump_edges( AF_GlyphHints hints, + FT_Bool to_stdout ) { FT_Int dimension; @@ -363,92 +400,35 @@ * note: AF_DIMENSION_HORZ corresponds to _vertical_ edges * since they have a constant X coordinate. */ - printf ( "Table of %s edges:\n", - dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" ); - printf ( " [ index | pos | dir | link |" - " serif | blue | opos | pos | flags ]\n" ); + AF_DUMP(( "Table of %s edges:\n", + dimension == AF_DIMENSION_HORZ ? "vertical" + : "horizontal" )); + if ( axis->num_edges ) + AF_DUMP(( " [ index | pos | dir | link" + " | serif | blue | opos | pos | flags ]\n" )); + else + AF_DUMP(( " (none)\n" )); for ( edge = edges; edge < limit; edge++ ) - { - printf ( " [ %5d | %5.2g | %5s | %4d |" - " %5d | %c | %5.2f | %5.2f | %11s ]\n", - edge - edges, - (int)edge->opos / 64.0, - af_dir_str( (AF_Direction)edge->dir ), - AF_INDEX_NUM( edge->link, edges ), - AF_INDEX_NUM( edge->serif, edges ), - edge->blue_edge ? 'y' : 'n', - edge->opos / 64.0, - edge->pos / 64.0, - af_edge_flags_to_string( (AF_Edge_Flags)edge->flags ) ); - } - printf( "\n" ); + AF_DUMP(( " [ %5d | %5.2g | %5s | %4d" + " | %5d | %c | %5.2f | %5.2f | %11s ]\n", + AF_INDEX_NUM( edge, edges ), + (int)edge->opos / 64.0, + af_dir_str( (AF_Direction)edge->dir ), + AF_INDEX_NUM( edge->link, edges ), + AF_INDEX_NUM( edge->serif, edges ), + edge->blue_edge ? 'y' : 'n', + edge->opos / 64.0, + edge->pos / 64.0, + af_edge_flags_to_string( (AF_Edge_Flags)edge->flags ) )); + AF_DUMP(( "\n" )); } } #ifdef __cplusplus } #endif -#else /* !FT_DEBUG_AUTOFIT */ - - /* these empty stubs are only used to link the `ftgrid' test program */ - /* if debugging is disabled */ - -#ifdef __cplusplus - extern "C" { -#endif - - void - af_glyph_hints_dump_points( AF_GlyphHints hints ) - { - FT_UNUSED( hints ); - } - - - void - af_glyph_hints_dump_segments( AF_GlyphHints hints ) - { - FT_UNUSED( hints ); - } - - - FT_Error - af_glyph_hints_get_num_segments( AF_GlyphHints hints, - FT_Int dimension, - FT_Int* num_segments ) - { - FT_UNUSED( hints ); - FT_UNUSED( dimension ); - FT_UNUSED( num_segments ); - - return 0; - } - - - FT_Error - af_glyph_hints_get_segment_offset( AF_GlyphHints hints, - FT_Int dimension, - FT_Int idx, - FT_Pos* offset ) - { - FT_UNUSED( hints ); - FT_UNUSED( dimension ); - FT_UNUSED( idx ); - FT_UNUSED( offset ); - - return 0; - } - - - void - af_glyph_hints_dump_edges( AF_GlyphHints hints ) - { - FT_UNUSED( hints ); - } - -#ifdef __cplusplus - } -#endif +#undef AF_DUMP #endif /* !FT_DEBUG_AUTOFIT */ @@ -494,8 +474,8 @@ } } - /* return no direction if arm lengths differ too much */ - /* (value 14 is heuristic) */ + /* return no direction if arm lengths differ too much */ + /* (value 14 is heuristic, corresponding to approx. 4.1 degrees) */ ss *= 14; if ( FT_ABS( ll ) <= FT_ABS( ss ) ) dir = AF_DIR_NONE; @@ -516,48 +496,48 @@ FT_LOCAL_DEF( void ) af_glyph_hints_done( AF_GlyphHints hints ) { - if ( hints && hints->memory ) - { - FT_Memory memory = hints->memory; - int dim; + FT_Memory memory = hints->memory; + int dim; - /* - * note that we don't need to free the segment and edge - * buffers since they are really within the hints->points array - */ - for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ ) - { - AF_AxisHints axis = &hints->axis[dim]; + if ( !( hints && hints->memory ) ) + return; + /* + * note that we don't need to free the segment and edge + * buffers since they are really within the hints->points array + */ + for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ ) + { + AF_AxisHints axis = &hints->axis[dim]; - axis->num_segments = 0; - axis->max_segments = 0; - FT_FREE( axis->segments ); - axis->num_edges = 0; - axis->max_edges = 0; - FT_FREE( axis->edges ); - } + axis->num_segments = 0; + axis->max_segments = 0; + FT_FREE( axis->segments ); - FT_FREE( hints->contours ); - hints->max_contours = 0; - hints->num_contours = 0; + axis->num_edges = 0; + axis->max_edges = 0; + FT_FREE( axis->edges ); + } - FT_FREE( hints->points ); - hints->num_points = 0; - hints->max_points = 0; + FT_FREE( hints->contours ); + hints->max_contours = 0; + hints->num_contours = 0; - hints->memory = NULL; - } + FT_FREE( hints->points ); + hints->num_points = 0; + hints->max_points = 0; + + hints->memory = NULL; } /* Reset metrics. */ FT_LOCAL_DEF( void ) - af_glyph_hints_rescale( AF_GlyphHints hints, - AF_ScriptMetrics metrics ) + af_glyph_hints_rescale( AF_GlyphHints hints, + AF_StyleMetrics metrics ) { hints->metrics = metrics; hints->scaler_flags = metrics->scaler.flags; @@ -571,7 +551,7 @@ af_glyph_hints_reload( AF_GlyphHints hints, FT_Outline* outline ) { - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; AF_Point points; FT_UInt old_max, new_max; FT_Fixed x_scale = hints->x_scale; @@ -663,6 +643,9 @@ for ( point = points; point < point_limit; point++, vec++, tag++ ) { + point->in_dir = (FT_Char)AF_DIR_NONE; + point->out_dir = (FT_Char)AF_DIR_NONE; + point->fx = (FT_Short)vec->x; point->fy = (FT_Short)vec->y; point->ox = point->x = FT_MulFix( vec->x, x_scale ) + x_delta; @@ -710,60 +693,228 @@ } } - /* compute directions of in & out vectors */ { - AF_Point first = points; - AF_Point prev = NULL; - FT_Pos in_x = 0; - FT_Pos in_y = 0; - AF_Direction in_dir = AF_DIR_NONE; + /* + * Compute directions of `in' and `out' vectors. + * + * Note that distances between points that are very near to each + * other are accumulated. In other words, the auto-hinter + * prepends the small vectors between near points to the first + * non-near vector. All intermediate points are tagged as + * weak; the directions are adjusted also to be equal to the + * accumulated one. + */ + + /* value 20 in `near_limit' is heuristic */ + FT_UInt units_per_em = hints->metrics->scaler.face->units_per_EM; + FT_Int near_limit = 20 * units_per_em / 2048; + FT_Int near_limit2 = 2 * near_limit - 1; + + AF_Point* contour; + AF_Point* contour_limit = hints->contours + hints->num_contours; + + + for ( contour = hints->contours; contour < contour_limit; contour++ ) + { + AF_Point first = *contour; + AF_Point next, prev, curr; + FT_Pos out_x, out_y; + + FT_Bool is_first; - for ( point = points; point < point_limit; point++ ) - { - AF_Point next; - FT_Pos out_x, out_y; + /* since the first point of a contour could be part of a */ + /* series of near points, go backwards to find the first */ + /* non-near point and adjust `first' */ - if ( point == first ) + point = first; + prev = first->prev; + + while ( prev != first ) { - prev = first->prev; - in_x = first->fx - prev->fx; - in_y = first->fy - prev->fy; - in_dir = af_direction_compute( in_x, in_y ); - first = prev + 1; + out_x = point->fx - prev->fx; + out_y = point->fy - prev->fy; + + /* + * We use Taxicab metrics to measure the vector length. + * + * Note that the accumulated distances so far could have the + * opposite direction of the distance measured here. For this + * reason we use `near_limit2' for the comparison to get a + * non-near point even in the worst case. + */ + if ( FT_ABS( out_x ) + FT_ABS( out_y ) >= near_limit2 ) + break; + + point = prev; + prev = prev->prev; } - point->in_dir = (FT_Char)in_dir; + /* adjust first point */ + first = point; + + /* now loop over all points of the contour to get */ + /* `in' and `out' vector directions */ - next = point->next; - out_x = next->fx - point->fx; - out_y = next->fy - point->fy; + curr = first; - in_dir = af_direction_compute( out_x, out_y ); - point->out_dir = (FT_Char)in_dir; + /* + * We abuse the `u' and `v' fields to store index deltas to the + * next and previous non-near point, respectively. + * + * To avoid problems with not having non-near points, we point to + * `first' by default as the next non-near point. + * + */ + curr->u = (FT_Pos)( first - curr ); + first->v = -curr->u; - /* check for weak points */ + out_x = 0; + out_y = 0; - if ( point->flags & ( AF_FLAG_CONIC | AF_FLAG_CUBIC ) ) + is_first = 1; + + for ( point = first; + point != first || is_first; + point = point->next ) { + AF_Direction out_dir; + + + is_first = 0; + + next = point->next; + + out_x += next->fx - point->fx; + out_y += next->fy - point->fy; + + if ( FT_ABS( out_x ) + FT_ABS( out_y ) < near_limit ) + { + next->flags |= AF_FLAG_WEAK_INTERPOLATION; + continue; + } + + curr->u = (FT_Pos)( next - curr ); + next->v = -curr->u; + + out_dir = af_direction_compute( out_x, out_y ); + + /* adjust directions for all points inbetween; */ + /* the loop also updates position of `curr' */ + curr->out_dir = (FT_Char)out_dir; + for ( curr = curr->next; curr != next; curr = curr->next ) + { + curr->in_dir = (FT_Char)out_dir; + curr->out_dir = (FT_Char)out_dir; + } + next->in_dir = (FT_Char)out_dir; + + curr->u = (FT_Pos)( first - curr ); + first->v = -curr->u; + + out_x = 0; + out_y = 0; + } + } + + /* + * The next step is to `simplify' an outline's topology so that we + * can identify local extrema more reliably: A series of + * non-horizontal or non-vertical vectors pointing into the same + * quadrant are handled as a single, long vector. From a + * topological point of the view, the intermediate points are of no + * interest and thus tagged as weak. + */ + + for ( point = points; point < point_limit; point++ ) + { + if ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) + continue; + + if ( point->in_dir == AF_DIR_NONE && + point->out_dir == AF_DIR_NONE ) + { + /* check whether both vectors point into the same quadrant */ + + FT_Pos in_x, in_y; + FT_Pos out_x, out_y; + + AF_Point next_u = point + point->u; + AF_Point prev_v = point + point->v; + + + in_x = point->fx - prev_v->fx; + in_y = point->fy - prev_v->fy; + + out_x = next_u->fx - point->fx; + out_y = next_u->fy - point->fy; + + if ( ( in_x ^ out_x ) >= 0 && ( in_y ^ out_y ) >= 0 ) + { + /* yes, so tag current point as weak */ + /* and update index deltas */ + + point->flags |= AF_FLAG_WEAK_INTERPOLATION; + + prev_v->u = (FT_Pos)( next_u - prev_v ); + next_u->v = -prev_v->u; + } + } + } + + /* + * Finally, check for remaining weak points. Everything else not + * collected in edges so far is then implicitly classified as strong + * points. + */ + + for ( point = points; point < point_limit; point++ ) + { + if ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) + continue; + + if ( point->flags & AF_FLAG_CONTROL ) + { + /* control points are always weak */ Is_Weak_Point: point->flags |= AF_FLAG_WEAK_INTERPOLATION; } else if ( point->out_dir == point->in_dir ) { if ( point->out_dir != AF_DIR_NONE ) + { + /* current point lies on a horizontal or */ + /* vertical segment (but doesn't start or end it) */ goto Is_Weak_Point; + } - if ( ft_corner_is_flat( in_x, in_y, out_x, out_y ) ) - goto Is_Weak_Point; + { + AF_Point next_u = point + point->u; + AF_Point prev_v = point + point->v; + + + if ( ft_corner_is_flat( point->fx - prev_v->fx, + point->fy - prev_v->fy, + next_u->fx - point->fx, + next_u->fy - point->fy ) ) + { + /* either the `in' or the `out' vector is much more */ + /* dominant than the other one, so tag current point */ + /* as weak and update index deltas */ + + prev_v->u = (FT_Pos)( next_u - prev_v ); + next_u->v = -prev_v->u; + + goto Is_Weak_Point; + } + } } else if ( point->in_dir == -point->out_dir ) + { + /* current point forms a spike */ goto Is_Weak_Point; - - in_x = out_x; - in_y = out_y; - prev = point; + } } } } @@ -920,8 +1071,7 @@ /* if this point is candidate to weak interpolation, we */ /* interpolate it after all strong points have been processed */ - if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) && - !( point->flags & AF_FLAG_INFLECTION ) ) + if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ) continue; if ( dim == AF_DIMENSION_VERT ) @@ -1177,8 +1327,6 @@ } } - point = points; - for ( ; contour < contour_limit; contour++ ) { AF_Point first_touched, last_touched; @@ -1201,7 +1349,6 @@ } first_touched = point; - last_touched = point; for (;;) { diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h index 1c52e0d..92101de 100644 --- a/src/autofit/afhints.h +++ b/src/autofit/afhints.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines (specification). */ /* */ -/* Copyright 2003-2008, 2010-2011 by */ +/* Copyright 2003-2008, 2010-2012, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,7 +27,7 @@ FT_BEGIN_HEADER /* * The definition of outline glyph hints. These are shared by all - * script analysis routines (until now). + * writing system analysis routines (until now). */ typedef enum AF_Dimension_ @@ -62,33 +62,34 @@ FT_BEGIN_HEADER * * by David Turner and Werner Lemberg * - * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf + * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf + * + * with appropriate updates. * * * Segments * * `af_{cjk,latin,...}_hints_compute_segments' are the functions to - * find segments in an outline. A segment is a series of consecutive - * points that are approximately aligned along a coordinate axis. The - * analysis to do so is specific to a script. + * find segments in an outline. * - * A segment must have at least two points, except in the case of - * `fake' segments that are generated to hint metrics appropriately, - * and which consist of a single point. + * A segment is a series of at least two consecutive points that are + * approximately aligned along a coordinate axis. The analysis to do + * so is specific to a writing system. * * * Edges * + * `af_{cjk,latin,...}_hints_compute_edges' are the functions to find + * edges. + * * As soon as segments are defined, the auto-hinter groups them into * edges. An edge corresponds to a single position on the main * dimension that collects one or more segments (allowing for a small * threshold). * - * The auto-hinter first tries to grid fit edges, then to align - * segments on the edges unless it detects that they form a serif. - * - * `af_{cjk,latin,...}_hints_compute_edges' are the functions to find - * edges; they are specific to a script. + * As an example, the `latin' writing system first tries to grid-fit + * edges, then to align segments on the edges unless it detects that + * they form a serif. * * * A H @@ -107,6 +108,8 @@ FT_BEGIN_HEADER * * Stems * + * Stems are detected by `af_{cjk,latin,...}_hint_edges'. + * * Segments need to be `linked' to other ones in order to detect stems. * A stem is made of two segments that face each other in opposite * directions and that are sufficiently close to each other. Using @@ -127,17 +130,21 @@ FT_BEGIN_HEADER * The best candidate is stored in field `link' in structure * `AF_Segment'. * - * Stems are detected by `af_{cjk,latin,...}_hint_edges'. - * * In the above ASCII drawing, the best candidate for both AB and CD is * GH, while the best candidate for GH is AB. Similarly, the best * candidate for EF and GH is AB, while the best candidate for AB is * GH. * + * The detection and handling of stems is dependent on the writing + * system. + * * * Serifs * - * On the opposite, a serif has + * Serifs are detected by `af_{cjk,latin,...}_hint_edges'. + * + * In comparison to a stem, a serif (as handled by the auto-hinter + * module that takes care of the `latin' writing system) has * * best segment_1 = segment_2 && best segment_2 != segment_1 * @@ -147,8 +154,6 @@ FT_BEGIN_HEADER * The best candidate is stored in field `serif' in structure * `AF_Segment' (and `link' is set to NULL). * - * Serifs are detected by `af_{cjk,latin,...}_hint_edges'. - * * * Touched points * @@ -169,18 +174,19 @@ FT_BEGIN_HEADER * * Strong Points * - * Experience has shown that points which are not part of an edge need - * to be interpolated linearly between their two closest edges, even if - * these are not part of the contour of those particular points. - * Typical candidates for this are + * Experience has shown that points not part of an edge need to be + * interpolated linearly between their two closest edges, even if these + * are not part of the contour of those particular points. Typical + * candidates for this are * * - angle points (i.e., points where the `in' and `out' direction * differ greatly) * * - inflection points (i.e., where the `in' and `out' angles are the - * same, but the curvature changes sign) + * same, but the curvature changes sign) [currently, such points + * aren't handled specially in the auto-hinter] * - * `af_glyph_hints_align_strong_points' is the function which takes + * `af_glyph_hints_align_strong_points' is the function that takes * care of such situations; it is equivalent to the TrueType `IP' * hinting instruction. * @@ -210,23 +216,12 @@ FT_BEGIN_HEADER AF_FLAG_CUBIC = 1 << 1, AF_FLAG_CONTROL = AF_FLAG_CONIC | AF_FLAG_CUBIC, - /* point extremum flags */ - AF_FLAG_EXTREMA_X = 1 << 2, - AF_FLAG_EXTREMA_Y = 1 << 3, - - /* point roundness flags */ - AF_FLAG_ROUND_X = 1 << 4, - AF_FLAG_ROUND_Y = 1 << 5, - /* point touch flags */ - AF_FLAG_TOUCH_X = 1 << 6, - AF_FLAG_TOUCH_Y = 1 << 7, + AF_FLAG_TOUCH_X = 1 << 2, + AF_FLAG_TOUCH_Y = 1 << 3, /* candidates for weak interpolation have this flag set */ - AF_FLAG_WEAK_INTERPOLATION = 1 << 8, - - /* all inflection points in the outline have this flag set */ - AF_FLAG_INFLECTION = 1 << 9 + AF_FLAG_WEAK_INTERPOLATION = 1 << 4 } AF_Flags; @@ -234,10 +229,11 @@ FT_BEGIN_HEADER /* edge hint flags */ typedef enum AF_Edge_Flags_ { - AF_EDGE_NORMAL = 0, - AF_EDGE_ROUND = 1 << 0, - AF_EDGE_SERIF = 1 << 1, - AF_EDGE_DONE = 1 << 2 + AF_EDGE_NORMAL = 0, + AF_EDGE_ROUND = 1 << 0, + AF_EDGE_SERIF = 1 << 1, + AF_EDGE_DONE = 1 << 2, + AF_EDGE_NEUTRAL = 1 << 3 /* set if edge aligns to a neutral blue zone */ } AF_Edge_Flags; @@ -254,7 +250,7 @@ FT_BEGIN_HEADER FT_Char out_dir; /* direction of outwards vector */ FT_Pos ox, oy; /* original, scaled position */ - FT_Short fx, fy; /* original, unscaled position (font units) */ + FT_Short fx, fy; /* original, unscaled position (in font units) */ FT_Pos x, y; /* current position */ FT_Pos u, v; /* current (x,y) or (y,x) depending on context */ @@ -290,19 +286,19 @@ FT_BEGIN_HEADER typedef struct AF_EdgeRec_ { - FT_Short fpos; /* original, unscaled position (font units) */ - FT_Pos opos; /* original, scaled position */ - FT_Pos pos; /* current position */ + FT_Short fpos; /* original, unscaled position (in font units) */ + FT_Pos opos; /* original, scaled position */ + FT_Pos pos; /* current position */ FT_Byte flags; /* edge flags */ FT_Char dir; /* edge direction */ FT_Fixed scale; /* used to speed up interpolation between edges */ - AF_Width blue_edge; /* non-NULL if this is a blue edge */ - AF_Edge link; /* link edge */ - AF_Edge serif; /* primary edge for serifs */ - FT_Short num_linked; /* number of linked edges */ - FT_Int score; /* used during stem matching */ + AF_Width blue_edge; /* non-NULL if this is a blue edge */ + AF_Edge link; /* link edge */ + AF_Edge serif; /* primary edge for serifs */ + FT_Short num_linked; /* number of linked edges */ + FT_Int score; /* used during stem matching */ AF_Segment first; /* first segment in edge */ AF_Segment last; /* last segment in edge */ @@ -330,31 +326,31 @@ FT_BEGIN_HEADER typedef struct AF_GlyphHintsRec_ { - FT_Memory memory; + FT_Memory memory; - FT_Fixed x_scale; - FT_Pos x_delta; + FT_Fixed x_scale; + FT_Pos x_delta; - FT_Fixed y_scale; - FT_Pos y_delta; + FT_Fixed y_scale; + FT_Pos y_delta; - FT_Int max_points; /* number of allocated points */ - FT_Int num_points; /* number of used points */ - AF_Point points; /* points array */ + FT_Int max_points; /* number of allocated points */ + FT_Int num_points; /* number of used points */ + AF_Point points; /* points array */ - FT_Int max_contours; /* number of allocated contours */ - FT_Int num_contours; /* number of used contours */ - AF_Point* contours; /* contours array */ + FT_Int max_contours; /* number of allocated contours */ + FT_Int num_contours; /* number of used contours */ + AF_Point* contours; /* contours array */ - AF_AxisHintsRec axis[AF_DIMENSION_MAX]; + AF_AxisHintsRec axis[AF_DIMENSION_MAX]; - FT_UInt32 scaler_flags; /* copy of scaler flags */ - FT_UInt32 other_flags; /* free for script-specific */ - /* implementations */ - AF_ScriptMetrics metrics; + FT_UInt32 scaler_flags; /* copy of scaler flags */ + FT_UInt32 other_flags; /* free for style-specific */ + /* implementations */ + AF_StyleMetrics metrics; - FT_Pos xmin_delta; /* used for warping */ - FT_Pos xmax_delta; + FT_Pos xmin_delta; /* used for warping */ + FT_Pos xmax_delta; } AF_GlyphHintsRec; @@ -416,8 +412,8 @@ FT_BEGIN_HEADER FT_Memory memory ); FT_LOCAL( void ) - af_glyph_hints_rescale( AF_GlyphHints hints, - AF_ScriptMetrics metrics ); + af_glyph_hints_rescale( AF_GlyphHints hints, + AF_StyleMetrics metrics ); FT_LOCAL( FT_Error ) af_glyph_hints_reload( AF_GlyphHints hints, diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c index 9c74838..197881b 100644 --- a/src/autofit/afindic.c +++ b/src/autofit/afindic.c @@ -2,9 +2,9 @@ /* */ /* afindic.c */ /* */ -/* Auto-fitter hinting routines for Indic scripts (body). */ +/* Auto-fitter hinting routines for Indic writing system (body). */ /* */ -/* Copyright 2007, 2011 by */ +/* Copyright 2007, 2011-2013 by */ /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -46,7 +46,7 @@ face->charmap = NULL; else { - af_cjk_metrics_init_widths( metrics, face, 0x7530 ); + af_cjk_metrics_init_widths( metrics, face ); #if 0 /* either need indic specific blue_chars[] or just skip blue zones */ af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars ); @@ -56,7 +56,7 @@ FT_Set_Charmap( face, oldmap ); - return AF_Err_Ok; + return FT_Err_Ok; } @@ -97,58 +97,41 @@ /*************************************************************************/ - static const AF_Script_UniRangeRec af_indic_uniranges[] = - { -#if 0 - AF_UNIRANGE_REC( 0x0100UL, 0xFFFFUL ), /* why this? */ -#endif - AF_UNIRANGE_REC( 0x0900UL, 0x0DFFUL), /* Indic Range */ - AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL), /* Tibetan */ - AF_UNIRANGE_REC( 0x1900UL, 0x194FUL), /* Limbu */ - AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL), /* Sundanese */ - AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL), /* Meetei Mayak */ - AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL), /* Syloti Nagri */ - AF_UNIRANGE_REC( 0x11800UL, 0x118DFUL), /* Sharada */ - AF_UNIRANGE_REC( 0UL, 0UL) - }; - + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_indic_writing_system_class, - AF_DEFINE_SCRIPT_CLASS( af_indic_script_class, - AF_SCRIPT_INDIC, - af_indic_uniranges, + AF_WRITING_SYSTEM_INDIC, sizeof ( AF_CJKMetricsRec ), - (AF_Script_InitMetricsFunc) af_indic_metrics_init, - (AF_Script_ScaleMetricsFunc)af_indic_metrics_scale, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) af_indic_metrics_init, + (AF_WritingSystem_ScaleMetricsFunc)af_indic_metrics_scale, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) af_indic_hints_init, - (AF_Script_ApplyHintsFunc) af_indic_hints_apply + (AF_WritingSystem_InitHintsFunc) af_indic_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_indic_hints_apply ) + #else /* !AF_CONFIG_OPTION_INDIC */ - static const AF_Script_UniRangeRec af_indic_uniranges[] = - { - { 0, 0 } - }; + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_indic_writing_system_class, - AF_DEFINE_SCRIPT_CLASS( af_indic_script_class, - AF_SCRIPT_INDIC, - af_indic_uniranges, + AF_WRITING_SYSTEM_INDIC, sizeof ( AF_CJKMetricsRec ), - (AF_Script_InitMetricsFunc) NULL, - (AF_Script_ScaleMetricsFunc)NULL, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) NULL, + (AF_WritingSystem_ScaleMetricsFunc)NULL, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) NULL, - (AF_Script_ApplyHintsFunc) NULL + (AF_WritingSystem_InitHintsFunc) NULL, + (AF_WritingSystem_ApplyHintsFunc) NULL ) + #endif /* !AF_CONFIG_OPTION_INDIC */ diff --git a/src/autofit/afindic.h b/src/autofit/afindic.h index 662a982..9e13cf7 100644 --- a/src/autofit/afindic.h +++ b/src/autofit/afindic.h @@ -2,9 +2,10 @@ /* */ /* afindic.h */ /* */ -/* Auto-fitter hinting routines for Indic scripts (specification). */ +/* Auto-fitter hinting routines for Indic writing system */ +/* (specification). */ /* */ -/* Copyright 2007 by */ +/* Copyright 2007, 2012, 2013 by */ /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,9 +26,9 @@ FT_BEGIN_HEADER - /* the Indic-specific script class */ + /* the `indic' writing system */ - AF_DECLARE_SCRIPT_CLASS(af_indic_script_class) + AF_DECLARE_WRITING_SYSTEM_CLASS( af_indic_writing_system_class ) /* */ diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 30145a2..36a3689 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -2,9 +2,9 @@ /* */ /* aflatin.c */ /* */ -/* Auto-fitter hinting routines for latin script (body). */ +/* Auto-fitter hinting routines for latin writing system (body). */ /* */ -/* Copyright 2003-2011 by */ +/* Copyright 2003-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,6 +20,8 @@ #include FT_ADVANCES_H #include FT_INTERNAL_DEBUG_H +#include "afglobal.h" +#include "afpic.h" #include "aflatin.h" #include "aferrors.h" @@ -53,29 +55,85 @@ FT_LOCAL_DEF( void ) af_latin_metrics_init_widths( AF_LatinMetrics metrics, - FT_Face face, - FT_ULong charcode ) + FT_Face face ) { /* scan the array of segments in each direction */ AF_GlyphHintsRec hints[1]; + FT_TRACE5(( "\n" + "latin standard widths computation (style `%s')\n" + "=====================================================\n" + "\n", + af_style_names[metrics->root.style_class->style] )); + af_glyph_hints_init( hints, face->memory ); metrics->axis[AF_DIMENSION_HORZ].width_count = 0; metrics->axis[AF_DIMENSION_VERT].width_count = 0; { - FT_Error error; - FT_UInt glyph_index; - int dim; - AF_LatinMetricsRec dummy[1]; - AF_Scaler scaler = &dummy->root.scaler; + FT_Error error; + FT_ULong glyph_index; + FT_Long y_offset; + int dim; + AF_LatinMetricsRec dummy[1]; + AF_Scaler scaler = &dummy->root.scaler; + +#ifdef FT_CONFIG_OPTION_PIC + AF_FaceGlobals globals = metrics->root.globals; +#endif + AF_StyleClass style_class = metrics->root.style_class; + AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET + [style_class->script]; - glyph_index = FT_Get_Char_Index( face, charcode ); - if ( glyph_index == 0 ) - goto Exit; + FT_UInt32 standard_char; + + + /* + * We check more than a single standard character to catch features + * like `c2sc' (small caps from caps) that don't contain lowercase + * letters by definition, or other features that mainly operate on + * numerals. + */ + + standard_char = script_class->standard_char1; + af_get_char_index( &metrics->root, + standard_char, + &glyph_index, + &y_offset ); + if ( !glyph_index ) + { + if ( script_class->standard_char2 ) + { + standard_char = script_class->standard_char2; + af_get_char_index( &metrics->root, + standard_char, + &glyph_index, + &y_offset ); + if ( !glyph_index ) + { + if ( script_class->standard_char3 ) + { + standard_char = script_class->standard_char3; + af_get_char_index( &metrics->root, + standard_char, + &glyph_index, + &y_offset ); + if ( !glyph_index ) + goto Exit; + } + else + goto Exit; + } + } + else + goto Exit; + } + + FT_TRACE5(( "standard character: U+%04lX (glyph index %d)\n", + standard_char, glyph_index )); error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); if ( error || face->glyph->outline.n_points <= 0 ) @@ -94,7 +152,7 @@ scaler->render_mode = FT_RENDER_MODE_NORMAL; scaler->flags = 0; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy ); error = af_glyph_hints_reload( hints, &face->glyph->outline ); if ( error ) @@ -113,7 +171,15 @@ if ( error ) goto Exit; + /* + * We assume that the glyphs selected for the stem width + * computation are `featureless' enough so that the linking + * algorithm works fine without adjustments of its scoring + * function. + */ af_latin_hints_link_segments( hints, + 0, + NULL, (AF_Dimension)dim ); seg = axhints->segments; @@ -138,46 +204,51 @@ } } - af_sort_widths( num_widths, axis->widths ); + /* this also replaces multiple almost identical stem widths */ + /* with a single one (the value 100 is heuristic) */ + af_sort_and_quantize_widths( &num_widths, axis->widths, + dummy->units_per_em / 100 ); axis->width_count = num_widths; } - Exit: + Exit: for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ ) { AF_LatinAxis axis = &metrics->axis[dim]; FT_Pos stdw; - stdw = ( axis->width_count > 0 ) - ? axis->widths[0].org - : AF_LATIN_CONSTANT( metrics, 50 ); + stdw = ( axis->width_count > 0 ) ? axis->widths[0].org + : AF_LATIN_CONSTANT( metrics, 50 ); /* let's try 20% of the smallest width */ axis->edge_distance_threshold = stdw / 5; axis->standard_width = stdw; axis->extra_light = 0; - } - } - af_glyph_hints_done( hints ); - } +#ifdef FT_DEBUG_LEVEL_TRACE + { + FT_UInt i; + FT_TRACE5(( "%s widths:\n", + dim == AF_DIMENSION_VERT ? "horizontal" + : "vertical" )); -#define AF_LATIN_MAX_TEST_CHARACTERS 12 + FT_TRACE5(( " %d (standard)", axis->standard_width )); + for ( i = 1; i < axis->width_count; i++ ) + FT_TRACE5(( " %d", axis->widths[i].org )); + FT_TRACE5(( "\n" )); + } +#endif + } + } - static const char af_latin_blue_chars[AF_LATIN_MAX_BLUES] - [AF_LATIN_MAX_TEST_CHARACTERS + 1] = - { - "THEZOCQS", - "HEZLOCUS", - "fijkdbh", - "xzroesc", - "xzroesc", - "pqgjy" - }; + FT_TRACE5(( "\n" )); + + af_glyph_hints_done( hints ); + } /* Find all blue zones. Flat segments give the reference points, */ @@ -187,63 +258,122 @@ af_latin_metrics_init_blues( AF_LatinMetrics metrics, FT_Face face ) { - FT_Pos flats [AF_LATIN_MAX_TEST_CHARACTERS]; - FT_Pos rounds[AF_LATIN_MAX_TEST_CHARACTERS]; + FT_Pos flats [AF_BLUE_STRING_MAX_LEN]; + FT_Pos rounds[AF_BLUE_STRING_MAX_LEN]; + FT_Int num_flats; FT_Int num_rounds; - FT_Int bb; + AF_LatinBlue blue; FT_Error error; - AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT]; - FT_GlyphSlot glyph = face->glyph; + AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT]; + FT_Outline outline; + + AF_StyleClass sc = metrics->root.style_class; + + AF_Blue_Stringset bss = sc->blue_stringset; + const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; - /* we compute the blues simply by loading each character from the */ - /* `af_latin_blue_chars[blues]' string, then finding its top-most or */ - /* bottom-most points (depending on `AF_IS_TOP_BLUE') */ + /* we walk over the blue character strings as specified in the */ + /* style's entry in the `af_blue_stringset' array */ - FT_TRACE5(( "blue zones computation\n" )); - FT_TRACE5(( "------------------------------------------------\n" )); + FT_TRACE5(( "latin blue zones computation\n" + "============================\n" + "\n" )); - for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ ) + for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ ) { - const char* p = af_latin_blue_chars[bb]; - const char* limit = p + AF_LATIN_MAX_TEST_CHARACTERS; + const char* p = &af_blue_strings[bs->string]; FT_Pos* blue_ref; FT_Pos* blue_shoot; - FT_TRACE5(( "blue %3d: ", bb )); +#ifdef FT_DEBUG_LEVEL_TRACE + { + FT_Bool have_flag = 0; + + + FT_TRACE5(( "blue zone %d", axis->blue_count )); + + if ( bs->properties ) + { + FT_TRACE5(( " (" )); + + if ( AF_LATIN_IS_TOP_BLUE( bs ) ) + { + FT_TRACE5(( "top" )); + have_flag = 1; + } + + if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) + { + if ( have_flag ) + FT_TRACE5(( ", " )); + FT_TRACE5(( "neutral" )); + have_flag = 1; + } + + if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) ) + { + if ( have_flag ) + FT_TRACE5(( ", " )); + FT_TRACE5(( "small top" )); + have_flag = 1; + } + + if ( AF_LATIN_IS_LONG_BLUE( bs ) ) + { + if ( have_flag ) + FT_TRACE5(( ", " )); + FT_TRACE5(( "long" )); + } + + FT_TRACE5(( ")" )); + } + + FT_TRACE5(( ":\n" )); + } +#endif /* FT_DEBUG_LEVEL_TRACE */ num_flats = 0; num_rounds = 0; - for ( ; p < limit && *p; p++ ) + while ( *p ) { - FT_UInt glyph_index; + FT_ULong ch; + FT_ULong glyph_index; + FT_Long y_offset; FT_Pos best_y; /* same as points.y */ - FT_Int best_point, best_first, best_last; + FT_Int best_point, best_contour_first, best_contour_last; FT_Vector* points; FT_Bool round = 0; - FT_TRACE5(( "'%c'", *p )); + GET_UTF8_CHAR( ch, p ); /* load the character in the face -- skip unknown or empty ones */ - glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p ); + af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); if ( glyph_index == 0 ) + { + FT_TRACE5(( " U+%04lX unavailable\n", ch )); continue; + } - error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); - if ( error || glyph->outline.n_points <= 0 ) + error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); + outline = face->glyph->outline; + if ( error || outline.n_points <= 0 ) + { + FT_TRACE5(( " U+%04lX contains no outlines\n", ch )); continue; + } /* now compute min or max point indices and coordinates */ - points = glyph->outline.points; - best_point = -1; - best_y = 0; /* make compiler happy */ - best_first = 0; /* ditto */ - best_last = 0; /* ditto */ + points = outline.points; + best_point = -1; + best_y = 0; /* make compiler happy */ + best_contour_first = 0; /* ditto */ + best_contour_last = 0; /* ditto */ { FT_Int nn; @@ -251,23 +381,21 @@ FT_Int last = -1; - for ( nn = 0; - nn < glyph->outline.n_contours; - first = last + 1, nn++ ) + for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ ) { FT_Int old_best_point = best_point; FT_Int pp; - last = glyph->outline.contours[nn]; + last = outline.contours[nn]; /* Avoid single-point contours since they are never rasterized. */ /* In some fonts, they correspond to mark attachment points */ - /* which are way outside of the glyph's real outline. */ + /* that are way outside of the glyph's real outline. */ if ( last <= first ) continue; - if ( AF_LATIN_IS_TOP_BLUE( bb ) ) + if ( AF_LATIN_IS_TOP_BLUE( bs ) ) { for ( pp = first; pp <= last; pp++ ) if ( best_point < 0 || points[pp].y > best_y ) @@ -288,11 +416,10 @@ if ( best_point != old_best_point ) { - best_first = first; - best_last = last; + best_contour_first = first; + best_contour_last = last; } } - FT_TRACE5(( "%5d", best_y )); } /* now check whether the point belongs to a straight or round */ @@ -300,47 +427,297 @@ /* lies, then inspect its previous and next points */ if ( best_point >= 0 ) { + FT_Pos best_x = points[best_point].x; FT_Int prev, next; + FT_Int best_segment_first, best_segment_last; + FT_Int best_on_point_first, best_on_point_last; FT_Pos dist; - /* now look for the previous and next points that are not on the */ - /* same Y coordinate. Threshold the `closeness'... */ + best_segment_first = best_point; + best_segment_last = best_point; + + if ( FT_CURVE_TAG( outline.tags[best_point] ) == FT_CURVE_TAG_ON ) + { + best_on_point_first = best_point; + best_on_point_last = best_point; + } + else + { + best_on_point_first = -1; + best_on_point_last = -1; + } + + /* look for the previous and next points on the contour */ + /* that are not on the same Y coordinate, then threshold */ + /* the `closeness'... */ prev = best_point; next = prev; do { - if ( prev > best_first ) + if ( prev > best_contour_first ) prev--; else - prev = best_last; + prev = best_contour_last; - dist = points[prev].y - best_y; - if ( dist < -5 || dist > 5 ) - break; + dist = FT_ABS( points[prev].y - best_y ); + /* accept a small distance or a small angle (both values are */ + /* heuristic; value 20 corresponds to approx. 2.9 degrees) */ + if ( dist > 5 ) + if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist ) + break; + + best_segment_first = prev; + + if ( FT_CURVE_TAG( outline.tags[prev] ) == FT_CURVE_TAG_ON ) + { + best_on_point_first = prev; + if ( best_on_point_last < 0 ) + best_on_point_last = prev; + } } while ( prev != best_point ); do { - if ( next < best_last ) + if ( next < best_contour_last ) next++; else - next = best_first; + next = best_contour_first; - dist = points[next].y - best_y; - if ( dist < -5 || dist > 5 ) - break; + dist = FT_ABS( points[next].y - best_y ); + if ( dist > 5 ) + if ( FT_ABS( points[next].x - best_x ) <= 20 * dist ) + break; + + best_segment_last = next; + + if ( FT_CURVE_TAG( outline.tags[next] ) == FT_CURVE_TAG_ON ) + { + best_on_point_last = next; + if ( best_on_point_first < 0 ) + best_on_point_first = next; + } } while ( next != best_point ); - /* now set the `round' flag depending on the segment's kind */ - round = FT_BOOL( - FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON || - FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON ); + if ( AF_LATIN_IS_LONG_BLUE( bs ) ) + { + /* If this flag is set, we have an additional constraint to */ + /* get the blue zone distance: Find a segment of the topmost */ + /* (or bottommost) contour that is longer than a heuristic */ + /* threshold. This ensures that small bumps in the outline */ + /* are ignored (for example, the `vertical serifs' found in */ + /* many Hebrew glyph designs). */ + + /* If this segment is long enough, we are done. Otherwise, */ + /* search the segment next to the extremum that is long */ + /* enough, has the same direction, and a not too large */ + /* vertical distance from the extremum. Note that the */ + /* algorithm doesn't check whether the found segment is */ + /* actually the one (vertically) nearest to the extremum. */ + + /* heuristic threshold value */ + FT_Pos length_threshold = metrics->units_per_em / 25; + + + dist = FT_ABS( points[best_segment_last].x - + points[best_segment_first].x ); + + if ( dist < length_threshold && + best_segment_last - best_segment_first + 2 <= + best_contour_last - best_contour_first ) + { + /* heuristic threshold value */ + FT_Pos height_threshold = metrics->units_per_em / 4; + + FT_Int first; + FT_Int last; + FT_Bool hit; + + /* we intentionally declare these two variables */ + /* outside of the loop since various compilers emit */ + /* incorrect warning messages otherwise, talking about */ + /* `possibly uninitialized variables' */ + FT_Int p_first = 0; /* make compiler happy */ + FT_Int p_last = 0; + + FT_Bool left2right; + + + /* compute direction */ + prev = best_point; + + do + { + if ( prev > best_contour_first ) + prev--; + else + prev = best_contour_last; + + if ( points[prev].x != best_x ) + break; + + } while ( prev != best_point ); + + /* skip glyph for the degenerate case */ + if ( prev == best_point ) + continue; + + left2right = FT_BOOL( points[prev].x < points[best_point].x ); + + first = best_segment_last; + last = first; + hit = 0; + + do + { + FT_Bool l2r; + FT_Pos d; + + + if ( !hit ) + { + /* no hit; adjust first point */ + first = last; + + /* also adjust first and last on point */ + if ( FT_CURVE_TAG( outline.tags[first] ) == + FT_CURVE_TAG_ON ) + { + p_first = first; + p_last = first; + } + else + { + p_first = -1; + p_last = -1; + } + + hit = 1; + } + + if ( last < best_contour_last ) + last++; + else + last = best_contour_first; + + if ( FT_ABS( best_y - points[first].y ) > height_threshold ) + { + /* vertical distance too large */ + hit = 0; + continue; + } + + /* same test as above */ + dist = FT_ABS( points[last].y - points[first].y ); + if ( dist > 5 ) + if ( FT_ABS( points[last].x - points[first].x ) <= + 20 * dist ) + { + hit = 0; + continue; + } + + if ( FT_CURVE_TAG( outline.tags[last] ) == FT_CURVE_TAG_ON ) + { + p_last = last; + if ( p_first < 0 ) + p_first = last; + } + + l2r = FT_BOOL( points[first].x < points[last].x ); + d = FT_ABS( points[last].x - points[first].x ); + + if ( l2r == left2right && + d >= length_threshold ) + { + /* all constraints are met; update segment after finding */ + /* its end */ + do + { + if ( last < best_contour_last ) + last++; + else + last = best_contour_first; + + d = FT_ABS( points[last].y - points[first].y ); + if ( d > 5 ) + if ( FT_ABS( points[next].x - points[first].x ) <= + 20 * dist ) + { + if ( last > best_contour_first ) + last--; + else + last = best_contour_last; + break; + } + + p_last = last; + + if ( FT_CURVE_TAG( outline.tags[last] ) == + FT_CURVE_TAG_ON ) + { + p_last = last; + if ( p_first < 0 ) + p_first = last; + } + + } while ( last != best_segment_first ); + + best_y = points[first].y; + + best_segment_first = first; + best_segment_last = last; + + best_on_point_first = p_first; + best_on_point_last = p_last; + + break; + } + + } while ( last != best_segment_first ); + } + } + + /* for computing blue zones, we add the y offset as returned */ + /* by the currently used OpenType feature -- for example, */ + /* superscript glyphs might be identical to subscript glyphs */ + /* with a vertical shift */ + best_y += y_offset; + + FT_TRACE5(( " U+%04lX: best_y = %5ld", ch, best_y )); + + /* now set the `round' flag depending on the segment's kind: */ + /* */ + /* - if the horizontal distance between the first and last */ + /* `on' point is larger than upem/8 (value 8 is heuristic) */ + /* we have a flat segment */ + /* - if either the first or the last point of the segment is */ + /* an `off' point, the segment is round, otherwise it is */ + /* flat */ + if ( best_on_point_first >= 0 && + best_on_point_last >= 0 && + (FT_UInt)( FT_ABS( points[best_on_point_last].x - + points[best_on_point_first].x ) ) > + metrics->units_per_em / 8 ) + round = 0; + else + round = FT_BOOL( + FT_CURVE_TAG( outline.tags[best_segment_first] ) != + FT_CURVE_TAG_ON || + FT_CURVE_TAG( outline.tags[best_segment_last] ) != + FT_CURVE_TAG_ON ); - FT_TRACE5(( "%c ", round ? 'r' : 'f' )); + if ( round && AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) + { + /* only use flat segments for a neutral blue zone */ + FT_TRACE5(( " (round, skipped)\n" )); + continue; + } + + FT_TRACE5(( " (%s)\n", round ? "round" : "flat" )); } if ( round ) @@ -349,15 +726,13 @@ flats[num_flats++] = best_y; } - FT_TRACE5(( "\n" )); - if ( num_flats == 0 && num_rounds == 0 ) { /* * we couldn't find a single glyph to compute this blue zone, * we will simply ignore it then */ - FT_TRACE5(( "empty\n" )); + FT_TRACE5(( " empty\n" )); continue; } @@ -385,7 +760,7 @@ } else { - *blue_ref = flats[num_flats / 2]; + *blue_ref = flats [num_flats / 2]; *blue_shoot = rounds[num_rounds / 2]; } @@ -399,24 +774,33 @@ FT_Bool over_ref = FT_BOOL( shoot > ref ); - if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref ) + if ( AF_LATIN_IS_TOP_BLUE( bs ) ^ over_ref ) + { *blue_ref = *blue_shoot = ( shoot + ref ) / 2; + + FT_TRACE5(( " [overshoot smaller than reference," + " taking mean value]\n" )); + } } blue->flags = 0; - if ( AF_LATIN_IS_TOP_BLUE( bb ) ) + if ( AF_LATIN_IS_TOP_BLUE( bs ) ) blue->flags |= AF_LATIN_BLUE_TOP; + if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) + blue->flags |= AF_LATIN_BLUE_NEUTRAL; /* * The following flag is used later to adjust the y and x scales * in order to optimize the pixel grid alignment of the top of small * letters. */ - if ( bb == AF_LATIN_BLUE_SMALL_TOP ) + if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) ) blue->flags |= AF_LATIN_BLUE_ADJUSTMENT; - FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot )); + FT_TRACE5(( " -> reference = %ld\n" + " overshoot = %ld\n", + *blue_ref, *blue_shoot )); } FT_TRACE5(( "\n" )); @@ -439,10 +823,11 @@ /* digit `0' is 0x30 in all supported charmaps */ for ( i = 0x30; i <= 0x39; i++ ) { - FT_UInt glyph_index; + FT_ULong glyph_index; + FT_Long y_offset; - glyph_index = FT_Get_Char_Index( face, i ); + af_get_char_index( &metrics->root, i, &glyph_index, &y_offset ); if ( glyph_index == 0 ) continue; @@ -478,41 +863,20 @@ af_latin_metrics_init( AF_LatinMetrics metrics, FT_Face face ) { - FT_Error error = AF_Err_Ok; FT_CharMap oldmap = face->charmap; - FT_UInt ee; - - static const FT_Encoding latin_encodings[] = - { - FT_ENCODING_UNICODE, - FT_ENCODING_APPLE_ROMAN, - FT_ENCODING_ADOBE_STANDARD, - FT_ENCODING_ADOBE_LATIN_1, - - FT_ENCODING_NONE /* end of list */ - }; metrics->units_per_em = face->units_per_EM; - /* do we have a latin charmap in there? */ - for ( ee = 0; latin_encodings[ee] != FT_ENCODING_NONE; ee++ ) - { - error = FT_Select_Charmap( face, latin_encodings[ee] ); - if ( !error ) - break; - } - - if ( !error ) + if ( !FT_Select_Charmap( face, FT_ENCODING_UNICODE ) ) { - /* For now, compute the standard width and height from the `o'. */ - af_latin_metrics_init_widths( metrics, face, 'o' ); + af_latin_metrics_init_widths( metrics, face ); af_latin_metrics_init_blues( metrics, face ); af_latin_metrics_check_digits( metrics, face ); } FT_Set_Charmap( face, oldmap ); - return AF_Err_Ok; + return FT_Err_Ok; } @@ -569,9 +933,26 @@ if ( blue ) { - FT_Pos scaled = FT_MulFix( blue->shoot.org, scaler->y_scale ); - FT_Pos fitted = ( scaled + 40 ) & ~63; + FT_Pos scaled; + FT_Pos threshold; + FT_Pos fitted; + FT_UInt limit; + FT_UInt ppem; + + + scaled = FT_MulFix( blue->shoot.org, scaler->y_scale ); + ppem = metrics->root.scaler.face->size->metrics.x_ppem; + limit = metrics->root.globals->increase_x_height; + threshold = 40; + /* if the `increase-x-height' property is active, */ + /* we round up much more often */ + if ( limit && + ppem <= limit && + ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN ) + threshold = 52; + + fitted = ( scaled + threshold ) & ~63; if ( scaled != fitted ) { @@ -584,7 +965,20 @@ else #endif if ( dim == AF_DIMENSION_VERT ) + { scale = FT_MulDiv( scale, fitted, scaled ); + + FT_TRACE5(( + "af_latin_metrics_scale_dim:" + " x height alignment (style `%s'):\n" + " " + " vertical scaling changed from %.4f to %.4f (by %d%%)\n" + "\n", + af_style_names[metrics->root.style_class->style], + axis->org_scale / 65536.0, + scale / 65536.0, + ( fitted - scaled ) * 100 / scaled )); + } } } } @@ -603,6 +997,10 @@ metrics->root.scaler.y_delta = delta; } + FT_TRACE5(( "%s widths (style `%s')\n", + dim == AF_DIMENSION_HORZ ? "horizontal" : "vertical", + af_style_names[metrics->root.style_class->style] )); + /* scale the widths */ for ( nn = 0; nn < axis->width_count; nn++ ) { @@ -611,15 +1009,31 @@ width->cur = FT_MulFix( width->org, scale ); width->fit = width->cur; + + FT_TRACE5(( " %d scaled to %.2f\n", + width->org, + width->cur / 64.0 )); } + FT_TRACE5(( "\n" )); + /* an extra-light axis corresponds to a standard width that is */ /* smaller than 5/8 pixels */ axis->extra_light = (FT_Bool)( FT_MulFix( axis->standard_width, scale ) < 32 + 8 ); +#ifdef FT_DEBUG_LEVEL_TRACE + if ( axis->extra_light ) + FT_TRACE5(( "`%s' style is extra light (at current resolution)\n" + "\n", + af_style_names[metrics->root.style_class->style] )); +#endif + if ( dim == AF_DIMENSION_VERT ) { + FT_TRACE5(( "blue zones (style `%s')\n", + af_style_names[metrics->root.style_class->style] )); + /* scale the blue zones */ for ( nn = 0; nn < axis->blue_count; nn++ ) { @@ -677,7 +1091,7 @@ if ( delta2 < 32 ) delta2 = 0; - else if ( delta < 48 ) + else if ( delta2 < 48 ) delta2 = 32; else delta2 = 64; @@ -691,6 +1105,19 @@ #endif blue->flags |= AF_LATIN_BLUE_ACTIVE; + + FT_TRACE5(( " reference %d: %d scaled to %.2f%s\n" + " overshoot %d: %d scaled to %.2f%s\n", + nn, + blue->ref.org, + blue->ref.fit / 64.0, + blue->flags & AF_LATIN_BLUE_ACTIVE ? "" + : " (inactive)", + nn, + blue->shoot.org, + blue->shoot.fit / 64.0, + blue->flags & AF_LATIN_BLUE_ACTIVE ? "" + : " (inactive)" )); } } } @@ -705,6 +1132,7 @@ { metrics->root.scaler.render_mode = scaler->render_mode; metrics->root.scaler.face = scaler->face; + metrics->root.scaler.flags = scaler->flags; af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ ); af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT ); @@ -728,7 +1156,7 @@ { AF_AxisHints axis = &hints->axis[dim]; FT_Memory memory = hints->memory; - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; AF_Segment segment = NULL; AF_SegmentRec seg0; AF_Point* contour = hints->contours; @@ -848,7 +1276,7 @@ on_edge = 0; segment = NULL; - /* fallthrough */ + /* fall through */ } } @@ -865,17 +1293,19 @@ /* this is the start of a new segment! */ segment_dir = (AF_Direction)point->out_dir; - /* clear all segment fields */ error = af_axis_hints_new_segment( axis, memory, &segment ); if ( error ) goto Exit; - segment[0] = seg0; + /* clear all segment fields */ + segment[0] = seg0; + segment->dir = (FT_Char)segment_dir; min_pos = max_pos = point->u; segment->first = point; segment->last = point; - on_edge = 1; + + on_edge = 1; } point = point->next; @@ -884,8 +1314,8 @@ } /* contours */ - /* now slightly increase the height of segments when this makes */ - /* sense -- this is used to better detect and ignore serifs */ + /* now slightly increase the height of segments if this makes */ + /* sense -- this is used to better detect and ignore serifs */ { AF_Segment segments = axis->segments; AF_Segment segments_end = segments + axis->num_segments; @@ -899,9 +1329,6 @@ FT_Pos last_v = last->v; - if ( first == last ) - continue; - if ( first_v < last_v ) { AF_Point p; @@ -940,31 +1367,44 @@ } - /* Link segments to form stems and serifs. */ + /* Link segments to form stems and serifs. If `width_count' and */ + /* `widths' are non-zero, use them to fine-tune the scoring function. */ FT_LOCAL_DEF( void ) af_latin_hints_link_segments( AF_GlyphHints hints, + FT_UInt width_count, + AF_WidthRec* widths, AF_Dimension dim ) { AF_AxisHints axis = &hints->axis[dim]; AF_Segment segments = axis->segments; AF_Segment segment_limit = segments + axis->num_segments; - FT_Pos len_threshold, len_score; + FT_Pos len_threshold, len_score, dist_score, max_width; AF_Segment seg1, seg2; + if ( width_count ) + max_width = widths[width_count - 1].org; + else + max_width = 0; + + /* a heuristic value to set up a minimum value for overlapping */ len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 ); if ( len_threshold == 0 ) len_threshold = 1; + /* a heuristic value to weight lengths */ len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 ); + /* a heuristic value to weight distances (no call to */ + /* AF_LATIN_CONSTANT needed, since we work on multiples */ + /* of the stem width) */ + dist_score = 3000; + /* now compare each segment to the others */ for ( seg1 = segments; seg1 < segment_limit; seg1++ ) { - /* the fake segments are introduced to hint the metrics -- */ - /* we must never link them to anything */ - if ( seg1->dir != axis->major_dir || seg1->first == seg1->last ) + if ( seg1->dir != axis->major_dir ) continue; /* search for stems having opposite directions, */ @@ -978,10 +1418,9 @@ if ( seg1->dir + seg2->dir == 0 && pos2 > pos1 ) { /* compute distance between the two segments */ - FT_Pos dist = pos2 - pos1; - FT_Pos min = seg1->min_coord; - FT_Pos max = seg1->max_coord; - FT_Pos len, score; + FT_Pos min = seg1->min_coord; + FT_Pos max = seg1->max_coord; + FT_Pos len; if ( min < seg2->min_coord ) @@ -991,15 +1430,49 @@ max = seg2->max_coord; /* compute maximum coordinate difference of the two segments */ + /* (this is, how much they overlap) */ len = max - min; if ( len >= len_threshold ) { - /* small coordinate differences cause a higher score, and */ - /* segments with a greater distance cause a higher score also */ - score = dist + len_score / len; + /* + * The score is the sum of two demerits indicating the + * `badness' of a fit, measured along the segments' main axis + * and orthogonal to it, respectively. + * + * o The less overlapping along the main axis, the worse it + * is, causing a larger demerit. + * + * o The nearer the orthogonal distance to a stem width, the + * better it is, causing a smaller demerit. For simplicity, + * however, we only increase the demerit for values that + * exceed the largest stem width. + */ + + FT_Pos dist = pos2 - pos1; + + FT_Pos dist_demerit, score; + + + if ( max_width ) + { + /* distance demerits are based on multiples of `max_width'; */ + /* we scale by 1024 for getting more precision */ + FT_Pos delta = ( dist << 10 ) / max_width - ( 1 << 10 ); + + + if ( delta > 10000 ) + dist_demerit = 32000; + else if ( delta > 0 ) + dist_demerit = delta * delta / dist_score; + else + dist_demerit = 0; + } + else + dist_demerit = dist; /* default if no widths available */ + + score = dist_demerit + len_score / len; /* and we search for the smallest score */ - /* of the sum of the two values */ if ( score < seg1->score ) { seg1->score = score; @@ -1040,7 +1513,7 @@ AF_Dimension dim ) { AF_AxisHints axis = &hints->axis[dim]; - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = hints->memory; AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim]; @@ -1169,17 +1642,17 @@ } - /*********************************************************************/ - /* */ - /* Good, we will now compute each edge's properties according to */ - /* the segments found on its position. Basically, these are */ - /* */ - /* - the edge's main direction */ - /* - stem edge, serif edge or both (which defaults to stem then) */ - /* - rounded edge, straight or both (which defaults to straight) */ - /* - link for edge */ - /* */ - /*********************************************************************/ + /******************************************************************/ + /* */ + /* Good, we now compute each edge's properties according to the */ + /* segments found on its position. Basically, these are */ + /* */ + /* - the edge's main direction */ + /* - stem edge, serif edge or both (which defaults to stem then) */ + /* - rounded edge, straight or both (which defaults to straight) */ + /* - link for edge */ + /* */ + /******************************************************************/ /* first of all, set the `edge' field in each segment -- this is */ /* required in order to compute edge links */ @@ -1331,6 +1804,8 @@ FT_LOCAL_DEF( FT_Error ) af_latin_hints_detect_features( AF_GlyphHints hints, + FT_UInt width_count, + AF_WidthRec* widths, AF_Dimension dim ) { FT_Error error; @@ -1339,7 +1814,7 @@ error = af_latin_hints_compute_segments( hints, dim ); if ( !error ) { - af_latin_hints_link_segments( hints, dim ); + af_latin_hints_link_segments( hints, width_count, widths, dim ); error = af_latin_hints_compute_edges( hints, dim ); } @@ -1367,9 +1842,10 @@ /* for each horizontal edge search the blue zone which is closest */ for ( ; edge < edge_limit; edge++ ) { - FT_Int bb; - AF_Width best_blue = NULL; - FT_Pos best_dist; /* initial threshold */ + FT_UInt bb; + AF_Width best_blue = NULL; + FT_Bool best_blue_is_neutral = 0; + FT_Pos best_dist; /* initial threshold */ /* compute the initial threshold as a fraction of the EM size */ @@ -1380,27 +1856,29 @@ if ( best_dist > 64 / 2 ) best_dist = 64 / 2; - for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ ) + for ( bb = 0; bb < latin->blue_count; bb++ ) { AF_LatinBlue blue = latin->blues + bb; - FT_Bool is_top_blue, is_major_dir; + FT_Bool is_top_blue, is_neutral_blue, is_major_dir; /* skip inactive blue zones (i.e., those that are too large) */ if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) ) continue; - /* if it is a top zone, check for right edges -- if it is a bottom */ - /* zone, check for left edges */ - /* */ - /* of course, that's for TrueType */ - is_top_blue = (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 ); - is_major_dir = FT_BOOL( edge->dir == axis->major_dir ); - - /* if it is a top zone, the edge must be against the major */ - /* direction; if it is a bottom zone, it must be in the major */ - /* direction */ - if ( is_top_blue ^ is_major_dir ) + /* if it is a top zone, check for right edges (against the major */ + /* direction); if it is a bottom zone, check for left edges (in */ + /* the major direction) -- this assumes the TrueType convention */ + /* for the orientation of contours */ + is_top_blue = + (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 ); + is_neutral_blue = + (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_NEUTRAL ) != 0); + is_major_dir = + FT_BOOL( edge->dir == axis->major_dir ); + + /* neutral blue zones are handled for both directions */ + if ( is_top_blue ^ is_major_dir || is_neutral_blue ) { FT_Pos dist; @@ -1413,15 +1891,19 @@ dist = FT_MulFix( dist, scale ); if ( dist < best_dist ) { - best_dist = dist; - best_blue = &blue->ref; + best_dist = dist; + best_blue = &blue->ref; + best_blue_is_neutral = is_neutral_blue; } /* now compare it to the overshoot position and check whether */ /* the edge is rounded, and whether the edge is over the */ /* reference position of a top zone, or under the reference */ - /* position of a bottom zone */ - if ( edge->flags & AF_EDGE_ROUND && dist != 0 ) + /* position of a bottom zone (provided we don't have a */ + /* neutral blue zone) */ + if ( edge->flags & AF_EDGE_ROUND && + dist != 0 && + !is_neutral_blue ) { FT_Bool is_under_ref = FT_BOOL( edge->fpos < blue->ref.org ); @@ -1435,8 +1917,9 @@ dist = FT_MulFix( dist, scale ); if ( dist < best_dist ) { - best_dist = dist; - best_blue = &blue->shoot; + best_dist = dist; + best_blue = &blue->shoot; + best_blue_is_neutral = is_neutral_blue; } } } @@ -1444,7 +1927,11 @@ } if ( best_blue ) + { edge->blue_edge = best_blue; + if ( best_blue_is_neutral ) + edge->flags |= AF_EDGE_NEUTRAL; + } } } @@ -1460,7 +1947,7 @@ FT_Face face = metrics->root.scaler.face; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics ); /* * correct x_scale and y_scale if needed, since they may have @@ -1476,9 +1963,7 @@ #if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */ if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V ) - { metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL; - } #endif scaler_flags = hints->scaler_flags; @@ -1518,7 +2003,7 @@ hints->scaler_flags = scaler_flags; hints->other_flags = other_flags; - return AF_Err_Ok; + return FT_Err_Ok; } @@ -1589,8 +2074,8 @@ AF_Edge_Flags base_flags, AF_Edge_Flags stem_flags ) { - AF_LatinMetrics metrics = (AF_LatinMetrics) hints->metrics; - AF_LatinAxis axis = & metrics->axis[dim]; + AF_LatinMetrics metrics = (AF_LatinMetrics)hints->metrics; + AF_LatinAxis axis = &metrics->axis[dim]; FT_Pos dist = width; FT_Int sign = 0; FT_Int vertical = ( dim == AF_DIMENSION_VERT ); @@ -1722,7 +2207,7 @@ if ( delta < 0 ) delta = -delta; - if (delta >= 16) + if ( delta >= 16 ) { dist = org_dist; if ( dist < 48 ) @@ -1762,9 +2247,9 @@ stem_edge->pos = base_edge->pos + fitted_width; - FT_TRACE5(( " LINK: edge %d (opos=%.2f) linked to (%.2f)," + FT_TRACE5(( " LINK: edge %d (opos=%.2f) linked to %.2f," " dist was %.2f, now %.2f\n", - stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0, + stem_edge - hints->axis[dim].edges, stem_edge->opos / 64.0, stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 )); } @@ -1808,9 +2293,14 @@ AF_Edge anchor = NULL; FT_Int has_serifs = 0; +#ifdef FT_DEBUG_LEVEL_TRACE + FT_UInt num_actions = 0; +#endif + - FT_TRACE5(("%s edge hinting\n", dim == AF_DIMENSION_VERT ? "horizontal" - : "vertical")); + FT_TRACE5(( "latin %s edge hinting (style `%s')\n", + dim == AF_DIMENSION_VERT ? "horizontal" : "vertical", + af_style_names[hints->metrics->style_class->style] )); /* we begin by aligning all stems relative to the blue zone */ /* if needed -- that's only for horizontal edges */ @@ -1826,14 +2316,41 @@ if ( edge->flags & AF_EDGE_DONE ) continue; - blue = edge->blue_edge; edge1 = NULL; edge2 = edge->link; + /* + * If a stem contains both a neutral and a non-neutral blue zone, + * skip the neutral one. Otherwise, outlines with different + * directions might be incorrectly aligned at the same vertical + * position. + * + * If we have two neutral blue zones, skip one of them. + * + */ + if ( edge->blue_edge && edge2 && edge2->blue_edge ) + { + FT_Byte neutral = edge->flags & AF_EDGE_NEUTRAL; + FT_Byte neutral2 = edge2->flags & AF_EDGE_NEUTRAL; + + + if ( ( neutral && neutral2 ) || neutral2 ) + { + edge2->blue_edge = NULL; + edge2->flags &= ~AF_EDGE_NEUTRAL; + } + else if ( neutral ) + { + edge->blue_edge = NULL; + edge->flags &= ~AF_EDGE_NEUTRAL; + } + } + + blue = edge->blue_edge; if ( blue ) edge1 = edge; - /* flip edges if the other stem is aligned to a blue zone */ + /* flip edges if the other edge is aligned to a blue zone */ else if ( edge2 && edge2->blue_edge ) { blue = edge2->blue_edge; @@ -1844,10 +2361,20 @@ if ( !edge1 ) continue; - FT_TRACE5(( " BLUE: edge %d (opos=%.2f) snapped to (%.2f)," - " was (%.2f)\n", - edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0, - edge1->pos / 64.0 )); +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !anchor ) + FT_TRACE5(( " BLUE_ANCHOR: edge %d (opos=%.2f) snapped to %.2f," + " was %.2f (anchor=edge %d)\n", + edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0, + edge1->pos / 64.0, edge - edges )); + else + FT_TRACE5(( " BLUE: edge %d (opos=%.2f) snapped to %.2f," + " was %.2f\n", + edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0, + edge1->pos / 64.0 )); + + num_actions++; +#endif edge1->pos = blue->fit; edge1->flags |= AF_EDGE_DONE; @@ -1856,6 +2383,10 @@ { af_latin_align_linked_edge( hints, dim, edge1, edge2 ); edge2->flags |= AF_EDGE_DONE; + +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif } if ( !anchor ) @@ -1886,10 +2417,14 @@ /* this should not happen, but it's better to be safe */ if ( edge2->blue_edge ) { - FT_TRACE5(( " ASSERTION FAILED for edge %d\n", edge2-edges )); + FT_TRACE5(( " ASSERTION FAILED for edge %d\n", edge2 - edges )); af_latin_align_linked_edge( hints, dim, edge2, edge ); edge->flags |= AF_EDGE_DONE; + +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif continue; } @@ -1947,16 +2482,20 @@ else edge->pos = FT_PIX_ROUND( edge->opos ); + anchor = edge; + edge->flags |= AF_EDGE_DONE; + FT_TRACE5(( " ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f)" - " snapped to (%.2f) (%.2f)\n", + " snapped to %.2f and %.2f\n", edge - edges, edge->opos / 64.0, edge2 - edges, edge2->opos / 64.0, edge->pos / 64.0, edge2->pos / 64.0 )); - anchor = edge; - - edge->flags |= AF_EDGE_DONE; af_latin_align_linked_edge( hints, dim, edge, edge2 ); + +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions += 2; +#endif } else { @@ -1989,7 +2528,7 @@ cur_pos1 = FT_PIX_ROUND( org_center ); - if (cur_len <= 64 ) + if ( cur_len <= 64 ) { u_off = 32; d_off = 32; @@ -2016,12 +2555,13 @@ edge->pos = cur_pos1 - cur_len / 2; edge2->pos = cur_pos1 + cur_len / 2; - FT_TRACE5(( " STEM: %d (opos=%.2f) to %d (opos=%.2f)" - " snapped to (%.2f) and (%.2f)\n", + FT_TRACE5(( " STEM: edge %d (opos=%.2f) linked to %d (opos=%.2f)" + " snapped to %.2f and %.2f\n", edge - edges, edge->opos / 64.0, edge2 - edges, edge2->opos / 64.0, edge->pos / 64.0, edge2->pos / 64.0 )); } + else { org_pos = anchor->pos + ( edge->opos - anchor->opos ); @@ -2046,20 +2586,29 @@ edge->pos = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2; edge2->pos = edge->pos + cur_len; - FT_TRACE5(( " STEM: %d (opos=%.2f) to %d (opos=%.2f)" - " snapped to (%.2f) and (%.2f)\n", + FT_TRACE5(( " STEM: edge %d (opos=%.2f) linked to %d (opos=%.2f)" + " snapped to %.2f and %.2f\n", edge - edges, edge->opos / 64.0, edge2 - edges, edge2->opos / 64.0, edge->pos / 64.0, edge2->pos / 64.0 )); } +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif + edge->flags |= AF_EDGE_DONE; edge2->flags |= AF_EDGE_DONE; if ( edge > edges && edge->pos < edge[-1].pos ) { - FT_TRACE5(( " BOUND: %d (pos=%.2f) to (%.2f)\n", +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE5(( " BOUND: edge %d (pos=%.2f) moved to %.2f\n", edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 )); + + num_actions++; +#endif + edge->pos = edge[-1].pos; } } @@ -2154,7 +2703,7 @@ { af_latin_align_serif_edge( hints, edge->serif, edge ); FT_TRACE5(( " SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f)" - " aligned to (%.2f)\n", + " aligned to %.2f\n", edge - edges, edge->opos / 64.0, edge->serif - edges, edge->serif->opos / 64.0, edge->pos / 64.0 )); @@ -2164,7 +2713,7 @@ edge->pos = FT_PIX_ROUND( edge->opos ); anchor = edge; FT_TRACE5(( " SERIF_ANCHOR: edge %d (opos=%.2f)" - " snapped to (%.2f)\n", + " snapped to %.2f\n", edge-edges, edge->opos / 64.0, edge->pos / 64.0 )); } else @@ -2191,7 +2740,7 @@ after->pos - before->pos, after->opos - before->opos ); - FT_TRACE5(( " SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f)" + FT_TRACE5(( " SERIF_LINK1: edge %d (opos=%.2f) snapped to %.2f" " from %d (opos=%.2f)\n", edge - edges, edge->opos / 64.0, edge->pos / 64.0, @@ -2201,26 +2750,49 @@ { edge->pos = anchor->pos + ( ( edge->opos - anchor->opos + 16 ) & ~31 ); - FT_TRACE5(( " SERIF_LINK2: edge %d (opos=%.2f)" - " snapped to (%.2f)\n", + " snapped to %.2f\n", edge - edges, edge->opos / 64.0, edge->pos / 64.0 )); } } +#ifdef FT_DEBUG_LEVEL_TRACE + num_actions++; +#endif edge->flags |= AF_EDGE_DONE; if ( edge > edges && edge->pos < edge[-1].pos ) + { +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE5(( " BOUND: edge %d (pos=%.2f) moved to %.2f\n", + edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 )); + + num_actions++; +#endif edge->pos = edge[-1].pos; + } if ( edge + 1 < edge_limit && edge[1].flags & AF_EDGE_DONE && edge->pos > edge[1].pos ) + { +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE5(( " BOUND: edge %d (pos=%.2f) moved to %.2f\n", + edge - edges, edge->pos / 64.0, edge[1].pos / 64.0 )); + + num_actions++; +#endif + edge->pos = edge[1].pos; + } } } +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !num_actions ) + FT_TRACE5(( " (none)\n" )); FT_TRACE5(( "\n" )); +#endif } @@ -2234,6 +2806,8 @@ FT_Error error; int dim; + AF_LatinAxis axis; + error = af_glyph_hints_reload( hints, outline ); if ( error ) @@ -2247,14 +2821,22 @@ if ( AF_HINTS_DO_HORIZONTAL( hints ) ) #endif { - error = af_latin_hints_detect_features( hints, AF_DIMENSION_HORZ ); + axis = &metrics->axis[AF_DIMENSION_HORZ]; + error = af_latin_hints_detect_features( hints, + axis->width_count, + axis->widths, + AF_DIMENSION_HORZ ); if ( error ) goto Exit; } if ( AF_HINTS_DO_VERTICAL( hints ) ) { - error = af_latin_hints_detect_features( hints, AF_DIMENSION_VERT ); + axis = &metrics->axis[AF_DIMENSION_VERT]; + error = af_latin_hints_detect_features( hints, + axis->width_count, + axis->widths, + AF_DIMENSION_VERT ); if ( error ) goto Exit; @@ -2290,6 +2872,7 @@ af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim ); } } + af_glyph_hints_save( hints, outline ); Exit: @@ -2306,53 +2889,19 @@ /*************************************************************************/ - /* XXX: this should probably fine tuned to differentiate better between */ - /* scripts... */ + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_latin_writing_system_class, - static const AF_Script_UniRangeRec af_latin_uniranges[] = - { - AF_UNIRANGE_REC( 0x0020UL, 0x007FUL ), /* Basic Latin (no control chars) */ - AF_UNIRANGE_REC( 0x00A0UL, 0x00FFUL ), /* Latin-1 Supplement (no control chars) */ - AF_UNIRANGE_REC( 0x0100UL, 0x017FUL ), /* Latin Extended-A */ - AF_UNIRANGE_REC( 0x0180UL, 0x024FUL ), /* Latin Extended-B */ - AF_UNIRANGE_REC( 0x0250UL, 0x02AFUL ), /* IPA Extensions */ - AF_UNIRANGE_REC( 0x02B0UL, 0x02FFUL ), /* Spacing Modifier Letters */ - AF_UNIRANGE_REC( 0x0300UL, 0x036FUL ), /* Combining Diacritical Marks */ - AF_UNIRANGE_REC( 0x0370UL, 0x03FFUL ), /* Greek and Coptic */ - AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */ - AF_UNIRANGE_REC( 0x0500UL, 0x052FUL ), /* Cyrillic Supplement */ - AF_UNIRANGE_REC( 0x1D00UL, 0x1D7FUL ), /* Phonetic Extensions */ - AF_UNIRANGE_REC( 0x1D80UL, 0x1DBFUL ), /* Phonetic Extensions Supplement */ - AF_UNIRANGE_REC( 0x1DC0UL, 0x1DFFUL ), /* Combining Diacritical Marks Supplement */ - AF_UNIRANGE_REC( 0x1E00UL, 0x1EFFUL ), /* Latin Extended Additional */ - AF_UNIRANGE_REC( 0x1F00UL, 0x1FFFUL ), /* Greek Extended */ - AF_UNIRANGE_REC( 0x2000UL, 0x206FUL ), /* General Punctuation */ - AF_UNIRANGE_REC( 0x2070UL, 0x209FUL ), /* Superscripts and Subscripts */ - AF_UNIRANGE_REC( 0x20A0UL, 0x20CFUL ), /* Currency Symbols */ - AF_UNIRANGE_REC( 0x2150UL, 0x218FUL ), /* Number Forms */ - AF_UNIRANGE_REC( 0x2460UL, 0x24FFUL ), /* Enclosed Alphanumerics */ - AF_UNIRANGE_REC( 0x2C60UL, 0x2C7FUL ), /* Latin Extended-C */ - AF_UNIRANGE_REC( 0x2DE0UL, 0x2DFFUL ), /* Cyrillic Extended-A */ - AF_UNIRANGE_REC( 0xA640UL, 0xA69FUL ), /* Cyrillic Extended-B */ - AF_UNIRANGE_REC( 0xA720UL, 0xA7FFUL ), /* Latin Extended-D */ - AF_UNIRANGE_REC( 0xFB00UL, 0xFB06UL ), /* Alphab. Present. Forms (Latin Ligs) */ - AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ), /* Mathematical Alphanumeric Symbols */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - - - AF_DEFINE_SCRIPT_CLASS( af_latin_script_class, - AF_SCRIPT_LATIN, - af_latin_uniranges, + AF_WRITING_SYSTEM_LATIN, sizeof ( AF_LatinMetricsRec ), - (AF_Script_InitMetricsFunc) af_latin_metrics_init, - (AF_Script_ScaleMetricsFunc)af_latin_metrics_scale, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init, + (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) af_latin_hints_init, - (AF_Script_ApplyHintsFunc) af_latin_hints_apply + (AF_WritingSystem_InitHintsFunc) af_latin_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_latin_hints_apply ) diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h index c5c2d13..2c0bfca 100644 --- a/src/autofit/aflatin.h +++ b/src/autofit/aflatin.h @@ -2,9 +2,10 @@ /* */ /* aflatin.h */ /* */ -/* Auto-fitter hinting routines for latin script (specification). */ +/* Auto-fitter hinting routines for latin writing system */ +/* (specification). */ /* */ -/* Copyright 2003-2007, 2009, 2011 by */ +/* Copyright 2003-2007, 2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,10 +25,9 @@ FT_BEGIN_HEADER + /* the `latin' writing system */ - /* the latin-specific script class */ - - AF_DECLARE_SCRIPT_CLASS(af_latin_script_class) + AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin_writing_system_class ) /* constants are given with units_per_em == 2048 in mind */ @@ -46,40 +46,30 @@ FT_BEGIN_HEADER /* * The following declarations could be embedded in the file `aflatin.c'; - * they have been made semi-public to allow alternate script hinters to - * re-use some of them. + * they have been made semi-public to allow alternate writing system + * hinters to re-use some of them. */ - /* Latin (global) metrics management */ - - enum - { - AF_LATIN_BLUE_CAPITAL_TOP, - AF_LATIN_BLUE_CAPITAL_BOTTOM, - AF_LATIN_BLUE_SMALL_F_TOP, - AF_LATIN_BLUE_SMALL_TOP, - AF_LATIN_BLUE_SMALL_BOTTOM, - AF_LATIN_BLUE_SMALL_MINOR, - - AF_LATIN_BLUE_MAX - }; - - -#define AF_LATIN_IS_TOP_BLUE( b ) ( (b) == AF_LATIN_BLUE_CAPITAL_TOP || \ - (b) == AF_LATIN_BLUE_SMALL_F_TOP || \ - (b) == AF_LATIN_BLUE_SMALL_TOP ) +#define AF_LATIN_IS_TOP_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_LATIN_TOP ) +#define AF_LATIN_IS_NEUTRAL_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_LATIN_NEUTRAL ) +#define AF_LATIN_IS_X_HEIGHT_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_LATIN_X_HEIGHT ) +#define AF_LATIN_IS_LONG_BLUE( b ) \ + ( (b)->properties & AF_BLUE_PROPERTY_LATIN_LONG ) #define AF_LATIN_MAX_WIDTHS 16 -#define AF_LATIN_MAX_BLUES AF_LATIN_BLUE_MAX enum { - AF_LATIN_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */ - AF_LATIN_BLUE_TOP = 1 << 1, /* result of AF_LATIN_IS_TOP_BLUE */ - AF_LATIN_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */ - /* optimization */ + AF_LATIN_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */ + AF_LATIN_BLUE_TOP = 1 << 1, /* set if we have a top blue zone */ + AF_LATIN_BLUE_NEUTRAL = 1 << 2, /* set if we have neutral blue zone */ + AF_LATIN_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */ + /* optimization */ AF_LATIN_BLUE_FLAG_MAX }; @@ -106,7 +96,7 @@ FT_BEGIN_HEADER /* ignored for horizontal metrics */ FT_UInt blue_count; - AF_LatinBlueRec blues[AF_LATIN_BLUE_MAX]; + AF_LatinBlueRec blues[AF_BLUE_STRINGSET_MAX]; FT_Fixed org_scale; FT_Pos org_delta; @@ -116,9 +106,9 @@ FT_BEGIN_HEADER typedef struct AF_LatinMetricsRec_ { - AF_ScriptMetricsRec root; - FT_UInt units_per_em; - AF_LatinAxisRec axis[AF_DIMENSION_MAX]; + AF_StyleMetricsRec root; + FT_UInt units_per_em; + AF_LatinAxisRec axis[AF_DIMENSION_MAX]; } AF_LatinMetricsRec, *AF_LatinMetrics; @@ -133,8 +123,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) af_latin_metrics_init_widths( AF_LatinMetrics metrics, - FT_Face face, - FT_ULong charcode ); + FT_Face face ); FT_LOCAL( void ) af_latin_metrics_check_digits( AF_LatinMetrics metrics, @@ -174,31 +163,27 @@ FT_BEGIN_HEADER /* - * This shouldn't normally be exported. However, other scripts might - * like to use this function as-is. + * The next functions shouldn't normally be exported. However, other + * writing systems might like to use these functions as-is. */ FT_LOCAL( FT_Error ) af_latin_hints_compute_segments( AF_GlyphHints hints, AF_Dimension dim ); - /* - * This shouldn't normally be exported. However, other scripts might - * want to use this function as-is. - */ FT_LOCAL( void ) af_latin_hints_link_segments( AF_GlyphHints hints, + FT_UInt width_count, + AF_WidthRec* widths, AF_Dimension dim ); - /* - * This shouldn't normally be exported. However, other scripts might - * want to use this function as-is. - */ FT_LOCAL( FT_Error ) af_latin_hints_compute_edges( AF_GlyphHints hints, AF_Dimension dim ); FT_LOCAL( FT_Error ) af_latin_hints_detect_features( AF_GlyphHints hints, + FT_UInt width_count, + AF_WidthRec* widths, AF_Dimension dim ); /* */ diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c index ea6af8d..07590b3 100644 --- a/src/autofit/aflatin2.c +++ b/src/autofit/aflatin2.c @@ -2,9 +2,9 @@ /* */ /* aflatin2.c */ /* */ -/* Auto-fitter hinting routines for latin script (body). */ +/* Auto-fitter hinting routines for latin writing system (body). */ /* */ -/* Copyright 2003-2011 by */ +/* Copyright 2003-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,6 +18,7 @@ #include FT_ADVANCES_H +#include "afglobal.h" #include "aflatin.h" #include "aflatin2.h" #include "aferrors.h" @@ -56,8 +57,7 @@ FT_LOCAL_DEF( void ) af_latin2_metrics_init_widths( AF_LatinMetrics metrics, - FT_Face face, - FT_ULong charcode ) + FT_Face face ) { /* scan the array of segments in each direction */ AF_GlyphHintsRec hints[1]; @@ -76,7 +76,9 @@ AF_Scaler scaler = &dummy->root.scaler; - glyph_index = FT_Get_Char_Index( face, charcode ); + glyph_index = FT_Get_Char_Index( + face, + metrics->root.style_class->standard_char ); if ( glyph_index == 0 ) goto Exit; @@ -93,7 +95,7 @@ scaler->render_mode = FT_RENDER_MODE_NORMAL; scaler->flags = 0; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy ); error = af_glyph_hints_reload( hints, &face->glyph->outline ); if ( error ) @@ -198,8 +200,8 @@ /* 'af_latin2_blue_chars[blues]' string, then compute its top-most or */ /* bottom-most points (depending on `AF_IS_TOP_BLUE') */ - FT_TRACE5(( "blue zones computation\n" )); - FT_TRACE5(( "------------------------------------------------\n" )); + FT_TRACE5(( "blue zones computation\n" + "======================\n\n" )); for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ ) { @@ -209,7 +211,7 @@ FT_Pos* blue_shoot; - FT_TRACE5(( "blue %3d: ", bb )); + FT_TRACE5(( "blue zone %d:\n", bb )); num_flats = 0; num_rounds = 0; @@ -222,8 +224,6 @@ FT_Bool round; - FT_TRACE5(( "'%c'", *p )); - /* load the character in the face -- skip unknown or empty ones */ glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p ); if ( glyph_index == 0 ) @@ -285,13 +285,14 @@ best_last = last; } } - FT_TRACE5(( "%5d", best_y )); + FT_TRACE5(( " %c %d", *p, best_y )); } /* now check whether the point belongs to a straight or round */ /* segment; we first need to find in which contour the extremum */ /* lies, then inspect its previous and next points */ { + FT_Pos best_x = points[best_point].x; FT_Int start, end, prev, next; FT_Pos dist; @@ -302,13 +303,16 @@ do { - prev = start-1; + prev = start - 1; if ( prev < best_first ) prev = best_last; - dist = points[prev].y - best_y; - if ( dist < -5 || dist > 5 ) - break; + dist = FT_ABS( points[prev].y - best_y ); + /* accept a small distance or a small angle (both values are */ + /* heuristic; value 20 corresponds to approx. 2.9 degrees) */ + if ( dist > 5 ) + if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist ) + break; start = prev; @@ -316,13 +320,14 @@ do { - next = end+1; + next = end + 1; if ( next > best_last ) next = best_first; - dist = points[next].y - best_y; - if ( dist < -5 || dist > 5 ) - break; + dist = FT_ABS( points[next].y - best_y ); + if ( dist > 5 ) + if ( FT_ABS( points[next].x - best_x ) <= 20 * dist ) + break; end = next; @@ -333,7 +338,7 @@ FT_CURVE_TAG( glyph->outline.tags[start] ) != FT_CURVE_TAG_ON || FT_CURVE_TAG( glyph->outline.tags[ end ] ) != FT_CURVE_TAG_ON ); - FT_TRACE5(( "%c ", round ? 'r' : 'f' )); + FT_TRACE5(( " (%s)\n", round ? "round" : "flat" )); } if ( round ) @@ -342,15 +347,13 @@ flats[num_flats++] = best_y; } - FT_TRACE5(( "\n" )); - if ( num_flats == 0 && num_rounds == 0 ) { /* * we couldn't find a single glyph to compute this blue zone, * we will simply ignore it then */ - FT_TRACE5(( "empty\n" )); + FT_TRACE5(( " empty\n" )); continue; } @@ -393,7 +396,13 @@ if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref ) - *blue_shoot = *blue_ref = ( shoot + ref ) / 2; + { + *blue_ref = + *blue_shoot = ( shoot + ref ) / 2; + + FT_TRACE5(( " [overshoot smaller than reference," + " taking mean value]\n" )); + } } blue->flags = 0; @@ -401,14 +410,16 @@ blue->flags |= AF_LATIN_BLUE_TOP; /* - * The following flags is used later to adjust the y and x scales + * The following flag is used later to adjust the y and x scales * in order to optimize the pixel grid alignment of the top of small * letters. */ - if ( bb == AF_LATIN_BLUE_SMALL_TOP ) + if ( AF_LATIN_IS_X_HEIGHT_BLUE( bb ) ) blue->flags |= AF_LATIN_BLUE_ADJUSTMENT; - FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot )); + FT_TRACE5(( " -> reference = %ld\n" + " overshoot = %ld\n", + *blue_ref, *blue_shoot )); } return; @@ -465,7 +476,7 @@ af_latin2_metrics_init( AF_LatinMetrics metrics, FT_Face face ) { - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_CharMap oldmap = face->charmap; FT_UInt ee; @@ -491,14 +502,13 @@ if ( !error ) { - /* For now, compute the standard width and height from the `o'. */ - af_latin2_metrics_init_widths( metrics, face, 'o' ); + af_latin2_metrics_init_widths( metrics, face ); af_latin2_metrics_init_blues( metrics, face ); af_latin2_metrics_check_digits( metrics, face ); } FT_Set_Charmap( face, oldmap ); - return AF_Err_Ok; + return FT_Err_Ok; } @@ -553,8 +563,26 @@ if ( blue ) { - FT_Pos scaled = FT_MulFix( blue->shoot.org, scaler->y_scale ); - FT_Pos fitted = ( scaled + 40 ) & ~63; + FT_Pos scaled; + FT_Pos threshold; + FT_Pos fitted; + FT_UInt limit; + FT_UInt ppem; + + + scaled = FT_MulFix( blue->shoot.org, scaler->y_scale ); + ppem = metrics->root.scaler.face->size->metrics.x_ppem; + limit = metrics->root.globals->increase_x_height; + threshold = 40; + + /* if the `increase-x-height' property is active, */ + /* we round up much more often */ + if ( limit && + ppem <= limit && + ppem >= AF_PROP_INCREASE_X_HEIGHT_MIN ) + threshold = 52; + + fitted = ( scaled + threshold ) & ~63; #if 1 if ( scaled != fitted ) @@ -658,6 +686,7 @@ { metrics->root.scaler.render_mode = scaler->render_mode; metrics->root.scaler.face = scaler->face; + metrics->root.scaler.flags = scaler->flags; af_latin2_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ ); af_latin2_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT ); @@ -680,7 +709,7 @@ { AF_AxisHints axis = &hints->axis[dim]; FT_Memory memory = hints->memory; - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; AF_Segment segment = NULL; AF_SegmentRec seg0; AF_Point* contour = hints->contours; @@ -796,17 +825,17 @@ segment->dir = first->out_dir; segment->first = first; segment->last = point; - segment->pos = (FT_Short)(( min_u + max_u ) >> 1); + segment->pos = (FT_Short)( ( min_u + max_u ) >> 1 ); segment->min_coord = (FT_Short) min_v; segment->max_coord = (FT_Short) max_v; - segment->height = (FT_Short)(max_v - min_v); + segment->height = (FT_Short)( max_v - min_v ); /* a segment is round if it doesn't have successive */ /* on-curve points. */ { AF_Point pt = first; AF_Point last = point; - AF_Flags f0 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL); + AF_Flags f0 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL ); AF_Flags f1; @@ -815,7 +844,7 @@ for ( ; pt != last; f0 = f1 ) { pt = pt->next; - f1 = (AF_Flags)(pt->flags & AF_FLAG_CONTROL); + f1 = (AF_Flags)( pt->flags & AF_FLAG_CONTROL ); if ( !f0 && !f1 ) break; @@ -832,7 +861,7 @@ break; /* jump to the start of the next segment, if any */ - while ( FT_ABS(point->out_dir) != major_dir ) + while ( FT_ABS( point->out_dir ) != major_dir ) { point = point->next; @@ -861,9 +890,6 @@ FT_Pos last_v = last->v; - if ( first == last ) - continue; - if ( first_v < last_v ) { p = first->prev; @@ -900,16 +926,17 @@ FT_UInt count = axis->num_segments; FT_UInt ii, jj; - for (ii = 0; ii < count; ii++) + for ( ii = 0; ii < count; ii++ ) { if ( segments[ii].dir > 0 ) { - for (jj = ii+1; jj < count; jj++) + for ( jj = ii + 1; jj < count; jj++ ) { if ( segments[jj].dir < 0 ) { AF_SegmentRec tmp; + tmp = segments[ii]; segments[ii] = segments[jj]; segments[jj] = tmp; @@ -954,7 +981,7 @@ #ifdef AF_SORT_SEGMENTS for ( seg1 = segments; seg1 < segment_mid; seg1++ ) { - if ( seg1->dir != axis->major_dir || seg1->first == seg1->last ) + if ( seg1->dir != axis->major_dir ) continue; for ( seg2 = segment_mid; seg2 < segment_limit; seg2++ ) @@ -962,9 +989,7 @@ /* now compare each segment to the others */ for ( seg1 = segments; seg1 < segment_limit; seg1++ ) { - /* the fake segments are introduced to hint the metrics -- */ - /* we must never link them to anything */ - if ( seg1->dir != axis->major_dir || seg1->first == seg1->last ) + if ( seg1->dir != axis->major_dir ) continue; for ( seg2 = segments; seg2 < segment_limit; seg2++ ) @@ -1036,7 +1061,7 @@ AF_Dimension dim ) { AF_AxisHints axis = &hints->axis[dim]; - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = hints->memory; AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim]; @@ -1070,7 +1095,7 @@ if ( dim == AF_DIMENSION_HORZ ) { if ( laxis->width_count > 0 ) - segment_length_threshold = (laxis->standard_width * 10 ) >> 4; + segment_length_threshold = ( laxis->standard_width * 10 ) >> 4; else segment_length_threshold = FT_DivFix( 64, hints->y_scale ); } @@ -1116,10 +1141,11 @@ { FT_Pos dist = seg->serif->pos - seg->pos; - if (dist < 0) + + if ( dist < 0 ) dist = -dist; - if (dist >= laxis->standard_width >> 1) + if ( dist >= laxis->standard_width >> 1 ) { /* unlink this serif, it is too distant from its reference stem */ seg->serif = NULL; @@ -1163,9 +1189,10 @@ edge->first = seg; edge->last = seg; - edge->fpos = seg->pos; edge->dir = seg->dir; - edge->opos = edge->pos = FT_MulFix( seg->pos, scale ); + edge->fpos = seg->pos; + edge->opos = FT_MulFix( seg->pos, scale ); + edge->pos = edge->opos; seg->edge_next = seg; } else @@ -1417,7 +1444,7 @@ compare = &blue->ref; dist = edge->fpos - compare->org; - if (dist < 0) + if ( dist < 0 ) dist = -dist; dist = FT_MulFix( dist, scale ); @@ -1470,7 +1497,7 @@ FT_Face face = metrics->root.scaler.face; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics ); /* * correct x_scale and y_scale if needed, since they may have @@ -1521,8 +1548,8 @@ * In `light' hinting mode we disable horizontal hinting completely. * We also do it if the face is italic. */ - if ( mode == FT_RENDER_MODE_LIGHT || - (face->style_flags & FT_STYLE_FLAG_ITALIC) != 0 ) + if ( mode == FT_RENDER_MODE_LIGHT || + ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 ) scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL; hints->scaler_flags = scaler_flags; @@ -1603,8 +1630,8 @@ FT_Int sign = 0; FT_Int vertical = ( dim == AF_DIMENSION_VERT ); + FT_UNUSED( base_flags ); - FT_UNUSED(base_flags); if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) || axis->extra_light ) @@ -1734,7 +1761,7 @@ if ( delta < 0 ) delta = -delta; - if (delta >= 16) + if ( delta >= 16 ) { dist = org_dist; if ( dist < 48 ) @@ -1788,7 +1815,7 @@ { FT_UNUSED( hints ); - serif->pos = base->pos + (serif->opos - base->opos); + serif->pos = base->pos + ( serif->opos - base->opos ); } @@ -1870,9 +1897,10 @@ { anchor = edge; - anchor_drift = (anchor->pos - anchor->opos); - if (edge2) - anchor_drift = (anchor_drift + (edge2->pos - edge2->opos)) >> 1; + anchor_drift = ( anchor->pos - anchor->opos ); + if ( edge2 ) + anchor_drift = ( anchor_drift + + ( edge2->pos - edge2->opos ) ) >> 1; } } } @@ -1964,8 +1992,8 @@ edge2->flags |= AF_EDGE_DONE; - anchor_drift = ( (anchor->pos - anchor->opos) + - (edge2->pos - edge2->opos)) >> 1; + anchor_drift = ( ( anchor->pos - anchor->opos ) + + ( edge2->pos - edge2->opos ) ) >> 1; FT_TRACE5(( "DRIFT: %.2f\n", anchor_drift/64.0 )); } @@ -1984,8 +2012,8 @@ (AF_Edge_Flags)edge->flags, (AF_Edge_Flags)edge2->flags ); - org_left = org_pos + ((org_len - cur_len) >> 1); - org_right = org_pos + ((org_len + cur_len) >> 1); + org_left = org_pos + ( ( org_len - cur_len ) >> 1 ); + org_right = org_pos + ( ( org_len + cur_len ) >> 1 ); FT_TRACE5(( "ALIGN: left=%.2f right=%.2f ", org_left / 64.0, org_right / 64.0 )); @@ -2013,13 +2041,13 @@ } /* if the span is within a single pixel, don't touch it */ - if ( FT_PIX_FLOOR(org_left) == FT_PIX_CEIL(org_right) ) + if ( FT_PIX_FLOOR( org_left ) == FT_PIX_CEIL( org_right ) ) { FT_TRACE5(( "single pixel stem\n" )); goto AlignStem; } - if (cur_len <= 96) + if ( cur_len <= 96 ) { /* we want to avoid the absolute worst case which is * when the left and right edges of the span each represent @@ -2027,43 +2055,43 @@ * to 25/75%, since this is much more pleasant to the eye with * very acceptable distortion */ - FT_Pos frac_left = (org_left) & 63; - FT_Pos frac_right = (org_right) & 63; + FT_Pos frac_left = org_left & 63; + FT_Pos frac_right = org_right & 63; if ( frac_left >= 22 && frac_left <= 42 && frac_right >= 22 && frac_right <= 42 ) { org = frac_left; - fit = (org <= 32) ? 16 : 48; - delta = FT_ABS(fit - org); + fit = ( org <= 32 ) ? 16 : 48; + delta = FT_ABS( fit - org ); displacements[count] = fit - org; scores[count++] = delta; - FT_TRACE5(( "dispA=%.2f (%d) ", (fit - org) / 64.0, delta )); + FT_TRACE5(( "dispA=%.2f (%d) ", ( fit - org ) / 64.0, delta )); org = frac_right; - fit = (org <= 32) ? 16 : 48; - delta = FT_ABS(fit - org); + fit = ( org <= 32 ) ? 16 : 48; + delta = FT_ABS( fit - org ); displacements[count] = fit - org; scores[count++] = delta; - FT_TRACE5(( "dispB=%.2f (%d) ", (fit - org) / 64.0, delta )); + FT_TRACE5(( "dispB=%.2f (%d) ", ( fit - org ) / 64.0, delta )); } } /* snapping the left edge to the grid */ org = org_left; - fit = FT_PIX_ROUND(org); - delta = FT_ABS(fit - org); + fit = FT_PIX_ROUND( org ); + delta = FT_ABS( fit - org ); displacements[count] = fit - org; scores[count++] = delta; - FT_TRACE5(( "dispC=%.2f (%d) ", (fit - org) / 64.0, delta )); + FT_TRACE5(( "dispC=%.2f (%d) ", ( fit - org ) / 64.0, delta )); /* snapping the right edge to the grid */ org = org_right; - fit = FT_PIX_ROUND(org); - delta = FT_ABS(fit - org); + fit = FT_PIX_ROUND( org ); + delta = FT_ABS( fit - org ); displacements[count] = fit - org; scores[count++] = delta; - FT_TRACE5(( "dispD=%.2f (%d) ", (fit - org) / 64.0, delta )); + FT_TRACE5(( "dispD=%.2f (%d) ", ( fit - org ) / 64.0, delta )); /* now find the best displacement */ { @@ -2071,9 +2099,9 @@ FT_Pos best_disp = displacements[0]; FT_UInt nn; - for (nn = 1; nn < count; nn++) + for ( nn = 1; nn < count; nn++ ) { - if (scores[nn] < best_score) + if ( scores[nn] < best_score ) { best_score = scores[nn]; best_disp = displacements[nn]; @@ -2086,7 +2114,7 @@ } AlignStem: - edge->pos = cur_center - (cur_len >> 1); + edge->pos = cur_center - ( cur_len >> 1 ); edge2->pos = edge->pos + cur_len; FT_TRACE5(( "STEM1: %d (opos=%.2f) to %d (opos=%.2f)" @@ -2348,26 +2376,19 @@ /*************************************************************************/ - static const AF_Script_UniRangeRec af_latin2_uniranges[] = - { - AF_UNIRANGE_REC( 32UL, 127UL ), /* TODO: Add new Unicode ranges here! */ - AF_UNIRANGE_REC( 160UL, 255UL ), - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - + AF_DEFINE_WRITING_SYSTEM_CLASS( + af_latin2_writing_system_class, - AF_DEFINE_SCRIPT_CLASS( af_latin2_script_class, - AF_SCRIPT_LATIN2, - af_latin2_uniranges, + AF_WRITING_SYSTEM_LATIN2, sizeof ( AF_LatinMetricsRec ), - (AF_Script_InitMetricsFunc) af_latin2_metrics_init, - (AF_Script_ScaleMetricsFunc)af_latin2_metrics_scale, - (AF_Script_DoneMetricsFunc) NULL, + (AF_WritingSystem_InitMetricsFunc) af_latin2_metrics_init, + (AF_WritingSystem_ScaleMetricsFunc)af_latin2_metrics_scale, + (AF_WritingSystem_DoneMetricsFunc) NULL, - (AF_Script_InitHintsFunc) af_latin2_hints_init, - (AF_Script_ApplyHintsFunc) af_latin2_hints_apply + (AF_WritingSystem_InitHintsFunc) af_latin2_hints_init, + (AF_WritingSystem_ApplyHintsFunc) af_latin2_hints_apply ) diff --git a/src/autofit/aflatin2.h b/src/autofit/aflatin2.h index 925c621..b5d252a 100644 --- a/src/autofit/aflatin2.h +++ b/src/autofit/aflatin2.h @@ -2,9 +2,10 @@ /* */ /* aflatin2.h */ /* */ -/* Auto-fitter hinting routines for latin script (specification). */ +/* Auto-fitter hinting routines for latin writing system */ +/* (specification). */ /* */ -/* Copyright 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 2003-2007, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,9 +26,10 @@ FT_BEGIN_HEADER - /* the latin-specific script class */ + /* the `latin' writing system */ + + AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin2_writing_system_class ) - AF_DECLARE_SCRIPT_CLASS(af_latin2_script_class) /* */ diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 34ef9d8..fb15c87 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (body). */ /* */ -/* Copyright 2003-2009, 2011-2012 by */ +/* Copyright 2003-2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,18 +16,23 @@ /***************************************************************************/ +#include "afglobal.h" #include "afloader.h" #include "afhints.h" -#include "afglobal.h" #include "aferrors.h" +#include "afmodule.h" +#include "afpic.h" /* Initialize glyph loader. */ FT_LOCAL_DEF( FT_Error ) - af_loader_init( AF_Loader loader, - FT_Memory memory ) + af_loader_init( AF_Module module ) { + AF_Loader loader = module->loader; + FT_Memory memory = module->root.library->memory; + + FT_ZERO( loader ); af_glyph_hints_init( &loader->hints, memory ); @@ -41,10 +46,11 @@ /* Reset glyph loader and compute globals if necessary. */ FT_LOCAL_DEF( FT_Error ) - af_loader_reset( AF_Loader loader, + af_loader_reset( AF_Module module, FT_Face face ) { - FT_Error error = AF_Err_Ok; + FT_Error error = FT_Err_Ok; + AF_Loader loader = module->loader; loader->face = face; @@ -54,7 +60,7 @@ if ( loader->globals == NULL ) { - error = af_face_globals_new( face, &loader->globals ); + error = af_face_globals_new( face, &loader->globals, module ); if ( !error ) { face->autohint.data = @@ -71,8 +77,11 @@ /* Finalize glyph loader. */ FT_LOCAL_DEF( void ) - af_loader_done( AF_Loader loader ) + af_loader_done( AF_Module module ) { + AF_Loader loader = module->loader; + + af_glyph_hints_done( &loader->hints ); loader->face = NULL; @@ -100,13 +109,15 @@ FT_Error error; FT_Face face = loader->face; FT_GlyphLoader gloader = loader->gloader; - AF_ScriptMetrics metrics = loader->metrics; + AF_StyleMetrics metrics = loader->metrics; AF_GlyphHints hints = &loader->hints; FT_GlyphSlot slot = face->glyph; FT_Slot_Internal internal = slot->internal; + FT_Int32 flags; - error = FT_Load_Glyph( face, glyph_index, load_flags ); + flags = load_flags | FT_LOAD_LINEAR_DESIGN; + error = FT_Load_Glyph( face, glyph_index, flags ); if ( error ) goto Exit; @@ -120,14 +131,10 @@ loader->trans_delta = internal->glyph_delta; inverse = loader->trans_matrix; - FT_Matrix_Invert( &inverse ); - FT_Vector_Transform( &loader->trans_delta, &inverse ); + if ( !FT_Matrix_Invert( &inverse ) ) + FT_Vector_Transform( &loader->trans_delta, &inverse ); } - /* set linear metrics */ - slot->linearHoriAdvance = slot->metrics.horiAdvance; - slot->linearVertAdvance = slot->metrics.vertAdvance; - switch ( slot->format ) { case FT_GLYPH_FORMAT_OUTLINE: @@ -137,8 +144,8 @@ loader->trans_delta.x, loader->trans_delta.y ); - /* copy the outline points in the loader's current */ - /* extra points which is used to keep original glyph coordinates */ + /* copy the outline points in the loader's current */ + /* extra points which are used to keep original glyph coordinates */ error = FT_GLYPHLOADER_CHECK_POINTS( gloader, slot->outline.n_points + 4, slot->outline.n_contours ); @@ -174,10 +181,20 @@ /* now load the slot image into the auto-outline and run the */ /* automatic hinting process */ - if ( metrics->clazz->script_hints_apply ) - metrics->clazz->script_hints_apply( hints, - &gloader->current.outline, - metrics ); + { +#ifdef FT_CONFIG_OPTION_PIC + AF_FaceGlobals globals = loader->globals; +#endif + AF_StyleClass style_class = metrics->style_class; + AF_WritingSystemClass writing_system_class = + AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; + + + if ( writing_system_class->style_hints_apply ) + writing_system_class->style_hints_apply( hints, + &gloader->current.outline, + metrics ); + } /* we now need to adjust the metrics according to the change in */ /* width/positioning that occurred during the hinting process */ @@ -301,12 +318,7 @@ /* recompute subglyph pointer */ subglyph = gloader->base.subglyphs + num_base_subgs + nn; - if ( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS ) - { - pp1 = loader->pp1; - pp2 = loader->pp2; - } - else + if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS ) ) { loader->pp1 = pp1; loader->pp2 = pp2; @@ -343,14 +355,14 @@ if ( start_point + k >= num_base_points || l >= (FT_UInt)num_new_points ) { - error = AF_Err_Invalid_Composite; + error = FT_THROW( Invalid_Composite ); goto Exit; } l += num_base_points; - /* for now, only use the current point coordinates; */ - /* we may consider another approach in the near future */ + /* for now, only use the current point coordinates; */ + /* we eventually may consider another approach */ p1 = gloader->base.outline.points + start_point + k; p2 = gloader->base.outline.points + start_point + l; @@ -381,7 +393,7 @@ default: /* we don't support other formats (yet?) */ - error = AF_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); } Hint_Metrics: @@ -484,18 +496,19 @@ /* Load a glyph. */ FT_LOCAL_DEF( FT_Error ) - af_loader_load_glyph( AF_Loader loader, + af_loader_load_glyph( AF_Module module, FT_Face face, FT_UInt gindex, FT_Int32 load_flags ) { FT_Error error; - FT_Size size = face->size; + FT_Size size = face->size; + AF_Loader loader = module->loader; AF_ScalerRec scaler; if ( !size ) - return AF_Err_Invalid_Argument; + return FT_THROW( Invalid_Size_Handle ); FT_ZERO( &scaler ); @@ -508,37 +521,45 @@ scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags ); scaler.flags = 0; /* XXX: fix this */ - error = af_loader_reset( loader, face ); + error = af_loader_reset( module, face ); if ( !error ) { - AF_ScriptMetrics metrics; - FT_UInt options = 0; + AF_StyleMetrics metrics; + FT_UInt options = AF_STYLE_NONE_DFLT; #ifdef FT_OPTION_AUTOFIT2 - /* XXX: undocumented hook to activate the latin2 hinter */ + /* XXX: undocumented hook to activate the latin2 writing system */ if ( load_flags & ( 1UL << 20 ) ) - options = 2; + options = AF_STYLE_LTN2_DFLT; #endif error = af_face_globals_get_metrics( loader->globals, gindex, options, &metrics ); if ( !error ) { +#ifdef FT_CONFIG_OPTION_PIC + AF_FaceGlobals globals = loader->globals; +#endif + AF_StyleClass style_class = metrics->style_class; + AF_WritingSystemClass writing_system_class = + AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system]; + + loader->metrics = metrics; - if ( metrics->clazz->script_metrics_scale ) - metrics->clazz->script_metrics_scale( metrics, &scaler ); + if ( writing_system_class->style_metrics_scale ) + writing_system_class->style_metrics_scale( metrics, &scaler ); else metrics->scaler = scaler; load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM; load_flags &= ~FT_LOAD_RENDER; - if ( metrics->clazz->script_hints_init ) + if ( writing_system_class->style_hints_init ) { - error = metrics->clazz->script_hints_init( &loader->hints, - metrics ); + error = writing_system_class->style_hints_init( &loader->hints, + metrics ); if ( error ) goto Exit; } diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h index eec0e92..9601e24 100644 --- a/src/autofit/afloader.h +++ b/src/autofit/afloader.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (specification). */ /* */ -/* Copyright 2003-2005, 2011-2012 by */ +/* Copyright 2003-2005, 2011-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,13 +25,26 @@ FT_BEGIN_HEADER - typedef struct AF_LoaderRec_ + typedef struct AF_ModuleRec_* AF_Module; + + /* + * The autofitter module's (global) data structure to communicate with + * actual fonts. If necessary, `local' data like the current face, the + * current face's auto-hint data, or the current glyph's parameters + * relevant to auto-hinting are `swapped in'. Cf. functions like + * `af_loader_reset' and `af_loader_load_g'. + */ + + typedef struct AF_LoaderRec_ { - FT_Face face; /* current face */ - AF_FaceGlobals globals; /* current face globals */ - FT_GlyphLoader gloader; /* glyph loader */ + /* current face data */ + FT_Face face; + AF_FaceGlobals globals; + + /* current glyph data */ + FT_GlyphLoader gloader; AF_GlyphHintsRec hints; - AF_ScriptMetrics metrics; + AF_StyleMetrics metrics; FT_Bool transformed; FT_Matrix trans_matrix; FT_Vector trans_delta; @@ -43,21 +56,20 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Error ) - af_loader_init( AF_Loader loader, - FT_Memory memory ); + af_loader_init( AF_Module module ); FT_LOCAL( FT_Error ) - af_loader_reset( AF_Loader loader, + af_loader_reset( AF_Module module, FT_Face face ); FT_LOCAL( void ) - af_loader_done( AF_Loader loader ); + af_loader_done( AF_Module module ); FT_LOCAL( FT_Error ) - af_loader_load_glyph( AF_Loader loader, + af_loader_load_glyph( AF_Module module, FT_Face face, FT_UInt gindex, FT_Int32 load_flags ); diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c index 20b6218..641e03e 100644 --- a/src/autofit/afmodule.c +++ b/src/autofit/afmodule.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module implementation (body). */ /* */ -/* Copyright 2003-2006, 2009, 2011 by */ +/* Copyright 2003-2006, 2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,8 +16,10 @@ /***************************************************************************/ +#include "afglobal.h" #include "afmodule.h" #include "afloader.h" +#include "aferrors.h" #include "afpic.h" #ifdef FT_DEBUG_AUTOFIT @@ -28,66 +30,280 @@ #endif #include FT_INTERNAL_OBJECTS_H +#include FT_INTERNAL_DEBUG_H +#include FT_AUTOHINTER_H +#include FT_SERVICE_PROPERTIES_H - typedef struct FT_AutofitterRec_ + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_afmodule + + + static FT_Error + af_property_get_face_globals( FT_Face face, + AF_FaceGlobals* aglobals, + AF_Module module ) + { + FT_Error error = FT_Err_Ok; + AF_FaceGlobals globals; + + + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + globals = (AF_FaceGlobals)face->autohint.data; + if ( !globals ) + { + /* trigger computation of the global style data */ + /* in case it hasn't been done yet */ + error = af_face_globals_new( face, &globals, module ); + if ( !error ) + { + face->autohint.data = + (FT_Pointer)globals; + face->autohint.finalizer = + (FT_Generic_Finalizer)af_face_globals_free; + } + } + + if ( !error ) + *aglobals = globals; + + return error; + } + + + static FT_Error + af_property_set( FT_Module ft_module, + const char* property_name, + const void* value ) + { + FT_Error error = FT_Err_Ok; + AF_Module module = (AF_Module)ft_module; + + + if ( !ft_strcmp( property_name, "fallback-script" ) ) + { + FT_UInt* fallback_script = (FT_UInt*)value; + + FT_UInt ss; + + + /* We translate the fallback script to a fallback style that uses */ + /* `fallback-script' as its script and `AF_COVERAGE_NONE' as its */ + /* coverage value. */ + for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ ) + { + AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss]; + + + if ( (FT_UInt)style_class->script == *fallback_script && + style_class->coverage == AF_COVERAGE_DEFAULT ) + { + module->fallback_style = ss; + break; + } + } + + if ( !AF_STYLE_CLASSES_GET[ss] ) + { + FT_TRACE0(( "af_property_set: Invalid value %d for property `%s'\n", + fallback_script, property_name )); + return FT_THROW( Invalid_Argument ); + } + + return error; + } + else if ( !ft_strcmp( property_name, "default-script" ) ) + { + FT_UInt* default_script = (FT_UInt*)value; + + + module->default_script = *default_script; + + return error; + } + else if ( !ft_strcmp( property_name, "increase-x-height" ) ) + { + FT_Prop_IncreaseXHeight* prop = (FT_Prop_IncreaseXHeight*)value; + AF_FaceGlobals globals; + + + error = af_property_get_face_globals( prop->face, &globals, module ); + if ( !error ) + globals->increase_x_height = prop->limit; + + return error; + } + + FT_TRACE0(( "af_property_set: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + static FT_Error + af_property_get( FT_Module ft_module, + const char* property_name, + void* value ) + { + FT_Error error = FT_Err_Ok; + AF_Module module = (AF_Module)ft_module; + FT_UInt fallback_style = module->fallback_style; + FT_UInt default_script = module->default_script; + + + if ( !ft_strcmp( property_name, "glyph-to-script-map" ) ) + { + FT_Prop_GlyphToScriptMap* prop = (FT_Prop_GlyphToScriptMap*)value; + AF_FaceGlobals globals; + + + error = af_property_get_face_globals( prop->face, &globals, module ); + if ( !error ) + prop->map = globals->glyph_styles; + + return error; + } + else if ( !ft_strcmp( property_name, "fallback-script" ) ) + { + FT_UInt* val = (FT_UInt*)value; + + AF_StyleClass style_class = AF_STYLE_CLASSES_GET[fallback_style]; + + + *val = style_class->script; + + return error; + } + else if ( !ft_strcmp( property_name, "default-script" ) ) + { + FT_UInt* val = (FT_UInt*)value; + + + *val = default_script; + + return error; + } + else if ( !ft_strcmp( property_name, "increase-x-height" ) ) + { + FT_Prop_IncreaseXHeight* prop = (FT_Prop_IncreaseXHeight*)value; + AF_FaceGlobals globals; + + + error = af_property_get_face_globals( prop->face, &globals, module ); + if ( !error ) + prop->limit = globals->increase_x_height; + + return error; + } + + + FT_TRACE0(( "af_property_get: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + FT_DEFINE_SERVICE_PROPERTIESREC( + af_service_properties, + (FT_Properties_SetFunc)af_property_set, + (FT_Properties_GetFunc)af_property_get ) + + + FT_DEFINE_SERVICEDESCREC1( + af_services, + FT_SERVICE_ID_PROPERTIES, &AF_SERVICE_PROPERTIES_GET ) + + + FT_CALLBACK_DEF( FT_Module_Interface ) + af_get_interface( FT_Module module, + const char* module_interface ) { - FT_ModuleRec root; - AF_LoaderRec loader[1]; + /* AF_SERVICES_GET dereferences `library' in PIC mode */ +#ifdef FT_CONFIG_OPTION_PIC + FT_Library library; + + + if ( !module ) + return NULL; + library = module->library; + if ( !library ) + return NULL; +#else + FT_UNUSED( module ); +#endif - } FT_AutofitterRec, *FT_Autofitter; + return ft_service_list_lookup( AF_SERVICES_GET, module_interface ); + } FT_CALLBACK_DEF( FT_Error ) - af_autofitter_init( FT_Autofitter module ) + af_autofitter_init( FT_Module ft_module ) /* AF_Module */ { - return af_loader_init( module->loader, module->root.library->memory ); + AF_Module module = (AF_Module)ft_module; + + + module->fallback_style = AF_STYLE_FALLBACK; + module->default_script = AF_SCRIPT_DEFAULT; + + return af_loader_init( module ); } FT_CALLBACK_DEF( void ) - af_autofitter_done( FT_Autofitter module ) + af_autofitter_done( FT_Module ft_module ) /* AF_Module */ { - af_loader_done( module->loader ); + AF_Module module = (AF_Module)ft_module; + + + af_loader_done( module ); } FT_CALLBACK_DEF( FT_Error ) - af_autofitter_load_glyph( FT_Autofitter module, - FT_GlyphSlot slot, - FT_Size size, - FT_UInt glyph_index, - FT_Int32 load_flags ) + af_autofitter_load_glyph( AF_Module module, + FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_Int32 load_flags ) { FT_UNUSED( size ); - return af_loader_load_glyph( module->loader, slot->face, + return af_loader_load_glyph( module, slot->face, glyph_index, load_flags ); } - FT_DEFINE_AUTOHINTER_SERVICE( - af_autofitter_service, - NULL, - NULL, - NULL, - (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph ) + FT_DEFINE_AUTOHINTER_INTERFACE( + af_autofitter_interface, + NULL, /* reset_face */ + NULL, /* get_global_hints */ + NULL, /* done_global_hints */ + (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph ) /* load_glyph */ + FT_DEFINE_MODULE( autofit_module_class, FT_MODULE_HINTER, - sizeof ( FT_AutofitterRec ), + sizeof ( AF_ModuleRec ), "autofitter", 0x10000L, /* version 1.0 of the autofitter */ 0x20000L, /* requires FreeType 2.0 or above */ - (const void*)&AF_AF_AUTOFITTER_SERVICE_GET, + (const void*)&AF_INTERFACE_GET, (FT_Module_Constructor)af_autofitter_init, (FT_Module_Destructor) af_autofitter_done, - (FT_Module_Requester) NULL ) + (FT_Module_Requester) af_get_interface ) /* END */ diff --git a/src/autofit/afmodule.h b/src/autofit/afmodule.h index d979239..20b7b9f 100644 --- a/src/autofit/afmodule.h +++ b/src/autofit/afmodule.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module implementation (specification). */ /* */ -/* Copyright 2003, 2004, 2005 by */ +/* Copyright 2003-2005, 2009, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,9 +23,31 @@ #include FT_INTERNAL_OBJECTS_H #include FT_MODULE_H +#include "afloader.h" + FT_BEGIN_HEADER + + /* + * This is the `extended' FT_Module structure which holds the + * autofitter's global data. Right before hinting a glyph, the data + * specific to the glyph's face (blue zones, stem widths, etc.) are + * loaded into `loader' (see function `af_loader_reset'). + */ + + typedef struct AF_ModuleRec_ + { + FT_ModuleRec root; + + FT_UInt fallback_style; + FT_UInt default_script; + + AF_LoaderRec loader[1]; + + } AF_ModuleRec; + + FT_DECLARE_MODULE(autofit_module_class) diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c index 87074af..cb29fd7 100644 --- a/src/autofit/afpic.c +++ b/src/autofit/afpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for autofit module. */ /* */ -/* Copyright 2009, 2010, 2011 by */ +/* Copyright 2009-2014 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,23 +20,35 @@ #include FT_FREETYPE_H #include FT_INTERNAL_OBJECTS_H #include "afpic.h" +#include "afglobal.h" #include "aferrors.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from afmodule.c */ - void FT_Init_Class_af_autofitter_service( - FT_Library library, - FT_AutoHinter_ServiceRec* clazz ); - - /* forward declaration of PIC init functions from script classes */ -#include "aflatin.h" -#ifdef FT_OPTION_AUTOFIT2 -#include "aflatin2.h" -#endif -#include "afcjk.h" -#include "afdummy.h" -#include "afindic.h" + FT_Error + FT_Create_Class_af_services( FT_Library library, + FT_ServiceDescRec** output_class ); + + void + FT_Destroy_Class_af_services( FT_Library library, + FT_ServiceDescRec* clazz ); + + void + FT_Init_Class_af_service_properties( FT_Service_PropertiesRec* clazz ); + + void FT_Init_Class_af_autofitter_interface( + FT_Library library, + FT_AutoHinter_InterfaceRec* clazz ); + + + /* forward declaration of PIC init functions from writing system classes */ +#undef WRITING_SYSTEM +#define WRITING_SYSTEM( ws, WS ) /* empty */ + +#include "afwrtsys.h" + void autofit_module_class_pic_free( FT_Library library ) @@ -47,7 +59,15 @@ if ( pic_container->autofit ) { - FT_FREE( pic_container->autofit ); + AFModulePIC* container = (AFModulePIC*)pic_container->autofit; + + + if ( container->af_services ) + FT_Destroy_Class_af_services( library, + container->af_services ); + container->af_services = NULL; + + FT_FREE( container ); pic_container->autofit = NULL; } } @@ -58,8 +78,8 @@ { FT_PIC_Container* pic_container = &library->pic_container; FT_UInt ss; - FT_Error error = AF_Err_Ok; - AFModulePIC* container; + FT_Error error = FT_Err_Ok; + AFModulePIC* container = NULL; FT_Memory memory = library->memory; @@ -71,39 +91,61 @@ /* initialize pointer table - */ /* this is how the module usually expects this data */ - for ( ss = 0 ; ss < AF_SCRIPT_CLASSES_REC_COUNT ; ss++ ) - { + error = FT_Create_Class_af_services( library, + &container->af_services ); + if ( error ) + goto Exit; + + FT_Init_Class_af_service_properties( &container->af_service_properties ); + + for ( ss = 0; ss < AF_WRITING_SYSTEM_MAX; ss++ ) + container->af_writing_system_classes[ss] = + &container->af_writing_system_classes_rec[ss]; + container->af_writing_system_classes[AF_WRITING_SYSTEM_MAX] = NULL; + + for ( ss = 0; ss < AF_SCRIPT_MAX; ss++ ) container->af_script_classes[ss] = &container->af_script_classes_rec[ss]; - } - container->af_script_classes[AF_SCRIPT_CLASSES_COUNT - 1] = NULL; + container->af_script_classes[AF_SCRIPT_MAX] = NULL; + + for ( ss = 0; ss < AF_STYLE_MAX; ss++ ) + container->af_style_classes[ss] = + &container->af_style_classes_rec[ss]; + container->af_style_classes[AF_STYLE_MAX] = NULL; + +#undef WRITING_SYSTEM +#define WRITING_SYSTEM( ws, WS ) \ + FT_Init_Class_af_ ## ws ## _writing_system_class( \ + &container->af_writing_system_classes_rec[ss++] ); - /* add call to initialization function when you add new scripts */ ss = 0; - FT_Init_Class_af_dummy_script_class( - &container->af_script_classes_rec[ss++] ); -#ifdef FT_OPTION_AUTOFIT2 - FT_Init_Class_af_latin2_script_class( - &container->af_script_classes_rec[ss++] ); -#endif - FT_Init_Class_af_latin_script_class( - &container->af_script_classes_rec[ss++] ); - FT_Init_Class_af_cjk_script_class( - &container->af_script_classes_rec[ss++] ); - FT_Init_Class_af_indic_script_class( - &container->af_script_classes_rec[ss++] ); - - FT_Init_Class_af_autofitter_service( - library, &container->af_autofitter_service ); - -/* Exit: */ +#include "afwrtsys.h" + +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + FT_Init_Class_af_ ## s ## _script_class( \ + &container->af_script_classes_rec[ss++] ); + ss = 0; +#include "afscript.h" + +#undef STYLE +#define STYLE( s, S, d, ws, sc, bss, c ) \ + FT_Init_Class_af_ ## s ## _style_class( \ + &container->af_style_classes_rec[ss++] ); + + ss = 0; +#include "afstyles.h" + + FT_Init_Class_af_autofitter_interface( + library, &container->af_autofitter_interface ); + + Exit: if ( error ) autofit_module_class_pic_free( library ); return error; } - #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h index 21b0ff9..9a68b4a 100644 --- a/src/autofit/afpic.h +++ b/src/autofit/afpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for autofit module. */ /* */ -/* Copyright 2009, 2011 by */ +/* Copyright 2009, 2011-2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,38 +24,67 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H + #ifndef FT_CONFIG_OPTION_PIC -#define AF_SCRIPT_CLASSES_GET af_script_classes -#define AF_AF_AUTOFITTER_SERVICE_GET af_autofitter_service +#define AF_SERVICES_GET af_services +#define AF_SERVICE_PROPERTIES_GET af_service_properties + +#define AF_WRITING_SYSTEM_CLASSES_GET af_writing_system_classes +#define AF_SCRIPT_CLASSES_GET af_script_classes +#define AF_STYLE_CLASSES_GET af_style_classes +#define AF_INTERFACE_GET af_autofitter_interface #else /* FT_CONFIG_OPTION_PIC */ + /* some include files required for members of AFModulePIC */ +#include FT_SERVICE_PROPERTIES_H + #include "aftypes.h" - /* increase these when you add new scripts, */ - /* and update autofit_module_class_pic_init */ -#ifdef FT_OPTION_AUTOFIT2 -#define AF_SCRIPT_CLASSES_COUNT 6 -#else -#define AF_SCRIPT_CLASSES_COUNT 5 -#endif -#define AF_SCRIPT_CLASSES_REC_COUNT ( AF_SCRIPT_CLASSES_COUNT - 1 ) - typedef struct AFModulePIC_ + typedef struct AFModulePIC_ { - AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT]; - AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT]; - FT_AutoHinter_ServiceRec af_autofitter_service; + FT_ServiceDescRec* af_services; + FT_Service_PropertiesRec af_service_properties; + + AF_WritingSystemClass af_writing_system_classes + [AF_WRITING_SYSTEM_MAX + 1]; + AF_WritingSystemClassRec af_writing_system_classes_rec + [AF_WRITING_SYSTEM_MAX]; + + AF_ScriptClass af_script_classes + [AF_SCRIPT_MAX + 1]; + AF_ScriptClassRec af_script_classes_rec + [AF_SCRIPT_MAX]; + + AF_StyleClass af_style_classes + [AF_STYLE_MAX + 1]; + AF_StyleClassRec af_style_classes_rec + [AF_STYLE_MAX]; + + FT_AutoHinter_InterfaceRec af_autofitter_interface; } AFModulePIC; -#define GET_PIC( lib ) \ + +#define GET_PIC( lib ) \ ( (AFModulePIC*)((lib)->pic_container.autofit) ) -#define AF_SCRIPT_CLASSES_GET \ - ( GET_PIC( FT_FACE_LIBRARY(globals->face) )->af_script_classes ) -#define AF_AF_AUTOFITTER_SERVICE_GET \ - ( GET_PIC( library )->af_autofitter_service ) + +#define AF_SERVICES_GET \ + ( GET_PIC( library )->af_services ) +#define AF_SERVICE_PROPERTIES_GET \ + ( GET_PIC( library )->af_service_properties ) + +#define AF_WRITING_SYSTEM_CLASSES_GET \ + ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_writing_system_classes ) +#define AF_SCRIPT_CLASSES_GET \ + ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_script_classes ) +#define AF_STYLE_CLASSES_GET \ + ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_style_classes ) +#define AF_INTERFACE_GET \ + ( GET_PIC( library )->af_autofitter_interface ) + /* see afpic.c for the implementation */ void diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c new file mode 100644 index 0000000..b2c504d --- /dev/null +++ b/src/autofit/afranges.c @@ -0,0 +1,220 @@ +/***************************************************************************/ +/* */ +/* afranges.c */ +/* */ +/* Auto-fitter Unicode script ranges (body). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#include "afranges.h" + + + const AF_Script_UniRangeRec af_cyrl_uniranges[] = + { + AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */ + AF_UNIRANGE_REC( 0x0500UL, 0x052FUL ), /* Cyrillic Supplement */ + AF_UNIRANGE_REC( 0x2DE0UL, 0x2DFFUL ), /* Cyrillic Extended-A */ + AF_UNIRANGE_REC( 0xA640UL, 0xA69FUL ), /* Cyrillic Extended-B */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + /* there are some characters in the Devanagari Unicode block that are */ + /* generic to Indic scripts; we omit them so that their presence doesn't */ + /* trigger Devanagari */ + + const AF_Script_UniRangeRec af_deva_uniranges[] = + { + AF_UNIRANGE_REC( 0x0900UL, 0x093BUL ), /* Devanagari */ + /* omitting U+093C nukta */ + AF_UNIRANGE_REC( 0x093DUL, 0x0950UL ), + /* omitting U+0951 udatta, U+0952 anudatta */ + AF_UNIRANGE_REC( 0x0953UL, 0x0963UL ), + /* omitting U+0964 danda, U+0965 double danda */ + AF_UNIRANGE_REC( 0x0966UL, 0x097FUL ), + AF_UNIRANGE_REC( 0x20B9UL, 0x20B9UL ), /* (new) Rupee sign */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_grek_uniranges[] = + { + AF_UNIRANGE_REC( 0x0370UL, 0x03FFUL ), /* Greek and Coptic */ + AF_UNIRANGE_REC( 0x1F00UL, 0x1FFFUL ), /* Greek Extended */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_hebr_uniranges[] = + { + AF_UNIRANGE_REC( 0x0590UL, 0x05FFUL ), /* Hebrew */ + AF_UNIRANGE_REC( 0xFB1DUL, 0xFB4FUL ), /* Alphab. Present. Forms (Hebrew) */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_latn_uniranges[] = + { + AF_UNIRANGE_REC( 0x0020UL, 0x007FUL ), /* Basic Latin (no control chars) */ + AF_UNIRANGE_REC( 0x00A0UL, 0x00FFUL ), /* Latin-1 Supplement (no control chars) */ + AF_UNIRANGE_REC( 0x0100UL, 0x017FUL ), /* Latin Extended-A */ + AF_UNIRANGE_REC( 0x0180UL, 0x024FUL ), /* Latin Extended-B */ + AF_UNIRANGE_REC( 0x0250UL, 0x02AFUL ), /* IPA Extensions */ + AF_UNIRANGE_REC( 0x02B0UL, 0x02FFUL ), /* Spacing Modifier Letters */ + AF_UNIRANGE_REC( 0x0300UL, 0x036FUL ), /* Combining Diacritical Marks */ + AF_UNIRANGE_REC( 0x1D00UL, 0x1D7FUL ), /* Phonetic Extensions */ + AF_UNIRANGE_REC( 0x1D80UL, 0x1DBFUL ), /* Phonetic Extensions Supplement */ + AF_UNIRANGE_REC( 0x1DC0UL, 0x1DFFUL ), /* Combining Diacritical Marks Supplement */ + AF_UNIRANGE_REC( 0x1E00UL, 0x1EFFUL ), /* Latin Extended Additional */ + AF_UNIRANGE_REC( 0x2000UL, 0x206FUL ), /* General Punctuation */ + AF_UNIRANGE_REC( 0x2070UL, 0x209FUL ), /* Superscripts and Subscripts */ + AF_UNIRANGE_REC( 0x20A0UL, 0x20B8UL ), /* Currency Symbols ... */ + AF_UNIRANGE_REC( 0x20BAUL, 0x20CFUL ), /* ... except new Rupee sign */ + AF_UNIRANGE_REC( 0x2150UL, 0x218FUL ), /* Number Forms */ + AF_UNIRANGE_REC( 0x2460UL, 0x24FFUL ), /* Enclosed Alphanumerics */ + AF_UNIRANGE_REC( 0x2C60UL, 0x2C7FUL ), /* Latin Extended-C */ + AF_UNIRANGE_REC( 0x2E00UL, 0x2E7FUL ), /* Supplemental Punctuation */ + AF_UNIRANGE_REC( 0xA720UL, 0xA7FFUL ), /* Latin Extended-D */ + AF_UNIRANGE_REC( 0xFB00UL, 0xFB06UL ), /* Alphab. Present. Forms (Latin Ligs) */ + AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ), /* Mathematical Alphanumeric Symbols */ + AF_UNIRANGE_REC( 0x1F100UL, 0x1F1FFUL ), /* Enclosed Alphanumeric Supplement */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_none_uniranges[] = + { + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_telu_uniranges[] = + { + AF_UNIRANGE_REC( 0x0C00UL, 0x0C7FUL ), /* Telugu */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + +#ifdef AF_CONFIG_OPTION_INDIC + + const AF_Script_UniRangeRec af_beng_uniranges[] = + { + AF_UNIRANGE_REC( 0x0980UL, 0x09FFUL ), /* Bengali */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_gujr_uniranges[] = + { + AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL ), /* Gujarati */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_guru_uniranges[] = + { + AF_UNIRANGE_REC( 0x0A00UL, 0x0A7FUL ), /* Gurmukhi */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_knda_uniranges[] = + { + AF_UNIRANGE_REC( 0x0C80UL, 0x0CFFUL ), /* Kannada */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_limb_uniranges[] = + { + AF_UNIRANGE_REC( 0x1900UL, 0x194FUL ), /* Limbu */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_mlym_uniranges[] = + { + AF_UNIRANGE_REC( 0x0D00UL, 0x0D7FUL ), /* Malayalam */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_orya_uniranges[] = + { + AF_UNIRANGE_REC( 0x0B00UL, 0x0B7FUL ), /* Oriya */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_sinh_uniranges[] = + { + AF_UNIRANGE_REC( 0x0D80UL, 0x0DFFUL ), /* Sinhala */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_sund_uniranges[] = + { + AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL ), /* Sundanese */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_sylo_uniranges[] = + { + AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL ), /* Syloti Nagri */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_taml_uniranges[] = + { + AF_UNIRANGE_REC( 0x0B80UL, 0x0BFFUL ), /* Tamil */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + + const AF_Script_UniRangeRec af_tibt_uniranges[] = + { + AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL ), /* Tibetan */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + +#endif /* !AF_CONFIG_OPTION_INDIC */ + +#ifdef AF_CONFIG_OPTION_CJK + + /* this corresponds to Unicode 6.0 */ + + const AF_Script_UniRangeRec af_hani_uniranges[] = + { + AF_UNIRANGE_REC( 0x1100UL, 0x11FFUL ), /* Hangul Jamo */ + AF_UNIRANGE_REC( 0x2E80UL, 0x2EFFUL ), /* CJK Radicals Supplement */ + AF_UNIRANGE_REC( 0x2F00UL, 0x2FDFUL ), /* Kangxi Radicals */ + AF_UNIRANGE_REC( 0x2FF0UL, 0x2FFFUL ), /* Ideographic Description Characters */ + AF_UNIRANGE_REC( 0x3000UL, 0x303FUL ), /* CJK Symbols and Punctuation */ + AF_UNIRANGE_REC( 0x3040UL, 0x309FUL ), /* Hiragana */ + AF_UNIRANGE_REC( 0x30A0UL, 0x30FFUL ), /* Katakana */ + AF_UNIRANGE_REC( 0x3100UL, 0x312FUL ), /* Bopomofo */ + AF_UNIRANGE_REC( 0x3130UL, 0x318FUL ), /* Hangul Compatibility Jamo */ + AF_UNIRANGE_REC( 0x3190UL, 0x319FUL ), /* Kanbun */ + AF_UNIRANGE_REC( 0x31A0UL, 0x31BFUL ), /* Bopomofo Extended */ + AF_UNIRANGE_REC( 0x31C0UL, 0x31EFUL ), /* CJK Strokes */ + AF_UNIRANGE_REC( 0x31F0UL, 0x31FFUL ), /* Katakana Phonetic Extensions */ + AF_UNIRANGE_REC( 0x3200UL, 0x32FFUL ), /* Enclosed CJK Letters and Months */ + AF_UNIRANGE_REC( 0x3300UL, 0x33FFUL ), /* CJK Compatibility */ + AF_UNIRANGE_REC( 0x3400UL, 0x4DBFUL ), /* CJK Unified Ideographs Extension A */ + AF_UNIRANGE_REC( 0x4DC0UL, 0x4DFFUL ), /* Yijing Hexagram Symbols */ + AF_UNIRANGE_REC( 0x4E00UL, 0x9FFFUL ), /* CJK Unified Ideographs */ + AF_UNIRANGE_REC( 0xA960UL, 0xA97FUL ), /* Hangul Jamo Extended-A */ + AF_UNIRANGE_REC( 0xAC00UL, 0xD7AFUL ), /* Hangul Syllables */ + AF_UNIRANGE_REC( 0xD7B0UL, 0xD7FFUL ), /* Hangul Jamo Extended-B */ + AF_UNIRANGE_REC( 0xF900UL, 0xFAFFUL ), /* CJK Compatibility Ideographs */ + AF_UNIRANGE_REC( 0xFE10UL, 0xFE1FUL ), /* Vertical forms */ + AF_UNIRANGE_REC( 0xFE30UL, 0xFE4FUL ), /* CJK Compatibility Forms */ + AF_UNIRANGE_REC( 0xFF00UL, 0xFFEFUL ), /* Halfwidth and Fullwidth Forms */ + AF_UNIRANGE_REC( 0x1B000UL, 0x1B0FFUL ), /* Kana Supplement */ + AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ), /* Tai Xuan Hing Symbols */ + AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ), /* Enclosed Ideographic Supplement */ + AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ), /* CJK Unified Ideographs Extension B */ + AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ), /* CJK Unified Ideographs Extension C */ + AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ), /* CJK Unified Ideographs Extension D */ + AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ), /* CJK Compatibility Ideographs Supplement */ + AF_UNIRANGE_REC( 0UL, 0UL ) + }; + +#endif /* !AF_CONFIG_OPTION_CJK */ + +/* END */ diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h new file mode 100644 index 0000000..fe5b2aa --- /dev/null +++ b/src/autofit/afranges.h @@ -0,0 +1,41 @@ +/***************************************************************************/ +/* */ +/* afranges.h */ +/* */ +/* Auto-fitter Unicode script ranges (specification). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __AFRANGES_H__ +#define __AFRANGES_H__ + + +#include "aftypes.h" + + +FT_BEGIN_HEADER + +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + extern const AF_Script_UniRangeRec af_ ## s ## _uniranges[]; + +#include "afscript.h" + + /* */ + +FT_END_HEADER + +#endif /* __AFRANGES_H__ */ + + +/* END */ diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h new file mode 100644 index 0000000..efe8754 --- /dev/null +++ b/src/autofit/afscript.h @@ -0,0 +1,139 @@ +/***************************************************************************/ +/* */ +/* afscript.h */ +/* */ +/* Auto-fitter scripts (specification only). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /* The following part can be included multiple times. */ + /* Define `SCRIPT' as needed. */ + + + /* Add new scripts here. The first and second arguments are the */ + /* script name in lowercase and uppercase, respectively, followed */ + /* by a description string. Then comes the corresponding HarfBuzz */ + /* script name tag, followed by a string of standard characters (to */ + /* derive the standard width and height of stems). */ + + SCRIPT( cyrl, CYRL, + "Cyrillic", + HB_SCRIPT_CYRILLIC, + 0x43E, 0x41E, 0x0 ) /* оО */ + + SCRIPT( deva, DEVA, + "Devanagari", + HB_SCRIPT_DEVANAGARI, + 0x920, 0x935, 0x91F ) /* ठ व ट */ + + SCRIPT( grek, GREK, + "Greek", + HB_SCRIPT_GREEK, + 0x3BF, 0x39F, 0x0 ) /* οΟ */ + + SCRIPT( hebr, HEBR, + "Hebrew", + HB_SCRIPT_HEBREW, + 0x5DD, 0x0, 0x0 ) /* ם */ + + SCRIPT( latn, LATN, + "Latin", + HB_SCRIPT_LATIN, + 'o', 'O', '0' ) + + SCRIPT( none, NONE, + "no script", + HB_SCRIPT_INVALID, + 0x0, 0x0, 0x0 ) + + /* there are no simple forms for letters; we thus use two digit shapes */ + SCRIPT( telu, TELU, + "Telugu", + HB_SCRIPT_TELUGU, + 0xC66, 0xC67, 0x0 ) /* ౦ ౧ */ + +#ifdef AF_CONFIG_OPTION_INDIC + + SCRIPT( beng, BENG, + "Bengali", + HB_SCRIPT_BENGALI, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( gujr, GUJR, + "Gujarati", + HB_SCRIPT_GUJARATI, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( guru, GURU, + "Gurmukhi", + HB_SCRIPT_GURMUKHI, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( knda, KNDA, + "Kannada", + HB_SCRIPT_KANNADA, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( limb, LIMB, + "Limbu", + HB_SCRIPT_LIMBU, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( mlym, MLYM, + "Malayalam", + HB_SCRIPT_MALAYALAM, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( orya, ORYA, + "Oriya", + HB_SCRIPT_ORIYA, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( sinh, SINH, + "Sinhala", + HB_SCRIPT_SINHALA, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( sund, SUND, + "Sundanese", + HB_SCRIPT_SUNDANESE, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( sylo, SYLO, + "Syloti Nagri", + HB_SCRIPT_SYLOTI_NAGRI, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( taml, TAML, + "Tamil", + HB_SCRIPT_TAMIL, + 'o', 0x0, 0x0 ) /* XXX */ + + SCRIPT( tibt, TIBT, + "Tibetan", + HB_SCRIPT_TIBETAN, + 'o', 0x0, 0x0 ) /* XXX */ + +#endif /* AF_CONFIG_OPTION_INDIC */ + +#ifdef AF_CONFIG_OPTION_CJK + + SCRIPT( hani, HANI, + "CJKV ideographs", + HB_SCRIPT_HAN, + 0x7530, 0x56D7, 0x0 ) /* 田囗 */ + +#endif /* AF_CONFIG_OPTION_CJK */ + + +/* END */ diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h new file mode 100644 index 0000000..f14d354 --- /dev/null +++ b/src/autofit/afstyles.h @@ -0,0 +1,164 @@ +/***************************************************************************/ +/* */ +/* afstyles.h */ +/* */ +/* Auto-fitter styles (specification only). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + + /* The following part can be included multiple times. */ + /* Define `STYLE' as needed. */ + + + /* Add new styles here. The first and second arguments are the */ + /* style name in lowercase and uppercase, respectively, followed */ + /* by a description string. The next arguments are the */ + /* corresponding writing system, script, blue stringset, and */ + /* coverage. */ + /* */ + /* Note that styles using `AF_COVERAGE_DEFAULT' should always */ + /* come after styles with other coverages. */ + /* */ + /* Example: */ + /* */ + /* STYLE( cyrl_dflt, CYRL_DFLT, */ + /* "Cyrillic default style", */ + /* AF_WRITING_SYSTEM_LATIN, */ + /* AF_SCRIPT_CYRL, */ + /* AF_BLUE_STRINGSET_CYRL, */ + /* AF_COVERAGE_DEFAULT ) */ + +#undef STYLE_LATIN +#define STYLE_LATIN( s, S, f, F, ds, df, C ) \ + STYLE( s ## _ ## f, S ## _ ## F, \ + ds " " df " style", \ + AF_WRITING_SYSTEM_LATIN, \ + AF_SCRIPT_ ## S, \ + AF_BLUE_STRINGSET_ ## S, \ + AF_COVERAGE_ ## C ) + +#undef META_STYLE_LATIN +#define META_STYLE_LATIN( s, S, ds ) \ + STYLE_LATIN( s, S, c2cp, C2CP, ds, \ + "petite capticals from capitals", \ + PETITE_CAPITALS_FROM_CAPITALS ) \ + STYLE_LATIN( s, S, c2sc, C2SC, ds, \ + "small capticals from capitals", \ + SMALL_CAPITALS_FROM_CAPITALS ) \ + STYLE_LATIN( s, S, ordn, ORDN, ds, \ + "ordinals", \ + ORDINALS ) \ + STYLE_LATIN( s, S, pcap, PCAP, ds, \ + "petite capitals", \ + PETITE_CAPITALS ) \ + STYLE_LATIN( s, S, sinf, SINF, ds, \ + "scientific inferiors", \ + SCIENTIFIC_INFERIORS ) \ + STYLE_LATIN( s, S, smcp, SMCP, ds, \ + "small capitals", \ + SMALL_CAPITALS ) \ + STYLE_LATIN( s, S, subs, SUBS, ds, \ + "subscript", \ + SUBSCRIPT ) \ + STYLE_LATIN( s, S, sups, SUPS, ds, \ + "superscript", \ + SUPERSCRIPT ) \ + STYLE_LATIN( s, S, titl, TITL, ds, \ + "titling", \ + TITLING ) \ + STYLE_LATIN( s, S, dflt, DFLT, ds, \ + "default", \ + DEFAULT ) + + META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" ) + + META_STYLE_LATIN( grek, GREK, "Greek" ) + + STYLE( hebr_dflt, HEBR_DFLT, + "Hebrew default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_HEBR, + AF_BLUE_STRINGSET_HEBR, + AF_COVERAGE_DEFAULT ) + META_STYLE_LATIN( latn, LATN, "Latin" ) + + STYLE( deva_dflt, DEVA_DFLT, + "Devanagari default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_DEVA, + AF_BLUE_STRINGSET_DEVA, + AF_COVERAGE_DEFAULT ) + +#ifdef FT_OPTION_AUTOFIT2 + STYLE( ltn2_dflt, LTN2_DFLT, + "Latin 2 default style", + AF_WRITING_SYSTEM_LATIN2, + AF_SCRIPT_LATN, + AF_BLUE_STRINGSET_LATN, + AF_COVERAGE_DEFAULT ) +#endif + + STYLE( none_dflt, NONE_DFLT, + "no style", + AF_WRITING_SYSTEM_DUMMY, + AF_SCRIPT_NONE, + (AF_Blue_Stringset)0, + AF_COVERAGE_DEFAULT ) + + STYLE( telu_dflt, TELU_DFLT, + "Telugu default style", + AF_WRITING_SYSTEM_LATIN, + AF_SCRIPT_TELU, + AF_BLUE_STRINGSET_TELU, + AF_COVERAGE_DEFAULT ) + +#ifdef AF_CONFIG_OPTION_INDIC + + /* no blue stringset support for the Indic writing system yet */ +#undef STYLE_DEFAULT_INDIC +#define STYLE_DEFAULT_INDIC( s, S, d ) \ + STYLE( s ## _dflt, S ## _DFLT, \ + d " default style", \ + AF_WRITING_SYSTEM_INDIC, \ + AF_SCRIPT_ ## S, \ + (AF_Blue_Stringset)0, \ + AF_COVERAGE_DEFAULT ) + + STYLE_DEFAULT_INDIC( beng, BENG, "Bengali" ) + STYLE_DEFAULT_INDIC( gujr, GUJR, "Gujarati" ) + STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" ) + STYLE_DEFAULT_INDIC( knda, KNDA, "Kannada" ) + STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" ) + STYLE_DEFAULT_INDIC( mlym, MLYM, "Malayalam" ) + STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" ) + STYLE_DEFAULT_INDIC( sinh, SINH, "Sinhala" ) + STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" ) + STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" ) + STYLE_DEFAULT_INDIC( taml, TAML, "Tamil" ) + STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" ) + +#endif /* AF_CONFIG_OPTION_INDIC */ + +#ifdef AF_CONFIG_OPTION_CJK + + STYLE( hani_dflt, HANI_DFLT, + "CJKV ideographs default style", + AF_WRITING_SYSTEM_CJK, + AF_SCRIPT_HANI, + AF_BLUE_STRINGSET_HANI, + AF_COVERAGE_DEFAULT ) + +#endif /* AF_CONFIG_OPTION_CJK */ + + +/* END */ diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h index 21e442c..61badd1 100644 --- a/src/autofit/aftypes.h +++ b/src/autofit/aftypes.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter types (specification only). */ /* */ -/* Copyright 2003-2009, 2011 by */ +/* Copyright 2003-2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,15 +20,12 @@ * * The auto-fitter is a complete rewrite of the old auto-hinter. * Its main feature is the ability to differentiate between different - * scripts in order to apply language-specific rules. + * writing systems and scripts in order to apply specific rules. * * The code has also been compartmentized into several entities that * should make algorithmic experimentation easier than with the old * code. * - * Finally, we get rid of the Catharon license, since this code is - * released under the FreeType one. - * *************************************************************************/ @@ -42,6 +39,8 @@ #include FT_INTERNAL_OBJECTS_H #include FT_INTERNAL_DEBUG_H +#include "afblue.h" + FT_BEGIN_HEADER @@ -87,8 +86,9 @@ extern void* _af_debug_hints; FT_Pos* table ); FT_LOCAL( void ) - af_sort_widths( FT_UInt count, - AF_Width widths ); + af_sort_and_quantize_widths( FT_UInt* count, + AF_Width widths, + FT_Pos threshold ); /*************************************************************************/ @@ -197,87 +197,124 @@ extern void* _af_debug_hints; (a)->y_delta == (b)->y_delta ) + typedef struct AF_StyleMetricsRec_* AF_StyleMetrics; + + /* This function parses an FT_Face to compute global metrics for + * a specific style. + */ + typedef FT_Error + (*AF_WritingSystem_InitMetricsFunc)( AF_StyleMetrics metrics, + FT_Face face ); + + typedef void + (*AF_WritingSystem_ScaleMetricsFunc)( AF_StyleMetrics metrics, + AF_Scaler scaler ); + + typedef void + (*AF_WritingSystem_DoneMetricsFunc)( AF_StyleMetrics metrics ); + + + typedef FT_Error + (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints hints, + AF_StyleMetrics metrics ); + + typedef void + (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints hints, + FT_Outline* outline, + AF_StyleMetrics metrics ); + + /*************************************************************************/ /*************************************************************************/ /***** *****/ - /***** S C R I P T S *****/ + /***** W R I T I N G S Y S T E M S *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ /* - * The list of known scripts. Each different script corresponds to the - * following information: - * - * - A set of Unicode ranges to test whether the face supports the - * script. + * For the auto-hinter, a writing system consists of multiple scripts that + * can be handled similarly *in a typographical way*; the relationship is + * not based on history. For example, both the Greek and the unrelated + * Armenian scripts share the same features like ascender, descender, + * x-height, etc. Essentially, a writing system is covered by a + * submodule of the auto-fitter; it contains * - * - A specific global analyzer that will compute global metrics - * specific to the script. + * - a specific global analyzer that computes global metrics specific to + * the script (based on script-specific characters to identify ascender + * height, x-height, etc.), * - * - A specific glyph analyzer that will compute segments and - * edges for each glyph covered by the script. + * - a specific glyph analyzer that computes segments and edges for each + * glyph covered by the script, * - * - A specific grid-fitting algorithm that will distort the - * scaled glyph outline according to the results of the glyph - * analyzer. - * - * Note that a given analyzer and/or grid-fitting algorithm can be - * used by more than one script. + * - a specific grid-fitting algorithm that distorts the scaled glyph + * outline according to the results of the glyph analyzer. */ - typedef enum AF_Script_ +#define __AFWRTSYS_H__ /* don't load header files */ +#undef WRITING_SYSTEM +#define WRITING_SYSTEM( ws, WS ) \ + AF_WRITING_SYSTEM_ ## WS, + + /* The list of known writing systems. */ + typedef enum AF_WritingSystem_ { - AF_SCRIPT_NONE = 0, - AF_SCRIPT_LATIN = 1, - AF_SCRIPT_CJK = 2, - AF_SCRIPT_INDIC = 3, -#ifdef FT_OPTION_AUTOFIT2 - AF_SCRIPT_LATIN2, -#endif - /* add new scripts here. Don't forget to update the list in */ - /* `afglobal.c'. */ +#include "afwrtsys.h" - AF_SCRIPT_MAX /* do not remove */ + AF_WRITING_SYSTEM_MAX /* do not remove */ - } AF_Script; + } AF_WritingSystem; +#undef __AFWRTSYS_H__ - typedef struct AF_ScriptClassRec_ const* AF_ScriptClass; - typedef struct AF_ScriptMetricsRec_ + typedef struct AF_WritingSystemClassRec_ { - AF_ScriptClass clazz; - AF_ScalerRec scaler; - FT_Bool digits_have_same_width; + AF_WritingSystem writing_system; - } AF_ScriptMetricsRec, *AF_ScriptMetrics; + FT_Offset style_metrics_size; + AF_WritingSystem_InitMetricsFunc style_metrics_init; + AF_WritingSystem_ScaleMetricsFunc style_metrics_scale; + AF_WritingSystem_DoneMetricsFunc style_metrics_done; + AF_WritingSystem_InitHintsFunc style_hints_init; + AF_WritingSystem_ApplyHintsFunc style_hints_apply; - /* This function parses an FT_Face to compute global metrics for - * a specific script. + } AF_WritingSystemClassRec; + + typedef const AF_WritingSystemClassRec* AF_WritingSystemClass; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S C R I P T S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * Each script is associated with a set of Unicode ranges that gets used + * to test whether the font face supports the script. + * + * We use four-letter script tags from the OpenType specification, + * extended by `NONE', which indicates `no script'. */ - typedef FT_Error - (*AF_Script_InitMetricsFunc)( AF_ScriptMetrics metrics, - FT_Face face ); - typedef void - (*AF_Script_ScaleMetricsFunc)( AF_ScriptMetrics metrics, - AF_Scaler scaler ); +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \ + AF_SCRIPT_ ## S, - typedef void - (*AF_Script_DoneMetricsFunc)( AF_ScriptMetrics metrics ); + /* The list of known scripts. */ + typedef enum AF_Script_ + { +#include "afscript.h" - typedef FT_Error - (*AF_Script_InitHintsFunc)( AF_GlyphHints hints, - AF_ScriptMetrics metrics ); + AF_SCRIPT_MAX /* do not remove */ - typedef void - (*AF_Script_ApplyHintsFunc)( AF_GlyphHints hints, - FT_Outline* outline, - AF_ScriptMetrics metrics ); + } AF_Script; typedef struct AF_Script_UniRangeRec_ @@ -289,72 +326,300 @@ extern void* _af_debug_hints; #define AF_UNIRANGE_REC( a, b ) { (FT_UInt32)(a), (FT_UInt32)(b) } - typedef const AF_Script_UniRangeRec *AF_Script_UniRange; + typedef const AF_Script_UniRangeRec* AF_Script_UniRange; typedef struct AF_ScriptClassRec_ { - AF_Script script; - AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */ + AF_Script script; - FT_Offset script_metrics_size; - AF_Script_InitMetricsFunc script_metrics_init; - AF_Script_ScaleMetricsFunc script_metrics_scale; - AF_Script_DoneMetricsFunc script_metrics_done; + AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */ - AF_Script_InitHintsFunc script_hints_init; - AF_Script_ApplyHintsFunc script_hints_apply; + FT_UInt32 standard_char1; /* for default width and height */ + FT_UInt32 standard_char2; /* ditto */ + FT_UInt32 standard_char3; /* ditto */ } AF_ScriptClassRec; + typedef const AF_ScriptClassRec* AF_ScriptClass; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** C O V E R A G E S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * Usually, a font contains more glyphs than can be addressed by its + * character map. + * + * In the PostScript font world, encoding vectors specific to a given + * task are used to select such glyphs, and these glyphs can be often + * recognized by having a suffix in its glyph names. For example, a + * superscript glyph `A' might be called `A.sup'. Unfortunately, this + * naming scheme is not standardized and thus unusable for us. + * + * In the OpenType world, a better solution was invented, namely + * `features', which cleanly separate a character's input encoding from + * the corresponding glyph's appearance, and which don't use glyph names + * at all. For our purposes, and slightly generalized, an OpenType + * feature is a name of a mapping that maps character codes to + * non-standard glyph indices (features get used for other things also). + * For example, the `sups' feature provides superscript glyphs, thus + * mapping character codes like `A' or `B' to superscript glyph + * representation forms. How this mapping happens is completely + * uninteresting to us. + * + * For the auto-hinter, a `coverage' represents all glyphs of an OpenType + * feature collected in a set (as listed below) that can be hinted + * together. To continue the above example, superscript glyphs must not + * be hinted together with normal glyphs because the blue zones + * completely differ. + * + * Note that FreeType itself doesn't compute coverages; it only provides + * the glyphs addressable by the default Unicode character map. Instead, + * we use the HarfBuzz library (if available), which has many functions + * exactly for this purpose. + * + * AF_COVERAGE_DEFAULT is special: It should cover everything that isn't + * listed separately (including the glyphs addressable by the character + * map). In case HarfBuzz isn't available, it exactly covers the glyphs + * addressable by the character map. + * + */ + +#undef COVERAGE +#define COVERAGE( name, NAME, description, \ + tag1, tag2, tag3, tag4 ) \ + AF_COVERAGE_ ## NAME, + + + typedef enum AF_Coverage_ + { +#include "afcover.h" + + AF_COVERAGE_DEFAULT + + } AF_Coverage; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S T Y L E S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + /* + * The topmost structure for modelling the auto-hinter glyph input data + * is a `style class', grouping everything together. + */ + +#undef STYLE +#define STYLE( s, S, d, ws, sc, ss, c ) \ + AF_STYLE_ ## S, + + /* The list of known styles. */ + typedef enum AF_Style_ + { + +#include "afstyles.h" + + AF_STYLE_MAX /* do not remove */ + + } AF_Style; + + + typedef struct AF_StyleClassRec_ + { + AF_Style style; + + AF_WritingSystem writing_system; + AF_Script script; + AF_Blue_Stringset blue_stringset; + AF_Coverage coverage; + + } AF_StyleClassRec; + + typedef const AF_StyleClassRec* AF_StyleClass; + + + /*************************************************************************/ + /*************************************************************************/ + /***** *****/ + /***** S T Y L E M E T R I C S *****/ + /***** *****/ + /*************************************************************************/ + /*************************************************************************/ + + typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals; + + /* This is the main structure that combines everything. Autofit modules */ + /* specific to writing systems derive their structures from it, for */ + /* example `AF_LatinMetrics'. */ + + typedef struct AF_StyleMetricsRec_ + { + AF_StyleClass style_class; + AF_ScalerRec scaler; + FT_Bool digits_have_same_width; + + AF_FaceGlobals globals; /* to access properties */ + + } AF_StyleMetricsRec; + /* Declare and define vtables for classes */ #ifndef FT_CONFIG_OPTION_PIC +#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \ + FT_CALLBACK_TABLE const AF_WritingSystemClassRec \ + writing_system_class; + +#define AF_DEFINE_WRITING_SYSTEM_CLASS( \ + writing_system_class, \ + system, \ + m_size, \ + m_init, \ + m_scale, \ + m_done, \ + h_init, \ + h_apply ) \ + FT_CALLBACK_TABLE_DEF \ + const AF_WritingSystemClassRec writing_system_class = \ + { \ + system, \ + \ + m_size, \ + \ + m_init, \ + m_scale, \ + m_done, \ + \ + h_init, \ + h_apply \ + }; + + #define AF_DECLARE_SCRIPT_CLASS( script_class ) \ FT_CALLBACK_TABLE const AF_ScriptClassRec \ script_class; -#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \ - m_init, m_scale, m_done, h_init, h_apply ) \ - FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \ - script_class = \ - { \ - script_, \ - ranges, \ - \ - m_size, \ - \ - m_init, \ - m_scale, \ - m_done, \ - \ - h_init, \ - h_apply \ +#define AF_DEFINE_SCRIPT_CLASS( \ + script_class, \ + script, \ + ranges, \ + std_char1, \ + std_char2, \ + std_char3 ) \ + FT_CALLBACK_TABLE_DEF \ + const AF_ScriptClassRec script_class = \ + { \ + script, \ + ranges, \ + std_char1, \ + std_char2, \ + std_char3 \ + }; + + +#define AF_DECLARE_STYLE_CLASS( style_class ) \ + FT_CALLBACK_TABLE const AF_StyleClassRec \ + style_class; + +#define AF_DEFINE_STYLE_CLASS( \ + style_class, \ + style, \ + writing_system, \ + script, \ + blue_stringset, \ + coverage ) \ + FT_CALLBACK_TABLE_DEF \ + const AF_StyleClassRec style_class = \ + { \ + style, \ + writing_system, \ + script, \ + blue_stringset, \ + coverage \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define AF_DECLARE_SCRIPT_CLASS( script_class ) \ - FT_LOCAL( void ) \ - FT_Init_Class_##script_class( AF_ScriptClassRec* ac ); - -#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \ - m_init, m_scale, m_done, h_init, h_apply ) \ - FT_LOCAL_DEF( void ) \ - FT_Init_Class_##script_class( AF_ScriptClassRec* ac ) \ - { \ - ac->script = script_; \ - ac->script_uni_ranges = ranges; \ - \ - ac->script_metrics_size = m_size; \ - \ - ac->script_metrics_init = m_init; \ - ac->script_metrics_scale = m_scale; \ - ac->script_metrics_done = m_done; \ - \ - ac->script_hints_init = h_init; \ - ac->script_hints_apply = h_apply; \ +#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \ + FT_LOCAL( void ) \ + FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac ); + +#define AF_DEFINE_WRITING_SYSTEM_CLASS( \ + writing_system_class, \ + system, \ + m_size, \ + m_init, \ + m_scale, \ + m_done, \ + h_init, \ + h_apply ) \ + FT_LOCAL_DEF( void ) \ + FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac ) \ + { \ + ac->writing_system = system; \ + \ + ac->style_metrics_size = m_size; \ + \ + ac->style_metrics_init = m_init; \ + ac->style_metrics_scale = m_scale; \ + ac->style_metrics_done = m_done; \ + \ + ac->style_hints_init = h_init; \ + ac->style_hints_apply = h_apply; \ + } + + +#define AF_DECLARE_SCRIPT_CLASS( script_class ) \ + FT_LOCAL( void ) \ + FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac ); + +#define AF_DEFINE_SCRIPT_CLASS( \ + script_class, \ + script_, \ + ranges, \ + std_char1, \ + std_char2, \ + std_char3 ) \ + FT_LOCAL_DEF( void ) \ + FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac ) \ + { \ + ac->script = script_; \ + ac->script_uni_ranges = ranges; \ + ac->standard_char1 = std_char1; \ + ac->standard_char2 = std_char2; \ + ac->standard_char3 = std_char3; \ + } + + +#define AF_DECLARE_STYLE_CLASS( style_class ) \ + FT_LOCAL( void ) \ + FT_Init_Class_ ## style_class( AF_StyleClassRec* ac ); + +#define AF_DEFINE_STYLE_CLASS( \ + style_class, \ + style_, \ + writing_system_, \ + script_, \ + blue_stringset_, \ + coverage_ ) \ + FT_LOCAL_DEF( void ) \ + FT_Init_Class_ ## style_class( AF_StyleClassRec* ac ) \ + { \ + ac->style = style_; \ + ac->writing_system = writing_system_; \ + ac->script = script_; \ + ac->blue_stringset = blue_stringset_; \ + ac->coverage = coverage_; \ } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/autofit/afwrtsys.h b/src/autofit/afwrtsys.h new file mode 100644 index 0000000..8aa2ed9 --- /dev/null +++ b/src/autofit/afwrtsys.h @@ -0,0 +1,52 @@ +/***************************************************************************/ +/* */ +/* afwrtsys.h */ +/* */ +/* Auto-fitter writing systems (specification only). */ +/* */ +/* Copyright 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __AFWRTSYS_H__ +#define __AFWRTSYS_H__ + + /* Since preprocessor directives can't create other preprocessor */ + /* directives, we have to include the header files manually. */ + +#include "afdummy.h" +#include "aflatin.h" +#include "afcjk.h" +#include "afindic.h" +#ifdef FT_OPTION_AUTOFIT2 +#include "aflatin2.h" +#endif + +#endif /* __AFWRTSYS_H__ */ + + + /* The following part can be included multiple times. */ + /* Define `WRITING_SYSTEM' as needed. */ + + + /* Add new writing systems here. The arguments are the writing system */ + /* name in lowercase and uppercase, respectively. */ + + WRITING_SYSTEM( dummy, DUMMY ) + WRITING_SYSTEM( latin, LATIN ) + WRITING_SYSTEM( cjk, CJK ) + WRITING_SYSTEM( indic, INDIC ) +#ifdef FT_OPTION_AUTOFIT2 + WRITING_SYSTEM( latin2, LATIN2 ) +#endif + + +/* END */ diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c index 3883a0a..e2b9934 100644 --- a/src/autofit/autofit.c +++ b/src/autofit/autofit.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter module (body). */ /* */ -/* Copyright 2003-2007, 2011 by */ +/* Copyright 2003-2007, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -20,9 +20,12 @@ #include <ft2build.h> #include "afpic.c" #include "afangles.c" +#include "afblue.c" #include "afglobal.c" #include "afhints.c" +#include "afranges.c" + #include "afdummy.c" #include "aflatin.c" #ifdef FT_OPTION_AUTOFIT2 @@ -31,6 +34,8 @@ #include "afcjk.c" #include "afindic.c" +#include "hbshim.c" + #include "afloader.c" #include "afmodule.c" diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c new file mode 100644 index 0000000..a705cef --- /dev/null +++ b/src/autofit/hbshim.c @@ -0,0 +1,545 @@ +/***************************************************************************/ +/* */ +/* hbshim.c */ +/* */ +/* HarfBuzz interface for accessing OpenType features (body). */ +/* */ +/* Copyright 2013, 2014 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#include <ft2build.h> +#include FT_FREETYPE_H +#include "afglobal.h" +#include "aftypes.h" +#include "hbshim.h" + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_afharfbuzz + + + /* + * We use `sets' (in the HarfBuzz sense, which comes quite near to the + * usual mathematical meaning) to manage both lookups and glyph indices. + * + * 1. For each coverage, collect lookup IDs in a set. Note that an + * auto-hinter `coverage' is represented by one `feature', and a + * feature consists of an arbitrary number of (font specific) `lookup's + * that actually do the mapping job. Please check the OpenType + * specification for more details on features and lookups. + * + * 2. Create glyph ID sets from the corresponding lookup sets. + * + * 3. The glyph set corresponding to AF_COVERAGE_DEFAULT is computed + * with all lookups specific to the OpenType script activated. It + * relies on the order of AF_DEFINE_STYLE_CLASS entries so that + * special coverages (like `oldstyle figures') don't get overwritten. + * + */ + + + /* load coverage tags */ +#undef COVERAGE +#define COVERAGE( name, NAME, description, \ + tag1, tag2, tag3, tag4 ) \ + static const hb_tag_t name ## _coverage[] = \ + { \ + HB_TAG( tag1, tag2, tag3, tag4 ), \ + HB_TAG_NONE \ + }; + + +#include "afcover.h" + + + /* define mapping between coverage tags and AF_Coverage */ +#undef COVERAGE +#define COVERAGE( name, NAME, description, \ + tag1, tag2, tag3, tag4 ) \ + name ## _coverage, + + + static const hb_tag_t* coverages[] = + { +#include "afcover.h" + + NULL /* AF_COVERAGE_DEFAULT */ + }; + + + /* load HarfBuzz script tags */ +#undef SCRIPT +#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) h, + + + static const hb_script_t scripts[] = + { +#include "afscript.h" + }; + + + FT_Error + af_get_coverage( AF_FaceGlobals globals, + AF_StyleClass style_class, + FT_Byte* gstyles ) + { + hb_face_t* face; + + hb_set_t* gsub_lookups; /* GSUB lookups for a given script */ + hb_set_t* gsub_glyphs; /* glyphs covered by GSUB lookups */ + hb_set_t* gpos_lookups; /* GPOS lookups for a given script */ + hb_set_t* gpos_glyphs; /* glyphs covered by GPOS lookups */ + + hb_script_t script; + const hb_tag_t* coverage_tags; + hb_tag_t script_tags[] = { HB_TAG_NONE, + HB_TAG_NONE, + HB_TAG_NONE, + HB_TAG_NONE }; + + hb_codepoint_t idx; +#ifdef FT_DEBUG_LEVEL_TRACE + int count; +#endif + + + if ( !globals || !style_class || !gstyles ) + return FT_THROW( Invalid_Argument ); + + face = hb_font_get_face( globals->hb_font ); + + gsub_lookups = hb_set_create(); + gsub_glyphs = hb_set_create(); + gpos_lookups = hb_set_create(); + gpos_glyphs = hb_set_create(); + + coverage_tags = coverages[style_class->coverage]; + script = scripts[style_class->script]; + + /* Convert a HarfBuzz script tag into the corresponding OpenType */ + /* tag or tags -- some Indic scripts like Devanagari have an old */ + /* and a new set of features. */ + hb_ot_tags_from_script( script, + &script_tags[0], + &script_tags[1] ); + + /* `hb_ot_tags_from_script' usually returns HB_OT_TAG_DEFAULT_SCRIPT */ + /* as the second tag. We change that to HB_TAG_NONE except for the */ + /* default script. */ + if ( style_class->script == globals->module->default_script && + style_class->coverage == AF_COVERAGE_DEFAULT ) + { + if ( script_tags[0] == HB_TAG_NONE ) + script_tags[0] = HB_OT_TAG_DEFAULT_SCRIPT; + else + { + if ( script_tags[1] == HB_TAG_NONE ) + script_tags[1] = HB_OT_TAG_DEFAULT_SCRIPT; + else if ( script_tags[1] != HB_OT_TAG_DEFAULT_SCRIPT ) + script_tags[2] = HB_OT_TAG_DEFAULT_SCRIPT; + } + } + else + { + if ( script_tags[1] == HB_OT_TAG_DEFAULT_SCRIPT ) + script_tags[1] = HB_TAG_NONE; + } + + hb_ot_layout_collect_lookups( face, + HB_OT_TAG_GSUB, + script_tags, + NULL, + coverage_tags, + gsub_lookups ); + + if ( hb_set_is_empty( gsub_lookups ) ) + goto Exit; /* nothing to do */ + + hb_ot_layout_collect_lookups( face, + HB_OT_TAG_GPOS, + script_tags, + NULL, + coverage_tags, + gpos_lookups ); + + FT_TRACE4(( "GSUB lookups (style `%s'):\n" + " ", + af_style_names[style_class->style] )); + +#ifdef FT_DEBUG_LEVEL_TRACE + count = 0; +#endif + + for ( idx = -1; hb_set_next( gsub_lookups, &idx ); ) + { +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE4(( " %d", idx )); + count++; +#endif + + /* get output coverage of GSUB feature */ + hb_ot_layout_lookup_collect_glyphs( face, + HB_OT_TAG_GSUB, + idx, + NULL, + NULL, + NULL, + gsub_glyphs ); + } + +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !count ) + FT_TRACE4(( " (none)" )); + FT_TRACE4(( "\n\n" )); +#endif + + FT_TRACE4(( "GPOS lookups (style `%s'):\n" + " ", + af_style_names[style_class->style] )); + +#ifdef FT_DEBUG_LEVEL_TRACE + count = 0; +#endif + + for ( idx = -1; hb_set_next( gpos_lookups, &idx ); ) + { +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE4(( " %d", idx )); + count++; +#endif + + /* get input coverage of GPOS feature */ + hb_ot_layout_lookup_collect_glyphs( face, + HB_OT_TAG_GPOS, + idx, + NULL, + gpos_glyphs, + NULL, + NULL ); + } + +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !count ) + FT_TRACE4(( " (none)" )); + FT_TRACE4(( "\n\n" )); +#endif + + /* + * We now check whether we can construct blue zones, using glyphs + * covered by the feature only. In case there is not a single zone + * (this is, not a single character is covered), we skip this coverage. + * + */ + if ( style_class->coverage != AF_COVERAGE_DEFAULT ) + { + AF_Blue_Stringset bss = style_class->blue_stringset; + const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; + + FT_Bool found = 0; + + + for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ ) + { + const char* p = &af_blue_strings[bs->string]; + + + while ( *p ) + { + hb_codepoint_t ch; + + + GET_UTF8_CHAR( ch, p ); + + for ( idx = -1; hb_set_next( gsub_lookups, &idx ); ) + { + hb_codepoint_t gidx = FT_Get_Char_Index( globals->face, ch ); + + + if ( hb_ot_layout_lookup_would_substitute( face, idx, + &gidx, 1, 1 ) ) + { + found = 1; + break; + } + } + } + } + + if ( !found ) + { + FT_TRACE4(( " no blue characters found; style skipped\n" )); + goto Exit; + } + } + + /* + * Various OpenType features might use the same glyphs at different + * vertical positions; for example, superscript and subscript glyphs + * could be the same. However, the auto-hinter is completely + * agnostic of OpenType features after the feature analysis has been + * completed: The engine then simply receives a glyph index and returns a + * hinted and usually rendered glyph. + * + * Consider the superscript feature of font `pala.ttf': Some of the + * glyphs are `real', this is, they have a zero vertical offset, but + * most of them are small caps glyphs shifted up to the superscript + * position (this is, the `sups' feature is present in both the GSUB and + * GPOS tables). The code for blue zones computation actually uses a + * feature's y offset so that the `real' glyphs get correct hints. But + * later on it is impossible to decide whether a glyph index belongs to, + * say, the small caps or superscript feature. + * + * For this reason, we don't assign a style to a glyph if the current + * feature covers the glyph in both the GSUB and the GPOS tables. This + * is quite a broad condition, assuming that + * + * (a) glyphs that get used in multiple features are present in a + * feature without vertical shift, + * + * and + * + * (b) a feature's GPOS data really moves the glyph vertically. + * + * Not fulfilling condition (a) makes a font larger; it would also + * reduce the number of glyphs that could be addressed directly without + * using OpenType features, so this assumption is rather strong. + * + * Condition (b) is much weaker, and there might be glyphs which get + * missed. However, the OpenType features we are going to handle are + * primarily located in GSUB, and HarfBuzz doesn't provide an API to + * directly get the necessary information from the GPOS table. A + * possible solution might be to directly parse the GPOS table to find + * out whether a glyph gets shifted vertically, but this is something I + * would like to avoid if not really necessary. + * + * Note that we don't follow this logic for the default coverage. + * Complex scripts like Devanagari have mandatory GPOS features to + * position many glyph elements, using mark-to-base or mark-to-ligature + * tables; the number of glyphs missed due to condition (b) would be far + * too large. + * + */ + if ( style_class->coverage != AF_COVERAGE_DEFAULT ) + hb_set_subtract( gsub_glyphs, gpos_glyphs ); + +#ifdef FT_DEBUG_LEVEL_TRACE + FT_TRACE4(( " glyphs without GPOS data (`*' means already assigned)" )); + count = 0; +#endif + + for ( idx = -1; hb_set_next( gsub_glyphs, &idx ); ) + { +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !( count % 10 ) ) + FT_TRACE4(( "\n" + " " )); + + FT_TRACE4(( " %d", idx )); + count++; +#endif + + /* glyph indices returned by `hb_ot_layout_lookup_collect_glyphs' */ + /* can be arbitrary: some fonts use fake indices for processing */ + /* internal to GSUB or GPOS, which is fully valid */ + if ( idx >= (hb_codepoint_t)globals->glyph_count ) + continue; + + if ( gstyles[idx] == AF_STYLE_UNASSIGNED ) + gstyles[idx] = (FT_Byte)style_class->style; +#ifdef FT_DEBUG_LEVEL_TRACE + else + FT_TRACE4(( "*" )); +#endif + } + +#ifdef FT_DEBUG_LEVEL_TRACE + if ( !count ) + FT_TRACE4(( "\n" + " (none)" )); + FT_TRACE4(( "\n\n" )); +#endif + + Exit: + hb_set_destroy( gsub_lookups ); + hb_set_destroy( gsub_glyphs ); + hb_set_destroy( gpos_lookups ); + hb_set_destroy( gpos_glyphs ); + + return FT_Err_Ok; + } + + + /* construct HarfBuzz features */ +#undef COVERAGE +#define COVERAGE( name, NAME, description, \ + tag1, tag2, tag3, tag4 ) \ + static const hb_feature_t name ## _feature[] = \ + { \ + { \ + HB_TAG( tag1, tag2, tag3, tag4 ), \ + 1, 0, (unsigned int)-1 \ + } \ + }; + + +#include "afcover.h" + + + /* define mapping between HarfBuzz features and AF_Coverage */ +#undef COVERAGE +#define COVERAGE( name, NAME, description, \ + tag1, tag2, tag3, tag4 ) \ + name ## _feature, + + + static const hb_feature_t* features[] = + { +#include "afcover.h" + + NULL /* AF_COVERAGE_DEFAULT */ + }; + + + FT_Error + af_get_char_index( AF_StyleMetrics metrics, + FT_ULong charcode, + FT_ULong *codepoint, + FT_Long *y_offset ) + { + AF_StyleClass style_class; + + const hb_feature_t* feature; + + FT_ULong in_idx, out_idx; + + + if ( !metrics ) + return FT_THROW( Invalid_Argument ); + + in_idx = FT_Get_Char_Index( metrics->globals->face, charcode ); + + style_class = metrics->style_class; + + feature = features[style_class->coverage]; + + if ( feature ) + { + FT_UInt upem = metrics->globals->face->units_per_EM; + + hb_font_t* font = metrics->globals->hb_font; + hb_buffer_t* buf = hb_buffer_create(); + + uint32_t c = (uint32_t)charcode; + + hb_glyph_info_t* ginfo; + hb_glyph_position_t* gpos; + unsigned int gcount; + + + /* we shape at a size of units per EM; this means font units */ + hb_font_set_scale( font, upem, upem ); + + /* XXX: is this sufficient for a single character of any script? */ + hb_buffer_set_direction( buf, HB_DIRECTION_LTR ); + hb_buffer_set_script( buf, scripts[style_class->script] ); + + /* we add one character to `buf' ... */ + hb_buffer_add_utf32( buf, &c, 1, 0, 1 ); + + /* ... and apply one feature */ + hb_shape( font, buf, feature, 1 ); + + ginfo = hb_buffer_get_glyph_infos( buf, &gcount ); + gpos = hb_buffer_get_glyph_positions( buf, &gcount ); + + out_idx = ginfo[0].codepoint; + + /* getting the same index indicates no substitution, */ + /* which means that the glyph isn't available in the feature */ + if ( in_idx == out_idx ) + { + *codepoint = 0; + *y_offset = 0; + } + else + { + *codepoint = out_idx; + *y_offset = gpos[0].y_offset; + } + + hb_buffer_destroy( buf ); + +#ifdef FT_DEBUG_LEVEL_TRACE + if ( gcount > 1 ) + FT_TRACE1(( "af_get_char_index:" + " input character mapped to multiple glyphs\n" )); +#endif + } + else + { + *codepoint = in_idx; + *y_offset = 0; + } + + return FT_Err_Ok; + } + + +#else /* !FT_CONFIG_OPTION_USE_HARFBUZZ */ + + + FT_Error + af_get_coverage( AF_FaceGlobals globals, + AF_StyleClass style_class, + FT_Byte* gstyles ) + { + FT_UNUSED( globals ); + FT_UNUSED( style_class ); + FT_UNUSED( gstyles ); + + return FT_Err_Ok; + } + + + FT_Error + af_get_char_index( AF_StyleMetrics metrics, + FT_ULong charcode, + FT_ULong *codepoint, + FT_Long *y_offset ) + { + FT_Face face; + + + if ( !metrics ) + return FT_THROW( Invalid_Argument ); + + face = metrics->globals->face; + + *codepoint = FT_Get_Char_Index( face, charcode ); + *y_offset = 0; + + return FT_Err_Ok; + } + + +#endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ */ + + +/* END */ diff --git a/src/autofit/hbshim.h b/src/autofit/hbshim.h new file mode 100644 index 0000000..02f1513 --- /dev/null +++ b/src/autofit/hbshim.h @@ -0,0 +1,56 @@ +/***************************************************************************/ +/* */ +/* hbshim.h */ +/* */ +/* HarfBuzz interface for accessing OpenType features (specification). */ +/* */ +/* Copyright 2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __HBSHIM_H__ +#define __HBSHIM_H__ + + +#include <ft2build.h> +#include FT_FREETYPE_H + + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + +#include <hb.h> +#include <hb-ot.h> +#include <hb-ft.h> + +#endif + + +FT_BEGIN_HEADER + + FT_Error + af_get_coverage( AF_FaceGlobals globals, + AF_StyleClass style_class, + FT_Byte* gstyles ); + + FT_Error + af_get_char_index( AF_StyleMetrics metrics, + FT_ULong charcode, + FT_ULong *codepoint, + FT_Long *y_offset ); + + /* */ + +FT_END_HEADER + +#endif /* __HBSHIM_H__ */ + + +/* END */ diff --git a/src/autofit/rules.mk b/src/autofit/rules.mk index b76bb79..658f04e 100644 --- a/src/autofit/rules.mk +++ b/src/autofit/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 2003, 2004, 2005, 2006, 2007, 2011 by +# Copyright 2003-2007, 2011, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -26,6 +26,7 @@ AUTOF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(AUTOF_DIR)) # AUTOF driver sources (i.e., C files) # AUTOF_DRV_SRC := $(AUTOF_DIR)/afangles.c \ + $(AUTOF_DIR)/afblue.c \ $(AUTOF_DIR)/afcjk.c \ $(AUTOF_DIR)/afdummy.c \ $(AUTOF_DIR)/afglobal.c \ @@ -35,13 +36,19 @@ AUTOF_DRV_SRC := $(AUTOF_DIR)/afangles.c \ $(AUTOF_DIR)/afloader.c \ $(AUTOF_DIR)/afmodule.c \ $(AUTOF_DIR)/afpic.c \ - $(AUTOF_DIR)/afwarp.c + $(AUTOF_DIR)/afranges.c \ + $(AUTOF_DIR)/afwarp.c \ + $(AUTOF_DIR)/hbshim.c # AUTOF driver headers # AUTOF_DRV_H := $(AUTOF_DRV_SRC:%c=%h) \ + $(AUTOF_DIR)/afcover.h \ $(AUTOF_DIR)/aferrors.h \ - $(AUTOF_DIR)/aftypes.h + $(AUTOF_DIR)/afscript.h \ + $(AUTOF_DIR)/afstyles.h \ + $(AUTOF_DIR)/aftypes.h \ + $(AUTOF_DIR)/afwrtsys.h # AUTOF driver object(s) diff --git a/src/base/basepic.c b/src/base/basepic.c index d754eb1..aeb6fd5 100644 --- a/src/base/basepic.c +++ b/src/base/basepic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for base. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -21,14 +21,22 @@ #include FT_INTERNAL_OBJECTS_H #include "basepic.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from ftglyph.c */ - void FT_Init_Class_ft_outline_glyph_class( FT_Glyph_Class* clazz ); - void FT_Init_Class_ft_bitmap_glyph_class( FT_Glyph_Class* clazz ); + void + FT_Init_Class_ft_outline_glyph_class( FT_Glyph_Class* clazz ); + + void + FT_Init_Class_ft_bitmap_glyph_class( FT_Glyph_Class* clazz ); - /* forward declaration of PIC init function from ftrfork.c (not modularized) */ - void FT_Init_Table_raccess_guess_table( ft_raccess_guess_rec* record ); +#ifdef FT_CONFIG_OPTION_MAC_FONTS + /* forward declaration of PIC init function from ftrfork.c */ + /* (not modularized) */ + void + FT_Init_Table_ft_raccess_guess_table( ft_raccess_guess_rec* record ); +#endif /* forward declaration of PIC init functions from ftinit.c */ FT_Error @@ -37,14 +45,18 @@ void ft_destroy_default_module_classes( FT_Library library ); + void ft_base_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; + + if ( pic_container->base ) { - /* Destroy default module classes (in case FT_Add_Default_Modules was used) */ + /* destroy default module classes */ + /* (in case FT_Add_Default_Modules was used) */ ft_destroy_default_module_classes( library ); FT_FREE( pic_container->base ); @@ -57,12 +69,13 @@ ft_base_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = FT_Err_Ok; - BasePIC* container; - FT_Memory memory = library->memory; + FT_Error error = FT_Err_Ok; + BasePIC* container = NULL; + FT_Memory memory = library->memory; + /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->base = container; @@ -72,21 +85,23 @@ if ( error ) goto Exit; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ FT_Init_Class_ft_outline_glyph_class( &container->ft_outline_glyph_class ); FT_Init_Class_ft_bitmap_glyph_class( &container->ft_bitmap_glyph_class ); - FT_Init_Table_raccess_guess_table( - (ft_raccess_guess_rec*)&container->ft_raccess_guess_table); +#ifdef FT_CONFIG_OPTION_MAC_FONTS + FT_Init_Table_ft_raccess_guess_table( + (ft_raccess_guess_rec*)&container->ft_raccess_guess_table ); +#endif -Exit: - if( error ) + Exit: + if ( error ) ft_base_pic_free( library ); return error; } - #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/base/basepic.h b/src/base/basepic.h index bf90bef..329d7c8 100644 --- a/src/base/basepic.h +++ b/src/base/basepic.h @@ -25,11 +25,13 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H #ifndef FT_CONFIG_OPTION_PIC -#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class -#define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class -#define FT_DEFAULT_MODULES_GET ft_default_modules + +#define FT_OUTLINE_GLYPH_CLASS_GET &ft_outline_glyph_class +#define FT_BITMAP_GLYPH_CLASS_GET &ft_bitmap_glyph_class +#define FT_DEFAULT_MODULES_GET ft_default_modules + #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK -#define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table +#define FT_RACCESS_GUESS_TABLE_GET ft_raccess_guess_table #endif #else /* FT_CONFIG_OPTION_PIC */ @@ -41,25 +43,35 @@ FT_BEGIN_HEADER #endif - typedef struct BasePIC_ + typedef struct BasePIC_ { - FT_Module_Class** default_module_classes; - FT_Glyph_Class ft_outline_glyph_class; - FT_Glyph_Class ft_bitmap_glyph_class; + FT_Module_Class** default_module_classes; + FT_Glyph_Class ft_outline_glyph_class; + FT_Glyph_Class ft_bitmap_glyph_class; + #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK - ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES]; + ft_raccess_guess_rec ft_raccess_guess_table[FT_RACCESS_N_RULES]; #endif + } BasePIC; -#define GET_PIC(lib) ((BasePIC*)((lib)->pic_container.base)) -#define FT_OUTLINE_GLYPH_CLASS_GET (&GET_PIC(library)->ft_outline_glyph_class) -#define FT_BITMAP_GLYPH_CLASS_GET (&GET_PIC(library)->ft_bitmap_glyph_class) -#define FT_DEFAULT_MODULES_GET (GET_PIC(library)->default_module_classes) + +#define GET_PIC( lib ) ( (BasePIC*)( (lib)->pic_container.base ) ) + +#define FT_OUTLINE_GLYPH_CLASS_GET \ + ( &GET_PIC( library )->ft_outline_glyph_class ) +#define FT_BITMAP_GLYPH_CLASS_GET \ + ( &GET_PIC( library )->ft_bitmap_glyph_class ) +#define FT_DEFAULT_MODULES_GET \ + ( GET_PIC( library )->default_module_classes ) + #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK -#define FT_RACCESS_GUESS_TABLE_GET (GET_PIC(library)->ft_raccess_guess_table) +#define FT_RACCESS_GUESS_TABLE_GET \ + ( GET_PIC( library )->ft_raccess_guess_table ) #endif - /* see basepic.c for the implementation. */ + + /* see basepic.c for the implementation */ void ft_base_pic_free( FT_Library library ); @@ -67,7 +79,8 @@ FT_BEGIN_HEADER ft_base_pic_init( FT_Library library ); #endif /* FT_CONFIG_OPTION_PIC */ - /* */ + + /* */ FT_END_HEADER diff --git a/src/base/ftadvanc.c b/src/base/ftadvanc.c index a8bb43d..18884ef 100644 --- a/src/base/ftadvanc.c +++ b/src/base/ftadvanc.c @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (body). */ /* */ -/* Copyright 2008, 2009, 2011 by */ +/* Copyright 2008, 2009, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_ADVANCES_H #include FT_INTERNAL_OBJECTS_H @@ -35,7 +37,7 @@ return FT_Err_Ok; if ( face->size == NULL ) - return FT_Err_Invalid_Size_Handle; + return FT_THROW( Invalid_Size_Handle ); if ( flags & FT_LOAD_VERTICAL_LAYOUT ) scale = face->size->metrics.y_scale; @@ -76,10 +78,13 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); + + if ( !padvance ) + return FT_THROW( Invalid_Argument ); if ( gindex >= (FT_UInt)face->num_glyphs ) - return FT_Err_Invalid_Glyph_Index; + return FT_THROW( Invalid_Glyph_Index ); func = face->driver->clazz->get_advances; if ( func && LOAD_ADVANCE_FAST_CHECK( flags ) ) @@ -91,7 +96,7 @@ if ( !error ) return _ft_face_scale_advances( face, padvance, 1, flags ); - if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) ) + if ( FT_ERR_NEQ( error, Unimplemented_Feature ) ) return error; } @@ -114,12 +119,15 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); + + if ( !padvances ) + return FT_THROW( Invalid_Argument ); num = (FT_UInt)face->num_glyphs; end = start + count; if ( start >= num || end < start || end > num ) - return FT_Err_Invalid_Glyph_Index; + return FT_THROW( Invalid_Glyph_Index ); if ( count == 0 ) return FT_Err_Ok; @@ -131,14 +139,14 @@ if ( !error ) return _ft_face_scale_advances( face, padvances, count, flags ); - if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) ) + if ( FT_ERR_NEQ( error, Unimplemented_Feature ) ) return error; } error = FT_Err_Ok; if ( flags & FT_ADVANCE_FLAG_FAST_ONLY ) - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; for ( nn = 0; nn < count; nn++ ) diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index 4b8e911..f9a1751 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -4,7 +4,7 @@ /* */ /* FreeType bbox computation (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2006, 2010 by */ +/* Copyright 1996-2002, 2004, 2006, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ @@ -25,6 +25,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_BBOX_H #include FT_IMAGE_H #include FT_OUTLINE_H @@ -40,16 +42,35 @@ } TBBox_Rec; +#define FT_UPDATE_BBOX( p, bbox ) \ + FT_BEGIN_STMNT \ + if ( p->x < bbox.xMin ) \ + bbox.xMin = p->x; \ + if ( p->x > bbox.xMax ) \ + bbox.xMax = p->x; \ + if ( p->y < bbox.yMin ) \ + bbox.yMin = p->y; \ + if ( p->y > bbox.yMax ) \ + bbox.yMax = p->y; \ + FT_END_STMNT + +#define CHECK_X( p, bbox ) \ + ( p->x < bbox.xMin || p->x > bbox.xMax ) + +#define CHECK_Y( p, bbox ) \ + ( p->y < bbox.yMin || p->y > bbox.yMax ) + + /*************************************************************************/ /* */ /* <Function> */ /* BBox_Move_To */ /* */ /* <Description> */ - /* This function is used as a `move_to' and `line_to' emitter during */ + /* This function is used as a `move_to' emitter during */ /* FT_Outline_Decompose(). It simply records the destination point */ - /* in `user->last'; no further computations are necessary since we */ - /* use the cbox as the starting bbox which must be refined. */ + /* in `user->last'. We also update bbox in case contour starts with */ + /* an implicit `on' point. */ /* */ /* <Input> */ /* to :: A pointer to the destination vector. */ @@ -64,17 +85,42 @@ BBox_Move_To( FT_Vector* to, TBBox_Rec* user ) { + FT_UPDATE_BBOX( to, user->bbox ); + user->last = *to; return 0; } -#define CHECK_X( p, bbox ) \ - ( p->x < bbox.xMin || p->x > bbox.xMax ) + /*************************************************************************/ + /* */ + /* <Function> */ + /* BBox_Line_To */ + /* */ + /* <Description> */ + /* This function is used as a `line_to' emitter during */ + /* FT_Outline_Decompose(). It simply records the destination point */ + /* in `user->last'; no further computations are necessary because */ + /* bbox already contains both explicit ends of the line segment. */ + /* */ + /* <Input> */ + /* to :: A pointer to the destination vector. */ + /* */ + /* <InOut> */ + /* user :: A pointer to the current walk context. */ + /* */ + /* <Return> */ + /* Always 0. Needed for the interface only. */ + /* */ + static int + BBox_Line_To( FT_Vector* to, + TBBox_Rec* user ) + { + user->last = *to; -#define CHECK_Y( p, bbox ) \ - ( p->y < bbox.yMin || p->y > bbox.yMax ) + return 0; + } /*************************************************************************/ @@ -83,7 +129,7 @@ /* BBox_Conic_Check */ /* */ /* <Description> */ - /* Finds the extrema of a 1-dimensional conic Bezier curve and update */ + /* Find the extrema of a 1-dimensional conic Bezier curve and update */ /* a bounding range. This version uses direct computation, as it */ /* doesn't need square roots. */ /* */ @@ -106,30 +152,19 @@ FT_Pos* min, FT_Pos* max ) { - if ( y1 <= y3 && y2 == y1 ) /* flat arc */ - goto Suite; - - if ( y1 < y3 ) - { - if ( y2 >= y1 && y2 <= y3 ) /* ascending arc */ - goto Suite; - } - else - { - if ( y2 >= y3 && y2 <= y1 ) /* descending arc */ - { - y2 = y1; - y1 = y3; - y3 = y2; - goto Suite; - } - } - - y1 = y3 = y1 - FT_MulDiv( y2 - y1, y2 - y1, y1 - 2*y2 + y3 ); - - Suite: - if ( y1 < *min ) *min = y1; - if ( y3 > *max ) *max = y3; + /* This function is only called when a control off-point is outside */ + /* the bbox that contains all on-points. It finds a local extremum */ + /* within the segment, equal to (y1*y3 - y2*y2)/(y1 - 2*y2 + y3). */ + /* Or, offsetting from y2, we get */ + + y1 -= y2; + y3 -= y2; + y2 += FT_MulDiv( y1, y3, y1 + y3 ); + + if ( y2 < *min ) + *min = y2; + if ( y2 > *max ) + *max = y2; } @@ -164,8 +199,8 @@ FT_Vector* to, TBBox_Rec* user ) { - /* we don't need to check `to' since it is always an `on' point, thus */ - /* within the bbox */ + /* in case `to' is implicit and not included in bbox yet */ + FT_UPDATE_BBOX( to, user->bbox ); if ( CHECK_X( control, user->bbox ) ) BBox_Conic_Check( user->last.x, @@ -193,9 +228,9 @@ /* BBox_Cubic_Check */ /* */ /* <Description> */ - /* Finds the extrema of a 1-dimensional cubic Bezier curve and */ - /* updates a bounding range. This version uses splitting because we */ - /* don't want to use square roots and extra accuracy. */ + /* Find the extrema of a 1-dimensional cubic Bezier curve and */ + /* update a bounding range. This version uses iterative splitting */ + /* because it is faster than the exact solution with square roots. */ /* */ /* <Input> */ /* p1 :: The start coordinate. */ @@ -211,294 +246,117 @@ /* */ /* max :: The address of the current maximum. */ /* */ - -#if 0 - - static void - BBox_Cubic_Check( FT_Pos p1, - FT_Pos p2, - FT_Pos p3, - FT_Pos p4, - FT_Pos* min, - FT_Pos* max ) + static FT_Pos + cubic_peak( FT_Pos q1, + FT_Pos q2, + FT_Pos q3, + FT_Pos q4 ) { - FT_Pos stack[32*3 + 1], *arc; - - - arc = stack; - - arc[0] = p1; - arc[1] = p2; - arc[2] = p3; - arc[3] = p4; - - do + FT_Pos peak = 0; + FT_Int shift; + + /* This function finds a peak of a cubic segment if it is above 0 */ + /* using iterative bisection of the segment, or returns 0. */ + /* The fixed-point arithmetic of bisection is inherently stable */ + /* but may loose accuracy in the two lowest bits. To compensate, */ + /* we upscale the segment if there is room. Large values may need */ + /* to be downscaled to avoid overflows during bisection. */ + /* It is called with either q2 or q3 positive, which is necessary */ + /* for the peak to exist and avoids undefined FT_MSB. */ + + shift = 27 - + FT_MSB( FT_ABS( q1 ) | FT_ABS( q2 ) | FT_ABS( q3 ) | FT_ABS( q4 ) ); + + if ( shift > 0 ) { - FT_Pos y1 = arc[0]; - FT_Pos y2 = arc[1]; - FT_Pos y3 = arc[2]; - FT_Pos y4 = arc[3]; - + /* upscaling too much just wastes time */ + if ( shift > 2 ) + shift = 2; + + q1 <<= shift; + q2 <<= shift; + q3 <<= shift; + q4 <<= shift; + } + else + { + q1 >>= -shift; + q2 >>= -shift; + q3 >>= -shift; + q4 >>= -shift; + } - if ( y1 == y4 ) + /* for a peak to exist above 0, the cubic segment must have */ + /* at least one of its control off-points above 0. */ + while ( q2 > 0 || q3 > 0 ) + { + /* determine which half contains the maximum and split */ + if ( q1 + q2 > q3 + q4 ) /* first half */ { - if ( y1 == y2 && y1 == y3 ) /* flat */ - goto Test; + q4 = q4 + q3; + q3 = q3 + q2; + q2 = q2 + q1; + q4 = q4 + q3; + q3 = q3 + q2; + q4 = ( q4 + q3 ) / 8; + q3 = q3 / 4; + q2 = q2 / 2; } - else if ( y1 < y4 ) + else /* second half */ { - if ( y2 >= y1 && y2 <= y4 && y3 >= y1 && y3 <= y4 ) /* ascending */ - goto Test; + q1 = q1 + q2; + q2 = q2 + q3; + q3 = q3 + q4; + q1 = q1 + q2; + q2 = q2 + q3; + q1 = ( q1 + q2 ) / 8; + q2 = q2 / 4; + q3 = q3 / 2; } - else + + /* check whether either end reached the maximum */ + if ( q1 == q2 && q1 >= q3 ) { - if ( y2 >= y4 && y2 <= y1 && y3 >= y4 && y3 <= y1 ) /* descending */ - { - y2 = y1; - y1 = y4; - y4 = y2; - goto Test; - } + peak = q1; + break; } + if ( q3 == q4 && q2 <= q4 ) + { + peak = q4; + break; + } + } - /* unknown direction -- split the arc in two */ - arc[6] = y4; - arc[1] = y1 = ( y1 + y2 ) / 2; - arc[5] = y4 = ( y4 + y3 ) / 2; - y2 = ( y2 + y3 ) / 2; - arc[2] = y1 = ( y1 + y2 ) / 2; - arc[4] = y4 = ( y4 + y2 ) / 2; - arc[3] = ( y1 + y4 ) / 2; - - arc += 3; - goto Suite; - - Test: - if ( y1 < *min ) *min = y1; - if ( y4 > *max ) *max = y4; - arc -= 3; - - Suite: - ; - } while ( arc >= stack ); - } - -#else - - static void - test_cubic_extrema( FT_Pos y1, - FT_Pos y2, - FT_Pos y3, - FT_Pos y4, - FT_Fixed u, - FT_Pos* min, - FT_Pos* max ) - { - /* FT_Pos a = y4 - 3*y3 + 3*y2 - y1; */ - FT_Pos b = y3 - 2*y2 + y1; - FT_Pos c = y2 - y1; - FT_Pos d = y1; - FT_Pos y; - FT_Fixed uu; - - FT_UNUSED ( y4 ); - - - /* The polynomial is */ - /* */ - /* P(x) = a*x^3 + 3b*x^2 + 3c*x + d , */ - /* */ - /* dP/dx = 3a*x^2 + 6b*x + 3c . */ - /* */ - /* However, we also have */ - /* */ - /* dP/dx(u) = 0 , */ - /* */ - /* which implies by subtraction that */ - /* */ - /* P(u) = b*u^2 + 2c*u + d . */ - - if ( u > 0 && u < 0x10000L ) - { - uu = FT_MulFix( u, u ); - y = d + FT_MulFix( c, 2*u ) + FT_MulFix( b, uu ); + if ( shift > 0 ) + peak >>= shift; + else + peak <<= -shift; - if ( y < *min ) *min = y; - if ( y > *max ) *max = y; - } + return peak; } static void - BBox_Cubic_Check( FT_Pos y1, - FT_Pos y2, - FT_Pos y3, - FT_Pos y4, + BBox_Cubic_Check( FT_Pos p1, + FT_Pos p2, + FT_Pos p3, + FT_Pos p4, FT_Pos* min, FT_Pos* max ) { - /* always compare first and last points */ - if ( y1 < *min ) *min = y1; - else if ( y1 > *max ) *max = y1; + /* This function is only called when a control off-point is outside */ + /* the bbox that contains all on-points. So at least one of the */ + /* conditions below holds and cubic_peak is called with at least one */ + /* non-zero argument. */ - if ( y4 < *min ) *min = y4; - else if ( y4 > *max ) *max = y4; + if ( p2 > *max || p3 > *max ) + *max += cubic_peak( p1 - *max, p2 - *max, p3 - *max, p4 - *max ); - /* now, try to see if there are split points here */ - if ( y1 <= y4 ) - { - /* flat or ascending arc test */ - if ( y1 <= y2 && y2 <= y4 && y1 <= y3 && y3 <= y4 ) - return; - } - else /* y1 > y4 */ - { - /* descending arc test */ - if ( y1 >= y2 && y2 >= y4 && y1 >= y3 && y3 >= y4 ) - return; - } - - /* There are some split points. Find them. */ - { - FT_Pos a = y4 - 3*y3 + 3*y2 - y1; - FT_Pos b = y3 - 2*y2 + y1; - FT_Pos c = y2 - y1; - FT_Pos d; - FT_Fixed t; - - - /* We need to solve `ax^2+2bx+c' here, without floating points! */ - /* The trick is to normalize to a different representation in order */ - /* to use our 16.16 fixed point routines. */ - /* */ - /* We compute FT_MulFix(b,b) and FT_MulFix(a,c) after normalization. */ - /* These values must fit into a single 16.16 value. */ - /* */ - /* We normalize a, b, and c to `8.16' fixed float values to ensure */ - /* that its product is held in a `16.16' value. */ - - { - FT_ULong t1, t2; - int shift = 0; - - - /* The following computation is based on the fact that for */ - /* any value `y', if `n' is the position of the most */ - /* significant bit of `abs(y)' (starting from 0 for the */ - /* least significant bit), then `y' is in the range */ - /* */ - /* -2^n..2^n-1 */ - /* */ - /* We want to shift `a', `b', and `c' concurrently in order */ - /* to ensure that they all fit in 8.16 values, which maps */ - /* to the integer range `-2^23..2^23-1'. */ - /* */ - /* Necessarily, we need to shift `a', `b', and `c' so that */ - /* the most significant bit of its absolute values is at */ - /* _most_ at position 23. */ - /* */ - /* We begin by computing `t1' as the bitwise `OR' of the */ - /* absolute values of `a', `b', `c'. */ - - t1 = (FT_ULong)( ( a >= 0 ) ? a : -a ); - t2 = (FT_ULong)( ( b >= 0 ) ? b : -b ); - t1 |= t2; - t2 = (FT_ULong)( ( c >= 0 ) ? c : -c ); - t1 |= t2; - - /* Now we can be sure that the most significant bit of `t1' */ - /* is the most significant bit of either `a', `b', or `c', */ - /* depending on the greatest integer range of the particular */ - /* variable. */ - /* */ - /* Next, we compute the `shift', by shifting `t1' as many */ - /* times as necessary to move its MSB to position 23. This */ - /* corresponds to a value of `t1' that is in the range */ - /* 0x40_0000..0x7F_FFFF. */ - /* */ - /* Finally, we shift `a', `b', and `c' by the same amount. */ - /* This ensures that all values are now in the range */ - /* -2^23..2^23, i.e., they are now expressed as 8.16 */ - /* fixed-float numbers. This also means that we are using */ - /* 24 bits of precision to compute the zeros, independently */ - /* of the range of the original polynomial coefficients. */ - /* */ - /* This algorithm should ensure reasonably accurate values */ - /* for the zeros. Note that they are only expressed with */ - /* 16 bits when computing the extrema (the zeros need to */ - /* be in 0..1 exclusive to be considered part of the arc). */ - - if ( t1 == 0 ) /* all coefficients are 0! */ - return; - - if ( t1 > 0x7FFFFFUL ) - { - do - { - shift++; - t1 >>= 1; - - } while ( t1 > 0x7FFFFFUL ); - - /* this loses some bits of precision, but we use 24 of them */ - /* for the computation anyway */ - a >>= shift; - b >>= shift; - c >>= shift; - } - else if ( t1 < 0x400000UL ) - { - do - { - shift++; - t1 <<= 1; - - } while ( t1 < 0x400000UL ); - - a <<= shift; - b <<= shift; - c <<= shift; - } - } - - /* handle a == 0 */ - if ( a == 0 ) - { - if ( b != 0 ) - { - t = - FT_DivFix( c, b ) / 2; - test_cubic_extrema( y1, y2, y3, y4, t, min, max ); - } - } - else - { - /* solve the equation now */ - d = FT_MulFix( b, b ) - FT_MulFix( a, c ); - if ( d < 0 ) - return; - - if ( d == 0 ) - { - /* there is a single split point at -b/a */ - t = - FT_DivFix( b, a ); - test_cubic_extrema( y1, y2, y3, y4, t, min, max ); - } - else - { - /* there are two solutions; we need to filter them */ - d = FT_SqrtFixed( (FT_Int32)d ); - t = - FT_DivFix( b - d, a ); - test_cubic_extrema( y1, y2, y3, y4, t, min, max ); - - t = - FT_DivFix( b + d, a ); - test_cubic_extrema( y1, y2, y3, y4, t, min, max ); - } - } - } + /* now flip the signs to update the minimum */ + if ( p2 < *min || p3 < *min ) + *min -= cubic_peak( *min - p1, *min - p2, *min - p3, *min - p4 ); } -#endif - /*************************************************************************/ /* */ @@ -534,8 +392,9 @@ FT_Vector* to, TBBox_Rec* user ) { - /* we don't need to check `to' since it is always an `on' point, thus */ - /* within the bbox */ + /* We don't need to check `to' since it is always an on-point, */ + /* thus within the bbox. Only segments with an off-point outside */ + /* the bbox can possibly reach new extreme values. */ if ( CHECK_X( control1, user->bbox ) || CHECK_X( control2, user->bbox ) ) @@ -560,31 +419,35 @@ return 0; } -FT_DEFINE_OUTLINE_FUNCS(bbox_interface, + + FT_DEFINE_OUTLINE_FUNCS(bbox_interface, (FT_Outline_MoveTo_Func) BBox_Move_To, - (FT_Outline_LineTo_Func) BBox_Move_To, + (FT_Outline_LineTo_Func) BBox_Line_To, (FT_Outline_ConicTo_Func)BBox_Conic_To, (FT_Outline_CubicTo_Func)BBox_Cubic_To, 0, 0 ) + /* documentation is in ftbbox.h */ FT_EXPORT_DEF( FT_Error ) FT_Outline_Get_BBox( FT_Outline* outline, FT_BBox *abbox ) { - FT_BBox cbox; - FT_BBox bbox; + FT_BBox cbox = { 0x7FFFFFFFL, 0x7FFFFFFFL, + -0x7FFFFFFFL, -0x7FFFFFFFL }; + FT_BBox bbox = { 0x7FFFFFFFL, 0x7FFFFFFFL, + -0x7FFFFFFFL, -0x7FFFFFFFL }; FT_Vector* vec; FT_UShort n; if ( !abbox ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( !outline ) - return FT_Err_Invalid_Outline; + return FT_THROW( Invalid_Outline ); /* if outline is empty, return (0,0,0,0) */ if ( outline->n_points == 0 || outline->n_contours <= 0 ) @@ -599,32 +462,13 @@ FT_DEFINE_OUTLINE_FUNCS(bbox_interface, /* coincide, we exit immediately. */ vec = outline->points; - bbox.xMin = bbox.xMax = cbox.xMin = cbox.xMax = vec->x; - bbox.yMin = bbox.yMax = cbox.yMin = cbox.yMax = vec->y; - vec++; - for ( n = 1; n < outline->n_points; n++ ) + for ( n = 0; n < outline->n_points; n++ ) { - FT_Pos x = vec->x; - FT_Pos y = vec->y; - - - /* update control box */ - if ( x < cbox.xMin ) cbox.xMin = x; - if ( x > cbox.xMax ) cbox.xMax = x; - - if ( y < cbox.yMin ) cbox.yMin = y; - if ( y > cbox.yMax ) cbox.yMax = y; + FT_UPDATE_BBOX( vec, cbox); if ( FT_CURVE_TAG( outline->tags[n] ) == FT_CURVE_TAG_ON ) - { - /* update bbox for `on' points only */ - if ( x < bbox.xMin ) bbox.xMin = x; - if ( x > bbox.xMax ) bbox.xMax = x; - - if ( y < bbox.yMin ) bbox.yMin = y; - if ( y > bbox.yMax ) bbox.yMax = y; - } + FT_UPDATE_BBOX( vec, bbox); vec++; } diff --git a/src/base/ftbdf.c b/src/base/ftbdf.c index d29adf0..d9dcbad 100644 --- a/src/base/ftbdf.c +++ b/src/base/ftbdf.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing BDF-specific strings (body). */ /* */ -/* Copyright 2002, 2003, 2004 by */ +/* Copyright 2002-2004, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_BDF_H @@ -32,19 +34,18 @@ const char* encoding = NULL; const char* registry = NULL; + FT_Service_BDF service; - error = FT_Err_Invalid_Argument; - - if ( face ) - { - FT_Service_BDF service; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); - FT_FACE_FIND_SERVICE( face, service, BDF ); + FT_FACE_FIND_SERVICE( face, service, BDF ); - if ( service && service->get_charset_id ) - error = service->get_charset_id( face, &encoding, ®istry ); - } + 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; - aproperty->type = BDF_PROPERTY_TYPE_NONE; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); - if ( face ) - { - FT_Service_BDF service; + if ( !aproperty ) + return FT_THROW( Invalid_Argument ); + aproperty->type = BDF_PROPERTY_TYPE_NONE; - FT_FACE_FIND_SERVICE( face, service, BDF ); + FT_FACE_FIND_SERVICE( face, service, BDF ); - if ( service && service->get_property ) - error = service->get_property( face, prop_name, aproperty ); - } + if ( service && service->get_property ) + error = service->get_property( face, prop_name, aproperty ); + else + error = FT_THROW( Invalid_Argument ); - return error; + return error; } diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c index 84fa322..19a1a80 100644 --- a/src/base/ftbitmap.c +++ b/src/base/ftbitmap.c @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (body). */ /* */ -/* Copyright 2004-2009, 2011 by */ +/* Copyright 2004-2009, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_BITMAP_H #include FT_IMAGE_H #include FT_INTERNAL_OBJECTS_H @@ -31,7 +33,8 @@ FT_EXPORT_DEF( void ) FT_Bitmap_New( FT_Bitmap *abitmap ) { - *abitmap = null_bitmap; + if ( abitmap ) + *abitmap = null_bitmap; } @@ -42,25 +45,42 @@ const FT_Bitmap *source, FT_Bitmap *target) { - FT_Memory memory = library->memory; + FT_Memory memory; FT_Error error = FT_Err_Ok; - FT_Int pitch = source->pitch; - FT_ULong size; + + FT_Int pitch; + FT_ULong size; + + FT_Int source_pitch_sign, target_pitch_sign; + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + + if ( !source || !target ) + return FT_THROW( Invalid_Argument ); + if ( source == target ) return FT_Err_Ok; + source_pitch_sign = source->pitch < 0 ? -1 : 1; + target_pitch_sign = target->pitch < 0 ? -1 : 1; + if ( source->buffer == NULL ) { *target = *source; + if ( source_pitch_sign != target_pitch_sign ) + target->pitch = -target->pitch; return FT_Err_Ok; } + memory = library->memory; + pitch = source->pitch; + if ( pitch < 0 ) pitch = -pitch; - size = (FT_ULong)( pitch * source->rows ); + size = (FT_ULong)pitch * source->rows; if ( target->buffer ) { @@ -68,9 +88,9 @@ FT_ULong target_size; - if ( target_pitch < 0 ) + if ( target_pitch < 0 ) target_pitch = -target_pitch; - target_size = (FT_ULong)( target_pitch * target->rows ); + target_size = (FT_ULong)target_pitch * target->rows; if ( target_size != size ) (void)FT_QREALLOC( target->buffer, target_size, size ); @@ -87,13 +107,35 @@ *target = *source; target->buffer = p; - FT_MEM_COPY( target->buffer, source->buffer, size ); + if ( source_pitch_sign == target_pitch_sign ) + FT_MEM_COPY( target->buffer, source->buffer, size ); + else + { + /* take care of bitmap flow */ + FT_UInt i; + FT_Byte* s = source->buffer; + FT_Byte* t = target->buffer; + + + t += pitch * ( target->rows - 1 ); + + for ( i = target->rows; i > 0; i-- ) + { + FT_ARRAY_COPY( t, s, pitch ); + + s += pitch; + t -= pitch; + } + } } return error; } + /* Enlarge `bitmap' horizontally and vertically by `xpixels' */ + /* and `ypixels', respectively. */ + static FT_Error ft_bitmap_assure_buffer( FT_Memory memory, FT_Bitmap* bitmap, @@ -104,7 +146,7 @@ int pitch; int new_pitch; FT_UInt bpp; - FT_Int i, width, height; + FT_UInt i, width, height; unsigned char* buffer = NULL; @@ -135,24 +177,24 @@ new_pitch = ( width + xpixels ); break; default: - return FT_Err_Invalid_Glyph_Format; + return FT_THROW( Invalid_Glyph_Format ); } /* if no need to allocate memory */ if ( ypixels == 0 && new_pitch <= pitch ) { /* zero the padding */ - FT_Int bit_width = pitch * 8; - FT_Int bit_last = ( width + xpixels ) * bpp; + FT_UInt bit_width = pitch * 8; + FT_UInt bit_last = ( width + xpixels ) * bpp; if ( bit_last < bit_width ) { FT_Byte* line = bitmap->buffer + ( bit_last >> 3 ); FT_Byte* end = bitmap->buffer + pitch; - FT_Int shift = bit_last & 7; + FT_UInt shift = bit_last & 7; FT_UInt mask = 0xFF00U >> shift; - FT_Int count = height; + FT_UInt count = height; for ( ; count > 0; count--, line += pitch, end += pitch ) @@ -166,19 +208,22 @@ write++; } if ( write < end ) - FT_MEM_ZERO( write, end-write ); + FT_MEM_ZERO( write, end - write ); } } return FT_Err_Ok; } + /* otherwise allocate new buffer */ if ( FT_QALLOC_MULT( buffer, new_pitch, bitmap->rows + ypixels ) ) return error; + /* new rows get added at the top of the bitmap, */ + /* thus take care of the flow direction */ if ( bitmap->pitch > 0 ) { - FT_Int len = ( width * bpp + 7 ) >> 3; + FT_UInt len = ( width * bpp + 7 ) >> 3; for ( i = 0; i < bitmap->rows; i++ ) @@ -187,7 +232,7 @@ } else { - FT_Int len = ( width * bpp + 7 ) >> 3; + FT_UInt len = ( width * bpp + 7 ) >> 3; for ( i = 0; i < bitmap->rows; i++ ) @@ -218,19 +263,20 @@ { FT_Error error; unsigned char* p; - FT_Int i, x, y, pitch; + FT_Int i, x, pitch; + FT_UInt y; FT_Int xstr, ystr; if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); if ( !bitmap || !bitmap->buffer ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( ( ( FT_PIX_ROUND( xStrength ) >> 6 ) > FT_INT_MAX ) || ( ( FT_PIX_ROUND( yStrength ) >> 6 ) > FT_INT_MAX ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); xstr = (FT_Int)FT_PIX_ROUND( xStrength ) >> 6; ystr = (FT_Int)FT_PIX_ROUND( yStrength ) >> 6; @@ -238,7 +284,7 @@ if ( xstr == 0 && ystr == 0 ) return FT_Err_Ok; else if ( xstr < 0 || ystr < 0 ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); switch ( bitmap->pixel_mode ) { @@ -246,17 +292,11 @@ case FT_PIXEL_MODE_GRAY4: { FT_Bitmap tmp; - FT_Int align; - - if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY2 ) - align = ( bitmap->width + xstr + 3 ) / 4; - else - align = ( bitmap->width + xstr + 1 ) / 2; + /* convert to 8bpp */ FT_Bitmap_New( &tmp ); - - error = FT_Bitmap_Convert( library, bitmap, &tmp, align ); + error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 ); if ( error ) return error; @@ -277,12 +317,17 @@ case FT_PIXEL_MODE_LCD_V: ystr *= 3; break; + + case FT_PIXEL_MODE_BGRA: + /* We don't embolden color glyphs. */ + return FT_Err_Ok; } error = ft_bitmap_assure_buffer( library->memory, bitmap, xstr, ystr ); if ( error ) return error; + /* take care of bitmap flow */ pitch = bitmap->pitch; if ( pitch > 0 ) p = bitmap->buffer + pitch * ystr; @@ -303,7 +348,7 @@ */ for ( x = pitch - 1; x >= 0; x-- ) { - unsigned char tmp; + unsigned char tmp; tmp = p[x]; @@ -318,7 +363,7 @@ p[x] |= p[x - 1] << ( 8 - i ); #if 0 - if ( p[x] == 0xff ) + if ( p[x] == 0xFF ) break; #endif } @@ -328,12 +373,12 @@ { if ( p[x] + p[x - i] > bitmap->num_grays - 1 ) { - p[x] = (unsigned char)(bitmap->num_grays - 1); + p[x] = (unsigned char)( bitmap->num_grays - 1 ); break; } else { - p[x] = (unsigned char)(p[x] + p[x-i]); + p[x] = (unsigned char)( p[x] + p[x - i] ); if ( p[x] == bitmap->num_grays - 1 ) break; } @@ -369,6 +414,52 @@ } + static FT_Byte + ft_gray_for_premultiplied_srgb_bgra( const FT_Byte* bgra ) + { + FT_UInt a = bgra[3]; + FT_UInt l; + + + /* Short-circuit transparent color to avoid division by zero. */ + if ( !a ) + return 0; + + /* + * Luminosity for sRGB is defined using ~0.2126,0.7152,0.0722 + * coefficients for RGB channels *on the linear colors*. + * A gamma of 2.2 is fair to assume. And then, we need to + * undo the premultiplication too. + * + * http://accessibility.kde.org/hsl-adjusted.php + * + * We do the computation with integers only, applying a gamma of 2.0. + * We guarantee 32-bit arithmetic to avoid overflow but the resulting + * luminosity fits into 16 bits. + * + */ + + l = ( 4732UL /* 0.0722 * 65536 */ * bgra[0] * bgra[0] + + 46871UL /* 0.7152 * 65536 */ * bgra[1] * bgra[1] + + 13933UL /* 0.2126 * 65536 */ * bgra[2] * bgra[2] ) >> 16; + + /* + * Final transparency can be determined as follows. + * + * - If alpha is zero, we want 0. + * - If alpha is zero and luminosity is zero, we want 255. + * - If alpha is zero and luminosity is one, we want 0. + * + * So the formula is a * (1 - l) = a - l * a. + * + * We still need to undo premultiplication by dividing l by a*a. + * + */ + + return (FT_Byte)( a - l / a ); + } + + /* documentation is in ftbitmap.h */ FT_EXPORT_DEF( FT_Error ) @@ -380,9 +471,15 @@ FT_Error error = FT_Err_Ok; FT_Memory memory; + FT_Byte* s; + FT_Byte* t; + if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); + + if ( !source || !target ) + return FT_THROW( Invalid_Argument ); memory = library->memory; @@ -394,14 +491,17 @@ case FT_PIXEL_MODE_GRAY4: case FT_PIXEL_MODE_LCD: case FT_PIXEL_MODE_LCD_V: + case FT_PIXEL_MODE_BGRA: { - FT_Int pad; - FT_Long old_size; + FT_Int pad, old_target_pitch, target_pitch; + FT_ULong old_size; + + old_target_pitch = target->pitch; + if ( old_target_pitch < 0 ) + old_target_pitch = -old_target_pitch; - old_size = target->rows * target->pitch; - if ( old_size < 0 ) - old_size = -old_size; + old_size = target->rows * old_target_pitch; target->pixel_mode = FT_PIXEL_MODE_GRAY; target->rows = source->rows; @@ -415,30 +515,39 @@ pad = alignment - pad; } - target->pitch = source->width + pad; + target_pitch = source->width + pad; - if ( target->pitch > 0 && - (FT_ULong)target->rows > FT_ULONG_MAX / target->pitch ) - return FT_Err_Invalid_Argument; + if ( target_pitch > 0 && + (FT_ULong)target->rows > FT_ULONG_MAX / target_pitch ) + return FT_THROW( Invalid_Argument ); - if ( target->rows * target->pitch > old_size && + if ( target->rows * target_pitch > old_size && FT_QREALLOC( target->buffer, - old_size, target->rows * target->pitch ) ) + old_size, target->rows * target_pitch ) ) return error; + + target->pitch = target->pitch < 0 ? -target_pitch : target_pitch; } break; default: - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); } + s = source->buffer; + t = target->buffer; + + /* take care of bitmap flow */ + if ( source->pitch < 0 ) + s -= source->pitch * ( source->rows - 1 ); + if ( target->pitch < 0 ) + t -= target->pitch * ( target->rows - 1 ); + switch ( source->pixel_mode ) { case FT_PIXEL_MODE_MONO: { - FT_Byte* s = source->buffer; - FT_Byte* t = target->buffer; - FT_Int i; + FT_UInt i; target->num_grays = 2; @@ -447,7 +556,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; /* get the full bytes */ @@ -495,12 +604,8 @@ case FT_PIXEL_MODE_LCD: case FT_PIXEL_MODE_LCD_V: { - FT_Int width = source->width; - FT_Byte* s = source->buffer; - FT_Byte* t = target->buffer; - FT_Int s_pitch = source->pitch; - FT_Int t_pitch = target->pitch; - FT_Int i; + FT_Int width = source->width; + FT_UInt i; target->num_grays = 256; @@ -509,8 +614,8 @@ { FT_ARRAY_COPY( t, s, width ); - s += s_pitch; - t += t_pitch; + s += source->pitch; + t += target->pitch; } } break; @@ -518,9 +623,7 @@ case FT_PIXEL_MODE_GRAY2: { - FT_Byte* s = source->buffer; - FT_Byte* t = target->buffer; - FT_Int i; + FT_UInt i; target->num_grays = 4; @@ -529,7 +632,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; /* get the full bytes */ @@ -570,9 +673,7 @@ case FT_PIXEL_MODE_GRAY4: { - FT_Byte* s = source->buffer; - FT_Byte* t = target->buffer; - FT_Int i; + FT_UInt i; target->num_grays = 16; @@ -581,7 +682,7 @@ { FT_Byte* ss = s; FT_Byte* tt = t; - FT_Int j; + FT_UInt j; /* get the full bytes */ @@ -607,6 +708,34 @@ break; + case FT_PIXEL_MODE_BGRA: + { + FT_UInt i; + + + target->num_grays = 256; + + for ( i = source->rows; i > 0; i-- ) + { + FT_Byte* ss = s; + FT_Byte* tt = t; + FT_UInt j; + + + for ( j = source->width; j > 0; j-- ) + { + tt[0] = ft_gray_for_premultiplied_srgb_bgra( ss ); + + ss += 4; + tt += 1; + } + + s += source->pitch; + t += target->pitch; + } + } + break; + default: ; } @@ -650,10 +779,10 @@ if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); if ( !bitmap ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); memory = library->memory; diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index 2aeea04..57f7968 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (body). */ /* */ -/* Copyright 1996-2006, 2008, 2012 by */ +/* Copyright 1996-2006, 2008, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -34,21 +34,19 @@ #include <ft2build.h> #include FT_GLYPH_H +#include FT_TRIGONOMETRY_H #include FT_INTERNAL_CALC_H #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_OBJECTS_H -#ifdef FT_MULFIX_INLINED + +#ifdef FT_MULFIX_ASSEMBLER #undef FT_MulFix #endif -/* we need to define a 64-bits data type here */ - -#ifdef FT_LONG64 - - typedef FT_INT64 FT_Int64; +/* we need to emulate a 64-bit data type if a real one isn't available */ -#else +#ifndef FT_LONG64 typedef struct FT_Int64_ { @@ -57,7 +55,7 @@ } FT_Int64; -#endif /* FT_LONG64 */ +#endif /* !FT_LONG64 */ /*************************************************************************/ @@ -70,6 +68,16 @@ #define FT_COMPONENT trace_calc + /* transfer sign leaving a positive number */ +#define FT_MOVE_SIGN( x, s ) \ + FT_BEGIN_STMNT \ + if ( x < 0 ) \ + { \ + x = -x; \ + s = -s; \ + } \ + FT_END_STMNT + /* The following three functions are available regardless of whether */ /* FT_LONG64 is defined. */ @@ -78,8 +86,8 @@ FT_EXPORT_DEF( FT_Fixed ) FT_RoundFix( FT_Fixed a ) { - return ( a >= 0 ) ? ( a + 0x8000L ) & ~0xFFFFL - : -((-a + 0x8000L ) & ~0xFFFFL ); + return a >= 0 ? ( a + 0x8000L ) & ~0xFFFFL + : -((-a + 0x8000L ) & ~0xFFFFL ); } @@ -88,8 +96,8 @@ FT_EXPORT_DEF( FT_Fixed ) FT_CeilFix( FT_Fixed a ) { - return ( a >= 0 ) ? ( a + 0xFFFFL ) & ~0xFFFFL - : -((-a + 0xFFFFL ) & ~0xFFFFL ); + return a >= 0 ? ( a + 0xFFFFL ) & ~0xFFFFL + : -((-a + 0xFFFFL ) & ~0xFFFFL ); } @@ -98,43 +106,65 @@ FT_EXPORT_DEF( FT_Fixed ) FT_FloorFix( FT_Fixed a ) { - return ( a >= 0 ) ? a & ~0xFFFFL - : -((-a) & ~0xFFFFL ); + return a >= 0 ? a & ~0xFFFFL + : -((-a) & ~0xFFFFL ); } +#ifndef FT_MSB -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_BASE_DEF ( FT_Int ) + FT_MSB( FT_UInt32 z ) + { + FT_Int shift = 0; - /* documentation is in ftcalc.h */ - FT_EXPORT_DEF( FT_Int32 ) - FT_Sqrt32( FT_Int32 x ) - { - FT_UInt32 val, root, newroot, mask; + /* determine msb bit index in `shift' */ + if ( z & 0xFFFF0000UL ) + { + z >>= 16; + shift += 16; + } + if ( z & 0x0000FF00UL ) + { + z >>= 8; + shift += 8; + } + if ( z & 0x000000F0UL ) + { + z >>= 4; + shift += 4; + } + if ( z & 0x0000000CUL ) + { + z >>= 2; + shift += 2; + } + if ( z & 0x00000002UL ) + { + /* z >>= 1; */ + shift += 1; + } + return shift; + } - root = 0; - mask = (FT_UInt32)0x40000000UL; - val = (FT_UInt32)x; +#endif /* !FT_MSB */ - do - { - newroot = root + mask; - if ( newroot <= val ) - { - val -= newroot; - root = newroot + mask; - } - root >>= 1; - mask >>= 2; + /* documentation is in ftcalc.h */ - } while ( mask != 0 ); + FT_BASE_DEF( FT_Fixed ) + FT_Hypot( FT_Fixed x, + FT_Fixed y ) + { + FT_Vector v; - return root; - } -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + v.x = x; + v.y = y; + + return FT_Vector_Length( &v ); + } #ifdef FT_LONG64 @@ -147,24 +177,21 @@ FT_Long b, FT_Long c ) { - FT_Int s; + FT_Int s = 1; FT_Long d; - s = 1; - if ( a < 0 ) { a = -a; s = -1; } - if ( b < 0 ) { b = -b; s = -s; } - if ( c < 0 ) { c = -c; s = -s; } + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); + FT_MOVE_SIGN( c, s ); d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c : 0x7FFFFFFFL ); - return ( s > 0 ) ? d : -d; + return s < 0 ? -d : d; } -#ifdef TT_USE_BYTECODE_INTERPRETER - /* documentation is in ftcalc.h */ FT_BASE_DEF( FT_Long ) @@ -172,23 +199,20 @@ FT_Long b, FT_Long c ) { - FT_Int s; + FT_Int s = 1; FT_Long d; - s = 1; - if ( a < 0 ) { a = -a; s = -1; } - if ( b < 0 ) { b = -b; s = -s; } - if ( c < 0 ) { c = -c; s = -s; } + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); + FT_MOVE_SIGN( c, s ); d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c : 0x7FFFFFFFL ); - return ( s > 0 ) ? d : -d; + return s < 0 ? -d : d; } -#endif /* TT_USE_BYTECODE_INTERPRETER */ - /* documentation is in freetype.h */ @@ -206,21 +230,12 @@ FT_Long c; - if ( a < 0 ) - { - a = -a; - s = -1; - } - - if ( b < 0 ) - { - b = -b; - s = -s; - } + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 ); - return ( s > 0 ) ? c : -c; + return s < 0 ? -c : c; #endif /* FT_MULFIX_ASSEMBLER */ } @@ -232,21 +247,17 @@ FT_DivFix( FT_Long a, FT_Long b ) { - FT_Int32 s; - FT_UInt32 q; + FT_Int s = 1; + FT_Long q; - s = 1; - if ( a < 0 ) { a = -a; s = -1; } - if ( b < 0 ) { b = -b; s = -s; } - if ( b == 0 ) - /* check for division by 0 */ - q = 0x7FFFFFFFL; - else - /* compute result directly */ - q = (FT_UInt32)( ( ( (FT_Int64)a << 16 ) + ( b >> 1 ) ) / b ); + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); - return ( s < 0 ? -(FT_Long)q : (FT_Long)q ); + q = (FT_Long)( b > 0 ? ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b + : 0x7FFFFFFFL ); + + return s < 0 ? -q : q; } @@ -294,25 +305,30 @@ FT_Int i; - q = 0; - r = hi; - - if ( r >= y ) + if ( hi >= y ) return (FT_UInt32)0x7FFFFFFFL; - i = 32; + /* We shift as many bits as we can into the high register, perform */ + /* 32-bit division with modulo there, then work through the remaining */ + /* bits with long division. This optimization is especially noticeable */ + /* for smaller dividends that barely use the high register. */ + + i = 31 - FT_MSB( hi ); + r = ( hi << i ) | ( lo >> ( 32 - i ) ); lo <<= i; /* left 64-bit shift */ + q = r / y; + r -= q * y; /* remainder */ + + i = 32 - i; /* bits remaining in low register */ do { - r <<= 1; q <<= 1; - r |= lo >> 31; + r = ( r << 1 ) | ( lo >> 31 ); lo <<= 1; if ( r >= y ) { r -= y; q |= 1; } - lo <<= 1; } while ( --i ); return q; @@ -324,7 +340,7 @@ FT_Int64* y, FT_Int64 *z ) { - register FT_UInt32 lo, hi; + FT_UInt32 lo, hi; lo = x->lo + y->lo; @@ -335,99 +351,134 @@ } - /* documentation is in freetype.h */ - - /* The FT_MulDiv function has been optimized thanks to ideas from */ - /* Graham Asher. The trick is to optimize computation when everything */ - /* fits within 32-bits (a rather common case). */ + /* The FT_MulDiv function has been optimized thanks to ideas from */ + /* Graham Asher and Alexei Podtelezhnikov. The trick is to optimize */ + /* a rather common case when everything fits within 32-bits. */ + /* */ + /* We compute 'a*b+c/2', then divide it by 'c' (all positive values). */ + /* */ + /* The product of two positive numbers never exceeds the square of */ + /* its mean values. Therefore, we always avoid the overflow by */ + /* imposing */ + /* */ + /* (a + b) / 2 <= sqrt(X - c/2) , */ /* */ - /* we compute 'a*b+c/2', then divide it by 'c'. (positive values) */ + /* where X = 2^32 - 1, the maximum unsigned 32-bit value, and using */ + /* unsigned arithmetic. Now we replace `sqrt' with a linear function */ + /* that is smaller or equal for all values of c in the interval */ + /* [0;X/2]; it should be equal to sqrt(X) and sqrt(3X/4) at the */ + /* endpoints. Substituting the linear solution and explicit numbers */ + /* we get */ /* */ - /* 46340 is FLOOR(SQRT(2^31-1)). */ + /* a + b <= 131071.99 - c / 122291.84 . */ /* */ - /* if ( a <= 46340 && b <= 46340 ) then ( a*b <= 0x7FFEA810 ) */ + /* In practice, we should use a faster and even stronger inequality */ /* */ - /* 0x7FFFFFFF - 0x7FFEA810 = 0x157F0 */ + /* a + b <= 131071 - (c >> 16) */ /* */ - /* if ( c < 0x157F0*2 ) then ( a*b+c/2 <= 0x7FFFFFFF ) */ + /* or, alternatively, */ /* */ - /* and 2*0x157F0 = 176096 */ + /* a + b <= 129894 - (c >> 17) . */ /* */ + /* FT_MulFix, on the other hand, is optimized for a small value of */ + /* the first argument, when the second argument can be much larger. */ + /* This can be achieved by scaling the second argument and the limit */ + /* in the above inequalities. For example, */ + /* */ + /* a + (b >> 8) <= (131071 >> 4) */ + /* */ + /* covers the practical range of use. The actual test below is a bit */ + /* tighter to avoid the border case overflows. */ + /* */ + /* In the case of FT_DivFix, the exact overflow check */ + /* */ + /* a << 16 <= X - c/2 */ + /* */ + /* is scaled down by 2^16 and we use */ + /* */ + /* a <= 65535 - (c >> 17) . */ + + /* documentation is in freetype.h */ FT_EXPORT_DEF( FT_Long ) FT_MulDiv( FT_Long a, FT_Long b, FT_Long c ) { - long s; + FT_Int s = 1; /* XXX: this function does not allow 64-bit arguments */ if ( a == 0 || b == c ) return a; - s = a; a = FT_ABS( a ); - s ^= b; b = FT_ABS( b ); - s ^= c; c = FT_ABS( c ); + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); + FT_MOVE_SIGN( c, s ); + + if ( c == 0 ) + a = 0x7FFFFFFFL; - if ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 ) - a = ( a * b + ( c >> 1 ) ) / c; + else if ( (FT_ULong)a + b <= 129894UL - ( c >> 17 ) ) + a = ( (FT_ULong)a * b + ( c >> 1 ) ) / c; - else if ( (FT_Int32)c > 0 ) + else { FT_Int64 temp, temp2; - ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp ); + ft_multo64( a, b, &temp ); temp2.hi = 0; - temp2.lo = (FT_UInt32)(c >> 1); + temp2.lo = c >> 1; + FT_Add64( &temp, &temp2, &temp ); - a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c ); + + /* last attempt to ditch long division */ + a = temp.hi == 0 ? temp.lo / c + : ft_div64by32( temp.hi, temp.lo, c ); } - else - a = 0x7FFFFFFFL; - return ( s < 0 ? -a : a ); + return s < 0 ? -a : a; } -#ifdef TT_USE_BYTECODE_INTERPRETER - FT_BASE_DEF( FT_Long ) FT_MulDiv_No_Round( FT_Long a, FT_Long b, FT_Long c ) { - long s; + FT_Int s = 1; if ( a == 0 || b == c ) return a; - s = a; a = FT_ABS( a ); - s ^= b; b = FT_ABS( b ); - s ^= c; c = FT_ABS( c ); + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); + FT_MOVE_SIGN( c, s ); + + if ( c == 0 ) + a = 0x7FFFFFFFL; - if ( a <= 46340L && b <= 46340L && c > 0 ) - a = a * b / c; + else if ( (FT_ULong)a + b <= 131071UL ) + a = (FT_ULong)a * b / c; - else if ( (FT_Int32)c > 0 ) + else { FT_Int64 temp; - ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp ); - a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c ); + ft_multo64( a, b, &temp ); + + /* last attempt to ditch long division */ + a = temp.hi == 0 ? temp.lo / c + : ft_div64by32( temp.hi, temp.lo, c ); } - else - a = 0x7FFFFFFFL; - return ( s < 0 ? -a : a ); + return s < 0 ? -a : a; } -#endif /* TT_USE_BYTECODE_INTERPRETER */ - /* documentation is in freetype.h */ @@ -481,7 +532,7 @@ ua = (FT_ULong)a; ub = (FT_ULong)b; - if ( ua <= 2048 && ub <= 1048576L ) + if ( ua + ( ub >> 8 ) <= 8190UL ) ua = ( ua * ub + 0x8000U ) >> 16; else { @@ -499,20 +550,20 @@ #else /* 0 */ - FT_Long s; + FT_Int s = 1; FT_ULong ua, ub; if ( a == 0 || b == 0x10000L ) return a; - s = a; a = FT_ABS( a ); - s ^= b; b = FT_ABS( b ); + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); ua = (FT_ULong)a; ub = (FT_ULong)b; - if ( ua <= 2048 && ub <= 1048576L ) + if ( ua + ( ub >> 8 ) <= 8190UL ) ua = ( ua * ub + 0x8000UL ) >> 16; else { @@ -523,7 +574,7 @@ ( ( al * ( ub & 0xFFFFUL ) + 0x8000UL ) >> 16 ); } - return ( s < 0 ? -(FT_Long)ua : (FT_Long)ua ); + return s < 0 ? -(FT_Long)ua : (FT_Long)ua; #endif /* 0 */ @@ -536,23 +587,24 @@ FT_DivFix( FT_Long a, FT_Long b ) { - FT_Int32 s; - FT_UInt32 q; + FT_Int s = 1; + FT_Long q; /* XXX: this function does not allow 64-bit arguments */ - s = (FT_Int32)a; a = FT_ABS( a ); - s ^= (FT_Int32)b; b = FT_ABS( b ); - if ( (FT_UInt32)b == 0 ) + FT_MOVE_SIGN( a, s ); + FT_MOVE_SIGN( b, s ); + + if ( b == 0 ) { /* check for division by 0 */ - q = (FT_UInt32)0x7FFFFFFFL; + q = 0x7FFFFFFFL; } - else if ( ( a >> 16 ) == 0 ) + else if ( a <= 65535L - ( b >> 17 ) ) { /* compute result directly */ - q = (FT_UInt32)( ( a << 16 ) + ( b >> 1 ) ) / (FT_UInt32)b; + q = (FT_Long)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b ); } else { @@ -560,138 +612,18 @@ FT_Int64 temp, temp2; - temp.hi = (FT_Int32) ( a >> 16 ); - temp.lo = (FT_UInt32)( a << 16 ); + temp.hi = a >> 16; + temp.lo = a << 16; temp2.hi = 0; - temp2.lo = (FT_UInt32)( b >> 1 ); - FT_Add64( &temp, &temp2, &temp ); - q = ft_div64by32( temp.hi, temp.lo, (FT_Int32)b ); - } - - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); - } - - -#if 0 - - /* documentation is in ftcalc.h */ - - FT_EXPORT_DEF( void ) - FT_MulTo64( FT_Int32 x, - FT_Int32 y, - FT_Int64 *z ) - { - FT_Int32 s; - - - s = x; x = FT_ABS( x ); - s ^= y; y = FT_ABS( y ); - - ft_multo64( x, y, z ); - - if ( s < 0 ) - { - z->lo = (FT_UInt32)-(FT_Int32)z->lo; - z->hi = ~z->hi + !( z->lo ); - } - } - + temp2.lo = b >> 1; - /* apparently, the second version of this code is not compiled correctly */ - /* on Mac machines with the MPW C compiler.. tsk, tsk, tsk... */ - -#if 1 - - FT_EXPORT_DEF( FT_Int32 ) - FT_Div64by32( FT_Int64* x, - FT_Int32 y ) - { - FT_Int32 s; - FT_UInt32 q, r, i, lo; - - - s = x->hi; - if ( s < 0 ) - { - x->lo = (FT_UInt32)-(FT_Int32)x->lo; - x->hi = ~x->hi + !x->lo; - } - s ^= y; y = FT_ABS( y ); - - /* Shortcut */ - if ( x->hi == 0 ) - { - if ( y > 0 ) - q = x->lo / y; - else - q = 0x7FFFFFFFL; - - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); - } - - r = x->hi; - lo = x->lo; - - if ( r >= (FT_UInt32)y ) /* we know y is to be treated as unsigned here */ - return ( s < 0 ? 0x80000001UL : 0x7FFFFFFFUL ); - /* Return Max/Min Int32 if division overflow. */ - /* This includes division by zero! */ - q = 0; - for ( i = 0; i < 32; i++ ) - { - r <<= 1; - q <<= 1; - r |= lo >> 31; - - if ( r >= (FT_UInt32)y ) - { - r -= y; - q |= 1; - } - lo <<= 1; - } - - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); - } - -#else /* 0 */ - - FT_EXPORT_DEF( FT_Int32 ) - FT_Div64by32( FT_Int64* x, - FT_Int32 y ) - { - FT_Int32 s; - FT_UInt32 q; - - - s = x->hi; - if ( s < 0 ) - { - x->lo = (FT_UInt32)-(FT_Int32)x->lo; - x->hi = ~x->hi + !x->lo; - } - s ^= y; y = FT_ABS( y ); - - /* Shortcut */ - if ( x->hi == 0 ) - { - if ( y > 0 ) - q = ( x->lo + ( y >> 1 ) ) / y; - else - q = 0x7FFFFFFFL; - - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); + FT_Add64( &temp, &temp2, &temp ); + q = (FT_Long)ft_div64by32( temp.hi, temp.lo, b ); } - q = ft_div64by32( x->hi, x->lo, y ); - - return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); + return s < 0 ? -q : q; } -#endif /* 0 */ - -#endif /* 0 */ - #endif /* FT_LONG64 */ @@ -727,14 +659,14 @@ if ( !matrix ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* compute discriminant */ delta = FT_MulFix( matrix->xx, matrix->yy ) - FT_MulFix( matrix->xy, matrix->yx ); if ( !delta ) - return FT_Err_Invalid_Argument; /* matrix can't be inverted */ + return FT_THROW( Invalid_Argument ); /* matrix can't be inverted */ matrix->xy = - FT_DivFix( matrix->xy, delta ); matrix->yx = - FT_DivFix( matrix->yx, delta ); @@ -800,6 +732,8 @@ } +#if 0 + /* documentation is in ftcalc.h */ FT_BASE_DEF( FT_Int32 ) @@ -834,6 +768,8 @@ return (FT_Int32)root; } +#endif /* 0 */ + /* documentation is in ftcalc.h */ @@ -923,35 +859,40 @@ FT_Pos out_x, FT_Pos out_y ) { - FT_Pos ax = in_x; - FT_Pos ay = in_y; - - FT_Pos d_in, d_out, d_corner; - - - if ( ax < 0 ) - ax = -ax; - if ( ay < 0 ) - ay = -ay; - d_in = ax + ay; - - ax = out_x; - if ( ax < 0 ) - ax = -ax; - ay = out_y; - if ( ay < 0 ) - ay = -ay; - d_out = ax + ay; - - ax = out_x + in_x; - if ( ax < 0 ) - ax = -ax; - ay = out_y + in_y; - if ( ay < 0 ) - ay = -ay; - d_corner = ax + ay; - - return ( d_in + d_out - d_corner ) < ( d_corner >> 4 ); + FT_Pos ax = in_x + out_x; + FT_Pos ay = in_y + out_y; + + FT_Pos d_in, d_out, d_hypot; + + + /* The idea of this function is to compare the length of the */ + /* hypotenuse with the `in' and `out' length. The `corner' */ + /* represented by `in' and `out' is flat if the hypotenuse's */ + /* length isn't too large. */ + /* */ + /* This approach has the advantage that the angle between */ + /* `in' and `out' is not checked. In case one of the two */ + /* vectors is `dominant', this is, much larger than the */ + /* other vector, we thus always have a flat corner. */ + /* */ + /* hypotenuse */ + /* x---------------------------x */ + /* \ / */ + /* \ / */ + /* in \ / out */ + /* \ / */ + /* o */ + /* Point */ + + d_in = FT_HYPOT( in_x, in_y ); + d_out = FT_HYPOT( out_x, out_y ); + d_hypot = FT_HYPOT( ax, ay ); + + /* now do a simple length comparison: */ + /* */ + /* d_in + d_out < 17/16 d_hypot */ + + return ( d_in + d_out - d_hypot ) < ( d_hypot >> 4 ); } diff --git a/src/base/ftcid.c b/src/base/ftcid.c index 733aae1..741879d 100644 --- a/src/base/ftcid.c +++ b/src/base/ftcid.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing CID font information. */ /* */ -/* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ +/* Copyright 2007, 2009, 2013 by Derek Clegg, Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -35,7 +35,7 @@ FT_Int s = 0; - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( face ) { @@ -65,7 +65,7 @@ FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, FT_Bool *is_cid ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error = FT_ERR( Invalid_Argument ); FT_Bool ic = 0; @@ -92,7 +92,7 @@ FT_UInt glyph_index, FT_UInt *cid ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error = FT_ERR( Invalid_Argument ); FT_UInt c = 0; diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c index 12fed04..6fb86fe 100644 --- a/src/base/ftdbgmem.c +++ b/src/base/ftdbgmem.c @@ -4,7 +4,7 @@ /* */ /* Memory debugger (body). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2009 by */ +/* Copyright 2001-2006, 2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -344,85 +344,80 @@ ft_mem_table_destroy( FT_MemTable table ) { FT_ULong i; + FT_Long leak_count = 0; + FT_ULong leaks = 0; FT_DumpMemory( table->memory ); - if ( table ) + /* remove all blocks from the table, revealing leaked ones */ + for ( i = 0; i < table->size; i++ ) { - FT_Long leak_count = 0; - FT_ULong leaks = 0; + FT_MemNode *pnode = table->buckets + i, next, node = *pnode; - /* remove all blocks from the table, revealing leaked ones */ - for ( i = 0; i < table->size; i++ ) + while ( node ) { - FT_MemNode *pnode = table->buckets + i, next, node = *pnode; + next = node->link; + node->link = 0; - - while ( node ) + if ( node->size > 0 ) { - next = node->link; - node->link = 0; - - if ( node->size > 0 ) - { - printf( - "leaked memory block at address %p, size %8ld in (%s:%ld)\n", - node->address, node->size, - FT_FILENAME( node->source->file_name ), - node->source->line_no ); + printf( + "leaked memory block at address %p, size %8ld in (%s:%ld)\n", + node->address, node->size, + FT_FILENAME( node->source->file_name ), + node->source->line_no ); - leak_count++; - leaks += node->size; + leak_count++; + leaks += node->size; - ft_mem_table_free( table, node->address ); - } + ft_mem_table_free( table, node->address ); + } - node->address = NULL; - node->size = 0; + node->address = NULL; + node->size = 0; - ft_mem_table_free( table, node ); - node = next; - } - table->buckets[i] = 0; + ft_mem_table_free( table, node ); + node = next; } + table->buckets[i] = 0; + } - ft_mem_table_free( table, table->buckets ); - table->buckets = NULL; - - table->size = 0; - table->nodes = 0; + ft_mem_table_free( table, table->buckets ); + table->buckets = NULL; - /* remove all sources */ - for ( i = 0; i < FT_MEM_SOURCE_BUCKETS; i++ ) - { - FT_MemSource source, next; + table->size = 0; + table->nodes = 0; + /* remove all sources */ + for ( i = 0; i < FT_MEM_SOURCE_BUCKETS; i++ ) + { + FT_MemSource source, next; - for ( source = table->sources[i]; source != NULL; source = next ) - { - next = source->link; - ft_mem_table_free( table, source ); - } - table->sources[i] = NULL; + for ( source = table->sources[i]; source != NULL; source = next ) + { + next = source->link; + ft_mem_table_free( table, source ); } - printf( - "FreeType: total memory allocations = %ld\n", table->alloc_total ); - printf( - "FreeType: maximum memory footprint = %ld\n", table->alloc_max ); + table->sources[i] = NULL; + } - ft_mem_table_free( table, table ); + printf( "FreeType: total memory allocations = %ld\n", + table->alloc_total ); + printf( "FreeType: maximum memory footprint = %ld\n", + table->alloc_max ); - if ( leak_count > 0 ) - ft_mem_debug_panic( - "FreeType: %ld bytes of memory leaked in %ld blocks\n", - leaks, leak_count ); + ft_mem_table_free( table, table ); - printf( "FreeType: no memory leaks detected\n" ); - } + if ( leak_count > 0 ) + ft_mem_debug_panic( + "FreeType: %ld bytes of memory leaked in %ld blocks\n", + leaks, leak_count ); + + printf( "FreeType: no memory leaks detected\n" ); } diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c index 2adbeab..39ac6ad 100644 --- a/src/base/ftdebug.c +++ b/src/base/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2008 by */ +/* Copyright 1996-2001, 2002, 2004, 2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -51,7 +51,8 @@ /* documentation is in ftdebug.h */ FT_BASE_DEF( void ) - FT_Message( const char* fmt, ... ) + FT_Message( const char* fmt, + ... ) { va_list ap; @@ -65,7 +66,8 @@ /* documentation is in ftdebug.h */ FT_BASE_DEF( void ) - FT_Panic( const char* fmt, ... ) + FT_Panic( const char* fmt, + ... ) { va_list ap; @@ -77,6 +79,21 @@ exit( EXIT_FAILURE ); } + + /* documentation is in ftdebug.h */ + + FT_BASE_DEF( int ) + FT_Throw( FT_Error error, + int line, + const char* file ) + { + FT_UNUSED( error ); + FT_UNUSED( line ); + FT_UNUSED( file ); + + return 0; + } + #endif /* FT_DEBUG_LEVEL_ERROR */ @@ -135,7 +152,7 @@ /* the memory and stream components which are set to 7 and 5, */ /* respectively. */ /* */ - /* See the file <include/freetype/internal/fttrace.h> for details of the */ + /* See the file <include/internal/fttrace.h> for details of the */ /* available toggle names. */ /* */ /* The level must be between 0 and 7; 0 means quiet (except for serious */ @@ -164,6 +181,9 @@ while ( *p && *p != ':' ) p++; + if ( !*p ) + break; + if ( *p == ':' && p > q ) { FT_Int n, i, len = (FT_Int)( p - q ); @@ -192,7 +212,7 @@ p++; if ( *p ) { - level = *p++ - '0'; + level = *p - '0'; if ( level < 0 || level > 7 ) level = -1; } diff --git a/src/base/ftfstype.c b/src/base/ftfstype.c index d0ef7b7..6b49ef8 100644 --- a/src/base/ftfstype.c +++ b/src/base/ftfstype.c @@ -4,7 +4,7 @@ /* */ /* FreeType utility file to access FSType data (body). */ /* */ -/* Copyright 2008, 2009 by */ +/* Copyright 2008, 2009, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -51,7 +51,7 @@ /* look at FSType before fsType for Type42 */ - if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, ft_sfnt_os2 ) ) != NULL && + if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, FT_SFNT_OS2 ) ) != NULL && os2->version != 0xFFFFU ) return os2->fsType; diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c index 8483450..3cc5c7a 100644 --- a/src/base/ftgloadr.c +++ b/src/base/ftgloadr.c @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph loader (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2010 by */ +/* Copyright 2002-2006, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_GLYPH_LOADER_H #include FT_INTERNAL_MEMORY_H #include FT_INTERNAL_OBJECTS_H @@ -219,7 +220,7 @@ new_max = FT_PAD_CEIL( new_max, 8 ); if ( new_max > FT_OUTLINE_POINTS_MAX ) - return FT_Err_Array_Too_Large; + return FT_THROW( Array_Too_Large ); if ( FT_RENEW_ARRAY( base->points, old_max, new_max ) || FT_RENEW_ARRAY( base->tags, old_max, new_max ) ) @@ -251,7 +252,7 @@ new_max = FT_PAD_CEIL( new_max, 4 ); if ( new_max > FT_OUTLINE_CONTOURS_MAX ) - return FT_Err_Array_Too_Large; + return FT_THROW( Array_Too_Large ); if ( FT_RENEW_ARRAY( base->contours, old_max, new_max ) ) goto Exit; @@ -264,6 +265,9 @@ FT_GlyphLoader_Adjust_Points( loader ); Exit: + if ( error ) + FT_GlyphLoader_Reset( loader ); + return error; } @@ -318,7 +322,7 @@ } - /* add current glyph to the base image - and prepare for another */ + /* add current glyph to the base image -- and prepare for another */ FT_BASE_DEF( void ) FT_GlyphLoader_Add( FT_GlyphLoader loader ) { diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c index 591b57a..ac178c4 100644 --- a/src/base/ftglyph.c +++ b/src/base/ftglyph.c @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 by */ +/* Copyright 1996-2005, 2007, 2008, 2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,6 +29,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_GLYPH_H #include FT_OUTLINE_H #include FT_BITMAP_H @@ -65,7 +67,7 @@ if ( slot->format != FT_GLYPH_FORMAT_BITMAP ) { - error = FT_Err_Invalid_Glyph_Format; + error = FT_THROW( Invalid_Glyph_Format ); goto Exit; } @@ -166,7 +168,7 @@ /* check format in glyph slot */ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) { - error = FT_Err_Invalid_Glyph_Format; + error = FT_THROW( Invalid_Glyph_Format ); goto Exit; } @@ -312,17 +314,17 @@ /* check arguments */ - if ( !target ) + if ( !target || !source || !source->clazz ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } - *target = 0; + *target = NULL; if ( !source || !source->clazz ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -357,16 +359,16 @@ FT_Error error; FT_Glyph glyph; - const FT_Glyph_Class* clazz = 0; + const FT_Glyph_Class* clazz = NULL; if ( !slot ) - return FT_Err_Invalid_Slot_Handle; + return FT_THROW( Invalid_Slot_Handle ); library = slot->library; if ( !aglyph ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* if it is a bitmap, that's easy :-) */ if ( slot->format == FT_GLYPH_FORMAT_BITMAP ) @@ -388,7 +390,7 @@ if ( !clazz ) { - error = FT_Err_Invalid_Glyph_Format; + error = FT_THROW( Invalid_Glyph_Format ); goto Exit; } @@ -422,15 +424,16 @@ FT_Matrix* matrix, FT_Vector* delta ) { - const FT_Glyph_Class* clazz; - FT_Error error = FT_Err_Ok; + FT_Error error = FT_Err_Ok; if ( !glyph || !glyph->clazz ) - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); else { - clazz = glyph->clazz; + const FT_Glyph_Class* clazz = glyph->clazz; + + if ( clazz->glyph_transform ) { /* transform glyph image */ @@ -441,7 +444,7 @@ FT_Vector_Transform( &glyph->advance, matrix ); } else - error = FT_Err_Invalid_Glyph_Format; + error = FT_THROW( Invalid_Glyph_Format ); } return error; } @@ -464,38 +467,33 @@ if ( !glyph || !glyph->clazz ) return; - else + + clazz = glyph->clazz; + if ( !clazz->glyph_bbox ) + return; + + /* retrieve bbox in 26.6 coordinates */ + clazz->glyph_bbox( glyph, acbox ); + + /* perform grid fitting if needed */ + if ( bbox_mode == FT_GLYPH_BBOX_GRIDFIT || + bbox_mode == FT_GLYPH_BBOX_PIXELS ) { - clazz = glyph->clazz; - if ( !clazz->glyph_bbox ) - return; - else - { - /* retrieve bbox in 26.6 coordinates */ - clazz->glyph_bbox( glyph, acbox ); - - /* perform grid fitting if needed */ - if ( bbox_mode == FT_GLYPH_BBOX_GRIDFIT || - bbox_mode == FT_GLYPH_BBOX_PIXELS ) - { - acbox->xMin = FT_PIX_FLOOR( acbox->xMin ); - acbox->yMin = FT_PIX_FLOOR( acbox->yMin ); - acbox->xMax = FT_PIX_CEIL( acbox->xMax ); - acbox->yMax = FT_PIX_CEIL( acbox->yMax ); - } - - /* convert to integer pixels if needed */ - if ( bbox_mode == FT_GLYPH_BBOX_TRUNCATE || - bbox_mode == FT_GLYPH_BBOX_PIXELS ) - { - acbox->xMin >>= 6; - acbox->yMin >>= 6; - acbox->xMax >>= 6; - acbox->yMax >>= 6; - } - } + acbox->xMin = FT_PIX_FLOOR( acbox->xMin ); + acbox->yMin = FT_PIX_FLOOR( acbox->yMin ); + acbox->xMax = FT_PIX_CEIL( acbox->xMax ); + acbox->yMax = FT_PIX_CEIL( acbox->yMax ); + } + + /* convert to integer pixels if needed */ + if ( bbox_mode == FT_GLYPH_BBOX_TRUNCATE || + bbox_mode == FT_GLYPH_BBOX_PIXELS ) + { + acbox->xMin >>= 6; + acbox->yMin >>= 6; + acbox->xMax >>= 6; + acbox->yMax >>= 6; } - return; } @@ -510,11 +508,11 @@ FT_GlyphSlotRec dummy; FT_GlyphSlot_InternalRec dummy_internal; FT_Error error = FT_Err_Ok; - FT_Glyph glyph; + FT_Glyph b, glyph; FT_BitmapGlyph bitmap = NULL; const FT_Glyph_Class* clazz; - /* FT_BITMAP_GLYPH_CLASS_GET derefers `library' in PIC mode */ + /* FT_BITMAP_GLYPH_CLASS_GET dereferences `library' in PIC mode */ FT_Library library; @@ -547,10 +545,10 @@ dummy.format = clazz->glyph_format; /* create result bitmap glyph */ - error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET, - (FT_Glyph*)(void*)&bitmap ); + error = ft_new_glyph( library, FT_BITMAP_GLYPH_CLASS_GET, &b ); if ( error ) goto Exit; + bitmap = (FT_BitmapGlyph)b; #if 1 /* if `origin' is set, translate the glyph image */ @@ -600,7 +598,7 @@ return error; Bad: - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } diff --git a/src/base/ftgxval.c b/src/base/ftgxval.c index aeeb8ce..a65f4c8 100644 --- a/src/base/ftgxval.c +++ b/src/base/ftgxval.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTyepGX/AAT tables (body). */ /* */ -/* Copyright 2004, 2005, 2006, 2010 by */ +/* Copyright 2004-2006, 2010, 2013, 2014 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -26,6 +26,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_GX_VALIDATE_H @@ -44,13 +46,13 @@ if ( !face ) { - error = FT_Err_Invalid_Face_Handle; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } - if ( tables == NULL ) + if ( !tables ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -62,7 +64,7 @@ tables, table_length ); else - error = FT_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); Exit: return error; @@ -96,13 +98,13 @@ if ( !face ) { - error = FT_Err_Invalid_Face_Handle; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } - if ( ckern_table == NULL ) + if ( !ckern_table ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -113,7 +115,7 @@ validation_flags, ckern_table ); else - error = FT_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); Exit: return error; diff --git a/src/base/ftinit.c b/src/base/ftinit.c index 91f8e2a..c4c8820 100644 --- a/src/base/ftinit.c +++ b/src/base/ftinit.c @@ -4,7 +4,7 @@ /* */ /* FreeType initialization layer (body). */ /* */ -/* Copyright 1996-2001, 2002, 2005, 2007, 2009, 2012 by */ +/* Copyright 1996-2002, 2005, 2007, 2009, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,8 +23,8 @@ /* FT_Add_Default_Modules(): */ /* This function is used to add the set of default modules to a */ /* fresh new library object. The set is taken from the header file */ - /* `freetype/config/ftmodule.h'. See the document `FreeType 2.0 */ - /* Build System' for more information. */ + /* `config/ftmodule.h'. See the document `FreeType 2.0 Build */ + /* System' for more information. */ /* */ /* FT_Init_FreeType(): */ /* This function creates a system object for the current platform, */ @@ -156,7 +156,7 @@ { FT_Error error; FT_Memory memory; - FT_Module_Class* *classes; + FT_Module_Class* *classes = NULL; FT_Module_Class* clazz; FT_UInt i; BasePIC* pic_container = (BasePIC*)library->pic_container.base; @@ -166,7 +166,7 @@ pic_container->default_module_classes = 0; - if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) * + if ( FT_ALLOC( classes, sizeof ( FT_Module_Class* ) * ( FT_NUM_MODULE_CLASSES + 1 ) ) ) return error; @@ -235,6 +235,8 @@ FT_Memory memory; + /* check of `alibrary' delayed to `FT_New_Library' */ + /* First of all, allocate a new system object -- this function is part */ /* of the system-specific component, i.e. `ftsystem.c'. */ @@ -242,7 +244,7 @@ if ( !memory ) { FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" )); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } /* build a library out of it, then fill it with the set of */ @@ -263,17 +265,19 @@ FT_EXPORT_DEF( FT_Error ) FT_Done_FreeType( FT_Library library ) { - if ( library ) - { - FT_Memory memory = library->memory; + FT_Memory memory; + + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); - /* Discard the library object */ - FT_Done_Library( library ); + memory = library->memory; - /* discard memory manager */ - FT_Done_Memory( memory ); - } + /* Discard the library object */ + FT_Done_Library( library ); + + /* discard memory manager */ + FT_Done_Memory( memory ); return FT_Err_Ok; } diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c index 0da4ba1..d8bcbbf 100644 --- a/src/base/ftlcdfil.c +++ b/src/base/ftlcdfil.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for color filtering of subpixel bitmap glyphs (body). */ /* */ -/* Copyright 2006, 2008, 2009, 2010 by */ +/* Copyright 2006, 2008-2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_LCD_FILTER_H #include FT_IMAGE_H #include FT_INTERNAL_OBJECTS_H @@ -44,9 +46,16 @@ FT_Byte* line = bitmap->buffer; + /* take care of bitmap flow */ + if ( bitmap->pitch < 0 ) + line -= bitmap->pitch * ( bitmap->rows - 1 ); + + /* `fir' and `pix' must be at least 32 bit wide, since the sum of */ + /* the values in `weights' can exceed 0xFF */ + for ( ; height > 0; height--, line += bitmap->pitch ) { - FT_UInt fir[5]; + FT_UInt fir[4]; /* below, `pix' is used as the 5th element */ FT_UInt val1, xx; @@ -55,7 +64,6 @@ fir[1] = weights[3] * val1; fir[2] = weights[4] * val1; fir[3] = 0; - fir[4] = 0; val1 = line[1]; fir[0] += weights[1] * val1; @@ -76,7 +84,7 @@ fir[3] = weights[4] * val; pix >>= 8; - pix |= -( pix >> 8 ); + pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); line[xx - 2] = (FT_Byte)pix; } @@ -85,11 +93,11 @@ pix = fir[0] >> 8; - pix |= -( pix >> 8 ); + pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); line[xx - 2] = (FT_Byte)pix; pix = fir[1] >> 8; - pix |= -( pix >> 8 ); + pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); line[xx - 1] = (FT_Byte)pix; } } @@ -102,10 +110,14 @@ FT_Int pitch = bitmap->pitch; + /* take care of bitmap flow */ + if ( bitmap->pitch < 0 ) + column -= bitmap->pitch * ( bitmap->rows - 1 ); + for ( ; width > 0; width--, column++ ) { FT_Byte* col = column; - FT_UInt fir[5]; + FT_UInt fir[4]; /* below, `pix' is used as the 5th element */ FT_UInt val1, yy; @@ -114,7 +126,6 @@ fir[1] = weights[3] * val1; fir[2] = weights[4] * val1; fir[3] = 0; - fir[4] = 0; col += pitch; val1 = col[0]; @@ -137,7 +148,7 @@ fir[3] = weights[4] * val; pix >>= 8; - pix |= -( pix >> 8 ); + pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); col[-2 * pitch] = (FT_Byte)pix; col += pitch; } @@ -147,11 +158,11 @@ pix = fir[0] >> 8; - pix |= -( pix >> 8 ); + pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); col[-2 * pitch] = (FT_Byte)pix; pix = fir[1] >> 8; - pix |= -( pix >> 8 ); + pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); col[-pitch] = (FT_Byte)pix; } } @@ -187,6 +198,10 @@ FT_Byte* line = bitmap->buffer; + /* take care of bitmap flow */ + if ( bitmap->pitch < 0 ) + line -= bitmap->pitch * ( bitmap->rows - 1 ); + for ( ; height > 0; height--, line += pitch ) { FT_UInt xx; @@ -226,6 +241,10 @@ FT_Byte* column = bitmap->buffer; + /* take care of bitmap flow */ + if ( bitmap->pitch < 0 ) + column -= bitmap->pitch * ( bitmap->rows - 1 ); + for ( ; width > 0; width--, column++ ) { FT_Byte* col = column; @@ -270,8 +289,11 @@ FT_Library_SetLcdFilterWeights( FT_Library library, unsigned char *weights ) { - if ( !library || !weights ) - return FT_Err_Invalid_Argument; + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + + if ( !weights ) + return FT_THROW( Invalid_Argument ); ft_memcpy( library->lcd_weights, weights, 5 ); @@ -292,7 +314,7 @@ if ( !library ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Library_Handle ); switch ( filter ) { @@ -339,7 +361,7 @@ #endif default: - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } library->lcd_filter = filter; @@ -356,7 +378,7 @@ FT_UNUSED( library ); FT_UNUSED( weights ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } @@ -367,7 +389,7 @@ FT_UNUSED( library ); FT_UNUSED( filter ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } #endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ diff --git a/src/base/ftmac.c b/src/base/ftmac.c index f200748..5301ab4 100644 --- a/src/base/ftmac.c +++ b/src/base/ftmac.c @@ -8,8 +8,7 @@ /* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */ /* classic platforms built by MPW. */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, */ -/* 2009 by */ +/* Copyright 1996-2009, 2013, 2014 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -131,7 +130,7 @@ FT_UNUSED( pathSpec ); FT_UNUSED( face_index ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } @@ -190,10 +189,10 @@ CFRelease( cf_fontName ); if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); /* face_index calculation by searching preceding fontIDs */ /* with same FSRef */ @@ -228,12 +227,15 @@ FT_Error err; + if ( !fontName || !face_index ) + return FT_THROW( Invalid_Argument) ; + err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); - if ( FT_Err_Ok != err ) + if ( err ) return err; if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); return FT_Err_Ok; } @@ -251,19 +253,22 @@ FT_UNUSED( pathSpec ); FT_UNUSED( face_index ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); #else FSRef ref; FT_Error err; + if ( !fontName || !face_index ) + return FT_THROW( Invalid_Argument ); + err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index ); - if ( FT_Err_Ok != err ) + if ( err ) return err; if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL, pathSpec, NULL ) ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); return FT_Err_Ok; #endif @@ -279,7 +284,7 @@ if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); /* at present, no support for dfont format */ err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res ); @@ -359,11 +364,9 @@ count_faces_scalable( char* fond_data ) { AsscEntry* assoc; - FamRec* fond; short i, face, face_all; - fond = (FamRec*)fond_data; face_all = EndianS16_BtoN( *( (short *)( fond_data + sizeof ( FamRec ) ) ) ) + 1; assoc = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 ); @@ -443,9 +446,10 @@ style = (StyleTable*)p; p += sizeof ( StyleTable ); string_count = EndianS16_BtoN( *(short*)(p) ); + string_count = FT_MIN( 64, string_count ); p += sizeof ( short ); - for ( i = 0; i < string_count && i < 64; i++ ) + for ( i = 0; i < string_count; i++ ) { names[i] = p; p += names[i][0]; @@ -462,7 +466,7 @@ ps_name[ps_name_len] = 0; } if ( style->indexes[face_index] > 1 && - style->indexes[face_index] <= FT_MIN( string_count, 64 ) ) + style->indexes[face_index] <= string_count ) { unsigned char* suffixes = names[style->indexes[face_index] - 1]; @@ -508,17 +512,17 @@ /* We should not extract parent directory by string manipulation. */ if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL, NULL, &par_ref ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* now we have absolute dirname in path_lwfn */ ft_strcat( (char *)path_lwfn, "/" ); @@ -527,11 +531,11 @@ path_lwfn[dirname_len + base_lwfn[0]] = '\0'; if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL, NULL, NULL ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); return FT_Err_Ok; } @@ -557,7 +561,7 @@ { err = lookup_lwfn_by_fond( pathname, lwfn_file_name, buff, sizeof ( buff ) ); - if ( FT_Err_Ok == err ) + if ( !err ) have_lwfn = 1; } @@ -620,7 +624,7 @@ /* detect integer overflows */ if ( total_size < old_total_size ) { - error = FT_Err_Array_Too_Large; + error = FT_THROW( Array_Too_Large ); goto Error; } @@ -705,7 +709,7 @@ if ( noErr != FT_FSPathMakeRes( pathname, &res ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); pfb_data = NULL; pfb_size = 0; @@ -740,7 +744,7 @@ sfnt = GetResource( TTAG_sfnt, sfnt_id ); if ( sfnt == NULL ) - return FT_Err_Invalid_Handle; + return FT_THROW( Invalid_Handle ); sfnt_size = (FT_ULong)GetHandleSize( sfnt ); if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) ) @@ -797,23 +801,26 @@ FT_Long face_index, FT_Face* aface ) { - FT_Error error = FT_Err_Cannot_Open_Resource; + FT_Error error = FT_ERR( Cannot_Open_Resource ); ResFileRefNum res_ref; ResourceIndex res_index; Handle fond; - short num_faces_in_res, num_faces_in_fond; + short num_faces_in_res; if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); UseResFile( res_ref ); if ( ResError() ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); num_faces_in_res = 0; for ( res_index = 1; ; ++res_index ) { + short num_faces_in_fond; + + fond = Get1IndResource( TTAG_FOND, res_index ); if ( ResError() ) break; @@ -828,7 +835,7 @@ } CloseResFile( res_ref ); - if ( FT_Err_Ok == error && NULL != aface && NULL != *aface ) + if ( !error && aface && *aface ) (*aface)->num_faces = num_faces_in_res; return error; } @@ -852,9 +859,11 @@ FT_Error error = FT_Err_Ok; + /* check of `library' and `aface' delayed to `FT_New_Face_From_XXX' */ + GetResInfo( fond, &fond_id, &fond_type, fond_name ); if ( ResError() != noErr || fond_type != TTAG_FOND ) - return FT_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index ); @@ -883,7 +892,7 @@ error = lookup_lwfn_by_fond( path_fond, lwfn_file_name, path_lwfn, sizeof ( path_lwfn ) ); - if ( FT_Err_Ok == error ) + if ( !error ) have_lwfn = 1; } } @@ -894,10 +903,10 @@ face_index, aface ); else - error = FT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); found_no_lwfn_file: - if ( have_sfnt && FT_Err_Ok != error ) + if ( have_sfnt && error ) error = FT_New_Face_From_SFNT( library, sfnt_id, face_index, @@ -961,9 +970,8 @@ /* test for valid `library' and `aface' delayed to FT_Open_Face() */ if ( !pathname ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); - error = FT_Err_Ok; *aface = NULL; /* try resourcefork based font: LWFN, FFIL */ @@ -998,16 +1006,20 @@ { FT_Error error; FT_Open_Args args; - OSErr err; - UInt8 pathname[PATH_MAX]; + OSErr err; + UInt8 pathname[PATH_MAX]; + + + /* check of `library' and `aface' delayed to */ + /* `FT_New_Face_From_Resource' */ if ( !ref ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); err = FSRefMakePath( ref, pathname, sizeof ( pathname ) ); if ( err ) - error = FT_Err_Cannot_Open_Resource; + error = FT_THROW( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); if ( error != 0 || *aface != NULL ) @@ -1043,13 +1055,15 @@ FT_UNUSED( face_index ); FT_UNUSED( aface ); - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); #else FSRef ref; + /* check of `library' and `aface' delayed to `FT_New_Face_From_FSRef' */ + if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); else return FT_New_Face_From_FSRef( library, &ref, face_index, aface ); #endif diff --git a/src/base/ftmm.c b/src/base/ftmm.c index 0307729..056680b 100644 --- a/src/base/ftmm.c +++ b/src/base/ftmm.c @@ -4,7 +4,7 @@ /* */ /* Multiple Master font support (body). */ /* */ -/* Copyright 1996-2001, 2003, 2004, 2009 by */ +/* Copyright 1996-2001, 2003, 2004, 2009, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,8 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_MULTIPLE_MASTERS_H #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_MULTIPLE_MASTERS_H @@ -42,9 +44,9 @@ *aservice = NULL; if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( FT_HAS_MULTIPLE_MASTERS( face ) ) { @@ -70,10 +72,15 @@ FT_Service_MultiMasters service; + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !amaster ) + return FT_THROW( Invalid_Argument ); + error = ft_face_get_mm_service( face, &service ); if ( !error ) { - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( service->get_mm ) error = service->get_mm( face, amaster ); } @@ -92,10 +99,15 @@ FT_Service_MultiMasters service; + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !amaster ) + return FT_THROW( Invalid_Argument ); + error = ft_face_get_mm_service( face, &service ); if ( !error ) { - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( service->get_mm_var ) error = service->get_mm_var( face, amaster ); } @@ -115,10 +127,15 @@ FT_Service_MultiMasters service; + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !coords ) + return FT_THROW( Invalid_Argument ); + error = ft_face_get_mm_service( face, &service ); if ( !error ) { - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( service->set_mm_design ) error = service->set_mm_design( face, num_coords, coords ); } @@ -138,10 +155,15 @@ FT_Service_MultiMasters service; + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !coords ) + return FT_THROW( Invalid_Argument ); + error = ft_face_get_mm_service( face, &service ); if ( !error ) { - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( service->set_var_design ) error = service->set_var_design( face, num_coords, coords ); } @@ -161,10 +183,15 @@ FT_Service_MultiMasters service; + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !coords ) + return FT_THROW( Invalid_Argument ); + error = ft_face_get_mm_service( face, &service ); if ( !error ) { - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( service->set_mm_blend ) error = service->set_mm_blend( face, num_coords, coords ); } @@ -187,10 +214,15 @@ FT_Service_MultiMasters service; + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !coords ) + return FT_THROW( Invalid_Argument ); + error = ft_face_get_mm_service( face, &service ); if ( !error ) { - error = FT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( service->set_mm_blend ) error = service->set_mm_blend( face, num_coords, coords ); } diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 36ee797..ee15a01 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,6 +29,7 @@ #include FT_TRUETYPE_TAGS_H #include FT_TRUETYPE_IDS_H +#include FT_SERVICE_PROPERTIES_H #include FT_SERVICE_SFNT_H #include FT_SERVICE_POSTSCRIPT_NAME_H #include FT_SERVICE_GLYPH_DICT_H @@ -40,6 +41,30 @@ #include "ftbase.h" #endif + +#ifdef FT_DEBUG_LEVEL_TRACE + +#include FT_BITMAP_H + +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + /* We disable the warning `conversion from XXX to YYY, */ + /* possible loss of data' in order to compile cleanly with */ + /* the maximum level of warnings: `md5.c' is non-FreeType */ + /* code, and it gets used during development builds only. */ +#pragma warning( push ) +#pragma warning( disable : 4244 ) +#endif /* _MSC_VER */ + + /* it's easiest to include `md5.c' directly */ +#include "md5.c" + +#if defined( _MSC_VER ) +#pragma warning( pop ) +#endif + +#endif /* FT_DEBUG_LEVEL_TRACE */ + + #define GRID_FIT_METRICS @@ -136,10 +161,10 @@ *astream = 0; if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); if ( !args ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); memory = library->memory; @@ -177,7 +202,7 @@ #endif else - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); if ( error ) FT_FREE( stream ); @@ -383,8 +408,11 @@ FT_GlyphSlot slot = NULL; - if ( !face || !face->driver ) - return FT_Err_Invalid_Argument; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + if ( !face->driver ) + return FT_THROW( Invalid_Argument ); driver = face->driver; clazz = driver->clazz; @@ -483,6 +511,7 @@ internal->transform_matrix.xy = 0; internal->transform_matrix.yx = 0; internal->transform_matrix.yy = 0x10000L; + matrix = &internal->transform_matrix; } else @@ -498,6 +527,7 @@ { internal->transform_delta.x = 0; internal->transform_delta.y = 0; + delta = &internal->transform_delta; } else @@ -574,7 +604,7 @@ if ( !face || !face->size || !face->glyph ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); /* The validity test for `glyph_index' is performed by the */ /* font drivers. */ @@ -640,18 +670,25 @@ /* the check for `num_locations' assures that we actually */ /* test for instructions in a TTF and not in a CFF-based OTF */ + /* */ + /* since `maxSizeOfInstructions' might be unreliable, we */ + /* check the size of the `fpgm' and `prep' tables, too -- */ + /* the assumption is that there don't exist real TTFs where */ + /* both `fpgm' and `prep' tables are missing */ if ( mode == FT_RENDER_MODE_LIGHT || face->internal->ignore_unpatented_hinter || ( FT_IS_SFNT( face ) && ttface->num_locations && - ttface->max_profile.maxSizeOfInstructions == 0 ) ) + ttface->max_profile.maxSizeOfInstructions == 0 && + ttface->font_program_size == 0 && + ttface->cvt_program_size == 0 ) ) autohint = TRUE; } } if ( autohint ) { - FT_AutoHinter_Service hinting; + FT_AutoHinter_Interface hinting; /* try to load embedded bitmaps first if available */ @@ -680,7 +717,7 @@ internal->transform_flags = 0; /* load auto-hinted outline */ - hinting = (FT_AutoHinter_Service)hinter->clazz->module_interface; + hinting = (FT_AutoHinter_Interface)hinter->clazz->module_interface; error = hinting->load_glyph( (FT_AutoHinter)hinter, slot, face->size, @@ -814,7 +851,7 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); glyph_index = (FT_UInt)char_code; if ( face->charmap ) @@ -965,7 +1002,7 @@ first = face->charmaps; if ( !first ) - return FT_Err_Invalid_CharMap_Handle; + return FT_THROW( Invalid_CharMap_Handle ); /* * The original TrueType specification(s) only specified charmap @@ -1008,14 +1045,6 @@ ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE && cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) ) { -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( cur - first > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "find_unicode_charmap: UCS-4 cmap is found " - "at too late position (%d)\n", cur - first )); - continue; - } -#endif face->charmap = cur[0]; return FT_Err_Ok; } @@ -1030,20 +1059,12 @@ { if ( cur[0]->encoding == FT_ENCODING_UNICODE ) { -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( cur - first > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "find_unicode_charmap: UCS-2 cmap is found " - "at too late position (%d)\n", cur - first )); - continue; - } -#endif face->charmap = cur[0]; return FT_Err_Ok; } } - return FT_Err_Invalid_CharMap_Handle; + return FT_THROW( Invalid_CharMap_Handle ); } @@ -1079,17 +1100,7 @@ if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE && cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR && FT_Get_CMap_Format( cur[0] ) == 14 ) - { -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( cur - first > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "find_unicode_charmap: UVS cmap is found " - "at too late position (%d)\n", cur - first )); - continue; - } -#endif return cur[0]; - } } return NULL; @@ -1106,7 +1117,8 @@ /* */ static FT_Error open_face( FT_Driver driver, - FT_Stream stream, + FT_Stream *astream, + FT_Bool external_stream, FT_Long face_index, FT_Int num_params, FT_Parameter* params, @@ -1114,10 +1126,11 @@ { FT_Memory memory; FT_Driver_Class clazz; - FT_Face face = 0; - FT_Error error, error2; + FT_Face face = NULL; FT_Face_Internal internal = NULL; + FT_Error error, error2; + clazz = driver->clazz; memory = driver->root.memory; @@ -1126,15 +1139,19 @@ if ( FT_ALLOC( face, clazz->face_object_size ) ) goto Fail; + face->driver = driver; + face->memory = memory; + face->stream = *astream; + + /* set the FT_FACE_FLAG_EXTERNAL_STREAM bit for FT_Done_Face */ + if ( external_stream ) + face->face_flags |= FT_FACE_FLAG_EXTERNAL_STREAM; + if ( FT_NEW( internal ) ) goto Fail; face->internal = internal; - face->driver = driver; - face->memory = memory; - face->stream = stream; - #ifdef FT_CONFIG_OPTION_INCREMENTAL { int i; @@ -1150,11 +1167,12 @@ #endif if ( clazz->init_face ) - error = clazz->init_face( stream, + error = clazz->init_face( *astream, face, (FT_Int)face_index, num_params, params ); + *astream = face->stream; /* Stream may have been changed. */ if ( error ) goto Fail; @@ -1165,7 +1183,7 @@ /* is returned. */ /* no error should happen, but we want to play safe */ - if ( error2 && error2 != FT_Err_Invalid_CharMap_Handle ) + if ( error2 && FT_ERR_NEQ( error2, Invalid_CharMap_Handle ) ) { error = error2; goto Fail; @@ -1204,9 +1222,9 @@ FT_Open_Args args; - /* test for valid `library' and `aface' delayed to FT_Open_Face() */ + /* test for valid `library' and `aface' delayed to `FT_Open_Face' */ if ( !pathname ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); args.flags = FT_OPEN_PATHNAME; args.pathname = (char*)pathname; @@ -1230,9 +1248,9 @@ FT_Open_Args args; - /* test for valid `library' and `face' delayed to FT_Open_Face() */ + /* test for valid `library' and `face' delayed to `FT_Open_Face' */ if ( !file_base ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); args.flags = FT_OPEN_MEMORY; args.memory_base = file_base; @@ -1304,10 +1322,10 @@ if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); if ( !base ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); *astream = 0; memory = library->memory; @@ -1421,7 +1439,7 @@ if ( FT_READ_ULONG( tag ) ) return error; if ( tag != TTAG_typ1 ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); if ( FT_READ_USHORT( numTables ) ) return error; @@ -1458,7 +1476,7 @@ if ( face_index >= 0 && pstable_index == face_index ) return FT_Err_Ok; } - return FT_Err_Table_Missing; + return FT_THROW( Table_Missing ); } @@ -1504,7 +1522,7 @@ error = open_face_from_buffer( library, sfnt_ps, length, - face_index < 0 ? face_index : 0, + FT_MIN( face_index, 0 ), is_sfnt_cid ? "cid" : "type1", aface ); Exit: @@ -1512,7 +1530,7 @@ FT_Error error1; - if ( error == FT_Err_Unknown_File_Format ) + if ( FT_ERR_EQ( error, Unknown_File_Format ) ) { error1 = FT_Stream_Seek( stream, pos ); if ( error1 ) @@ -1540,13 +1558,13 @@ FT_Long face_index, FT_Face *aface ) { - FT_Error error = FT_Err_Cannot_Open_Resource; + FT_Error error = FT_ERR( Cannot_Open_Resource ); FT_Memory memory = library->memory; FT_Byte* pfb_data = NULL; int i, type, flags; - FT_Long len; - FT_Long pfb_len, pfb_pos, pfb_lenpos; - FT_Long rlen, temp; + FT_ULong len; + FT_ULong pfb_len, pfb_pos, pfb_lenpos; + FT_ULong rlen, temp; if ( face_index == -1 ) @@ -1562,11 +1580,34 @@ error = FT_Stream_Seek( stream, offsets[i] ); if ( error ) goto Exit; - if ( FT_READ_LONG( temp ) ) + if ( FT_READ_ULONG( temp ) ) + goto Exit; + + /* FT2 allocator takes signed long buffer length, + * too large value causing overflow should be checked + */ + FT_TRACE4(( " POST fragment #%d: length=0x%08x\n", + i, temp)); + if ( 0x7FFFFFFFUL < temp || pfb_len + temp + 6 < pfb_len ) + { + FT_TRACE2(( " too long fragment length makes" + " pfb_len confused: temp=0x%08x\n", temp )); + error = FT_THROW( Invalid_Offset ); goto Exit; + } + pfb_len += temp + 6; } + FT_TRACE2(( " total buffer size to concatenate %d" + " POST fragments: 0x%08x\n", + resource_cnt, pfb_len + 2)); + if ( pfb_len + 2 < 6 ) { + FT_TRACE2(( " too long fragment length makes" + " pfb_len confused: pfb_len=0x%08x\n", pfb_len )); + error = FT_THROW( Array_Too_Large ); + goto Exit; + } if ( FT_ALLOC( pfb_data, (FT_Long)pfb_len + 2 ) ) goto Exit; @@ -1586,16 +1627,30 @@ error = FT_Stream_Seek( stream, offsets[i] ); if ( error ) goto Exit2; - if ( FT_READ_LONG( rlen ) ) - goto Exit; + if ( FT_READ_ULONG( rlen ) ) + goto Exit2; + + /* FT2 allocator takes signed long buffer length, + * too large fragment length causing overflow should be checked + */ + if ( 0x7FFFFFFFUL < rlen ) + { + error = FT_THROW( Invalid_Offset ); + goto Exit2; + } + if ( FT_READ_USHORT( flags ) ) - goto Exit; + goto Exit2; FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n", i, offsets[i], rlen, flags )); + error = FT_ERR( Array_Too_Large ); /* postpone the check of rlen longer than buffer until FT_Stream_Read() */ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */ + { + FT_TRACE3(( " Skip POST fragment #%d because it is a comment\n", i )); continue; + } /* the flags are part of the resource, so rlen >= 2. */ /* but some fonts declare rlen = 0 for empty fragment */ @@ -1608,6 +1663,8 @@ len += rlen; else { + FT_TRACE3(( " Write POST fragment #%d header (4-byte) to buffer" + " 0x%p + 0x%08x\n", i, pfb_data, pfb_lenpos )); if ( pfb_lenpos + 3 > pfb_len + 2 ) goto Exit2; pfb_data[pfb_lenpos ] = (FT_Byte)( len ); @@ -1618,6 +1675,8 @@ if ( ( flags >> 8 ) == 5 ) /* End of font mark */ break; + FT_TRACE3(( " Write POST fragment #%d header (6-byte) to buffer" + " 0x%p + 0x%08x\n", i, pfb_data, pfb_pos )); if ( pfb_pos + 6 > pfb_len + 2 ) goto Exit2; pfb_data[pfb_pos++] = 0x80; @@ -1633,16 +1692,18 @@ pfb_data[pfb_pos++] = 0; } - error = FT_Err_Cannot_Open_Resource; if ( pfb_pos > pfb_len || pfb_pos + rlen > pfb_len ) goto Exit2; + FT_TRACE3(( " Load POST fragment #%d (%d byte) to buffer" + " 0x%p + 0x%08x\n", i, rlen, pfb_data, pfb_pos )); error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen ); if ( error ) goto Exit2; pfb_pos += rlen; } + error = FT_ERR( Array_Too_Large ); if ( pfb_pos + 2 > pfb_len + 2 ) goto Exit2; pfb_data[pfb_pos++] = 0x80; @@ -1663,6 +1724,13 @@ aface ); Exit2: + if ( error == FT_ERR( Array_Too_Large ) ) + FT_TRACE2(( " Abort due to too-short buffer to store" + " all POST fragments\n" )); + else if ( error == FT_ERR( Invalid_Offset ) ) + FT_TRACE2(( " Abort due to invalid offset in a POST fragment\n" )); + if ( error ) + error = FT_ERR( Cannot_Open_Resource ); FT_FREE( pfb_data ); Exit: @@ -1695,7 +1763,7 @@ if ( face_index == -1 ) face_index = 0; if ( face_index >= resource_cnt ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); flag_offset = offsets[face_index]; error = FT_Stream_Seek( stream, flag_offset ); @@ -1705,7 +1773,7 @@ if ( FT_READ_LONG( rlen ) ) goto Exit; if ( rlen == -1 ) - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); error = open_face_PS_from_sfnt_stream( library, stream, @@ -1762,9 +1830,10 @@ if ( error ) return error; + /* POST resources must be sorted to concatenate properly */ error = FT_Raccess_Get_DataOffsets( library, stream, map_offset, rdara_pos, - TTAG_POST, + TTAG_POST, TRUE, &data_offsets, &count ); if ( !error ) { @@ -1777,9 +1846,11 @@ return error; } + /* sfnt resources should not be sorted to preserve the face order by + QuickDraw API */ error = FT_Raccess_Get_DataOffsets( library, stream, map_offset, rdara_pos, - TTAG_sfnt, + TTAG_sfnt, FALSE, &data_offsets, &count ); if ( !error ) { @@ -1812,7 +1883,7 @@ if ( NULL == stream ) - return FT_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); error = FT_Stream_Seek( stream, 0 ); if ( error ) @@ -1829,7 +1900,7 @@ header[ 1] > 33 || header[63] != 0 || header[2 + header[1]] != 0 ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); dlen = ( header[0x53] << 24 ) | ( header[0x54] << 16 ) | @@ -1839,7 +1910,7 @@ rlen = ( header[0x57] << 24 ) | ( header[0x58] << 16 ) | ( header[0x59] << 8 ) | - header[0x5a]; + header[0x5A]; #endif /* 0 */ offset = 128 + ( ( dlen + 127 ) & ~127 ); @@ -1862,7 +1933,7 @@ #define FT_COMPONENT trace_raccess FT_Memory memory = library->memory; - FT_Error error = FT_Err_Unknown_File_Format; + FT_Error error = FT_ERR( Unknown_File_Format ); int i; char * file_names[FT_RACCESS_N_RULES]; @@ -1901,7 +1972,7 @@ i, args2.pathname, offsets[i] )); error = FT_Stream_New( library, &args2, &stream2 ); - if ( is_darwin_vfs && error == FT_Err_Cannot_Open_Stream ) + if ( is_darwin_vfs && FT_ERR_EQ( error, Cannot_Open_Stream ) ) vfs_rfork_has_no_font = TRUE; if ( error ) @@ -1930,7 +2001,7 @@ /* Caller (load_mac_face) requires FT_Err_Unknown_File_Format. */ if ( error ) - error = FT_Err_Unknown_File_Format; + error = FT_ERR( Unknown_File_Format ); return error; @@ -1959,7 +2030,7 @@ error = IsMacBinary( library, stream, face_index, aface ); - if ( FT_ERROR_BASE( error ) == FT_Err_Unknown_File_Format ) + if ( FT_ERR_EQ( error, Unknown_File_Format ) ) { #undef FT_COMPONENT @@ -1976,9 +2047,9 @@ } - if ( ( FT_ERROR_BASE( error ) == FT_Err_Unknown_File_Format || - FT_ERROR_BASE( error ) == FT_Err_Invalid_Stream_Operation ) && - ( args->flags & FT_OPEN_PATHNAME ) ) + if ( ( FT_ERR_EQ( error, Unknown_File_Format ) || + FT_ERR_EQ( error, Invalid_Stream_Operation ) ) && + ( args->flags & FT_OPEN_PATHNAME ) ) error = load_face_in_embedded_rfork( library, stream, face_index, aface, args ); return error; @@ -1997,8 +2068,8 @@ FT_Face *aface ) { FT_Error error; - FT_Driver driver; - FT_Memory memory; + FT_Driver driver = NULL; + FT_Memory memory = NULL; FT_Stream stream = NULL; FT_Face face = NULL; FT_ListNode node = NULL; @@ -2007,11 +2078,10 @@ FT_Module* limit; - /* test for valid `library' delayed to */ - /* FT_Stream_New() */ + /* test for valid `library' delayed to `FT_Stream_New' */ if ( ( !aface && face_index >= 0 ) || !args ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) && args->stream ); @@ -2042,24 +2112,25 @@ params = args->params; } - error = open_face( driver, stream, face_index, + error = open_face( driver, &stream, external_stream, face_index, num_params, params, &face ); if ( !error ) goto Success; } else - error = FT_Err_Invalid_Handle; + error = FT_THROW( Invalid_Handle ); FT_Stream_Free( stream, external_stream ); goto Fail; } else { + error = FT_ERR( Missing_Module ); + /* check each font driver for an appropriate format */ cur = library->modules; limit = cur + library->num_modules; - for ( ; cur < limit; cur++ ) { /* not all modules are font drivers, so check... */ @@ -2077,14 +2148,14 @@ params = args->params; } - error = open_face( driver, stream, face_index, + error = open_face( driver, &stream, external_stream, face_index, num_params, params, &face ); if ( !error ) goto Success; #ifdef FT_CONFIG_OPTION_MAC_FONTS if ( ft_strcmp( cur[0]->clazz->module_name, "truetype" ) == 0 && - FT_ERROR_BASE( error ) == FT_Err_Table_Missing ) + FT_ERR_EQ( error, Table_Missing ) ) { /* TrueType but essential tables are missing */ if ( FT_Stream_Seek( stream, 0 ) ) @@ -2104,39 +2175,39 @@ } #endif - if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format ) + if ( FT_ERR_NEQ( error, Unknown_File_Format ) ) goto Fail3; } } - Fail3: - /* If we are on the mac, and we get an FT_Err_Invalid_Stream_Operation */ - /* it may be because we have an empty data fork, so we need to check */ - /* the resource fork. */ - if ( FT_ERROR_BASE( error ) != FT_Err_Cannot_Open_Stream && - FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format && - FT_ERROR_BASE( error ) != FT_Err_Invalid_Stream_Operation ) - goto Fail2; + Fail3: + /* If we are on the mac, and we get an */ + /* FT_Err_Invalid_Stream_Operation it may be because we have an */ + /* empty data fork, so we need to check the resource fork. */ + if ( FT_ERR_NEQ( error, Cannot_Open_Stream ) && + FT_ERR_NEQ( error, Unknown_File_Format ) && + FT_ERR_NEQ( error, Invalid_Stream_Operation ) ) + goto Fail2; #if !defined( FT_MACINTOSH ) && defined( FT_CONFIG_OPTION_MAC_FONTS ) - error = load_mac_face( library, stream, face_index, aface, args ); - if ( !error ) - { - /* We don't want to go to Success here. We've already done that. */ - /* On the other hand, if we succeeded we still need to close this */ - /* stream (we opened a different stream which extracted the */ - /* interesting information out of this stream here. That stream */ - /* will still be open and the face will point to it). */ - FT_Stream_Free( stream, external_stream ); - return error; - } + error = load_mac_face( library, stream, face_index, aface, args ); + if ( !error ) + { + /* We don't want to go to Success here. We've already done that. */ + /* On the other hand, if we succeeded we still need to close this */ + /* stream (we opened a different stream which extracted the */ + /* interesting information out of this stream here. That stream */ + /* will still be open and the face will point to it). */ + FT_Stream_Free( stream, external_stream ); + return error; + } - if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format ) - goto Fail2; + if ( FT_ERR_NEQ( error, Unknown_File_Format ) ) + goto Fail2; #endif /* !FT_MACINTOSH && FT_CONFIG_OPTION_MAC_FONTS */ /* no driver is able to handle this format */ - error = FT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); Fail2: FT_Stream_Free( stream, external_stream ); @@ -2146,10 +2217,6 @@ Success: FT_TRACE4(( "FT_Open_Face: New face object, adding to list\n" )); - /* set the FT_FACE_FLAG_EXTERNAL_STREAM bit for FT_Done_Face */ - if ( external_stream ) - face->face_flags |= FT_FACE_FLAG_EXTERNAL_STREAM; - /* add the face object to its driver's list */ if ( FT_NEW( node ) ) goto Fail; @@ -2237,7 +2304,10 @@ goto Exit; Fail: - FT_Done_Face( face ); + if ( node ) + FT_Done_Face( face ); /* face must be in the driver's list */ + else if ( face ) + destroy_face( memory, face, driver ); Exit: FT_TRACE4(( "FT_Open_Face: Return %d\n", error )); @@ -2255,10 +2325,10 @@ FT_Open_Args open; - /* test for valid `face' delayed to FT_Attach_Stream() */ + /* test for valid `face' delayed to `FT_Attach_Stream' */ if ( !filepathname ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); open.stream = NULL; open.flags = FT_OPEN_PATHNAME; @@ -2281,14 +2351,14 @@ FT_Driver_Class clazz; - /* test for valid `parameters' delayed to FT_Stream_New() */ + /* test for valid `parameters' delayed to `FT_Stream_New' */ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); driver = face->driver; if ( !driver ) - return FT_Err_Invalid_Driver_Handle; + return FT_THROW( Invalid_Driver_Handle ); error = FT_Stream_New( driver->root.library, parameters, &stream ); if ( error ) @@ -2297,7 +2367,7 @@ /* we implement FT_Attach_Stream in each driver through the */ /* `attach_file' interface */ - error = FT_Err_Unimplemented_Feature; + error = FT_ERR( Unimplemented_Feature ); clazz = driver->clazz; if ( clazz->attach_file ) error = clazz->attach_file( face, stream ); @@ -2317,6 +2387,9 @@ FT_EXPORT_DEF( FT_Error ) FT_Reference_Face( FT_Face face ) { + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + face->internal->refcount++; return FT_Err_Ok; @@ -2334,7 +2407,7 @@ FT_ListNode node; - error = FT_Err_Invalid_Face_Handle; + error = FT_ERR( Invalid_Face_Handle ); if ( face && face->driver ) { face->internal->refcount--; @@ -2380,13 +2453,13 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( !asize ) - return FT_Err_Invalid_Size_Handle; + return FT_THROW( Invalid_Argument ); if ( !face->driver ) - return FT_Err_Invalid_Driver_Handle; + return FT_THROW( Invalid_Driver_Handle ); *asize = 0; @@ -2438,15 +2511,15 @@ if ( !size ) - return FT_Err_Invalid_Size_Handle; + return FT_THROW( Invalid_Size_Handle ); face = size->face; if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); driver = face->driver; if ( !driver ) - return FT_Err_Invalid_Driver_Handle; + return FT_THROW( Invalid_Driver_Handle ); memory = driver->root.memory; @@ -2467,7 +2540,7 @@ destroy_size( memory, size, driver ); } else - error = FT_Err_Invalid_Size_Handle; + error = FT_THROW( Invalid_Size_Handle ); return error; } @@ -2486,11 +2559,11 @@ if ( !FT_HAS_FIXED_SIZES( face ) ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); /* FT_Bitmap_Size doesn't provide enough info... */ if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL ) - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); w = FT_REQUEST_WIDTH ( req ); h = FT_REQUEST_HEIGHT( req ); @@ -2513,6 +2586,8 @@ if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width ) { + FT_TRACE3(( "FT_Match_Size: bitmap strike %d matches\n", i )); + if ( size_index ) *size_index = (FT_ULong)i; @@ -2520,7 +2595,7 @@ } } - return FT_Err_Invalid_Pixel_Size; + return FT_THROW( Invalid_Pixel_Size ); } @@ -2763,10 +2838,10 @@ if ( !face || !FT_HAS_FIXED_SIZES( face ) ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( strike_index < 0 || strike_index >= face->num_fixed_sizes ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); clazz = face->driver->clazz; @@ -2816,11 +2891,11 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( !req || req->width < 0 || req->height < 0 || req->type >= FT_SIZE_REQUEST_TYPE_MAX ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); clazz = face->driver->clazz; @@ -2869,9 +2944,6 @@ if ( error ) return error; - FT_TRACE3(( "FT_Request_Size: bitmap strike %lu matched\n", - strike_index )); - return FT_Select_Size( face, (FT_Int)strike_index ); } @@ -2893,6 +2965,8 @@ FT_Size_RequestRec req; + /* check of `face' delayed to `FT_Request_Size' */ + if ( !char_width ) char_width = char_height; else if ( !char_height ) @@ -2931,6 +3005,8 @@ FT_Size_RequestRec req; + /* check of `face' delayed to `FT_Request_Size' */ + if ( pixel_width == 0 ) pixel_width = pixel_height; else if ( pixel_height == 0 ) @@ -2971,10 +3047,10 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( !akerning ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); driver = face->driver; @@ -3030,14 +3106,14 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( !akerning ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); FT_FACE_FIND_SERVICE( face, service, KERNING ); if ( !service ) - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); error = service->get_track( face, point_size, @@ -3059,10 +3135,10 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( encoding == FT_ENCODING_NONE ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */ /* charmap available, i.e., one with UCS-4 characters, if possible. */ @@ -3073,7 +3149,7 @@ cur = face->charmaps; if ( !cur ) - return FT_Err_Invalid_CharMap_Handle; + return FT_THROW( Invalid_CharMap_Handle ); limit = cur + face->num_charmaps; @@ -3081,21 +3157,12 @@ { if ( cur[0]->encoding == encoding ) { -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( cur - face->charmaps > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "FT_Select_Charmap: requested charmap is found (%d), " - "but in too late position to cache\n", - cur - face->charmaps )); - continue; - } -#endif face->charmap = cur[0]; return 0; } } - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } @@ -3110,13 +3177,14 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); cur = face->charmaps; - if ( !cur ) - return FT_Err_Invalid_CharMap_Handle; + if ( !cur || !charmap ) + return FT_THROW( Invalid_CharMap_Handle ); + if ( FT_Get_CMap_Format( charmap ) == 14 ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); limit = cur + face->num_charmaps; @@ -3124,20 +3192,12 @@ { if ( cur[0] == charmap ) { -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( cur - face->charmaps > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "FT_Set_Charmap: requested charmap is found (%d), " - "but in too late position to cache\n", - cur - face->charmaps )); - continue; - } -#endif face->charmap = cur[0]; - return 0; + return FT_Err_Ok; } } - return FT_Err_Invalid_Argument; + + return FT_THROW( Invalid_Argument ); } @@ -3158,15 +3218,6 @@ FT_ASSERT( i < charmap->face->num_charmaps ); -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( i > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "FT_Get_Charmap_Index: requested charmap is found (%d), " - "but in too late position to cache\n", - i )); - return -i; - } -#endif return i; } @@ -3176,7 +3227,7 @@ { FT_CMap_Class clazz = cmap->clazz; FT_Face face = cmap->charmap.face; - FT_Memory memory = FT_FACE_MEMORY(face); + FT_Memory memory = FT_FACE_MEMORY( face ); if ( clazz->done ) @@ -3245,7 +3296,7 @@ if ( clazz == NULL || charmap == NULL || charmap->face == NULL ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); face = charmap->face; memory = FT_FACE_MEMORY( face ); @@ -3319,6 +3370,7 @@ FT_UInt gindex = 0; + /* only do something if we have a charmap, and we have glyphs at all */ if ( face && face->charmap && face->num_glyphs ) { gindex = FT_Get_Char_Index( face, 0 ); @@ -3350,8 +3402,10 @@ FT_CMap cmap = FT_CMAP( face->charmap ); - do { + do + { gindex = cmap->clazz->char_next( cmap, &code ); + } while ( gindex >= (FT_UInt)face->num_glyphs ); result = ( gindex == 0 ) ? 0 : code; @@ -3374,8 +3428,9 @@ FT_UInt result = 0; - if ( face && face->charmap && - face->charmap->encoding == FT_ENCODING_UNICODE ) + if ( face && + face->charmap && + face->charmap->encoding == FT_ENCODING_UNICODE ) { FT_CharMap charmap = find_variant_selector_charmap( face ); FT_CMap ucmap = FT_CMAP( face->charmap ); @@ -3553,7 +3608,9 @@ FT_UInt result = 0; - if ( face && FT_HAS_GLYPH_NAMES( face ) ) + if ( face && + FT_HAS_GLYPH_NAMES( face ) && + glyph_name ) { FT_Service_GlyphDict service; @@ -3578,27 +3635,30 @@ FT_Pointer buffer, FT_UInt buffer_max ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error; + FT_Service_GlyphDict service; - /* clean up buffer */ - if ( buffer && buffer_max > 0 ) - ((FT_Byte*)buffer)[0] = 0; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); - if ( face && - (FT_Long)glyph_index <= face->num_glyphs && - FT_HAS_GLYPH_NAMES( face ) ) - { - FT_Service_GlyphDict service; + if ( !buffer || buffer_max == 0 ) + return FT_THROW( Invalid_Argument ); + /* clean up buffer */ + ((FT_Byte*)buffer)[0] = '\0'; - FT_FACE_LOOKUP_SERVICE( face, - service, - GLYPH_DICT ); + if ( (FT_Long)glyph_index >= face->num_glyphs ) + return FT_THROW( Invalid_Glyph_Index ); - if ( service && service->get_name ) - error = service->get_name( face, glyph_index, buffer, buffer_max ); - } + if ( !FT_HAS_GLYPH_NAMES( face ) ) + return FT_THROW( Invalid_Argument ); + + FT_FACE_LOOKUP_SERVICE( face, service, GLYPH_DICT ); + if ( service && service->get_name ) + error = service->get_name( face, glyph_index, buffer, buffer_max ); + else + error = FT_THROW( Invalid_Argument ); return error; } @@ -3639,7 +3699,7 @@ FT_Get_Sfnt_Table( FT_Face face, FT_Sfnt_Tag tag ) { - void* table = 0; + void* table = NULL; FT_Service_SFNT_Table service; @@ -3667,11 +3727,11 @@ if ( !face || !FT_IS_SFNT( face ) ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE ); if ( service == NULL ) - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); return service->load_table( face, tag, offset, buffer, length ); } @@ -3689,12 +3749,14 @@ FT_ULong offset; + /* test for valid `length' delayed to `service->table_info' */ + if ( !face || !FT_IS_SFNT( face ) ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE ); if ( service == NULL ) - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); return service->table_info( face, table_index, tag, &offset, length ); } @@ -3756,12 +3818,12 @@ FT_Face face; - if ( size == NULL ) - return FT_Err_Invalid_Argument; + if ( !size ) + return FT_THROW( Invalid_Size_Handle ); face = size->face; - if ( face == NULL || face->driver == NULL ) - return FT_Err_Invalid_Argument; + if ( !face || !face->driver ) + return FT_THROW( Invalid_Face_Handle ); /* we don't need anything more complex than that; all size objects */ /* are already listed by the face */ @@ -3903,11 +3965,17 @@ static void ft_remove_renderer( FT_Module module ) { - FT_Library library = module->library; - FT_Memory memory = library->memory; + FT_Library library; + FT_Memory memory; FT_ListNode node; + library = module->library; + if ( !library ) + return; + + memory = library->memory; + node = FT_List_Find( &library->renderers, module ); if ( node ) { @@ -3934,7 +4002,7 @@ FT_Get_Renderer( FT_Library library, FT_Glyph_Format format ) { - /* test for valid `library' delayed to FT_Lookup_Renderer() */ + /* test for valid `library' delayed to `FT_Lookup_Renderer' */ return FT_Lookup_Renderer( library, format, 0 ); } @@ -3951,17 +4019,31 @@ FT_ListNode node; FT_Error error = FT_Err_Ok; + FT_Renderer_SetModeFunc set_mode; + if ( !library ) - return FT_Err_Invalid_Library_Handle; + { + error = FT_THROW( Invalid_Library_Handle ); + goto Exit; + } if ( !renderer ) - return FT_Err_Invalid_Argument; + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + if ( num_params > 0 && !parameters ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } node = FT_List_Find( &library->renderers, renderer ); if ( !node ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -3970,18 +4052,14 @@ if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE ) library->cur_renderer = renderer; - if ( num_params > 0 ) - { - FT_Renderer_SetModeFunc set_mode = renderer->clazz->set_mode; - + set_mode = renderer->clazz->set_mode; - for ( ; num_params > 0; num_params-- ) - { - error = set_mode( renderer, parameters->tag, parameters->data ); - if ( error ) - break; - parameters++; - } + for ( ; num_params > 0; num_params-- ) + { + error = set_mode( renderer, parameters->tag, parameters->data ); + if ( error ) + break; + parameters++; } Exit: @@ -4019,12 +4097,12 @@ else renderer = FT_Lookup_Renderer( library, slot->format, &node ); - error = FT_Err_Unimplemented_Feature; + error = FT_ERR( Unimplemented_Feature ); while ( renderer ) { error = renderer->render( renderer, slot, render_mode, NULL ); - if ( !error || - FT_ERROR_BASE( error ) != FT_Err_Cannot_Render_Glyph ) + if ( !error || + FT_ERR_NEQ( error, Cannot_Render_Glyph ) ) break; /* FT_Err_Cannot_Render_Glyph is returned if the render mode */ @@ -4040,10 +4118,57 @@ /* if we changed the current renderer for the glyph image format */ /* we need to select it as the next current one */ if ( !error && update && renderer ) - FT_Set_Renderer( library, renderer, 0, 0 ); + { + error = FT_Set_Renderer( library, renderer, 0, 0 ); + if ( error ) + break; + } + } + } + +#ifdef FT_DEBUG_LEVEL_TRACE + +#undef FT_COMPONENT +#define FT_COMPONENT trace_bitmap + + /* we convert to a single bitmap format for computing the checksum */ + if ( !error ) + { + FT_Bitmap bitmap; + FT_Error err; + + + FT_Bitmap_New( &bitmap ); + + /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */ + err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 ); + if ( !err ) + { + MD5_CTX ctx; + unsigned char md5[16]; + int i; + + + MD5_Init( &ctx); + MD5_Update( &ctx, bitmap.buffer, bitmap.rows * bitmap.pitch ); + MD5_Final( md5, &ctx ); + + FT_TRACE3(( "MD5 checksum for %dx%d bitmap:\n" + " ", + bitmap.rows, bitmap.pitch )); + for ( i = 0; i < 16; i++ ) + FT_TRACE3(( "%02X", md5[i] )); + FT_TRACE3(( "\n" )); } + + FT_Bitmap_Done( library, &bitmap ); } +#undef FT_COMPONENT +#define FT_COMPONENT trace_objs + +#endif /* FT_DEBUG_LEVEL_TRACE */ + return error; } @@ -4058,7 +4183,7 @@ if ( !slot || !slot->face ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); library = FT_FACE_LIBRARY( slot->face ); @@ -4138,14 +4263,14 @@ FREETYPE_MINOR ) if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); if ( !clazz ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* check freetype version */ if ( clazz->module_requires > FREETYPE_VER_FIXED ) - return FT_Err_Invalid_Version; + return FT_THROW( Invalid_Version ); /* look for a module with the same name in the library's table */ for ( nn = 0; nn < library->num_modules; nn++ ) @@ -4155,7 +4280,7 @@ { /* this installed module has the same name, compare their versions */ if ( clazz->module_version <= module->clazz->module_version ) - return FT_Err_Lower_Module_Version; + return FT_THROW( Lower_Module_Version ); /* remove the module from our list, then exit the loop to replace */ /* it by our new version.. */ @@ -4169,7 +4294,7 @@ if ( library->num_modules >= FT_MAX_MODULES ) { - error = FT_Err_Too_Many_Drivers; + error = FT_THROW( Too_Many_Drivers ); goto Exit; } @@ -4240,7 +4365,8 @@ FT_Renderer renderer = FT_RENDERER( module ); - if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE && + if ( renderer->clazz && + renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE && renderer->raster ) renderer->clazz->raster_class->raster_done( renderer->raster ); } @@ -4256,7 +4382,7 @@ FT_Get_Module( FT_Library library, const char* module_name ) { - FT_Module result = 0; + FT_Module result = NULL; FT_Module* cur; FT_Module* limit; @@ -4301,19 +4427,18 @@ { FT_Pointer result = NULL; + if ( module ) { FT_ASSERT( module->clazz && module->clazz->get_interface ); - /* first, look for the service in the module - */ + /* first, look for the service in the module */ if ( module->clazz->get_interface ) result = module->clazz->get_interface( module, service_id ); if ( result == NULL ) { - /* we didn't find it, look in all other modules then - */ + /* we didn't find it, look in all other modules then */ FT_Library library = module->library; FT_Module* cur = library->modules; FT_Module* limit = cur + library->num_modules; @@ -4349,7 +4474,7 @@ /* try to find the module from the table, then remove it from there */ if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); if ( module ) { @@ -4378,7 +4503,119 @@ } } } - return FT_Err_Invalid_Driver_Handle; + return FT_THROW( Invalid_Driver_Handle ); + } + + + static FT_Error + ft_property_do( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + void* value, + FT_Bool set ) + { + FT_Module* cur; + FT_Module* limit; + FT_Module_Interface interface; + + FT_Service_Properties service; + +#ifdef FT_DEBUG_LEVEL_ERROR + const FT_String* set_name = "FT_Property_Set"; + const FT_String* get_name = "FT_Property_Get"; + const FT_String* func_name = set ? set_name : get_name; +#endif + + FT_Bool missing_func; + + + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + + if ( !module_name || !property_name || !value ) + return FT_THROW( Invalid_Argument ); + + cur = library->modules; + limit = cur + library->num_modules; + + /* search module */ + for ( ; cur < limit; cur++ ) + if ( !ft_strcmp( cur[0]->clazz->module_name, module_name ) ) + break; + + if ( cur == limit ) + { + FT_ERROR(( "%s: can't find module `%s'\n", + func_name, module_name )); + return FT_THROW( Missing_Module ); + } + + /* check whether we have a service interface */ + if ( !cur[0]->clazz->get_interface ) + { + FT_ERROR(( "%s: module `%s' doesn't support properties\n", + func_name, module_name )); + return FT_THROW( Unimplemented_Feature ); + } + + /* search property service */ + interface = cur[0]->clazz->get_interface( cur[0], + FT_SERVICE_ID_PROPERTIES ); + if ( !interface ) + { + FT_ERROR(( "%s: module `%s' doesn't support properties\n", + func_name, module_name )); + return FT_THROW( Unimplemented_Feature ); + } + + service = (FT_Service_Properties)interface; + + if ( set ) + missing_func = (FT_Bool)( !service->set_property ); + else + missing_func = (FT_Bool)( !service->get_property ); + + if ( missing_func ) + { + FT_ERROR(( "%s: property service of module `%s' is broken\n", + func_name, module_name )); + return FT_THROW( Unimplemented_Feature ); + } + + return set ? service->set_property( cur[0], property_name, value ) + : service->get_property( cur[0], property_name, value ); + } + + + /* documentation is in ftmodapi.h */ + + FT_EXPORT_DEF( FT_Error ) + FT_Property_Set( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + const void* value ) + { + return ft_property_do( library, + module_name, + property_name, + (void*)value, + TRUE ); + } + + + /* documentation is in ftmodapi.h */ + + FT_EXPORT_DEF( FT_Error ) + FT_Property_Get( FT_Library library, + const FT_String* module_name, + const FT_String* property_name, + void* value ) + { + return ft_property_do( library, + module_name, + property_name, + value, + FALSE ); } @@ -4400,6 +4637,9 @@ FT_EXPORT_DEF( FT_Error ) FT_Reference_Library( FT_Library library ) { + if ( !library ) + return FT_THROW( Invalid_Library_Handle ); + library->refcount++; return FT_Err_Ok; @@ -4416,8 +4656,8 @@ FT_Error error; - if ( !memory ) - return FT_Err_Invalid_Argument; + if ( !memory || !alibrary ) + return FT_THROW( Invalid_Argument ); #ifdef FT_DEBUG_LEVEL_ERROR /* init debugging support */ @@ -4504,7 +4744,7 @@ if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); library->refcount--; if ( library->refcount > 0 ) @@ -4651,70 +4891,6 @@ } -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_BASE_DEF( FT_Error ) - ft_stub_set_char_sizes( FT_Size size, - FT_F26Dot6 width, - FT_F26Dot6 height, - FT_UInt horz_res, - FT_UInt vert_res ) - { - FT_Size_RequestRec req; - FT_Driver driver = size->face->driver; - - - if ( driver->clazz->request_size ) - { - req.type = FT_SIZE_REQUEST_TYPE_NOMINAL; - req.width = width; - req.height = height; - - if ( horz_res == 0 ) - horz_res = vert_res; - - if ( vert_res == 0 ) - vert_res = horz_res; - - if ( horz_res == 0 ) - horz_res = vert_res = 72; - - req.horiResolution = horz_res; - req.vertResolution = vert_res; - - return driver->clazz->request_size( size, &req ); - } - - return 0; - } - - - FT_BASE_DEF( FT_Error ) - ft_stub_set_pixel_sizes( FT_Size size, - FT_UInt width, - FT_UInt height ) - { - FT_Size_RequestRec req; - FT_Driver driver = size->face->driver; - - - if ( driver->clazz->request_size ) - { - req.type = FT_SIZE_REQUEST_TYPE_NOMINAL; - req.width = width << 6; - req.height = height << 6; - req.horiResolution = 0; - req.vertResolution = 0; - - return driver->clazz->request_size( size, &req ); - } - - return 0; - } - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /* documentation is in freetype.h */ FT_EXPORT_DEF( FT_Error ) @@ -4726,7 +4902,7 @@ FT_Int *p_arg2, FT_Matrix *p_transform ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error = FT_ERR( Invalid_Argument ); if ( glyph && @@ -4742,6 +4918,8 @@ *p_arg1 = subg->arg1; *p_arg2 = subg->arg2; *p_transform = subg->transform; + + error = FT_Err_Ok; } return error; diff --git a/src/base/ftotval.c b/src/base/ftotval.c index 694fd2b..5fc73d7 100644 --- a/src/base/ftotval.c +++ b/src/base/ftotval.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating OpenType tables (body). */ /* */ -/* Copyright 2004, 2006, 2008, 2010 by */ +/* Copyright 2004, 2006, 2008, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,6 +16,8 @@ /***************************************************************************/ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_OPENTYPE_VALIDATE_H #include FT_OPENTYPE_VALIDATE_H @@ -38,7 +40,7 @@ if ( !face ) { - error = FT_Err_Invalid_Face_Handle; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } @@ -48,7 +50,7 @@ GSUB_table && JSTF_table ) ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -63,7 +65,7 @@ GSUB_table, JSTF_table ); else - error = FT_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); Exit: return error; diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index 9ae276d..8749d64 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -4,7 +4,7 @@ /* */ /* FreeType outline management (body). */ /* */ -/* Copyright 1996-2008, 2010, 2012 by */ +/* Copyright 1996-2008, 2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -26,6 +26,7 @@ #include <ft2build.h> #include FT_OUTLINE_H #include FT_INTERNAL_OBJECTS_H +#include FT_INTERNAL_CALC_H #include FT_INTERNAL_DEBUG_H #include FT_TRIGONOMETRY_H @@ -72,8 +73,11 @@ FT_Pos delta; - if ( !outline || !func_interface ) - return FT_Err_Invalid_Argument; + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !func_interface ) + return FT_THROW( Invalid_Argument ); shift = func_interface->shift; delta = func_interface->delta; @@ -127,7 +131,7 @@ v_start.x = ( v_start.x + v_last.x ) / 2; v_start.y = ( v_start.y + v_last.y ) / 2; - v_last = v_start; + /* v_last = v_start; */ } point--; tags--; @@ -286,7 +290,7 @@ return error; Invalid_Outline: - return FT_Err_Invalid_Outline; + return FT_THROW( Invalid_Outline ); } @@ -300,10 +304,17 @@ if ( !anoutline || !memory ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); *anoutline = null_outline; + if ( numContours < 0 || + (FT_UInt)numContours > numPoints ) + return FT_THROW( Invalid_Argument ); + + if ( numPoints > FT_OUTLINE_POINTS_MAX ) + return FT_THROW( Array_Too_Large ); + if ( FT_NEW_ARRAY( anoutline->points, numPoints ) || FT_NEW_ARRAY( anoutline->tags, numPoints ) || FT_NEW_ARRAY( anoutline->contours, numContours ) ) @@ -332,7 +343,7 @@ FT_Outline *anoutline ) { if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); return FT_Outline_New_Internal( library->memory, numPoints, numContours, anoutline ); @@ -354,7 +365,7 @@ /* empty glyph? */ if ( n_points == 0 && n_contours == 0 ) - return 0; + return FT_Err_Ok; /* check point and contour counts */ if ( n_points <= 0 || n_contours <= 0 ) @@ -376,11 +387,11 @@ goto Bad; /* XXX: check the tags array */ - return 0; + return FT_Err_Ok; } Bad: - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } @@ -393,10 +404,12 @@ FT_Int is_owner; - if ( !source || !target || - source->n_points != target->n_points || + if ( !source || !target ) + return FT_THROW( Invalid_Outline ); + + if ( source->n_points != target->n_points || source->n_contours != target->n_contours ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( source == target ) return FT_Err_Ok; @@ -422,20 +435,21 @@ FT_Outline_Done_Internal( FT_Memory memory, FT_Outline* outline ) { - if ( memory && outline ) - { - if ( outline->flags & FT_OUTLINE_OWNER ) - { - FT_FREE( outline->points ); - FT_FREE( outline->tags ); - FT_FREE( outline->contours ); - } - *outline = null_outline; + if ( !outline ) + return FT_THROW( Invalid_Outline ); - return FT_Err_Ok; + if ( !memory ) + return FT_THROW( Invalid_Argument ); + + if ( outline->flags & FT_OUTLINE_OWNER ) + { + FT_FREE( outline->points ); + FT_FREE( outline->tags ); + FT_FREE( outline->contours ); } - else - return FT_Err_Invalid_Argument; + *outline = null_outline; + + return FT_Err_Ok; } @@ -448,7 +462,7 @@ /* check for valid `outline' in FT_Outline_Done_Internal() */ if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); return FT_Outline_Done_Internal( library->memory, outline ); } @@ -568,11 +582,13 @@ { char* p = outline->tags + first; char* q = outline->tags + last; - char swap; while ( p < q ) { + char swap; + + swap = *p; *p = *q; *q = swap; @@ -602,21 +618,24 @@ if ( !library ) - return FT_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); - if ( !outline || !params ) - return FT_Err_Invalid_Argument; + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !params ) + return FT_THROW( Invalid_Argument ); renderer = library->cur_renderer; node = library->renderers.head; params->source = (void*)outline; - error = FT_Err_Cannot_Render_Glyph; + error = FT_ERR( Cannot_Render_Glyph ); while ( renderer ) { error = renderer->raster_render( renderer->raster, params ); - if ( !error || FT_ERROR_BASE( error ) != FT_Err_Cannot_Render_Glyph ) + if ( !error || FT_ERR_NEQ( error, Cannot_Render_Glyph ) ) break; /* FT_Err_Cannot_Render_Glyph is returned if the render mode */ @@ -633,7 +652,7 @@ /* if we changed the current renderer for the glyph image format */ /* we need to select it as the next current one */ if ( !error && update && renderer ) - FT_Set_Renderer( library, renderer, 0, 0 ); + error = FT_Set_Renderer( library, renderer, 0, 0 ); return error; } @@ -650,9 +669,9 @@ if ( !abitmap ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); - /* other checks are delayed to FT_Outline_Render() */ + /* other checks are delayed to `FT_Outline_Render' */ params.target = abitmap; params.flags = 0; @@ -713,7 +732,8 @@ #if 0 #define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \ - do { \ + do \ + { \ (first) = ( c > 0 ) ? (outline)->points + \ (outline)->contours[c - 1] + 1 \ : (outline)->points; \ @@ -882,85 +902,126 @@ FT_Outline_Embolden( FT_Outline* outline, FT_Pos strength ) { + return FT_Outline_EmboldenXY( outline, strength, strength ); + } + + + /* documentation is in ftoutln.h */ + + FT_EXPORT_DEF( FT_Error ) + FT_Outline_EmboldenXY( FT_Outline* outline, + FT_Pos xstrength, + FT_Pos ystrength ) + { FT_Vector* points; FT_Vector v_prev, v_first, v_next, v_cur; - FT_Angle rotate, angle_in, angle_out; FT_Int c, n, first; FT_Int orientation; if ( !outline ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Outline ); - strength /= 2; - if ( strength == 0 ) + xstrength /= 2; + ystrength /= 2; + if ( xstrength == 0 && ystrength == 0 ) return FT_Err_Ok; orientation = FT_Outline_Get_Orientation( outline ); if ( orientation == FT_ORIENTATION_NONE ) { if ( outline->n_contours ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); else return FT_Err_Ok; } - if ( orientation == FT_ORIENTATION_TRUETYPE ) - rotate = -FT_ANGLE_PI2; - else - rotate = FT_ANGLE_PI2; - points = outline->points; first = 0; for ( c = 0; c < outline->n_contours; c++ ) { - int last = outline->contours[c]; + FT_Vector in, out, shift; + FT_Fixed l_in, l_out, l, q, d; + int last = outline->contours[c]; v_first = points[first]; v_prev = points[last]; v_cur = v_first; - for ( n = first; n <= last; n++ ) + /* compute incoming normalized vector */ + in.x = v_cur.x - v_prev.x; + in.y = v_cur.y - v_prev.y; + l_in = FT_Vector_Length( &in ); + if ( l_in ) { - FT_Vector in, out; - FT_Angle angle_diff; - FT_Pos d; - FT_Fixed scale; - + in.x = FT_DivFix( in.x, l_in ); + in.y = FT_DivFix( in.y, l_in ); + } + for ( n = first; n <= last; n++ ) + { if ( n < last ) v_next = points[n + 1]; else v_next = v_first; - /* compute the in and out vectors */ - in.x = v_cur.x - v_prev.x; - in.y = v_cur.y - v_prev.y; - + /* compute outgoing normalized vector */ out.x = v_next.x - v_cur.x; out.y = v_next.y - v_cur.y; + l_out = FT_Vector_Length( &out ); + if ( l_out ) + { + out.x = FT_DivFix( out.x, l_out ); + out.y = FT_DivFix( out.y, l_out ); + } - angle_in = FT_Atan2( in.x, in.y ); - angle_out = FT_Atan2( out.x, out.y ); - angle_diff = FT_Angle_Diff( angle_in, angle_out ); - scale = FT_Cos( angle_diff / 2 ); + d = FT_MulFix( in.x, out.x ) + FT_MulFix( in.y, out.y ); - if ( scale < 0x4000L && scale > -0x4000L ) - in.x = in.y = 0; - else + /* shift only if turn is less than ~160 degrees */ + if ( d > -0xF000L ) { - d = FT_DivFix( strength, scale ); + d = d + 0x10000L; + + /* shift components are aligned along lateral bisector */ + /* and directed according to the outline orientation. */ + shift.x = in.y + out.y; + shift.y = in.x + out.x; + + if ( orientation == FT_ORIENTATION_TRUETYPE ) + shift.x = -shift.x; + else + shift.y = -shift.y; + + /* restrict shift magnitude to better handle collapsing segments */ + q = FT_MulFix( out.x, in.y ) - FT_MulFix( out.y, in.x ); + if ( orientation == FT_ORIENTATION_TRUETYPE ) + q = -q; + + l = FT_MIN( l_in, l_out ); - FT_Vector_From_Polar( &in, d, angle_in + angle_diff / 2 - rotate ); + /* non-strict inequalities avoid divide-by-zero when q == l == 0 */ + if ( FT_MulFix( xstrength, q ) <= FT_MulFix( d, l ) ) + shift.x = FT_MulDiv( shift.x, xstrength, d ); + else + shift.x = FT_MulDiv( shift.x, l, q ); + + + if ( FT_MulFix( ystrength, q ) <= FT_MulFix( d, l ) ) + shift.y = FT_MulDiv( shift.y, ystrength, d ); + else + shift.y = FT_MulDiv( shift.y, l, q ); } + else + shift.x = shift.y = 0; - outline->points[n].x = v_cur.x + strength + in.x; - outline->points[n].y = v_cur.y + strength + in.y; + outline->points[n].x = v_cur.x + xstrength + shift.x; + outline->points[n].y = v_cur.y + ystrength + shift.y; - v_prev = v_cur; - v_cur = v_next; + in = out; + l_in = l_out; + v_cur = v_next; } first = last + 1; @@ -975,23 +1036,12 @@ FT_EXPORT_DEF( FT_Orientation ) FT_Outline_Get_Orientation( FT_Outline* outline ) { - FT_Pos xmin = 32768L; - FT_Pos xmin_ymin = 32768L; - FT_Pos xmin_ymax = -32768L; - FT_Vector* xmin_first = NULL; - FT_Vector* xmin_last = NULL; - - short* contour; - - FT_Vector* first; - FT_Vector* last; - FT_Vector* prev; - FT_Vector* point; - - int i; - FT_Pos ray_y[3]; - FT_Orientation result[3] = - { FT_ORIENTATION_NONE, FT_ORIENTATION_NONE, FT_ORIENTATION_NONE }; + FT_BBox cbox; + FT_Int xshift, yshift; + FT_Vector* points; + FT_Vector v_prev, v_cur; + FT_Int c, n, first; + FT_Pos area = 0; if ( !outline || outline->n_points <= 0 ) @@ -1002,127 +1052,45 @@ /* cubic or quadratic curves, this test deals with the polygon */ /* only which is spanned up by the control points. */ - first = outline->points; - for ( contour = outline->contours; - contour < outline->contours + outline->n_contours; - contour++, first = last + 1 ) - { - FT_Pos contour_xmin = 32768L; - FT_Pos contour_xmax = -32768L; - FT_Pos contour_ymin = 32768L; - FT_Pos contour_ymax = -32768L; - + FT_Outline_Get_CBox( outline, &cbox ); - last = outline->points + *contour; + /* Handle collapsed outlines to avoid undefined FT_MSB. */ + if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax ) + return FT_ORIENTATION_NONE; - /* skip degenerate contours */ - if ( last < first + 2 ) - continue; + xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14; + xshift = FT_MAX( xshift, 0 ); - for ( point = first; point <= last; ++point ) - { - if ( point->x < contour_xmin ) - contour_xmin = point->x; + yshift = FT_MSB( cbox.yMax - cbox.yMin ) - 14; + yshift = FT_MAX( yshift, 0 ); - if ( point->x > contour_xmax ) - contour_xmax = point->x; - - if ( point->y < contour_ymin ) - contour_ymin = point->y; - - if ( point->y > contour_ymax ) - contour_ymax = point->y; - } - - if ( contour_xmin < xmin && - contour_xmin != contour_xmax && - contour_ymin != contour_ymax ) - { - xmin = contour_xmin; - xmin_ymin = contour_ymin; - xmin_ymax = contour_ymax; - xmin_first = first; - xmin_last = last; - } - } - - if ( xmin == 32768L ) - return FT_ORIENTATION_TRUETYPE; - - ray_y[0] = ( xmin_ymin * 3 + xmin_ymax ) >> 2; - ray_y[1] = ( xmin_ymin + xmin_ymax ) >> 1; - ray_y[2] = ( xmin_ymin + xmin_ymax * 3 ) >> 2; + points = outline->points; - for ( i = 0; i < 3; i++ ) + first = 0; + for ( c = 0; c < outline->n_contours; c++ ) { - FT_Pos left_x; - FT_Pos right_x; - FT_Vector* left1; - FT_Vector* left2; - FT_Vector* right1; - FT_Vector* right2; - + FT_Int last = outline->contours[c]; - RedoRay: - left_x = 32768L; - right_x = -32768L; - left1 = left2 = right1 = right2 = NULL; + v_prev = points[last]; - prev = xmin_last; - for ( point = xmin_first; point <= xmin_last; prev = point, ++point ) + for ( n = first; n <= last; n++ ) { - FT_Pos tmp_x; - - - if ( point->y == ray_y[i] || prev->y == ray_y[i] ) - { - ray_y[i]++; - goto RedoRay; - } - - if ( ( point->y < ray_y[i] && prev->y < ray_y[i] ) || - ( point->y > ray_y[i] && prev->y > ray_y[i] ) ) - continue; - - tmp_x = FT_MulDiv( point->x - prev->x, - ray_y[i] - prev->y, - point->y - prev->y ) + prev->x; - - if ( tmp_x < left_x ) - { - left_x = tmp_x; - left1 = prev; - left2 = point; - } - - if ( tmp_x > right_x ) - { - right_x = tmp_x; - right1 = prev; - right2 = point; - } + v_cur = points[n]; + area += ( ( v_cur.y - v_prev.y ) >> yshift ) * + ( ( v_cur.x + v_prev.x ) >> xshift ); + v_prev = v_cur; } - if ( left1 && right1 ) - { - if ( left1->y < left2->y && right1->y > right2->y ) - result[i] = FT_ORIENTATION_TRUETYPE; - else if ( left1->y > left2->y && right1->y < right2->y ) - result[i] = FT_ORIENTATION_POSTSCRIPT; - else - result[i] = FT_ORIENTATION_NONE; - } + first = last + 1; } - if ( result[0] != FT_ORIENTATION_NONE && - ( result[0] == result[1] || result[0] == result[2] ) ) - return result[0]; - - if ( result[1] != FT_ORIENTATION_NONE && result[1] == result[2] ) - return result[1]; - - return FT_ORIENTATION_TRUETYPE; + if ( area > 0 ) + return FT_ORIENTATION_POSTSCRIPT; + else if ( area < 0 ) + return FT_ORIENTATION_TRUETYPE; + else + return FT_ORIENTATION_NONE; } diff --git a/src/base/ftpfr.c b/src/base/ftpfr.c index 3a0f92d..7425abe 100644 --- a/src/base/ftpfr.c +++ b/src/base/ftpfr.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing PFR-specific data (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2008, 2010 by */ +/* Copyright 2002-2004, 2008, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,6 +16,8 @@ /***************************************************************************/ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H + #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_PFR_H @@ -48,7 +50,7 @@ if ( !face ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Face_Handle ); service = ft_pfr_check( face ); if ( service ) @@ -84,7 +86,7 @@ if ( ametrics_y_scale ) *ametrics_y_scale = y_scale; - error = FT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); } return error; @@ -104,7 +106,10 @@ if ( !face ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Face_Handle ); + + if ( !avector ) + return FT_THROW( Invalid_Argument ); service = ft_pfr_check( face ); if ( service ) @@ -128,14 +133,18 @@ FT_Service_PfrMetrics service; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + + if ( !aadvance ) + return FT_THROW( Invalid_Argument ); + service = ft_pfr_check( face ); if ( service ) - { error = service->get_advance( face, gindex, aadvance ); - } else /* XXX: TODO: PROVIDE ADVANCE-LOADING METHOD TO ALL FONT DRIVERS */ - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); return error; } diff --git a/src/base/ftpic.c b/src/base/ftpic.c index b74e90d..9bd92f7 100644 --- a/src/base/ftpic.c +++ b/src/base/ftpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services (body). */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,7 +29,8 @@ ft_pic_container_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = FT_Err_Ok; + FT_Error error; + FT_MEM_SET( pic_container, 0, sizeof ( *pic_container ) ); diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c index 01d8625..efe24d6 100644 --- a/src/base/ftrfork.c +++ b/src/base/ftrfork.c @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (body). */ /* */ -/* Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 2004-2010, 2013, 2014 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */ @@ -29,6 +29,7 @@ #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_RFORK_H #include "basepic.h" +#include "ftbase.h" #undef FT_COMPONENT #define FT_COMPONENT trace_raccess @@ -86,7 +87,7 @@ /* map_len = head[12] .. head[15] */ if ( *rdata_pos + rdata_len != map_pos || map_pos == rfork_offset ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); error = FT_Stream_Seek( stream, map_pos ); if ( error ) @@ -108,7 +109,7 @@ allmatch = 0; } if ( !allzeros && !allmatch ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); /* If we have reached this point then it is probably a mac resource */ /* file. Now, does it contain any interesting resources? */ @@ -121,7 +122,7 @@ if ( FT_READ_USHORT( type_list ) ) return error; if ( type_list == -1 ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); error = FT_Stream_Seek( stream, map_pos + type_list ); if ( error ) @@ -151,6 +152,7 @@ FT_Long map_offset, FT_Long rdata_pos, FT_Long tag, + FT_Bool sort_by_res_id, FT_Long **offsets, FT_Long *count ) { @@ -163,6 +165,7 @@ FT_RFork_Ref *ref = NULL; + FT_TRACE3(( "\n" )); error = FT_Stream_Seek( stream, map_offset ); if ( error ) return error; @@ -179,10 +182,12 @@ return error; FT_TRACE2(( "Resource tags: %c%c%c%c\n", - (char)( 0xff & ( tag_internal >> 24 ) ), - (char)( 0xff & ( tag_internal >> 16 ) ), - (char)( 0xff & ( tag_internal >> 8 ) ), - (char)( 0xff & ( tag_internal >> 0 ) ) )); + (char)( 0xFF & ( tag_internal >> 24 ) ), + (char)( 0xFF & ( tag_internal >> 16 ) ), + (char)( 0xFF & ( tag_internal >> 8 ) ), + (char)( 0xFF & ( tag_internal >> 0 ) ) )); + FT_TRACE3(( " : subcount=%d, suboffset=0x%04x\n", + subcnt, rpos )); if ( tag_internal == tag ) { @@ -208,11 +213,24 @@ goto Exit; ref[j].offset = temp & 0xFFFFFFL; + FT_TRACE3(( " [%d]:" + " resource_id=0x%04x, offset=0x%08x\n", + j, ref[j].res_id, ref[j].offset )); } - ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ), - ( int(*)(const void*, const void*) ) - ft_raccess_sort_ref_by_id ); + if (sort_by_res_id) + { + ft_qsort( ref, *count, sizeof ( FT_RFork_Ref ), + ( int(*)(const void*, const void*) ) + ft_raccess_sort_ref_by_id ); + + FT_TRACE3(( " -- sort resources by their ids --\n" )); + for ( j = 0; j < *count; ++ j ) { + FT_TRACE3(( " [%d]:" + " resource_id=0x%04x, offset=0x%08x\n", + j, ref[j].res_id, ref[j].offset )); + } + } if ( FT_NEW_ARRAY( offsets_internal, *count ) ) goto Exit; @@ -233,7 +251,7 @@ } } - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } @@ -362,7 +380,7 @@ FT_Long *offsets, FT_Error *errors ) { - FT_Long i; + FT_Int i; for ( i = 0; i < FT_RACCESS_N_RULES; i++ ) @@ -435,7 +453,7 @@ *result_file_name = NULL; if ( NULL == stream ) - return FT_Err_Cannot_Open_Stream; + return FT_THROW( Cannot_Open_Stream ); return raccess_guess_apple_generic( library, stream, base_file_name, magic, result_offset ); @@ -457,7 +475,7 @@ *result_file_name = NULL; if ( NULL == stream ) - return FT_Err_Cannot_Open_Stream; + return FT_THROW( Cannot_Open_Stream ); return raccess_guess_apple_generic( library, stream, base_file_name, magic, result_offset ); @@ -481,7 +499,7 @@ memory = library->memory; newpath = raccess_make_file_name( memory, base_file_name, "._" ); if ( !newpath ) - return FT_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); error = raccess_guess_linux_double_from_file_name( library, newpath, result_offset ); @@ -507,7 +525,7 @@ FT_Error error; char* newpath = NULL; FT_Memory memory; - FT_Long base_file_len = ft_strlen( base_file_name ); + FT_Long base_file_len = (FT_Long)ft_strlen( base_file_name ); FT_UNUSED( stream ); @@ -515,7 +533,7 @@ memory = library->memory; if ( base_file_len + 6 > FT_INT_MAX ) - return FT_Err_Array_Too_Large; + return FT_THROW( Array_Too_Large ); if ( FT_ALLOC( newpath, base_file_len + 6 ) ) return error; @@ -543,7 +561,7 @@ FT_Error error; char* newpath = NULL; FT_Memory memory; - FT_Long base_file_len = ft_strlen( base_file_name ); + FT_Long base_file_len = (FT_Long)ft_strlen( base_file_name ); FT_UNUSED( stream ); @@ -551,7 +569,7 @@ memory = library->memory; if ( base_file_len + 18 > FT_INT_MAX ) - return FT_Err_Array_Too_Large; + return FT_THROW( Array_Too_Large ); if ( FT_ALLOC( newpath, base_file_len + 18 ) ) return error; @@ -584,7 +602,7 @@ newpath = raccess_make_file_name( memory, base_file_name, "resource.frk/" ); if ( !newpath ) - return FT_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); *result_file_name = newpath; *result_offset = 0; @@ -610,7 +628,7 @@ newpath = raccess_make_file_name( memory, base_file_name, ".resource/" ); if ( !newpath ) - return FT_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); *result_file_name = newpath; *result_offset = 0; @@ -637,7 +655,7 @@ newpath = raccess_make_file_name( memory, base_file_name, "%" ); if ( !newpath ) - return FT_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); error = raccess_guess_linux_double_from_file_name( library, newpath, result_offset ); @@ -669,7 +687,7 @@ newpath = raccess_make_file_name( memory, base_file_name, ".AppleDouble/" ); if ( !newpath ) - return FT_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); error = raccess_guess_linux_double_from_file_name( library, newpath, result_offset ); @@ -708,7 +726,7 @@ if ( FT_READ_LONG( magic_from_stream ) ) return error; if ( magic_from_stream != magic ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); if ( FT_READ_LONG( version_number ) ) return error; @@ -721,7 +739,7 @@ if ( FT_READ_USHORT( n_of_entries ) ) return error; if ( n_of_entries == 0 ) - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); for ( i = 0; i < n_of_entries; i++ ) { @@ -744,7 +762,7 @@ } } - return FT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); } @@ -827,7 +845,7 @@ FT_Long *offsets, FT_Error *errors ) { - int i; + FT_Int i; FT_UNUSED( library ); FT_UNUSED( stream ); @@ -838,7 +856,7 @@ { new_names[i] = NULL; offsets[i] = 0; - errors[i] = FT_Err_Unimplemented_Feature; + errors[i] = FT_ERR( Unimplemented_Feature ); } } diff --git a/src/base/ftsnames.c b/src/base/ftsnames.c index 3447888..260e91c 100644 --- a/src/base/ftsnames.c +++ b/src/base/ftsnames.c @@ -44,7 +44,7 @@ FT_UInt idx, FT_SfntName *aname ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error = FT_ERR( Invalid_Argument ); if ( aname && face && FT_IS_SFNT( face ) ) diff --git a/src/base/ftstream.c b/src/base/ftstream.c index fc2868e..759fd8f 100644 --- a/src/base/ftstream.c +++ b/src/base/ftstream.c @@ -4,7 +4,7 @@ /* */ /* I/O stream support (body). */ /* */ -/* Copyright 2000-2002, 2004-2006, 2008-2011 by */ +/* Copyright 2000-2002, 2004-2006, 2008-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -68,7 +68,7 @@ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", pos, stream->size )); - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); } } /* note that seeking to the first position after the file is valid */ @@ -78,7 +78,7 @@ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", pos, stream->size )); - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); } if ( !error ) @@ -93,7 +93,7 @@ FT_Long distance ) { if ( distance < 0 ) - return FT_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); return FT_Stream_Seek( stream, (FT_ULong)( stream->pos + distance ) ); } @@ -131,7 +131,7 @@ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", pos, stream->size )); - return FT_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); } if ( stream->read ) @@ -153,7 +153,7 @@ " invalid read; expected %lu bytes, got %lu\n", count, read_bytes )); - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); } return error; @@ -254,7 +254,7 @@ " frame size (%lu) larger than stream size (%lu)\n", count, stream->size )); - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); goto Exit; } @@ -277,7 +277,7 @@ count, read_bytes )); FT_FREE( stream->base ); - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); } stream->cursor = stream->base; stream->limit = stream->cursor + count; @@ -293,7 +293,7 @@ " invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n", stream->pos, count, stream->size )); - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); goto Exit; } @@ -474,7 +474,7 @@ return result; Fail: - *error = FT_Err_Invalid_Stream_Operation; + *error = FT_THROW( Invalid_Stream_Operation ); FT_ERROR(( "FT_Stream_ReadChar:" " invalid i/o; pos = 0x%lx, size = 0x%lx\n", stream->pos, stream->size )); @@ -521,7 +521,7 @@ return result; Fail: - *error = FT_Err_Invalid_Stream_Operation; + *error = FT_THROW( Invalid_Stream_Operation ); FT_ERROR(( "FT_Stream_ReadUShort:" " invalid i/o; pos = 0x%lx, size = 0x%lx\n", stream->pos, stream->size )); @@ -568,7 +568,7 @@ return result; Fail: - *error = FT_Err_Invalid_Stream_Operation; + *error = FT_THROW( Invalid_Stream_Operation ); FT_ERROR(( "FT_Stream_ReadUShortLE:" " invalid i/o; pos = 0x%lx, size = 0x%lx\n", stream->pos, stream->size )); @@ -615,7 +615,7 @@ return result; Fail: - *error = FT_Err_Invalid_Stream_Operation; + *error = FT_THROW( Invalid_Stream_Operation ); FT_ERROR(( "FT_Stream_ReadUOffset:" " invalid i/o; pos = 0x%lx, size = 0x%lx\n", stream->pos, stream->size )); @@ -662,7 +662,7 @@ return result; Fail: - *error = FT_Err_Invalid_Stream_Operation; + *error = FT_THROW( Invalid_Stream_Operation ); FT_ERROR(( "FT_Stream_ReadULong:" " invalid i/o; pos = 0x%lx, size = 0x%lx\n", stream->pos, stream->size )); @@ -709,7 +709,7 @@ return result; Fail: - *error = FT_Err_Invalid_Stream_Operation; + *error = FT_THROW( Invalid_Stream_Operation ); FT_ERROR(( "FT_Stream_ReadULongLE:" " invalid i/o; pos = 0x%lx, size = 0x%lx\n", stream->pos, stream->size )); @@ -727,8 +727,12 @@ FT_Bool frame_accessed = 0; FT_Byte* cursor; - if ( !fields || !stream ) - return FT_Err_Invalid_Argument; + + if ( !fields ) + return FT_THROW( Invalid_Argument ); + + if ( !stream ) + return FT_THROW( Invalid_Stream_Handle ); cursor = stream->cursor; @@ -760,7 +764,7 @@ if ( cursor + len > stream->limit ) { - error = FT_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); goto Exit; } @@ -776,43 +780,43 @@ case ft_frame_byte: case ft_frame_schar: /* read a single byte */ - value = FT_NEXT_BYTE(cursor); + value = FT_NEXT_BYTE( cursor ); sign_shift = 24; break; case ft_frame_short_be: case ft_frame_ushort_be: /* read a 2-byte big-endian short */ - value = FT_NEXT_USHORT(cursor); + value = FT_NEXT_USHORT( cursor) ; sign_shift = 16; break; case ft_frame_short_le: case ft_frame_ushort_le: /* read a 2-byte little-endian short */ - value = FT_NEXT_USHORT_LE(cursor); + value = FT_NEXT_USHORT_LE( cursor ); sign_shift = 16; break; case ft_frame_long_be: case ft_frame_ulong_be: /* read a 4-byte big-endian long */ - value = FT_NEXT_ULONG(cursor); + value = FT_NEXT_ULONG( cursor ); sign_shift = 0; break; case ft_frame_long_le: case ft_frame_ulong_le: /* read a 4-byte little-endian long */ - value = FT_NEXT_ULONG_LE(cursor); + value = FT_NEXT_ULONG_LE( cursor ); sign_shift = 0; break; case ft_frame_off3_be: case ft_frame_uoff3_be: /* read a 3-byte big-endian long */ - value = FT_NEXT_UOFF3(cursor); + value = FT_NEXT_UOFF3( cursor ); sign_shift = 8; break; case ft_frame_off3_le: case ft_frame_uoff3_le: /* read a 3-byte little-endian long */ - value = FT_NEXT_UOFF3_LE(cursor); + value = FT_NEXT_UOFF3_LE( cursor ); sign_shift = 8; break; @@ -831,15 +835,15 @@ p = (FT_Byte*)structure + fields->offset; switch ( fields->size ) { - case (8 / FT_CHAR_BIT): + case ( 8 / FT_CHAR_BIT ): *(FT_Byte*)p = (FT_Byte)value; break; - case (16 / FT_CHAR_BIT): + case ( 16 / FT_CHAR_BIT ): *(FT_UShort*)p = (FT_UShort)value; break; - case (32 / FT_CHAR_BIT): + case ( 32 / FT_CHAR_BIT ): *(FT_UInt32*)p = (FT_UInt32)value; break; diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c index 5399efe..5fc41fc 100644 --- a/src/base/ftstroke.c +++ b/src/base/ftstroke.c @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (body). */ /* */ -/* Copyright 2002-2006, 2008-2011 by */ +/* Copyright 2002-2006, 2008-2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -789,13 +789,16 @@ FT_Stroker_New( FT_Library library, FT_Stroker *astroker ) { - FT_Error error; + FT_Error error; /* assigned in FT_NEW */ FT_Memory memory; FT_Stroker stroker = NULL; if ( !library ) - return FT_Err_Invalid_Argument; + return FT_THROW( Invalid_Library_Handle ); + + if ( !astroker ) + return FT_THROW( Invalid_Argument ); memory = library->memory; @@ -822,14 +825,17 @@ FT_Stroker_LineJoin line_join, FT_Fixed miter_limit ) { + if ( !stroker ) + return; + stroker->radius = radius; stroker->line_cap = line_cap; stroker->line_join = line_join; stroker->miter_limit = miter_limit; /* ensure miter limit has sensible value */ - if ( stroker->miter_limit < 0x10000 ) - stroker->miter_limit = 0x10000; + if ( stroker->miter_limit < 0x10000L ) + stroker->miter_limit = 0x10000L; /* save line join style: */ /* line join style can be temporarily changed when stroking curves */ @@ -1002,7 +1008,8 @@ FT_Tan( theta ) ) ); - intersect = FT_BOOL( stroker->line_length >= min_length && + intersect = FT_BOOL( min_length && + stroker->line_length >= min_length && line_length >= min_length ); } @@ -1126,9 +1133,8 @@ middle.y += stroker->center.y; /* compute first angle point */ - length = FT_MulFix( radius, - FT_DivFix( 0x10000L - sigma, - ft_pos_abs( FT_Sin( theta ) ) ) ); + length = FT_MulDiv( radius, 0x10000L - sigma, + ft_pos_abs( FT_Sin( theta ) ) ); FT_Vector_From_Polar( &delta, length, phi + rotate ); delta.x += middle.x; @@ -1288,6 +1294,9 @@ FT_Fixed line_length; + if ( !stroker || !to ) + return FT_THROW( Invalid_Argument ); + delta.x = to->x - stroker->center.x; delta.y = to->y - stroker->center.y; @@ -1361,6 +1370,12 @@ FT_Bool first_arc = TRUE; + if ( !stroker || !control || !to ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + /* if all control points are coincident, this is a no-op; */ /* avoid creating a spurious corner */ if ( FT_IS_SMALL( stroker->center.x - control->x ) && @@ -1495,7 +1510,7 @@ sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) ); sinB = ft_pos_abs( FT_Sin( beta - gamma ) ); - alen = FT_DivFix( FT_MulFix( blen, sinA ), sinB ); + alen = FT_MulDiv( blen, sinA, sinB ); FT_Vector_From_Polar( &delta, alen, beta ); delta.x += start.x; @@ -1557,6 +1572,12 @@ FT_Bool first_arc = TRUE; + if ( !stroker || !control1 || !control2 || !to ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + /* if all control points are coincident, this is a no-op; */ /* avoid creating a spurious corner */ if ( FT_IS_SMALL( stroker->center.x - control1->x ) && @@ -1702,7 +1723,7 @@ sinA = ft_pos_abs( FT_Sin( alpha1 - gamma ) ); sinB = ft_pos_abs( FT_Sin( beta - gamma ) ); - alen = FT_DivFix( FT_MulFix( blen, sinA ), sinB ); + alen = FT_MulDiv( blen, sinA, sinB ); FT_Vector_From_Polar( &delta, alen, beta ); delta.x += start.x; @@ -1759,6 +1780,9 @@ FT_Vector* to, FT_Bool open ) { + if ( !stroker || !to ) + return FT_THROW( Invalid_Argument ); + /* We cannot process the first point, because there is not enough */ /* information regarding its corner/cap. The latter will be processed */ /* in the `FT_Stroker_EndSubPath' routine. */ @@ -1859,6 +1883,12 @@ FT_Error error = FT_Err_Ok; + if ( !stroker ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + if ( stroker->subpath_open ) { FT_StrokeBorder right = stroker->borders; @@ -1955,7 +1985,7 @@ if ( !stroker || border > 1 ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -1984,6 +2014,12 @@ FT_Error error; + if ( !stroker ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + error = ft_stroke_border_get_counts( stroker->borders + 0, &count1, &count2 ); if ( error ) @@ -1998,8 +2034,12 @@ num_contours = count2 + count4; Exit: - *anum_points = num_points; - *anum_contours = num_contours; + if ( anum_points ) + *anum_points = num_points; + + if ( anum_contours ) + *anum_contours = num_contours; + return error; } @@ -2011,6 +2051,9 @@ FT_StrokerBorder border, FT_Outline* outline ) { + if ( !stroker || !outline ) + return; + if ( border == FT_STROKER_BORDER_LEFT || border == FT_STROKER_BORDER_RIGHT ) { @@ -2060,8 +2103,11 @@ FT_Int tag; /* current point's state */ - if ( !outline || !stroker ) - return FT_Err_Invalid_Argument; + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !stroker ) + return FT_THROW( Invalid_Argument ); FT_Stroker_Rewind( stroker ); @@ -2239,7 +2285,7 @@ return error; Invalid_Outline: - return FT_Err_Invalid_Outline; + return FT_THROW( Invalid_Outline ); } @@ -2259,18 +2305,20 @@ FT_Stroker stroker, FT_Bool destroy ) { - FT_Error error = FT_Err_Invalid_Argument; - FT_Glyph glyph = NULL; + FT_Error error = FT_ERR( Invalid_Argument ); + FT_Glyph glyph = NULL; + + /* for FT_OUTLINE_GLYPH_CLASS_GET (in PIC mode) */ FT_Library library = stroker->library; FT_UNUSED( library ); - if ( pglyph == NULL ) + if ( !pglyph ) goto Exit; glyph = *pglyph; - if ( glyph == NULL || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET ) + if ( !glyph || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET ) goto Exit; { @@ -2294,7 +2342,7 @@ if ( error ) goto Fail; - (void)FT_Stroker_GetCounts( stroker, &num_points, &num_contours ); + FT_Stroker_GetCounts( stroker, &num_points, &num_contours ); FT_Outline_Done( glyph->library, outline ); @@ -2335,18 +2383,20 @@ FT_Bool inside, FT_Bool destroy ) { - FT_Error error = FT_Err_Invalid_Argument; - FT_Glyph glyph = NULL; + FT_Error error = FT_ERR( Invalid_Argument ); + FT_Glyph glyph = NULL; + + /* for FT_OUTLINE_GLYPH_CLASS_GET (in PIC mode) */ FT_Library library = stroker->library; FT_UNUSED( library ); - if ( pglyph == NULL ) + if ( !pglyph ) goto Exit; glyph = *pglyph; - if ( glyph == NULL || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET ) + if ( !glyph || glyph->clazz != FT_OUTLINE_GLYPH_CLASS_GET ) goto Exit; { @@ -2380,8 +2430,8 @@ if ( error ) goto Fail; - (void)FT_Stroker_GetBorderCounts( stroker, border, - &num_points, &num_contours ); + FT_Stroker_GetBorderCounts( stroker, border, + &num_points, &num_contours ); FT_Outline_Done( glyph->library, outline ); diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index d4ec0da..0567bd5 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -4,7 +4,7 @@ /* */ /* FreeType synthesizing code for emboldening and slanting (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2010 by */ +/* Copyright 2000-2006, 2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -33,6 +33,7 @@ #undef FT_COMPONENT #define FT_COMPONENT trace_synth + /*************************************************************************/ /*************************************************************************/ /**** ****/ @@ -47,8 +48,13 @@ FT_GlyphSlot_Oblique( FT_GlyphSlot slot ) { FT_Matrix transform; - FT_Outline* outline = &slot->outline; + FT_Outline* outline; + + + if ( !slot ) + return; + outline = &slot->outline; /* only oblique outline glyphs */ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE ) @@ -62,7 +68,7 @@ transform.xx = 0x10000L; transform.yx = 0x00000L; - transform.xy = 0x06000L; + transform.xy = 0x0366AL; transform.yy = 0x10000L; FT_Outline_Transform( outline, &transform ); @@ -72,7 +78,7 @@ /*************************************************************************/ /*************************************************************************/ /**** ****/ - /**** EXPERIMENTAL EMBOLDENING/OUTLINING SUPPORT ****/ + /**** EXPERIMENTAL EMBOLDENING SUPPORT ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ @@ -83,12 +89,18 @@ FT_EXPORT_DEF( void ) FT_GlyphSlot_Embolden( FT_GlyphSlot slot ) { - FT_Library library = slot->library; - FT_Face face = slot->face; + FT_Library library; + FT_Face face; FT_Error error; FT_Pos xstr, ystr; + if ( !slot ) + return; + + library = slot->library; + face = slot->face; + if ( slot->format != FT_GLYPH_FORMAT_OUTLINE && slot->format != FT_GLYPH_FORMAT_BITMAP ) return; @@ -99,15 +111,8 @@ ystr = xstr; if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) - { - /* ignore error */ - (void)FT_Outline_Embolden( &slot->outline, xstr ); + FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); - /* this is more than enough for most glyphs; if you need accurate */ - /* values, you have to call FT_Outline_Get_CBox */ - xstr = xstr * 2; - ystr = xstr; - } else /* slot->format == FT_GLYPH_FORMAT_BITMAP */ { /* round to full pixels */ @@ -145,11 +150,9 @@ slot->metrics.width += xstr; slot->metrics.height += ystr; - slot->metrics.horiBearingY += ystr; slot->metrics.horiAdvance += xstr; - slot->metrics.vertBearingX -= xstr / 2; - slot->metrics.vertBearingY += ystr; slot->metrics.vertAdvance += ystr; + slot->metrics.horiBearingY += ystr; /* XXX: 16-bit overflow case must be excluded before here */ if ( slot->format == FT_GLYPH_FORMAT_BITMAP ) diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c index 7e203be..2c6ddac 100644 --- a/src/base/ftsystem.c +++ b/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* ANSI-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2002, 2006, 2008-2011 by */ +/* Copyright 1996-2002, 2006, 2008-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -228,7 +228,7 @@ if ( !stream ) - return FT_Err_Invalid_Stream_Handle; + return FT_THROW( Invalid_Stream_Handle ); stream->descriptor.pointer = NULL; stream->pathname.pointer = (char*)filepathname; @@ -243,7 +243,7 @@ FT_ERROR(( "FT_Stream_Open:" " could not open `%s'\n", filepathname )); - return FT_Err_Cannot_Open_Resource; + return FT_THROW( Cannot_Open_Resource ); } ft_fseek( file, 0, SEEK_END ); @@ -253,7 +253,7 @@ FT_ERROR(( "FT_Stream_Open:" )); FT_ERROR(( " opened `%s' but zero-sized\n", filepathname )); ft_fclose( file ); - return FT_Err_Cannot_Open_Stream; + return FT_THROW( Cannot_Open_Stream ); } ft_fseek( file, 0, SEEK_SET ); diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c index fdf433a..22b7ecf 100644 --- a/src/base/fttrigon.c +++ b/src/base/fttrigon.c @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (body). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 2001-2005, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -15,169 +15,146 @@ /* */ /***************************************************************************/ + /*************************************************************************/ + /* */ + /* This is a fixed-point CORDIC implementation of trigonometric */ + /* functions as well as transformations between Cartesian and polar */ + /* coordinates. The angles are represented as 16.16 fixed-point values */ + /* in degrees, i.e., the angular resolution is 2^-16 degrees. Note that */ + /* only vectors longer than 2^16*180/pi (or at least 22 bits) on a */ + /* discrete Cartesian grid can have the same or better angular */ + /* resolution. Therefore, to maintain this precision, some functions */ + /* require an interim upscaling of the vectors, whereas others operate */ + /* with 24-bit long vectors directly. */ + /* */ + /*************************************************************************/ #include <ft2build.h> #include FT_INTERNAL_OBJECTS_H +#include FT_INTERNAL_CALC_H #include FT_TRIGONOMETRY_H - /* the following is 0.2715717684432231 * 2^30 */ -#define FT_TRIG_COSCALE 0x11616E8EUL + /* the Cordic shrink factor 0.858785336480436 * 2^32 */ +#define FT_TRIG_SCALE 0xDBD95B16UL + + /* the highest bit in overflow-safe vector components, */ + /* MSB of 0.858785336480436 * sqrt(0.5) * 2^30 */ +#define FT_TRIG_SAFE_MSB 29 /* this table was generated for FT_PI = 180L << 16, i.e. degrees */ #define FT_TRIG_MAX_ITERS 23 - static const FT_Fixed - ft_trig_arctan_table[24] = + static const FT_Angle + ft_trig_arctan_table[] = { - 4157273L, 2949120L, 1740967L, 919879L, 466945L, 234379L, 117304L, - 58666L, 29335L, 14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L, + 1740967L, 919879L, 466945L, 234379L, 117304L, 58666L, 29335L, + 14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L, 57L, 29L, 14L, 7L, 4L, 2L, 1L }; - /* the Cordic shrink factor, multiplied by 2^32 */ -#define FT_TRIG_SCALE 1166391785UL /* 0x4585BA38UL */ - -#ifdef FT_CONFIG_HAS_INT64 +#ifdef FT_LONG64 /* multiply a given value by the CORDIC shrink factor */ static FT_Fixed ft_trig_downscale( FT_Fixed val ) { - FT_Fixed s; - FT_Int64 v; + FT_Int s = 1; - s = val; - val = ( val >= 0 ) ? val : -val; + if ( val < 0 ) + { + val = -val; + s = -1; + } - v = ( val * (FT_Int64)FT_TRIG_SCALE ) + 0x100000000UL; - val = (FT_Fixed)( v >> 32 ); + /* 0x40000000 comes from regression analysis between true */ + /* and CORDIC hypotenuse, so it minimizes the error */ + val = (FT_Fixed)( ( (FT_Int64)val * FT_TRIG_SCALE + 0x40000000UL ) >> 32 ); - return ( s >= 0 ) ? val : -val; + return s < 0 ? -val : val; } -#else /* !FT_CONFIG_HAS_INT64 */ +#else /* !FT_LONG64 */ /* multiply a given value by the CORDIC shrink factor */ static FT_Fixed ft_trig_downscale( FT_Fixed val ) { - FT_Fixed s; - FT_UInt32 v1, v2, k1, k2, hi, lo1, lo2, lo3; + FT_Int s = 1; + FT_UInt32 lo1, hi1, lo2, hi2, lo, hi, i1, i2; + + if ( val < 0 ) + { + val = -val; + s = -1; + } + + lo1 = val & 0x0000FFFFU; + hi1 = val >> 16; + lo2 = FT_TRIG_SCALE & 0x0000FFFFU; + hi2 = FT_TRIG_SCALE >> 16; - s = val; - val = ( val >= 0 ) ? val : -val; + lo = lo1 * lo2; + i1 = lo1 * hi2; + i2 = lo2 * hi1; + hi = hi1 * hi2; - v1 = (FT_UInt32)val >> 16; - v2 = (FT_UInt32)(val & 0xFFFFL); + /* Check carry overflow of i1 + i2 */ + i1 += i2; + hi += (FT_UInt32)( i1 < i2 ) << 16; - k1 = (FT_UInt32)FT_TRIG_SCALE >> 16; /* constant */ - k2 = (FT_UInt32)(FT_TRIG_SCALE & 0xFFFFL); /* constant */ + hi += i1 >> 16; + i1 = i1 << 16; - hi = k1 * v1; - lo1 = k1 * v2 + k2 * v1; /* can't overflow */ + /* Check carry overflow of i1 + lo */ + lo += i1; + hi += ( lo < i1 ); - lo2 = ( k2 * v2 ) >> 16; - lo3 = ( lo1 >= lo2 ) ? lo1 : lo2; - lo1 += lo2; + /* 0x40000000 comes from regression analysis between true */ + /* and CORDIC hypotenuse, so it minimizes the error */ - hi += lo1 >> 16; - if ( lo1 < lo3 ) - hi += (FT_UInt32)0x10000UL; + /* Check carry overflow of lo + 0x40000000 */ + lo += 0x40000000UL; + hi += ( lo < 0x40000000UL ); val = (FT_Fixed)hi; - return ( s >= 0 ) ? val : -val; + return s < 0 ? -val : val; } -#endif /* !FT_CONFIG_HAS_INT64 */ +#endif /* !FT_LONG64 */ + /* undefined and never called for zero vector */ static FT_Int ft_trig_prenorm( FT_Vector* vec ) { - FT_Fixed x, y, z; - FT_Int shift; + FT_Pos x, y; + FT_Int shift; x = vec->x; y = vec->y; - z = ( ( x >= 0 ) ? x : - x ) | ( (y >= 0) ? y : -y ); - shift = 0; - -#if 1 - /* determine msb bit index in `shift' */ - if ( z >= ( 1L << 16 ) ) - { - z >>= 16; - shift += 16; - } - if ( z >= ( 1L << 8 ) ) - { - z >>= 8; - shift += 8; - } - if ( z >= ( 1L << 4 ) ) - { - z >>= 4; - shift += 4; - } - if ( z >= ( 1L << 2 ) ) - { - z >>= 2; - shift += 2; - } - if ( z >= ( 1L << 1 ) ) - { - z >>= 1; - shift += 1; - } + shift = FT_MSB( FT_ABS( x ) | FT_ABS( y ) ); - if ( shift <= 27 ) + if ( shift <= FT_TRIG_SAFE_MSB ) { - shift = 27 - shift; - vec->x = x << shift; - vec->y = y << shift; + shift = FT_TRIG_SAFE_MSB - shift; + vec->x = (FT_Pos)( (FT_ULong)x << shift ); + vec->y = (FT_Pos)( (FT_ULong)y << shift ); } else { - shift -= 27; + shift -= FT_TRIG_SAFE_MSB; vec->x = x >> shift; vec->y = y >> shift; shift = -shift; } -#else /* 0 */ - - if ( z < ( 1L << 27 ) ) - { - do - { - shift++; - z <<= 1; - } while ( z < ( 1L << 27 ) ); - vec->x = x << shift; - vec->y = y << shift; - } - else if ( z > ( 1L << 28 ) ) - { - do - { - shift++; - z >>= 1; - } while ( z > ( 1L << 28 ) ); - - vec->x = x >> shift; - vec->y = y >> shift; - shift = -shift; - } - -#endif /* 0 */ - return shift; } @@ -187,65 +164,50 @@ FT_Angle theta ) { FT_Int i; - FT_Fixed x, y, xtemp; - const FT_Fixed *arctanptr; + FT_Fixed x, y, xtemp, b; + const FT_Angle *arctanptr; x = vec->x; y = vec->y; - /* Get angle between -90 and 90 degrees */ - while ( theta <= -FT_ANGLE_PI2 ) + /* Rotate inside [-PI/4,PI/4] sector */ + while ( theta < -FT_ANGLE_PI4 ) { - x = -x; - y = -y; - theta += FT_ANGLE_PI; + xtemp = y; + y = -x; + x = xtemp; + theta += FT_ANGLE_PI2; } - while ( theta > FT_ANGLE_PI2 ) + while ( theta > FT_ANGLE_PI4 ) { - x = -x; - y = -y; - theta -= FT_ANGLE_PI; + xtemp = -y; + y = x; + x = xtemp; + theta -= FT_ANGLE_PI2; } - /* Initial pseudorotation, with left shift */ arctanptr = ft_trig_arctan_table; - if ( theta < 0 ) - { - xtemp = x + ( y << 1 ); - y = y - ( x << 1 ); - x = xtemp; - theta += *arctanptr++; - } - else - { - xtemp = x - ( y << 1 ); - y = y + ( x << 1 ); - x = xtemp; - theta -= *arctanptr++; - } - - /* Subsequent pseudorotations, with right shifts */ - i = 0; - do + /* Pseudorotations, with right shifts */ + for ( i = 1, b = 1; i < FT_TRIG_MAX_ITERS; b <<= 1, i++ ) { if ( theta < 0 ) { - xtemp = x + ( y >> i ); - y = y - ( x >> i ); + xtemp = x + ( ( y + b ) >> i ); + y = y - ( ( x + b ) >> i ); x = xtemp; theta += *arctanptr++; } else { - xtemp = x - ( y >> i ); - y = y + ( x >> i ); + xtemp = x - ( ( y + b ) >> i ); + y = y + ( ( x + b ) >> i ); x = xtemp; theta -= *arctanptr++; } - } while ( ++i < FT_TRIG_MAX_ITERS ); + } vec->x = x; vec->y = y; @@ -255,72 +217,74 @@ static void ft_trig_pseudo_polarize( FT_Vector* vec ) { - FT_Fixed theta; - FT_Fixed yi, i; - FT_Fixed x, y; - const FT_Fixed *arctanptr; + FT_Angle theta; + FT_Int i; + FT_Fixed x, y, xtemp, b; + const FT_Angle *arctanptr; x = vec->x; y = vec->y; - /* Get the vector into the right half plane */ - theta = 0; - if ( x < 0 ) - { - x = -x; - y = -y; - theta = 2 * FT_ANGLE_PI2; - } - - if ( y > 0 ) - theta = - theta; - - arctanptr = ft_trig_arctan_table; - - if ( y < 0 ) + /* Get the vector into [-PI/4,PI/4] sector */ + if ( y > x ) { - /* Rotate positive */ - yi = y + ( x << 1 ); - x = x - ( y << 1 ); - y = yi; - theta -= *arctanptr++; /* Subtract angle */ + if ( y > -x ) + { + theta = FT_ANGLE_PI2; + xtemp = y; + y = -x; + x = xtemp; + } + else + { + theta = y > 0 ? FT_ANGLE_PI : -FT_ANGLE_PI; + x = -x; + y = -y; + } } else { - /* Rotate negative */ - yi = y - ( x << 1 ); - x = x + ( y << 1 ); - y = yi; - theta += *arctanptr++; /* Add angle */ + if ( y < -x ) + { + theta = -FT_ANGLE_PI2; + xtemp = -y; + y = x; + x = xtemp; + } + else + { + theta = 0; + } } - i = 0; - do + arctanptr = ft_trig_arctan_table; + + /* Pseudorotations, with right shifts */ + for ( i = 1, b = 1; i < FT_TRIG_MAX_ITERS; b <<= 1, i++ ) { - if ( y < 0 ) + if ( y > 0 ) { - /* Rotate positive */ - yi = y + ( x >> i ); - x = x - ( y >> i ); - y = yi; - theta -= *arctanptr++; + xtemp = x + ( ( y + b ) >> i ); + y = y - ( ( x + b ) >> i ); + x = xtemp; + theta += *arctanptr++; } else { - /* Rotate negative */ - yi = y - ( x >> i ); - x = x + ( y >> i ); - y = yi; - theta += *arctanptr++; + xtemp = x - ( ( y + b ) >> i ); + y = y + ( ( x + b ) >> i ); + x = xtemp; + theta -= *arctanptr++; } - } while ( ++i < FT_TRIG_MAX_ITERS ); + } - /* round theta */ + /* round theta to acknowledge its error that mostly comes */ + /* from accumulated rounding errors in the arctan table */ if ( theta >= 0 ) - theta = FT_PAD_ROUND( theta, 32 ); + theta = FT_PAD_ROUND( theta, 16 ); else - theta = -FT_PAD_ROUND( -theta, 32 ); + theta = -FT_PAD_ROUND( -theta, 16 ); vec->x = x; vec->y = theta; @@ -335,11 +299,11 @@ FT_Vector v; - v.x = FT_TRIG_COSCALE >> 2; + v.x = FT_TRIG_SCALE >> 8; v.y = 0; ft_trig_pseudo_rotate( &v, angle ); - return v.x / ( 1 << 12 ); + return ( v.x + 0x80L ) >> 8; } @@ -360,7 +324,7 @@ FT_Vector v; - v.x = FT_TRIG_COSCALE >> 2; + v.x = FT_TRIG_SCALE >> 8; v.y = 0; ft_trig_pseudo_rotate( &v, angle ); @@ -395,11 +359,14 @@ FT_Vector_Unit( FT_Vector* vec, FT_Angle angle ) { - vec->x = FT_TRIG_COSCALE >> 2; + if ( !vec ) + return; + + vec->x = FT_TRIG_SCALE >> 8; vec->y = 0; ft_trig_pseudo_rotate( vec, angle ); - vec->x >>= 12; - vec->y >>= 12; + vec->x = ( vec->x + 0x80L ) >> 8; + vec->y = ( vec->y + 0x80L ) >> 8; } @@ -421,6 +388,9 @@ FT_Vector v; + if ( !vec ) + return; + v.x = vec->x; v.y = vec->y; @@ -442,8 +412,8 @@ else { shift = -shift; - vec->x = v.x << shift; - vec->y = v.y << shift; + vec->x = (FT_Pos)( (FT_ULong)v.x << shift ); + vec->y = (FT_Pos)( (FT_ULong)v.y << shift ); } } } @@ -458,16 +428,19 @@ FT_Vector v; + if ( !vec ) + return 0; + v = *vec; /* handle trivial cases */ if ( v.x == 0 ) { - return ( v.y >= 0 ) ? v.y : -v.y; + return FT_ABS( v.y ); } else if ( v.y == 0 ) { - return ( v.x >= 0 ) ? v.x : -v.x; + return FT_ABS( v.x ); } /* general case */ @@ -479,7 +452,7 @@ if ( shift > 0 ) return ( v.x + ( 1 << ( shift - 1 ) ) ) >> shift; - return v.x << -shift; + return (FT_Fixed)( (FT_UInt32)v.x << -shift ); } @@ -494,6 +467,9 @@ FT_Vector v; + if ( !vec || !length || !angle ) + return; + v = *vec; if ( v.x == 0 && v.y == 0 ) @@ -504,7 +480,8 @@ v.x = ft_trig_downscale( v.x ); - *length = ( shift >= 0 ) ? ( v.x >> shift ) : ( v.x << -shift ); + *length = shift >= 0 ? ( v.x >> shift ) + : (FT_Fixed)( (FT_UInt32)v.x << -shift ); *angle = v.y; } @@ -516,6 +493,9 @@ FT_Fixed length, FT_Angle angle ) { + if ( !vec ) + return; + vec->x = length; vec->y = 0; diff --git a/src/base/fttype1.c b/src/base/fttype1.c index 885dba5..47af19a 100644 --- a/src/base/fttype1.c +++ b/src/base/fttype1.c @@ -4,7 +4,7 @@ /* */ /* FreeType utility file for PS names support (body). */ /* */ -/* Copyright 2002-2004, 2011 by */ +/* Copyright 2002-2004, 2011, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_OBJECTS_H #include FT_INTERNAL_SERVICE_H #include FT_SERVICE_POSTSCRIPT_INFO_H @@ -28,19 +29,22 @@ FT_Get_PS_Font_Info( FT_Face face, PS_FontInfoRec* afont_info ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error; + FT_Service_PsInfo service; - if ( face ) - { - FT_Service_PsInfo service = NULL; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + if ( !afont_info ) + return FT_THROW( Invalid_Argument ); - FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); + FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); - if ( service && service->ps_get_font_info ) - error = service->ps_get_font_info( face, afont_info ); - } + if ( service && service->ps_get_font_info ) + error = service->ps_get_font_info( face, afont_info ); + else + error = FT_THROW( Invalid_Argument ); return error; } @@ -51,8 +55,8 @@ FT_EXPORT_DEF( FT_Int ) FT_Has_PS_Glyph_Names( FT_Face face ) { - FT_Int result = 0; - FT_Service_PsInfo service = NULL; + FT_Int result = 0; + FT_Service_PsInfo service; if ( face ) @@ -73,19 +77,22 @@ FT_Get_PS_Font_Private( FT_Face face, PS_PrivateRec* afont_private ) { - FT_Error error = FT_Err_Invalid_Argument; + FT_Error error; + FT_Service_PsInfo service; - if ( face ) - { - FT_Service_PsInfo service = NULL; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); + if ( !afont_private ) + return FT_THROW( Invalid_Argument ); - FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); + FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); - if ( service && service->ps_get_font_private ) - error = service->ps_get_font_private( face, afont_private ); - } + if ( service && service->ps_get_font_private ) + error = service->ps_get_font_private( face, afont_private ); + else + error = FT_THROW( Invalid_Argument ); return error; } diff --git a/src/base/ftutil.c b/src/base/ftutil.c index 5f77be5..56e2800 100644 --- a/src/base/ftutil.c +++ b/src/base/ftutil.c @@ -4,7 +4,7 @@ /* */ /* FreeType utility file for memory and list management (body). */ /* */ -/* Copyright 2002, 2004, 2005, 2006, 2007 by */ +/* Copyright 2002, 2004-2007, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -75,12 +75,12 @@ { block = memory->alloc( memory, size ); if ( block == NULL ) - error = FT_Err_Out_Of_Memory; + error = FT_THROW( Out_Of_Memory ); } else if ( size < 0 ) { /* may help catch/prevent security issues */ - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); } *p_error = error; @@ -98,6 +98,7 @@ { FT_Error error = FT_Err_Ok; + block = ft_mem_qrealloc( memory, item_size, cur_count, new_count, block, &error ); if ( !error && new_count > cur_count ) @@ -127,7 +128,7 @@ if ( cur_count < 0 || new_count < 0 || item_size < 0 ) { /* may help catch/prevent nasty security issues */ - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); } else if ( new_count == 0 || item_size == 0 ) { @@ -136,7 +137,7 @@ } else if ( new_count > FT_INT_MAX/item_size ) { - error = FT_Err_Array_Too_Large; + error = FT_THROW( Array_Too_Large ); } else if ( cur_count == 0 ) { @@ -153,7 +154,7 @@ block2 = memory->realloc( memory, cur_size, new_size, block ); if ( block2 == NULL ) - error = FT_Err_Out_Of_Memory; + error = FT_THROW( Out_Of_Memory ); else block = block2; } @@ -244,6 +245,9 @@ FT_ListNode cur; + if ( !list ) + return NULL; + cur = list->head; while ( cur ) { @@ -253,7 +257,7 @@ cur = cur->next; } - return (FT_ListNode)0; + return NULL; } @@ -263,8 +267,13 @@ FT_List_Add( FT_List list, FT_ListNode node ) { - FT_ListNode before = list->tail; + FT_ListNode before; + + + if ( !list || !node ) + return; + before = list->tail; node->next = 0; node->prev = before; @@ -284,8 +293,13 @@ FT_List_Insert( FT_List list, FT_ListNode node ) { - FT_ListNode after = list->head; + FT_ListNode after; + + + if ( !list || !node ) + return; + after = list->head; node->next = after; node->prev = 0; @@ -308,6 +322,9 @@ FT_ListNode before, after; + if ( !list || !node ) + return; + before = node->prev; after = node->next; @@ -332,6 +349,9 @@ FT_ListNode before, after; + if ( !list || !node ) + return; + before = node->prev; after = node->next; @@ -356,14 +376,19 @@ /* documentation is in ftlist.h */ FT_EXPORT_DEF( FT_Error ) - FT_List_Iterate( FT_List list, - FT_List_Iterator iterator, - void* user ) + FT_List_Iterate( FT_List list, + FT_List_Iterator iterator, + void* user ) { - FT_ListNode cur = list->head; + FT_ListNode cur; FT_Error error = FT_Err_Ok; + if ( !list || !iterator ) + return FT_THROW( Invalid_Argument ); + + cur = list->head; + while ( cur ) { FT_ListNode next = cur->next; @@ -391,6 +416,9 @@ FT_ListNode cur; + if ( !list || !memory ) + return; + cur = list->head; while ( cur ) { @@ -410,92 +438,4 @@ } - FT_BASE_DEF( FT_UInt32 ) - ft_highpow2( FT_UInt32 value ) - { - FT_UInt32 value2; - - - /* - * We simply clear the lowest bit in each iteration. When - * we reach 0, we know that the previous value was our result. - */ - for ( ;; ) - { - value2 = value & (value - 1); /* clear lowest bit */ - if ( value2 == 0 ) - break; - - value = value2; - } - return value; - } - - -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_BASE_DEF( FT_Error ) - FT_Alloc( FT_Memory memory, - FT_Long size, - void* *P ) - { - FT_Error error; - - - (void)FT_ALLOC( *P, size ); - return error; - } - - - FT_BASE_DEF( FT_Error ) - FT_QAlloc( FT_Memory memory, - FT_Long size, - void* *p ) - { - FT_Error error; - - - (void)FT_QALLOC( *p, size ); - return error; - } - - - FT_BASE_DEF( FT_Error ) - FT_Realloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void* *P ) - { - FT_Error error; - - - (void)FT_REALLOC( *P, current, size ); - return error; - } - - - FT_BASE_DEF( FT_Error ) - FT_QRealloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void* *p ) - { - FT_Error error; - - - (void)FT_QREALLOC( *p, current, size ); - return error; - } - - - FT_BASE_DEF( void ) - FT_Free( FT_Memory memory, - void* *P ) - { - if ( *P ) - FT_MEM_FREE( *P ); - } - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - /* END */ diff --git a/src/base/ftwinfnt.c b/src/base/ftwinfnt.c index bc2e90e..8e337fb 100644 --- a/src/base/ftwinfnt.c +++ b/src/base/ftwinfnt.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing Windows FNT specific info (body). */ /* */ -/* Copyright 2003, 2004 by */ +/* Copyright 2003, 2004, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include FT_WINFONTS_H #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_WINFNT_H @@ -32,17 +33,18 @@ FT_Error error; - error = FT_Err_Invalid_Argument; + if ( !face ) + return FT_THROW( Invalid_Face_Handle ); - if ( face != NULL ) - { - FT_FACE_LOOKUP_SERVICE( face, service, WINFNT ); + if ( !header ) + return FT_THROW( Invalid_Argument ); - if ( service != NULL ) - { - error = service->get_header( face, header ); - } - } + FT_FACE_LOOKUP_SERVICE( face, service, WINFNT ); + + if ( service ) + error = service->get_header( face, header ); + else + error = FT_THROW( Invalid_Argument ); return error; } diff --git a/src/base/md5.c b/src/base/md5.c new file mode 100644 index 0000000..52d96ac --- /dev/null +++ b/src/base/md5.c @@ -0,0 +1,296 @@ +/* + * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. + * MD5 Message-Digest Algorithm (RFC 1321). + * + * Homepage: + * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 + * + * Author: + * Alexander Peslyak, better known as Solar Designer <solar at openwall.com> + * + * This software was written by Alexander Peslyak in 2001. No copyright is + * claimed, and the software is hereby placed in the public domain. + * In case this attempt to disclaim copyright and place the software in the + * public domain is deemed null and void, then the software is + * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * (This is a heavily cut-down "BSD license".) + * + * This differs from Colin Plumb's older public domain implementation in that + * no exactly 32-bit integer data type is required (any 32-bit or wider + * unsigned integer data type will do), there's no compile-time endianness + * configuration, and the function prototypes match OpenSSL's. No code from + * Colin Plumb's implementation has been reused; this comment merely compares + * the properties of the two independent implementations. + * + * The primary goals of this implementation are portability and ease of use. + * It is meant to be fast, but not as fast as possible. Some known + * optimizations are not included to reduce source code size and avoid + * compile-time configuration. + */ + +#ifndef HAVE_OPENSSL + +#include <string.h> + +#include "md5.h" + +/* + * The basic MD5 functions. + * + * F and G are optimized compared to their RFC 1321 definitions for + * architectures that lack an AND-NOT instruction, just like in Colin Plumb's + * implementation. + */ +#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) +#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) +#define H(x, y, z) (((x) ^ (y)) ^ (z)) +#define H2(x, y, z) ((x) ^ ((y) ^ (z))) +#define I(x, y, z) ((y) ^ ((x) | ~(z))) + +/* + * The MD5 transformation for all four rounds. + */ +#define STEP(f, a, b, c, d, x, t, s) \ + (a) += f((b), (c), (d)) + (x) + (t); \ + (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ + (a) += (b); + +/* + * SET reads 4 input bytes in little-endian byte order and stores them + * in a properly aligned word in host byte order. + * + * The check for little-endian architectures that tolerate unaligned + * memory accesses is just an optimization. Nothing will break if it + * doesn't work. + */ +#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) +#define SET(n) \ + (*(MD5_u32plus *)&ptr[(n) * 4]) +#define GET(n) \ + SET(n) +#else +#define SET(n) \ + (ctx->block[(n)] = \ + (MD5_u32plus)ptr[(n) * 4] | \ + ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \ + ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \ + ((MD5_u32plus)ptr[(n) * 4 + 3] << 24)) +#define GET(n) \ + (ctx->block[(n)]) +#endif + +/* + * This processes one or more 64-byte data blocks, but does NOT update + * the bit counters. There are no alignment requirements. + */ +static const void *body(MD5_CTX *ctx, const void *data, unsigned long size) +{ + const unsigned char *ptr; + MD5_u32plus a, b, c, d; + MD5_u32plus saved_a, saved_b, saved_c, saved_d; + + ptr = (const unsigned char *)data; + + a = ctx->a; + b = ctx->b; + c = ctx->c; + d = ctx->d; + + do { + saved_a = a; + saved_b = b; + saved_c = c; + saved_d = d; + +/* Round 1 */ + STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7) + STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12) + STEP(F, c, d, a, b, SET(2), 0x242070db, 17) + STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22) + STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7) + STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12) + STEP(F, c, d, a, b, SET(6), 0xa8304613, 17) + STEP(F, b, c, d, a, SET(7), 0xfd469501, 22) + STEP(F, a, b, c, d, SET(8), 0x698098d8, 7) + STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12) + STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17) + STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22) + STEP(F, a, b, c, d, SET(12), 0x6b901122, 7) + STEP(F, d, a, b, c, SET(13), 0xfd987193, 12) + STEP(F, c, d, a, b, SET(14), 0xa679438e, 17) + STEP(F, b, c, d, a, SET(15), 0x49b40821, 22) + +/* Round 2 */ + STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5) + STEP(G, d, a, b, c, GET(6), 0xc040b340, 9) + STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14) + STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20) + STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5) + STEP(G, d, a, b, c, GET(10), 0x02441453, 9) + STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14) + STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20) + STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5) + STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9) + STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14) + STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20) + STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5) + STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9) + STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14) + STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20) + +/* Round 3 */ + STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4) + STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11) + STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16) + STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23) + STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4) + STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11) + STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16) + STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23) + STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4) + STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11) + STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16) + STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23) + STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4) + STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11) + STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16) + STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23) + +/* Round 4 */ + STEP(I, a, b, c, d, GET(0), 0xf4292244, 6) + STEP(I, d, a, b, c, GET(7), 0x432aff97, 10) + STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15) + STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21) + STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6) + STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10) + STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15) + STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21) + STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6) + STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10) + STEP(I, c, d, a, b, GET(6), 0xa3014314, 15) + STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21) + STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6) + STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10) + STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15) + STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21) + + a += saved_a; + b += saved_b; + c += saved_c; + d += saved_d; + + ptr += 64; + } while (size -= 64); + + ctx->a = a; + ctx->b = b; + ctx->c = c; + ctx->d = d; + + return ptr; +} + +void MD5_Init(MD5_CTX *ctx) +{ + ctx->a = 0x67452301; + ctx->b = 0xefcdab89; + ctx->c = 0x98badcfe; + ctx->d = 0x10325476; + + ctx->lo = 0; + ctx->hi = 0; +} + +void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size) +{ + MD5_u32plus saved_lo; + unsigned long used, available; + + saved_lo = ctx->lo; + if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) + ctx->hi++; + ctx->hi += size >> 29; + + used = saved_lo & 0x3f; + + if (used) { + available = 64 - used; + + if (size < available) { + memcpy(&ctx->buffer[used], data, size); + return; + } + + memcpy(&ctx->buffer[used], data, available); + data = (const unsigned char *)data + available; + size -= available; + body(ctx, ctx->buffer, 64); + } + + if (size >= 64) { + data = body(ctx, data, size & ~(unsigned long)0x3f); + size &= 0x3f; + } + + memcpy(ctx->buffer, data, size); +} + +void MD5_Final(unsigned char *result, MD5_CTX *ctx) +{ + unsigned long used, available; + + used = ctx->lo & 0x3f; + + ctx->buffer[used++] = 0x80; + + available = 64 - used; + + if (available < 8) { + memset(&ctx->buffer[used], 0, available); + body(ctx, ctx->buffer, 64); + used = 0; + available = 64; + } + + memset(&ctx->buffer[used], 0, available - 8); + + ctx->lo <<= 3; + ctx->buffer[56] = ctx->lo; + ctx->buffer[57] = ctx->lo >> 8; + ctx->buffer[58] = ctx->lo >> 16; + ctx->buffer[59] = ctx->lo >> 24; + ctx->buffer[60] = ctx->hi; + ctx->buffer[61] = ctx->hi >> 8; + ctx->buffer[62] = ctx->hi >> 16; + ctx->buffer[63] = ctx->hi >> 24; + + body(ctx, ctx->buffer, 64); + + result[0] = ctx->a; + result[1] = ctx->a >> 8; + result[2] = ctx->a >> 16; + result[3] = ctx->a >> 24; + result[4] = ctx->b; + result[5] = ctx->b >> 8; + result[6] = ctx->b >> 16; + result[7] = ctx->b >> 24; + result[8] = ctx->c; + result[9] = ctx->c >> 8; + result[10] = ctx->c >> 16; + result[11] = ctx->c >> 24; + result[12] = ctx->d; + result[13] = ctx->d >> 8; + result[14] = ctx->d >> 16; + result[15] = ctx->d >> 24; + + memset(ctx, 0, sizeof(*ctx)); +} + +#endif diff --git a/src/base/md5.h b/src/base/md5.h new file mode 100644 index 0000000..2da44bf --- /dev/null +++ b/src/base/md5.h @@ -0,0 +1,45 @@ +/* + * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. + * MD5 Message-Digest Algorithm (RFC 1321). + * + * Homepage: + * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 + * + * Author: + * Alexander Peslyak, better known as Solar Designer <solar at openwall.com> + * + * This software was written by Alexander Peslyak in 2001. No copyright is + * claimed, and the software is hereby placed in the public domain. + * In case this attempt to disclaim copyright and place the software in the + * public domain is deemed null and void, then the software is + * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See md5.c for more information. + */ + +#ifdef HAVE_OPENSSL +#include <openssl/md5.h> +#elif !defined(_MD5_H) +#define _MD5_H + +/* Any 32-bit or wider unsigned integer data type will do */ +typedef unsigned int MD5_u32plus; + +typedef struct { + MD5_u32plus lo, hi; + MD5_u32plus a, b, c, d; + unsigned char buffer[64]; + MD5_u32plus block[16]; +} MD5_CTX; + +extern void MD5_Init(MD5_CTX *ctx); +extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); +extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); + +#endif diff --git a/src/base/rules.mk b/src/base/rules.mk index 10f578a..cbd8107 100644 --- a/src/base/rules.mk +++ b/src/base/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by +# Copyright 1996-2000, 2002-2009, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -19,8 +19,8 @@ # BASE_OBJ_S: The single-object base layer. # BASE_OBJ_M: A list of all objects for a multiple-objects build. # BASE_EXT_OBJ: A list of base layer extensions, i.e., components found -# in `freetype/src/base' which are not compiled within the -# base layer proper. +# in `src/base' which are not compiled within the base +# layer proper. BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base) @@ -33,12 +33,14 @@ BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base) # All files listed here should be included in `ftbase.c' (for a `single' # build). # -BASE_SRC := $(BASE_DIR)/ftadvanc.c \ +BASE_SRC := $(BASE_DIR)/basepic.c \ + $(BASE_DIR)/ftadvanc.c \ $(BASE_DIR)/ftcalc.c \ $(BASE_DIR)/ftdbgmem.c \ $(BASE_DIR)/ftgloadr.c \ $(BASE_DIR)/ftobjs.c \ $(BASE_DIR)/ftoutln.c \ + $(BASE_DIR)/ftpic.c \ $(BASE_DIR)/ftrfork.c \ $(BASE_DIR)/ftsnames.c \ $(BASE_DIR)/ftstream.c \ @@ -50,7 +52,11 @@ ifneq ($(ftmac_c),) BASE_SRC += $(BASE_DIR)/$(ftmac_c) endif -BASE_H := $(BASE_DIR)/ftbase.h +# for simplicity, we also handle `md5.c' (which gets included by `ftobjs.h') +BASE_H := $(BASE_DIR)/basepic.h \ + $(BASE_DIR)/ftbase.h \ + $(BASE_DIR)/md5.c \ + $(BASE_DIR)/md5.h # Base layer `extensions' sources # diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c index 0edcc77..55a428c 100644 --- a/src/bdf/bdfdrivr.c +++ b/src/bdf/bdfdrivr.c @@ -2,7 +2,7 @@ FreeType font driver for bdf files - Copyright (C) 2001-2008, 2011 by + Copyright (C) 2001-2008, 2011, 2013, 2014 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy @@ -72,7 +72,7 @@ THE SOFTWARE. cmap->num_encodings = face->bdffont->glyphs_used; cmap->encodings = face->en_table; - return BDF_Err_Ok; + return FT_Err_Ok; } @@ -182,7 +182,7 @@ THE SOFTWARE. } - FT_CALLBACK_TABLE_DEF + static const FT_CMap_ClassRec bdf_cmap_class = { sizeof ( BDF_CMapRec ), @@ -198,7 +198,7 @@ THE SOFTWARE. static FT_Error bdf_interpret_style( BDF_Face bdf ) { - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Face face = FT_FACE( bdf ); FT_Memory memory = face->memory; bdf_font_t* font = bdf->bdffont; @@ -243,8 +243,6 @@ THE SOFTWARE. !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) strings[0] = (char *)(prop->value.atom); - len = 0; - for ( len = 0, nn = 0; nn < 4; nn++ ) { lengths[nn] = 0; @@ -342,7 +340,7 @@ THE SOFTWARE. FT_Int num_params, FT_Parameter* params ) { - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; BDF_Face face = (BDF_Face)bdfface; FT_Memory memory = FT_FACE_MEMORY( face ); @@ -351,7 +349,6 @@ THE SOFTWARE. FT_UNUSED( num_params ); FT_UNUSED( params ); - FT_UNUSED( face_index ); FT_TRACE2(( "BDF driver\n" )); @@ -365,7 +362,7 @@ THE SOFTWARE. options.font_spacing = BDF_PROPORTIONAL; error = bdf_load_font( stream, memory, &options, &font ); - if ( error == BDF_Err_Missing_Startfont_Field ) + if ( FT_ERR_EQ( error, Missing_Startfont_Field ) ) { FT_TRACE2(( " not a BDF file\n" )); goto Fail; @@ -375,6 +372,19 @@ THE SOFTWARE. /* we have a bdf font: let's construct the face object */ face->bdffont = font; + + /* BDF could not have multiple face in single font file. + * XXX: non-zero face_index is already invalid argument, but + * Type1, Type42 driver has a convention to return + * an invalid argument error when the font could be + * opened by the specified driver. + */ + if ( face_index > 0 ) { + FT_ERROR(( "BDF_Face_Init: invalid face index\n" )); + BDF_Face_Done( bdfface ); + return FT_THROW( Invalid_Argument ); + } + { bdf_property_t* prop = NULL; @@ -388,9 +398,10 @@ THE SOFTWARE. bdfface->num_faces = 1; bdfface->face_index = 0; - bdfface->face_flags = FT_FACE_FLAG_FIXED_SIZES | - FT_FACE_FLAG_HORIZONTAL | - FT_FACE_FLAG_FAST_GLYPHS; + + bdfface->face_flags |= FT_FACE_FLAG_FIXED_SIZES | + FT_FACE_FLAG_HORIZONTAL | + FT_FACE_FLAG_FAST_GLYPHS; prop = bdf_get_font_property( font, "SPACING" ); if ( prop && prop->format == BDF_ATOM && @@ -591,7 +602,7 @@ THE SOFTWARE. Fail: BDF_Face_Done( bdfface ); - return BDF_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); } @@ -608,7 +619,7 @@ THE SOFTWARE. size->metrics.descender = -bdffont->font_descent << 6; size->metrics.max_advance = bdffont->bbx.width << 6; - return BDF_Err_Ok; + return FT_Err_Ok; } @@ -619,7 +630,7 @@ THE SOFTWARE. FT_Face face = size->face; FT_Bitmap_Size* bsize = face->available_sizes; bdf_font_t* bdffont = ( (BDF_Face)face )->bdffont; - FT_Error error = BDF_Err_Invalid_Pixel_Size; + FT_Error error = FT_ERR( Invalid_Pixel_Size ); FT_Long height; @@ -630,17 +641,17 @@ THE SOFTWARE. { case FT_SIZE_REQUEST_TYPE_NOMINAL: if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) ) - error = BDF_Err_Ok; + error = FT_Err_Ok; break; case FT_SIZE_REQUEST_TYPE_REAL_DIM: if ( height == ( bdffont->font_ascent + bdffont->font_descent ) ) - error = BDF_Err_Ok; + error = FT_Err_Ok; break; default: - error = BDF_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); break; } @@ -660,7 +671,7 @@ THE SOFTWARE. { BDF_Face bdf = (BDF_Face)FT_SIZE_FACE( size ); FT_Face face = FT_FACE( bdf ); - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; bdf_glyph_t glyph; int bpp = bdf->bdffont->bpp; @@ -668,12 +679,20 @@ THE SOFTWARE. FT_UNUSED( load_flags ); - if ( !face || glyph_index >= (FT_UInt)face->num_glyphs ) + if ( !face ) { - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } + if ( glyph_index >= (FT_UInt)face->num_glyphs ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + FT_TRACE1(( "BDF_Glyph_Load: glyph index %d\n", glyph_index )); + /* index 0 is the undefined glyph */ if ( glyph_index == 0 ) glyph_index = bdf->default_glyph; @@ -786,7 +805,7 @@ THE SOFTWARE. } Fail: - return BDF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } @@ -864,10 +883,6 @@ THE SOFTWARE. 0, /* FT_Slot_InitFunc */ 0, /* FT_Slot_DoneFunc */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif BDF_Glyph_Load, 0, /* FT_Face_GetKerningFunc */ diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index b7b6857..abcfdee 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -1,6 +1,6 @@ /* * Copyright 2000 Computing Research Labs, New Mexico State University - * Copyright 2001-2012 + * Copyright 2001-2014 * Francesco Zappa Nardelli * * Permission is hereby granted, free of charge, to any person obtaining a @@ -169,6 +169,18 @@ sizeof ( _bdf_properties[0] ); + /* An auxiliary macro to parse properties, to be used in conditionals. */ + /* It behaves like `strncmp' but also tests the following character */ + /* whether it is a whitespace or NULL. */ + /* `property' is a constant string of length `n' to compare with. */ +#define _bdf_strncmp( name, property, n ) \ + ( ft_strncmp( name, property, n ) || \ + !( name[n] == ' ' || \ + name[n] == '\0' || \ + name[n] == '\n' || \ + name[n] == '\r' || \ + name[n] == '\t' ) ) + /* Auto correction messages. */ #define ACMSG1 "FONT_ASCENT property missing. " \ "Added `FONT_ASCENT %hd'.\n" @@ -254,7 +266,7 @@ { hashnode* obp = ht->table, *bp, *nbp; int i, sz = ht->size; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; ht->size <<= 1; @@ -282,8 +294,8 @@ hash_init( hashtable* ht, FT_Memory memory ) { - int sz = INITIAL_HT_SIZE; - FT_Error error = BDF_Err_Ok; + int sz = INITIAL_HT_SIZE; + FT_Error error = FT_Err_Ok; ht->size = sz; @@ -322,8 +334,9 @@ hashtable* ht, FT_Memory memory ) { - hashnode nn, *bp = hash_bucket( key, ht ); - FT_Error error = BDF_Err_Ok; + hashnode nn; + hashnode* bp = hash_bucket( key, ht ); + FT_Error error = FT_Err_Ok; nn = *bp; @@ -456,7 +469,7 @@ _bdf_list_ensure( _bdf_list_t* list, unsigned long num_items ) /* same as _bdf_list_t.used */ { - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; if ( num_items > list->size ) @@ -469,7 +482,7 @@ if ( oldsize == bigsize ) { - error = BDF_Err_Out_Of_Memory; + error = FT_THROW( Out_Of_Memory ); goto Exit; } else if ( newsize < oldsize || newsize > bigsize ) @@ -519,7 +532,7 @@ unsigned long *alen ) { unsigned long i, j; - char *fp, *dp; + char* dp; *alen = 0; @@ -530,7 +543,9 @@ dp = list->field[0]; for ( i = j = 0; i < list->used; i++ ) { - fp = list->field[i]; + char* fp = list->field[i]; + + while ( *fp ) dp[j++] = *fp++; @@ -558,7 +573,7 @@ int mult, final_empty; char *sp, *ep, *end; char seps[32]; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; /* Initialize the list. */ @@ -569,6 +584,7 @@ list->field[1] = (char*)empty; list->field[2] = (char*)empty; list->field[3] = (char*)empty; + list->field[4] = (char*)empty; } /* If the line is empty, then simply return. */ @@ -580,7 +596,7 @@ /* this, so an error is signaled. */ if ( separators == 0 || *separators == 0 ) { - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -666,14 +682,14 @@ unsigned long lineno, buf_size; int refill, hold, to_skip; ptrdiff_t bytes, start, end, cursor, avail; - char* buf = 0; + char* buf = 0; FT_Memory memory = stream->memory; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; if ( callback == 0 ) { - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -687,7 +703,6 @@ lineno = 1; buf[0] = 0; start = 0; - end = 0; avail = 0; cursor = 0; refill = 1; @@ -737,7 +752,7 @@ if ( buf_size >= 65536UL ) /* limit ourselves to 64KByte */ { FT_ERROR(( "_bdf_readstream: " ERRMSG6, lineno )); - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -752,7 +767,7 @@ { bytes = avail - start; - FT_MEM_COPY( buf, buf + start, bytes ); + FT_MEM_MOVE( buf, buf + start, bytes ); cursor = bytes; avail -= bytes; @@ -766,14 +781,14 @@ hold = buf[end]; buf[end] = 0; - /* XXX: Use encoding independent value for 0x1a */ - if ( buf[start] != '#' && buf[start] != 0x1a && end > start ) + /* XXX: Use encoding independent value for 0x1A */ + if ( buf[start] != '#' && buf[start] != 0x1A && end > start ) { - error = (*cb)( buf + start, end - start, lineno, + error = (*cb)( buf + start, (unsigned long)( end - start ), lineno, (void*)&cb, client_data ); /* Redo if we have encountered CHARS without properties. */ if ( error == -1 ) - error = (*cb)( buf + start, end - start, lineno, + error = (*cb)( buf + start, (unsigned long)( end - start ), lineno, (void*)&cb, client_data ); if ( error ) break; @@ -808,17 +823,17 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static const unsigned char odigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -826,7 +841,7 @@ static const unsigned char ddigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -834,16 +849,13 @@ static const unsigned char hdigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, - 0x7e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, + 0x7E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -#define isdigok( m, d ) (m[(d) >> 3] & ( 1 << ( (d) & 7 ) ) ) - - /* Routine to convert an ASCII string into an unsigned long integer. */ static unsigned long _bdf_atoul( char* s, @@ -881,7 +893,7 @@ s += 2; } - for ( v = 0; isdigok( dmap, *s ); s++ ) + for ( v = 0; sbitset( dmap, *s ); s++ ) v = v * base + a2i[(int)*s]; if ( end != 0 ) @@ -936,7 +948,7 @@ s += 2; } - for ( v = 0; isdigok( dmap, *s ); s++ ) + for ( v = 0; sbitset( dmap, *s ); s++ ) v = v * base + a2i[(int)*s]; if ( end != 0 ) @@ -991,7 +1003,7 @@ s += 2; } - for ( v = 0; isdigok( dmap, *s ); s++ ) + for ( v = 0; sbitset( dmap, *s ); s++ ) v = (short)( v * base + a2i[(int)*s] ); if ( end != 0 ) @@ -1030,7 +1042,7 @@ size_t n; bdf_property_t* p; FT_Memory memory = font->memory; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; /* First check whether the property has */ @@ -1049,7 +1061,7 @@ n = ft_strlen( name ) + 1; if ( n > FT_ULONG_MAX ) - return BDF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( FT_NEW_ARRAY( p->name, n ) ) goto Exit; @@ -1136,7 +1148,7 @@ { char* cp; FT_Memory memory = font->memory; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; if ( FT_RENEW_ARRAY( font->comments, @@ -1167,12 +1179,14 @@ char name[256]; _bdf_list_t list; FT_Memory memory; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; + + FT_UNUSED( lineno ); /* only used in debug mode */ if ( font == 0 || font->name == 0 || font->name[0] == 0 ) { - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -1187,13 +1201,13 @@ if ( len >= 256 ) { FT_ERROR(( "_bdf_set_default_spacing: " ERRMSG7, lineno )); - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } FT_MEM_COPY( name, font->name, len ); - error = _bdf_list_split( &list, (char *)"-", name, len ); + error = _bdf_list_split( &list, (char *)"-", name, (unsigned long)len ); if ( error ) goto Fail; @@ -1300,7 +1314,9 @@ hashnode hn; bdf_property_t *prop, *fp; FT_Memory memory = font->memory; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; + + FT_UNUSED( lineno ); /* only used in debug mode */ /* First, check whether the property already exists in the font. */ @@ -1404,7 +1420,7 @@ /* If the property happens to be a comment, then it doesn't need */ /* to be added to the internal hash table. */ - if ( ft_memcmp( name, "COMMENT", 7 ) != 0 ) + if ( _bdf_strncmp( name, "COMMENT", 7 ) != 0 ) { /* Add the property to the font property table. */ error = hash_insert( fp->name, @@ -1422,18 +1438,18 @@ /* FONT_ASCENT and FONT_DESCENT need to be assigned if they are */ /* present, and the SPACING property should override the default */ /* spacing. */ - if ( ft_memcmp( name, "DEFAULT_CHAR", 12 ) == 0 ) + if ( _bdf_strncmp( name, "DEFAULT_CHAR", 12 ) == 0 ) font->default_char = fp->value.l; - else if ( ft_memcmp( name, "FONT_ASCENT", 11 ) == 0 ) + else if ( _bdf_strncmp( name, "FONT_ASCENT", 11 ) == 0 ) font->font_ascent = fp->value.l; - else if ( ft_memcmp( name, "FONT_DESCENT", 12 ) == 0 ) + else if ( _bdf_strncmp( name, "FONT_DESCENT", 12 ) == 0 ) font->font_descent = fp->value.l; - else if ( ft_memcmp( name, "SPACING", 7 ) == 0 ) + else if ( _bdf_strncmp( name, "SPACING", 7 ) == 0 ) { if ( !fp->value.atom ) { FT_ERROR(( "_bdf_add_property: " ERRMSG8, lineno, "SPACING" )); - error = BDF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1474,7 +1490,7 @@ bdf_font_t* font; FT_Memory memory; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( call_data ); FT_UNUSED( lineno ); /* only used in debug mode */ @@ -1486,7 +1502,7 @@ memory = font->memory; /* Check for a comment. */ - if ( ft_memcmp( line, "COMMENT", 7 ) == 0 ) + if ( _bdf_strncmp( line, "COMMENT", 7 ) == 0 ) { linelen -= 7; @@ -1503,10 +1519,10 @@ /* The very first thing expected is the number of glyphs. */ if ( !( p->flags & _BDF_GLYPHS ) ) { - if ( ft_memcmp( line, "CHARS", 5 ) != 0 ) + if ( _bdf_strncmp( line, "CHARS", 5 ) != 0 ) { FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "CHARS" )); - error = BDF_Err_Missing_Chars_Field; + error = FT_THROW( Missing_Chars_Field ); goto Exit; } @@ -1524,7 +1540,7 @@ if ( p->cnt >= 0x110000UL ) { FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG5, lineno, "CHARS" )); - error = BDF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -1537,8 +1553,16 @@ } /* Check for the ENDFONT field. */ - if ( ft_memcmp( line, "ENDFONT", 7 ) == 0 ) + if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 ) { + if ( p->flags & _BDF_GLYPH_BITS ) + { + /* Missing ENDCHAR field. */ + FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" )); + error = FT_THROW( Corrupted_Font_Glyphs ); + goto Exit; + } + /* Sort the glyphs by encoding. */ ft_qsort( (char *)font->glyphs, font->glyphs_used, @@ -1551,7 +1575,7 @@ } /* Check for the ENDCHAR field. */ - if ( ft_memcmp( line, "ENDCHAR", 7 ) == 0 ) + if ( _bdf_strncmp( line, "ENDCHAR", 7 ) == 0 ) { p->glyph_enc = 0; p->flags &= ~_BDF_GLYPH_BITS; @@ -1567,7 +1591,7 @@ goto Exit; /* Check for the STARTCHAR field. */ - if ( ft_memcmp( line, "STARTCHAR", 9 ) == 0 ) + if ( _bdf_strncmp( line, "STARTCHAR", 9 ) == 0 ) { /* Set the character name in the parse info first until the */ /* encoding can be checked for an unencoded character. */ @@ -1584,7 +1608,7 @@ if ( !s ) { FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG8, lineno, "STARTCHAR" )); - error = BDF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1601,13 +1625,13 @@ } /* Check for the ENCODING field. */ - if ( ft_memcmp( line, "ENCODING", 8 ) == 0 ) + if ( _bdf_strncmp( line, "ENCODING", 8 ) == 0 ) { if ( !( p->flags & _BDF_GLYPH ) ) { /* Missing STARTCHAR field. */ FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "STARTCHAR" )); - error = BDF_Err_Missing_Startchar_Field; + error = FT_THROW( Missing_Startchar_Field ); goto Exit; } @@ -1626,15 +1650,19 @@ if ( p->glyph_enc == -1 && p->list.used > 2 ) p->glyph_enc = _bdf_atol( p->list.field[2], 0, 10 ); + if ( p->glyph_enc < -1 ) + p->glyph_enc = -1; + FT_TRACE4(( DBGMSG2, p->glyph_enc )); /* Check that the encoding is in the Unicode range because */ /* otherwise p->have (a bitmap with static size) overflows. */ - if ( p->glyph_enc > 0 && - (size_t)p->glyph_enc >= sizeof ( p->have ) * 8 ) + if ( p->glyph_enc > 0 && + (size_t)p->glyph_enc >= sizeof ( p->have ) / + sizeof ( unsigned long ) * 32 ) { FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG5, lineno, "ENCODING" )); - error = BDF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1746,7 +1774,7 @@ for ( i = 0; i < nibbles; i++ ) { c = line[i]; - if ( !isdigok( hdigits, c ) ) + if ( !sbitset( hdigits, c ) ) break; *bp = (FT_Byte)( ( *bp << 4 ) + a2i[c] ); if ( i + 1 < nibbles && ( i & 1 ) ) @@ -1770,7 +1798,7 @@ /* If any line has extra columns, indicate they have been removed. */ if ( i == nibbles && - isdigok( hdigits, line[nibbles] ) && + sbitset( hdigits, line[nibbles] ) && !( p->flags & _BDF_GLYPH_WIDTH_CHECK ) ) { FT_TRACE2(( "_bdf_parse_glyphs: " ACMSG14, glyph->encoding )); @@ -1783,7 +1811,7 @@ } /* Expect the SWIDTH (scalable width) field next. */ - if ( ft_memcmp( line, "SWIDTH", 6 ) == 0 ) + if ( _bdf_strncmp( line, "SWIDTH", 6 ) == 0 ) { if ( !( p->flags & _BDF_ENCODING ) ) goto Missing_Encoding; @@ -1799,7 +1827,7 @@ } /* Expect the DWIDTH (scalable width) field next. */ - if ( ft_memcmp( line, "DWIDTH", 6 ) == 0 ) + if ( _bdf_strncmp( line, "DWIDTH", 6 ) == 0 ) { if ( !( p->flags & _BDF_ENCODING ) ) goto Missing_Encoding; @@ -1827,7 +1855,7 @@ } /* Expect the BBX field next. */ - if ( ft_memcmp( line, "BBX", 3 ) == 0 ) + if ( _bdf_strncmp( line, "BBX", 3 ) == 0 ) { if ( !( p->flags & _BDF_ENCODING ) ) goto Missing_Encoding; @@ -1895,7 +1923,7 @@ } /* And finally, gather up the bitmap. */ - if ( ft_memcmp( line, "BITMAP", 6 ) == 0 ) + if ( _bdf_strncmp( line, "BITMAP", 6 ) == 0 ) { unsigned long bitmap_size; @@ -1904,7 +1932,7 @@ { /* Missing BBX field. */ FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "BBX" )); - error = BDF_Err_Missing_Bbx_Field; + error = FT_THROW( Missing_Bbx_Field ); goto Exit; } @@ -1915,7 +1943,7 @@ if ( glyph->bpr > 0xFFFFU || bitmap_size > 0xFFFFU ) { FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG4, lineno )); - error = BDF_Err_Bbx_Too_Big; + error = FT_THROW( Bbx_Too_Big ); goto Exit; } else @@ -1931,13 +1959,13 @@ } FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG9, lineno )); - error = BDF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; Missing_Encoding: /* Missing ENCODING field. */ FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENCODING" )); - error = BDF_Err_Missing_Encoding_Field; + error = FT_THROW( Missing_Encoding_Field ); Exit: if ( error && ( p->flags & _BDF_GLYPH ) ) @@ -1961,7 +1989,7 @@ char* name; char* value; char nbuf[128]; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( lineno ); @@ -1970,7 +1998,7 @@ p = (_bdf_parse_t *) client_data; /* Check for the end of the properties. */ - if ( ft_memcmp( line, "ENDPROPERTIES", 13 ) == 0 ) + if ( _bdf_strncmp( line, "ENDPROPERTIES", 13 ) == 0 ) { /* If the FONT_ASCENT or FONT_DESCENT properties have not been */ /* encountered yet, then make sure they are added as properties and */ @@ -2011,12 +2039,12 @@ } /* Ignore the _XFREE86_GLYPH_RANGES properties. */ - if ( ft_memcmp( line, "_XFREE86_GLYPH_RANGES", 21 ) == 0 ) + if ( _bdf_strncmp( line, "_XFREE86_GLYPH_RANGES", 21 ) == 0 ) goto Exit; /* Handle COMMENT fields and properties in a special way to preserve */ /* the spacing. */ - if ( ft_memcmp( line, "COMMENT", 7 ) == 0 ) + if ( _bdf_strncmp( line, "COMMENT", 7 ) == 0 ) { name = value = line; value += 7; @@ -2067,7 +2095,7 @@ char *s; FT_Memory memory = NULL; - FT_Error error = BDF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( lineno ); /* only used in debug mode */ @@ -2080,7 +2108,7 @@ /* Check for a comment. This is done to handle those fonts that have */ /* comments before the STARTFONT line for some reason. */ - if ( ft_memcmp( line, "COMMENT", 7 ) == 0 ) + if ( _bdf_strncmp( line, "COMMENT", 7 ) == 0 ) { if ( p->opts->keep_comments != 0 && p->font != 0 ) { @@ -2106,11 +2134,11 @@ { memory = p->memory; - if ( ft_memcmp( line, "STARTFONT", 9 ) != 0 ) + if ( _bdf_strncmp( line, "STARTFONT", 9 ) != 0 ) { /* we don't emit an error message since this code gets */ /* explicitly caught one level higher */ - error = BDF_Err_Missing_Startfont_Field; + error = FT_THROW( Missing_Startfont_Field ); goto Exit; } @@ -2154,13 +2182,13 @@ } /* Check for the start of the properties. */ - if ( ft_memcmp( line, "STARTPROPERTIES", 15 ) == 0 ) + if ( _bdf_strncmp( line, "STARTPROPERTIES", 15 ) == 0 ) { if ( !( p->flags & _BDF_FONT_BBX ) ) { /* Missing the FONTBOUNDINGBOX field. */ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" )); - error = BDF_Err_Missing_Fontboundingbox_Field; + error = FT_THROW( Missing_Fontboundingbox_Field ); goto Exit; } @@ -2171,7 +2199,10 @@ p->cnt = p->font->props_size = _bdf_atoul( p->list.field[1], 0, 10 ); if ( FT_NEW_ARRAY( p->font->props, p->cnt ) ) + { + p->font->props_size = 0; goto Exit; + } p->flags |= _BDF_PROPS; *next = _bdf_parse_properties; @@ -2180,13 +2211,13 @@ } /* Check for the FONTBOUNDINGBOX field. */ - if ( ft_memcmp( line, "FONTBOUNDINGBOX", 15 ) == 0 ) + if ( _bdf_strncmp( line, "FONTBOUNDINGBOX", 15 ) == 0 ) { if ( !( p->flags & _BDF_SIZE ) ) { /* Missing the SIZE field. */ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "SIZE" )); - error = BDF_Err_Missing_Size_Field; + error = FT_THROW( Missing_Size_Field ); goto Exit; } @@ -2211,7 +2242,7 @@ } /* The next thing to check for is the FONT field. */ - if ( ft_memcmp( line, "FONT", 4 ) == 0 ) + if ( _bdf_strncmp( line, "FONT", 4 ) == 0 ) { error = _bdf_list_split( &p->list, (char *)" +", line, linelen ); if ( error ) @@ -2223,7 +2254,7 @@ if ( !s ) { FT_ERROR(( "_bdf_parse_start: " ERRMSG8, lineno, "FONT" )); - error = BDF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -2246,13 +2277,13 @@ } /* Check for the SIZE field. */ - if ( ft_memcmp( line, "SIZE", 4 ) == 0 ) + if ( _bdf_strncmp( line, "SIZE", 4 ) == 0 ) { if ( !( p->flags & _BDF_FONT_NAME ) ) { /* Missing the FONT field. */ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONT" )); - error = BDF_Err_Missing_Font_Field; + error = FT_THROW( Missing_Font_Field ); goto Exit; } @@ -2300,7 +2331,7 @@ } /* Check for the CHARS field -- font properties are optional */ - if ( ft_memcmp( line, "CHARS", 5 ) == 0 ) + if ( _bdf_strncmp( line, "CHARS", 5 ) == 0 ) { char nbuf[128]; @@ -2309,7 +2340,7 @@ { /* Missing the FONTBOUNDINGBOX field. */ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" )); - error = BDF_Err_Missing_Fontboundingbox_Field; + error = FT_THROW( Missing_Fontboundingbox_Field ); goto Exit; } @@ -2341,7 +2372,7 @@ } FT_ERROR(( "_bdf_parse_start: " ERRMSG9, lineno )); - error = BDF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); Exit: return error; @@ -2364,8 +2395,8 @@ unsigned long lineno = 0; /* make compiler happy */ _bdf_parse_t *p = NULL; - FT_Memory memory = extmemory; - FT_Error error = BDF_Err_Ok; + FT_Memory memory = extmemory; /* needed for FT_NEW */ + FT_Error error = FT_Err_Ok; if ( FT_NEW( p ) ) @@ -2387,7 +2418,6 @@ { /* If the font is not proportional, set the font's monowidth */ /* field to the width of the font bounding box. */ - memory = p->font->memory; if ( p->font->spacing != BDF_PROPORTIONAL ) p->font->monowidth = p->font->bbx.width; @@ -2458,14 +2488,14 @@ { /* Error happened while parsing header. */ FT_ERROR(( "bdf_load_font: " ERRMSG2, lineno )); - error = BDF_Err_Corrupted_Font_Header; + error = FT_THROW( Corrupted_Font_Header ); goto Exit; } else { /* Error happened when parsing glyphs. */ FT_ERROR(( "bdf_load_font: " ERRMSG3, lineno )); - error = BDF_Err_Corrupted_Font_Glyphs; + error = FT_THROW( Corrupted_Font_Glyphs ); goto Exit; } } @@ -2485,8 +2515,8 @@ p->font->comments[p->font->comments_len] = 0; } } - else if ( error == BDF_Err_Ok ) - error = BDF_Err_Invalid_File_Format; + else if ( error == FT_Err_Ok ) + error = FT_THROW( Invalid_File_Format ); *font = p->font; diff --git a/src/bzip2/ftbzip2.c b/src/bzip2/ftbzip2.c index d60ee3e..7e406b1 100644 --- a/src/bzip2/ftbzip2.c +++ b/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2010, 2012 by */ +/* Copyright 2010, 2012-2014 by */ /* Joel Klinghed. */ /* */ /* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */ @@ -120,7 +120,7 @@ static FT_Error ft_bzip2_check_header( FT_Stream stream ) { - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte head[4]; @@ -131,10 +131,10 @@ /* head[0] && head[1] are the magic numbers; */ /* head[2] is the version, and head[3] the blocksize */ if ( head[0] != 0x42 || - head[1] != 0x5a || + head[1] != 0x5A || head[2] != 0x68 ) /* only support bzip2 (huffman) */ { - error = Bzip2_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -149,7 +149,7 @@ FT_Stream source ) { bz_stream* bzstream = &zip->bzstream; - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; zip->stream = stream; @@ -182,7 +182,7 @@ if ( BZ2_bzDecompressInit( bzstream, 0, 0 ) != BZ_OK || bzstream->next_in == NULL ) - error = Bzip2_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); Exit: return error; @@ -255,7 +255,7 @@ size = stream->read( stream, stream->pos, zip->input, FT_BZIP2_BUFFER_SIZE ); if ( size == 0 ) - return Bzip2_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); } else { @@ -264,7 +264,7 @@ size = FT_BZIP2_BUFFER_SIZE; if ( size == 0 ) - return Bzip2_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); FT_MEM_COPY( zip->input, stream->base + stream->pos, size ); } @@ -273,7 +273,7 @@ bzstream->next_in = (char*)zip->input; bzstream->avail_in = size; - return Bzip2_Err_Ok; + return FT_Err_Ok; } @@ -281,7 +281,7 @@ ft_bzip2_file_fill_output( FT_BZip2File zip ) { bz_stream* bzstream = &zip->bzstream; - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; zip->cursor = zip->buffer; @@ -306,12 +306,12 @@ { zip->limit = (FT_Byte*)bzstream->next_out; if ( zip->limit == zip->cursor ) - error = Bzip2_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } else if ( err != BZ_OK ) { - error = Bzip2_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } } @@ -325,7 +325,7 @@ ft_bzip2_file_skip_output( FT_BZip2File zip, FT_ULong count ) { - FT_Error error = Bzip2_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ULong delta; @@ -456,10 +456,18 @@ FT_Stream source ) { FT_Error error; - FT_Memory memory = source->memory; + FT_Memory memory; FT_BZip2File zip = NULL; + if ( !stream || !source ) + { + error = FT_THROW( Invalid_Stream_Handle ); + goto Exit; + } + + memory = source->memory; + /* * check the header right now; this prevents allocating unnecessary * objects when we don't need them @@ -502,7 +510,7 @@ FT_UNUSED( stream ); FT_UNUSED( source ); - return Bzip2_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } #endif /* !FT_CONFIG_OPTION_USE_BZIP2 */ diff --git a/src/cache/Jamfile b/src/cache/Jamfile index 340cff7..6563991 100644 --- a/src/cache/Jamfile +++ b/src/cache/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 src/cache Jamfile # -# Copyright 2001, 2003, 2004 by +# Copyright 2001, 2003, 2004, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -11,7 +11,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) cache ; -# The file <freetype/ftcache.h> contains some macro definitions that are +# The file <ftcache.h> contains some macro definitions that are # later used in #include statements related to the cache sub-system. It # needs to be parsed through a HDRMACRO rule for macro definitions. # diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index d4fc353..6bad39d 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType basic cache interface (body). */ /* */ -/* Copyright 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 by */ +/* Copyright 2003-2007, 2009-2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -30,44 +30,6 @@ #define FT_COMPONENT trace_cache -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* - * These structures correspond to the FTC_Font and FTC_ImageDesc types - * that were defined in version 2.1.7. - */ - typedef struct FTC_OldFontRec_ - { - FTC_FaceID face_id; - FT_UShort pix_width; - FT_UShort pix_height; - - } FTC_OldFontRec, *FTC_OldFont; - - - typedef struct FTC_OldImageDescRec_ - { - FTC_OldFontRec font; - FT_UInt32 flags; - - } FTC_OldImageDescRec, *FTC_OldImageDesc; - - - /* - * Notice that FTC_OldImageDescRec and FTC_ImageTypeRec are nearly - * identical, bit-wise. The only difference is that the `width' and - * `height' fields are expressed as 16-bit integers in the old structure, - * and as normal `int' in the new one. - * - * We are going to perform a weird hack to detect which structure is - * being passed to the image and sbit caches. If the new structure's - * `width' is larger than 0x10000, we assume that we are really receiving - * an FTC_OldImageDesc. - */ - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /* * Basic Families * @@ -148,10 +110,9 @@ return result; if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs ) - { - FT_TRACE1(( "ftc_basic_family_get_count: too large number of glyphs " )); - FT_TRACE1(( "in this face, truncated\n", face->num_glyphs )); - } + FT_TRACE1(( "ftc_basic_family_get_count:" + " too large number of glyphs in this face, truncated\n", + face->num_glyphs )); if ( !error ) result = (FT_UInt)face->num_glyphs; @@ -226,7 +187,7 @@ } } else - error = FTC_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); } } @@ -267,7 +228,7 @@ * */ - FT_CALLBACK_TABLE_DEF + static const FTC_IFamilyClassRec ftc_basic_image_family_class = { { @@ -281,7 +242,7 @@ }; - FT_CALLBACK_TABLE_DEF + static const FTC_GCacheClassRec ftc_basic_image_cache_class = { { @@ -325,10 +286,10 @@ FT_PtrDist hash; - /* some argument checks are delayed to FTC_Cache_Lookup */ + /* some argument checks are delayed to `FTC_Cache_Lookup' */ if ( !aglyph ) { - error = FTC_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -336,38 +297,15 @@ if ( anode ) *anode = NULL; -#if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU ) - - /* - * This one is a major hack used to detect whether we are passed a - * regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one. - */ - if ( (FT_ULong)type->width >= 0x10000L ) - { - FTC_OldImageDesc desc = (FTC_OldImageDesc)type; - - - query.attrs.scaler.face_id = desc->font.face_id; - query.attrs.scaler.width = desc->font.pix_width; - query.attrs.scaler.height = desc->font.pix_height; - query.attrs.load_flags = desc->flags; - } - else - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - { - if ( (FT_ULong)(type->flags - FT_INT_MIN) > FT_UINT_MAX ) - { - FT_TRACE1(( "FTC_ImageCache_Lookup: higher bits in load_flags" )); - FT_TRACE1(( "0x%x are dropped\n", (type->flags & ~((FT_ULong)FT_UINT_MAX)) )); - } + if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX ) + FT_TRACE1(( "FTC_ImageCache_Lookup:" + " higher bits in load_flags 0x%x are dropped\n", + type->flags & ~((FT_ULong)FT_UINT_MAX) )); - query.attrs.scaler.face_id = type->face_id; - query.attrs.scaler.width = type->width; - query.attrs.scaler.height = type->height; - query.attrs.load_flags = (FT_UInt)type->flags; - } + query.attrs.scaler.face_id = type->face_id; + query.attrs.scaler.width = type->width; + query.attrs.scaler.height = type->height; + query.attrs.load_flags = (FT_UInt)type->flags; query.attrs.scaler.pixel = 1; query.attrs.scaler.x_res = 0; /* make compilers happy */ @@ -421,10 +359,10 @@ FT_PtrDist hash; - /* some argument checks are delayed to FTC_Cache_Lookup */ + /* some argument checks are delayed to `FTC_Cache_Lookup' */ if ( !aglyph || !scaler ) { - error = FTC_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -432,12 +370,11 @@ if ( anode ) *anode = NULL; - /* FT_Load_Glyph(), FT_Load_Char() take FT_UInt flags */ + /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */ if ( load_flags > FT_UINT_MAX ) - { - FT_TRACE1(( "FTC_ImageCache_LookupScaler: higher bits in load_flags" )); - FT_TRACE1(( "0x%x are dropped\n", (load_flags & ~((FT_ULong)FT_UINT_MAX)) )); - } + FT_TRACE1(( "FTC_ImageCache_LookupScaler:" + " higher bits in load_flags 0x%x are dropped\n", + load_flags & ~((FT_ULong)FT_UINT_MAX) )); query.attrs.scaler = scaler[0]; query.attrs.load_flags = (FT_UInt)load_flags; @@ -467,144 +404,13 @@ } + /* + * + * basic small bitmap cache + * + */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* yet another backwards-legacy structure */ - typedef struct FTC_OldImage_Desc_ - { - FTC_FontRec font; - FT_UInt image_type; - - } FTC_OldImage_Desc; - - -#define FTC_OLD_IMAGE_FORMAT( x ) ( (x) & 7 ) - - -#define ftc_old_image_format_bitmap 0x0000 -#define ftc_old_image_format_outline 0x0001 - -#define ftc_old_image_format_mask 0x000F - -#define ftc_old_image_flag_monochrome 0x0010 -#define ftc_old_image_flag_unhinted 0x0020 -#define ftc_old_image_flag_autohinted 0x0040 -#define ftc_old_image_flag_unscaled 0x0080 -#define ftc_old_image_flag_no_sbits 0x0100 - - /* monochrome bitmap */ -#define ftc_old_image_mono ftc_old_image_format_bitmap | \ - ftc_old_image_flag_monochrome - - /* anti-aliased bitmap */ -#define ftc_old_image_grays ftc_old_image_format_bitmap - - /* scaled outline */ -#define ftc_old_image_outline ftc_old_image_format_outline - - - static void - ftc_image_type_from_old_desc( FTC_ImageType typ, - FTC_OldImage_Desc* desc ) - { - typ->face_id = desc->font.face_id; - typ->width = desc->font.pix_width; - typ->height = desc->font.pix_height; - - /* convert image type flags to load flags */ - { - FT_UInt load_flags = FT_LOAD_DEFAULT; - FT_UInt type = desc->image_type; - - - /* determine load flags, depending on the font description's */ - /* image type */ - - if ( FTC_OLD_IMAGE_FORMAT( type ) == ftc_old_image_format_bitmap ) - { - if ( type & ftc_old_image_flag_monochrome ) - load_flags |= FT_LOAD_MONOCHROME; - - /* disable embedded bitmaps loading if necessary */ - if ( type & ftc_old_image_flag_no_sbits ) - load_flags |= FT_LOAD_NO_BITMAP; - } - else - { - /* we want an outline, don't load embedded bitmaps */ - load_flags |= FT_LOAD_NO_BITMAP; - - if ( type & ftc_old_image_flag_unscaled ) - load_flags |= FT_LOAD_NO_SCALE; - } - - /* always render glyphs to bitmaps */ - load_flags |= FT_LOAD_RENDER; - - if ( type & ftc_old_image_flag_unhinted ) - load_flags |= FT_LOAD_NO_HINTING; - - if ( type & ftc_old_image_flag_autohinted ) - load_flags |= FT_LOAD_FORCE_AUTOHINT; - - typ->flags = load_flags; - } - } - - - FT_EXPORT( FT_Error ) - FTC_Image_Cache_New( FTC_Manager manager, - FTC_ImageCache *acache ); - - FT_EXPORT( FT_Error ) - FTC_Image_Cache_Lookup( FTC_ImageCache icache, - FTC_OldImage_Desc* desc, - FT_UInt gindex, - FT_Glyph *aglyph ); - - - FT_EXPORT_DEF( FT_Error ) - FTC_Image_Cache_New( FTC_Manager manager, - FTC_ImageCache *acache ) - { - return FTC_ImageCache_New( manager, (FTC_ImageCache*)acache ); - } - - - - FT_EXPORT_DEF( FT_Error ) - FTC_Image_Cache_Lookup( FTC_ImageCache icache, - FTC_OldImage_Desc* desc, - FT_UInt gindex, - FT_Glyph *aglyph ) - { - FTC_ImageTypeRec type0; - - - if ( !desc ) - return FTC_Err_Invalid_Argument; - - ftc_image_type_from_old_desc( &type0, desc ); - - return FTC_ImageCache_Lookup( (FTC_ImageCache)icache, - &type0, - gindex, - aglyph, - NULL ); - } - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - - /* - * - * basic small bitmap cache - * - */ - - - FT_CALLBACK_TABLE_DEF + static const FTC_SFamilyClassRec ftc_basic_sbit_family_class = { { @@ -619,7 +425,7 @@ }; - FT_CALLBACK_TABLE_DEF + static const FTC_GCacheClassRec ftc_basic_sbit_cache_class = { { @@ -666,43 +472,21 @@ if ( anode ) *anode = NULL; - /* other argument checks delayed to FTC_Cache_Lookup */ + /* other argument checks delayed to `FTC_Cache_Lookup' */ if ( !ansbit ) - return FTC_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); *ansbit = NULL; -#if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU ) + if ( (FT_ULong)( type->flags - FT_INT_MIN ) > FT_UINT_MAX ) + FT_TRACE1(( "FTC_ImageCache_Lookup:" + " higher bits in load_flags 0x%x are dropped\n", + type->flags & ~((FT_ULong)FT_UINT_MAX) )); - /* This one is a major hack used to detect whether we are passed a - * regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one. - */ - if ( (FT_ULong)type->width >= 0x10000L ) - { - FTC_OldImageDesc desc = (FTC_OldImageDesc)type; - - - query.attrs.scaler.face_id = desc->font.face_id; - query.attrs.scaler.width = desc->font.pix_width; - query.attrs.scaler.height = desc->font.pix_height; - query.attrs.load_flags = desc->flags; - } - else - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - { - if ( (FT_ULong)(type->flags - FT_INT_MIN) > FT_UINT_MAX ) - { - FT_TRACE1(( "FTC_ImageCache_Lookup: higher bits in load_flags" )); - FT_TRACE1(( "0x%x are dropped\n", (type->flags & ~((FT_ULong)FT_UINT_MAX)) )); - } - - query.attrs.scaler.face_id = type->face_id; - query.attrs.scaler.width = type->width; - query.attrs.scaler.height = type->height; - query.attrs.load_flags = (FT_UInt)type->flags; - } + query.attrs.scaler.face_id = type->face_id; + query.attrs.scaler.width = type->width; + query.attrs.scaler.height = type->height; + query.attrs.load_flags = (FT_UInt)type->flags; query.attrs.scaler.pixel = 1; query.attrs.scaler.x_res = 0; /* make compilers happy */ @@ -763,18 +547,17 @@ if ( anode ) *anode = NULL; - /* other argument checks delayed to FTC_Cache_Lookup */ + /* other argument checks delayed to `FTC_Cache_Lookup' */ if ( !ansbit || !scaler ) - return FTC_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); *ansbit = NULL; - /* FT_Load_Glyph(), FT_Load_Char() take FT_UInt flags */ + /* `FT_Load_Glyph' and `FT_Load_Char' take FT_UInt flags */ if ( load_flags > FT_UINT_MAX ) - { - FT_TRACE1(( "FTC_ImageCache_LookupScaler: higher bits in load_flags" )); - FT_TRACE1(( "0x%x are dropped\n", (load_flags & ~((FT_ULong)FT_UINT_MAX)) )); - } + FT_TRACE1(( "FTC_ImageCache_LookupScaler:" + " higher bits in load_flags 0x%x are dropped\n", + load_flags & ~((FT_ULong)FT_UINT_MAX) )); query.attrs.scaler = scaler[0]; query.attrs.load_flags = (FT_UInt)load_flags; @@ -807,49 +590,4 @@ } -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_EXPORT( FT_Error ) - FTC_SBit_Cache_New( FTC_Manager manager, - FTC_SBitCache *acache ); - - FT_EXPORT( FT_Error ) - FTC_SBit_Cache_Lookup( FTC_SBitCache cache, - FTC_OldImage_Desc* desc, - FT_UInt gindex, - FTC_SBit *ansbit ); - - - FT_EXPORT_DEF( FT_Error ) - FTC_SBit_Cache_New( FTC_Manager manager, - FTC_SBitCache *acache ) - { - return FTC_SBitCache_New( manager, (FTC_SBitCache*)acache ); - } - - - FT_EXPORT_DEF( FT_Error ) - FTC_SBit_Cache_Lookup( FTC_SBitCache cache, - FTC_OldImage_Desc* desc, - FT_UInt gindex, - FTC_SBit *ansbit ) - { - FTC_ImageTypeRec type0; - - - if ( !desc ) - return FTC_Err_Invalid_Argument; - - ftc_image_type_from_old_desc( &type0, desc ); - - return FTC_SBitCache_Lookup( (FTC_SBitCache)cache, - &type0, - gindex, - ansbit, - NULL ); - } - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /* END */ diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c index f01c403..f20dd45 100644 --- a/src/cache/ftccache.c +++ b/src/cache/ftccache.c @@ -4,8 +4,7 @@ /* */ /* The FreeType internal cache interface (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, */ -/* 2011 by */ +/* Copyright 2000-2007, 2009-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -270,11 +269,7 @@ /* remove a node from the cache manager */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_BASE_DEF( void ) -#else FT_LOCAL_DEF( void ) -#endif ftc_node_destroy( FTC_Node node, FTC_Manager manager ) { @@ -493,14 +488,14 @@ FTC_Node* bucket; FTC_Node* pnode; FTC_Node node; - FT_Error error = FTC_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Bool list_changed = FALSE; FTC_Node_CompareFunc compare = cache->clazz.node_compare; if ( cache == NULL || anode == NULL ) - return FTC_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* Go to the `top' node of the list sharing same masked hash */ bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash ); diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h index d60984f..4155f32 100644 --- a/src/cache/ftccache.h +++ b/src/cache/ftccache.h @@ -4,8 +4,7 @@ /* */ /* FreeType internal cache interface (specification). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, */ -/* 2011 by */ +/* Copyright 2000-2007, 2009-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -87,12 +86,6 @@ FT_BEGIN_HEADER ftc_get_top_node_for_hash( ( cache ), ( hash ) ) #endif -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_BASE( void ) - ftc_node_destroy( FTC_Node node, - FTC_Manager manager ); -#endif - /*************************************************************************/ /*************************************************************************/ @@ -223,7 +216,7 @@ FT_BEGIN_HEADER FT_Bool _list_changed = FALSE; \ \ \ - error = FTC_Err_Ok; \ + error = FT_Err_Ok; \ node = NULL; \ \ /* Go to the `top' node of the list sharing same masked hash */ \ @@ -328,7 +321,7 @@ FT_BEGIN_HEADER #define FTC_CACHE_TRYLOOP_END( list_changed ) \ - if ( !error || error != FTC_Err_Out_Of_Memory ) \ + if ( !error || FT_ERR_NEQ( error, Out_Of_Memory ) ) \ break; \ \ _try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \ diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h index 80ec9ce..9528279 100644 --- a/src/cache/ftccback.h +++ b/src/cache/ftccback.h @@ -4,7 +4,7 @@ /* */ /* Callback functions of the caching sub-system (specification only). */ /* */ -/* Copyright 2004, 2005, 2006, 2011 by */ +/* Copyright 2004-2006, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -81,11 +81,10 @@ FT_LOCAL( void ) ftc_cache_done( FTC_Cache cache ); -#ifndef FT_CONFIG_OPTION_OLD_INTERNALS FT_LOCAL( void ) ftc_node_destroy( FTC_Node node, FTC_Manager manager ); -#endif + #endif /* __FTCCBACK_H__ */ diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c index ad436ef..ab22366 100644 --- a/src/cache/ftccmap.c +++ b/src/cache/ftccmap.c @@ -4,8 +4,7 @@ /* */ /* FreeType CharMap cache (body) */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ -/* 2010, 2011 by */ +/* Copyright 2000-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -32,43 +31,6 @@ #define FT_COMPONENT trace_cache -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - typedef enum FTC_OldCMapType_ - { - FTC_OLD_CMAP_BY_INDEX = 0, - FTC_OLD_CMAP_BY_ENCODING = 1, - FTC_OLD_CMAP_BY_ID = 2 - - } FTC_OldCMapType; - - - typedef struct FTC_OldCMapIdRec_ - { - FT_UInt platform; - FT_UInt encoding; - - } FTC_OldCMapIdRec, *FTC_OldCMapId; - - - typedef struct FTC_OldCMapDescRec_ - { - FTC_FaceID face_id; - FTC_OldCMapType type; - - union - { - FT_UInt index; - FT_Encoding encoding; - FTC_OldCMapIdRec id; - - } u; - - } FTC_OldCMapDescRec, *FTC_OldCMapDesc; - -#endif /* FT_CONFIG_OLD_INTERNALS */ - - /*************************************************************************/ /* */ /* Each FTC_CMapNode contains a simple array to map a range of character */ @@ -121,7 +83,7 @@ /* if (indices[n] == FTC_CMAP_UNKNOWN), we assume that the corresponding */ /* glyph indices haven't been queried through FT_Get_Glyph_Index() yet */ -#define FTC_CMAP_UNKNOWN ( (FT_UInt16)-1 ) +#define FTC_CMAP_UNKNOWN (FT_UInt16)~0 /*************************************************************************/ @@ -240,7 +202,7 @@ /*************************************************************************/ - FT_CALLBACK_TABLE_DEF + static const FTC_CacheClassRec ftc_cmap_cache_class = { ftc_cmap_node_new, @@ -267,21 +229,6 @@ } -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* - * Unfortunately, it is not possible to support binary backwards - * compatibility in the cmap cache. The FTC_CMapCache_Lookup signature - * changes were too deep, and there is no clever hackish way to detect - * what kind of structure we are being passed. - * - * On the other hand it seems that no production code is using this - * function on Unix distributions. - */ - -#endif - - /* documentation is in ftcache.h */ FT_EXPORT_DEF( FT_UInt ) @@ -316,57 +263,12 @@ return 0; } -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - /* - * If cmap_index is greater than the maximum number of cachable - * charmaps, we assume the request is from a legacy rogue client - * using old internal header. See include/config/ftoption.h. - */ - if ( cmap_index > FT_MAX_CHARMAP_CACHEABLE && !no_cmap_change ) - { - FTC_OldCMapDesc desc = (FTC_OldCMapDesc) face_id; - - - char_code = (FT_UInt32)cmap_index; - query.face_id = desc->face_id; - - - switch ( desc->type ) - { - case FTC_OLD_CMAP_BY_INDEX: - query.cmap_index = desc->u.index; - query.char_code = (FT_UInt32)cmap_index; - break; - - case FTC_OLD_CMAP_BY_ENCODING: - { - FT_Face face; - - - error = FTC_Manager_LookupFace( cache->manager, desc->face_id, - &face ); - if ( error ) - return 0; - - FT_Select_Charmap( face, desc->u.encoding ); - - return FT_Get_Char_Index( face, char_code ); - } - - default: - return 0; - } - } - else - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + if ( !face_id ) + return 0; - { - query.face_id = face_id; - query.cmap_index = (FT_UInt)cmap_index; - query.char_code = char_code; - } + query.face_id = face_id; + query.cmap_index = (FT_UInt)cmap_index; + query.char_code = char_code; hash = FTC_CMAP_HASH( face_id, cmap_index, char_code ); @@ -402,12 +304,6 @@ if ( error ) goto Exit; -#ifdef FT_MAX_CHARMAP_CACHEABLE - /* something rotten can happen with rogue clients */ - if ( cmap_index > FT_MAX_CHARMAP_CACHEABLE ) - return 0; /* XXX: should return appropriate error */ -#endif - if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps ) { FT_CharMap old, cmap = NULL; diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index 76a510d..fff7a08 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -4,7 +4,7 @@ /* */ /* FreeType Cache Manager (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */ +/* Copyright 2000-2006, 2008-2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -151,7 +151,7 @@ } - FT_CALLBACK_TABLE_DEF + static const FTC_MruListClassRec ftc_size_list_class = { sizeof ( FTC_SizeNodeRec ), @@ -186,13 +186,13 @@ FTC_MruNode mrunode; - if ( asize == NULL ) - return FTC_Err_Invalid_Argument; + if ( !asize || !scaler ) + return FT_THROW( Invalid_Argument ); *asize = NULL; if ( !manager ) - return FTC_Err_Invalid_Cache_Handle; + return FT_THROW( Invalid_Cache_Handle ); #ifdef FTC_INLINE @@ -290,7 +290,7 @@ } - FT_CALLBACK_TABLE_DEF + static const FTC_MruListClassRec ftc_face_list_class = { sizeof ( FTC_FaceNodeRec), @@ -313,13 +313,13 @@ FTC_MruNode mrunode; - if ( aface == NULL ) - return FTC_Err_Invalid_Argument; + if ( !aface || !face_id ) + return FT_THROW( Invalid_Argument ); *aface = NULL; if ( !manager ) - return FTC_Err_Invalid_Cache_Handle; + return FT_THROW( Invalid_Cache_Handle ); /* we break encapsulation for the sake of speed */ #ifdef FTC_INLINE @@ -364,7 +364,10 @@ if ( !library ) - return FTC_Err_Invalid_Library_Handle; + return FT_THROW( Invalid_Library_Handle ); + + if ( !amanager || !requester ) + return FT_THROW( Invalid_Argument ); memory = library->memory; @@ -451,12 +454,13 @@ FT_EXPORT_DEF( void ) FTC_Manager_Reset( FTC_Manager manager ) { - if ( manager ) - { - FTC_MruList_Reset( &manager->sizes ); - FTC_MruList_Reset( &manager->faces ); - } - /* XXX: FIXME: flush the caches? */ + if ( !manager ) + return; + + FTC_MruList_Reset( &manager->sizes ); + FTC_MruList_Reset( &manager->faces ); + + FTC_Manager_FlushN( manager, manager->num_nodes ); } @@ -473,7 +477,7 @@ /* check node weights */ if ( first ) { - FT_ULong weight = 0; + FT_Offset weight = 0; node = first; @@ -575,7 +579,7 @@ FTC_CacheClass clazz, FTC_Cache *acache ) { - FT_Error error = FTC_Err_Invalid_Argument; + FT_Error error = FT_ERR( Invalid_Argument ); FTC_Cache cache = NULL; @@ -586,7 +590,7 @@ if ( manager->num_caches >= FTC_MAX_CACHES ) { - error = FTC_Err_Too_Many_Caches; + error = FT_THROW( Too_Many_Caches ); FT_ERROR(( "FTC_Manager_RegisterCache:" " too many registered caches\n" )); goto Exit; @@ -666,6 +670,10 @@ { FT_UInt nn; + + if ( !manager || !face_id ) + return; + /* this will remove all FTC_SizeNode that correspond to * the face_id as well */ @@ -684,60 +692,11 @@ FTC_Node_Unref( FTC_Node node, FTC_Manager manager ) { - if ( node && (FT_UInt)node->cache_index < manager->num_caches ) + if ( node && + manager && + (FT_UInt)node->cache_index < manager->num_caches ) node->ref_count--; } -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_EXPORT_DEF( FT_Error ) - FTC_Manager_Lookup_Face( FTC_Manager manager, - FTC_FaceID face_id, - FT_Face *aface ) - { - return FTC_Manager_LookupFace( manager, face_id, aface ); - } - - - FT_EXPORT( FT_Error ) - FTC_Manager_Lookup_Size( FTC_Manager manager, - FTC_Font font, - FT_Face *aface, - FT_Size *asize ) - { - FTC_ScalerRec scaler; - FT_Error error; - FT_Size size; - FT_Face face; - - - scaler.face_id = font->face_id; - scaler.width = font->pix_width; - scaler.height = font->pix_height; - scaler.pixel = TRUE; - scaler.x_res = 0; - scaler.y_res = 0; - - error = FTC_Manager_LookupSize( manager, &scaler, &size ); - if ( error ) - { - face = NULL; - size = NULL; - } - else - face = size->face; - - if ( aface ) - *aface = face; - - if ( asize ) - *asize = size; - - return error; - } - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - /* END */ diff --git a/src/cache/ftcmanag.h b/src/cache/ftcmanag.h index d6c8516..0aec33c 100644 --- a/src/cache/ftcmanag.h +++ b/src/cache/ftcmanag.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache Manager (specification). */ /* */ -/* Copyright 2000-2001, 2003, 2004, 2006, 2010 by */ +/* Copyright 2000-2001, 2003, 2004, 2006, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -94,8 +94,8 @@ FT_BEGIN_HEADER FT_Memory memory; FTC_Node nodes_list; - FT_ULong max_weight; - FT_ULong cur_weight; + FT_Offset max_weight; + FT_Offset cur_weight; FT_UInt num_nodes; FTC_Cache caches[FTC_MAX_CACHES]; diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h index 8c3797f..6fccf11 100644 --- a/src/cache/ftcmru.h +++ b/src/cache/ftcmru.h @@ -4,7 +4,7 @@ /* */ /* Simple MRU list-cache (specification). */ /* */ -/* Copyright 2000-2001, 2003, 2004, 2005, 2006, 2010 by */ +/* Copyright 2000-2001, 2003-2006, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -166,7 +166,7 @@ FT_BEGIN_HEADER FTC_MruNode _first, _node; \ \ \ - error = FTC_Err_Ok; \ + error = FT_Err_Ok; \ _first = *(_pfirst); \ _node = NULL; \ \ diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index 8bf8d60..59727d1 100644 --- a/src/cache/ftcsbits.c +++ b/src/cache/ftcsbits.c @@ -4,7 +4,7 @@ /* */ /* FreeType sbits manager (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011 by */ +/* Copyright 2000-2006, 2009-2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -116,7 +116,7 @@ if ( (FT_UInt)(gindex - gnode->gindex) >= snode->count ) { FT_ERROR(( "ftc_snode_load: invalid glyph index" )); - return FTC_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } sbit = snode->sbits + ( gindex - gnode->gindex ); @@ -142,12 +142,12 @@ goto BadGlyph; } - /* Check that our values fit into 8-bit containers! */ + /* Check whether our values fit into 8-bit containers! */ /* If this is not the case, our bitmap is too large */ /* and we will leave it as `missing' with sbit.buffer = 0 */ -#define CHECK_CHAR( d ) ( temp = (FT_Char)d, temp == d ) -#define CHECK_BYTE( d ) ( temp = (FT_Byte)d, temp == d ) +#define CHECK_CHAR( d ) ( temp = (FT_Char)d, (FT_Int) temp == (FT_Int) d ) +#define CHECK_BYTE( d ) ( temp = (FT_Byte)d, (FT_UInt)temp == (FT_UInt)d ) /* horizontal advance in pixels */ xadvance = ( slot->advance.x + 32 ) >> 6; @@ -189,13 +189,13 @@ /* we mark unloaded glyphs with `sbit.buffer == 0' */ /* and `width == 255', `height == 0' */ /* */ - if ( error && error != FTC_Err_Out_Of_Memory ) + if ( error && FT_ERR_NEQ( error, Out_Of_Memory ) ) { BadGlyph: sbit->width = 255; sbit->height = 0; sbit->buffer = NULL; - error = FTC_Err_Ok; + error = FT_Err_Ok; if ( asize ) *asize = 0; } @@ -223,7 +223,7 @@ total = clazz->family_get_count( family, cache->manager ); if ( total == 0 || gindex >= total ) { - error = FTC_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } diff --git a/src/cff/cf2arrst.c b/src/cff/cf2arrst.c new file mode 100644 index 0000000..c8d6f13 --- /dev/null +++ b/src/cff/cf2arrst.c @@ -0,0 +1,241 @@ +/***************************************************************************/ +/* */ +/* cf2arrst.c */ +/* */ +/* Adobe's code for Array Stacks (body). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2glue.h" +#include "cf2arrst.h" + +#include "cf2error.h" + + + /* + * CF2_ArrStack uses an error pointer, to enable shared errors. + * Shared errors are necessary when multiple objects allow the program + * to continue after detecting errors. Only the first error should be + * recorded. + */ + + FT_LOCAL_DEF( void ) + cf2_arrstack_init( CF2_ArrStack arrstack, + FT_Memory memory, + FT_Error* error, + size_t sizeItem ) + { + FT_ASSERT( arrstack != NULL ); + + /* initialize the structure */ + arrstack->memory = memory; + arrstack->error = error; + arrstack->sizeItem = sizeItem; + arrstack->allocated = 0; + arrstack->chunk = 10; /* chunks of 10 items */ + arrstack->count = 0; + arrstack->totalSize = 0; + arrstack->ptr = NULL; + } + + + FT_LOCAL_DEF( void ) + cf2_arrstack_finalize( CF2_ArrStack arrstack ) + { + FT_Memory memory = arrstack->memory; /* for FT_FREE */ + + + FT_ASSERT( arrstack != NULL ); + + arrstack->allocated = 0; + arrstack->count = 0; + arrstack->totalSize = 0; + + /* free the data buffer */ + FT_FREE( arrstack->ptr ); + } + + + /* allocate or reallocate the buffer size; */ + /* return false on memory error */ + static FT_Bool + cf2_arrstack_setNumElements( CF2_ArrStack arrstack, + size_t numElements ) + { + FT_ASSERT( arrstack != NULL ); + + { + FT_Error error = FT_Err_Ok; /* for FT_REALLOC */ + FT_Memory memory = arrstack->memory; /* for FT_REALLOC */ + + FT_Long newSize = (FT_Long)( numElements * arrstack->sizeItem ); + + + if ( numElements > LONG_MAX / arrstack->sizeItem ) + goto exit; + + + FT_ASSERT( newSize > 0 ); /* avoid realloc with zero size */ + + if ( !FT_REALLOC( arrstack->ptr, arrstack->totalSize, newSize ) ) + { + arrstack->allocated = numElements; + arrstack->totalSize = newSize; + + if ( arrstack->count > numElements ) + { + /* we truncated the list! */ + CF2_SET_ERROR( arrstack->error, Stack_Overflow ); + arrstack->count = numElements; + return FALSE; + } + + return TRUE; /* success */ + } + } + + exit: + /* if there's not already an error, store this one */ + CF2_SET_ERROR( arrstack->error, Out_Of_Memory ); + + return FALSE; + } + + + /* set the count, ensuring allocation is sufficient */ + FT_LOCAL_DEF( void ) + cf2_arrstack_setCount( CF2_ArrStack arrstack, + size_t numElements ) + { + FT_ASSERT( arrstack != NULL ); + + if ( numElements > arrstack->allocated ) + { + /* expand the allocation first */ + if ( !cf2_arrstack_setNumElements( arrstack, numElements ) ) + return; + } + + arrstack->count = numElements; + } + + + /* clear the count */ + FT_LOCAL_DEF( void ) + cf2_arrstack_clear( CF2_ArrStack arrstack ) + { + FT_ASSERT( arrstack != NULL ); + + arrstack->count = 0; + } + + + /* current number of items */ + FT_LOCAL_DEF( size_t ) + cf2_arrstack_size( const CF2_ArrStack arrstack ) + { + FT_ASSERT( arrstack != NULL ); + + return arrstack->count; + } + + + FT_LOCAL_DEF( void* ) + cf2_arrstack_getBuffer( const CF2_ArrStack arrstack ) + { + FT_ASSERT( arrstack != NULL ); + + return arrstack->ptr; + } + + + /* return pointer to the given element */ + FT_LOCAL_DEF( void* ) + cf2_arrstack_getPointer( const CF2_ArrStack arrstack, + size_t idx ) + { + void* newPtr; + + + FT_ASSERT( arrstack != NULL ); + + if ( idx >= arrstack->count ) + { + /* overflow */ + CF2_SET_ERROR( arrstack->error, Stack_Overflow ); + idx = 0; /* choose safe default */ + } + + newPtr = (FT_Byte*)arrstack->ptr + idx * arrstack->sizeItem; + + return newPtr; + } + + + /* push (append) an element at the end of the list; */ + /* return false on memory error */ + /* TODO: should there be a length param for extra checking? */ + FT_LOCAL_DEF( void ) + cf2_arrstack_push( CF2_ArrStack arrstack, + const void* ptr ) + { + FT_ASSERT( arrstack != NULL ); + + if ( arrstack->count == arrstack->allocated ) + { + /* grow the buffer by one chunk */ + if ( !cf2_arrstack_setNumElements( + arrstack, arrstack->allocated + arrstack->chunk ) ) + { + /* on error, ignore the push */ + return; + } + } + + FT_ASSERT( ptr != NULL ); + + { + size_t offset = arrstack->count * arrstack->sizeItem; + void* newPtr = (FT_Byte*)arrstack->ptr + offset; + + + FT_MEM_COPY( newPtr, ptr, arrstack->sizeItem ); + arrstack->count += 1; + } + } + + +/* END */ diff --git a/src/cff/cf2arrst.h b/src/cff/cf2arrst.h new file mode 100644 index 0000000..ff5ad8b --- /dev/null +++ b/src/cff/cf2arrst.h @@ -0,0 +1,100 @@ +/***************************************************************************/ +/* */ +/* cf2arrst.h */ +/* */ +/* Adobe's code for Array Stacks (specification). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2ARRST_H__ +#define __CF2ARRST_H__ + + +#include "cf2error.h" + + +FT_BEGIN_HEADER + + + /* need to define the struct here (not opaque) so it can be allocated by */ + /* clients */ + typedef struct CF2_ArrStackRec_ + { + FT_Memory memory; + FT_Error* error; + + size_t sizeItem; /* bytes per element */ + size_t allocated; /* items allocated */ + size_t chunk; /* allocation increment in items */ + size_t count; /* number of elements allocated */ + size_t totalSize; /* total bytes allocated */ + + void* ptr; /* ptr to data */ + + } CF2_ArrStackRec, *CF2_ArrStack; + + + FT_LOCAL( void ) + cf2_arrstack_init( CF2_ArrStack arrstack, + FT_Memory memory, + FT_Error* error, + size_t sizeItem ); + FT_LOCAL( void ) + cf2_arrstack_finalize( CF2_ArrStack arrstack ); + + FT_LOCAL( void ) + cf2_arrstack_setCount( CF2_ArrStack arrstack, + size_t numElements ); + FT_LOCAL( void ) + cf2_arrstack_clear( CF2_ArrStack arrstack ); + FT_LOCAL( size_t ) + cf2_arrstack_size( const CF2_ArrStack arrstack ); + + FT_LOCAL( void* ) + cf2_arrstack_getBuffer( const CF2_ArrStack arrstack ); + FT_LOCAL( void* ) + cf2_arrstack_getPointer( const CF2_ArrStack arrstack, + size_t idx ); + + FT_LOCAL( void ) + cf2_arrstack_push( CF2_ArrStack arrstack, + const void* ptr ); + + +FT_END_HEADER + + +#endif /* __CF2ARRST_H__ */ + + +/* END */ diff --git a/src/cff/cf2blues.c b/src/cff/cf2blues.c new file mode 100644 index 0000000..250f89e --- /dev/null +++ b/src/cff/cf2blues.c @@ -0,0 +1,579 @@ +/***************************************************************************/ +/* */ +/* cf2blues.c */ +/* */ +/* Adobe's code for handling Blue Zones (body). */ +/* */ +/* Copyright 2009-2014 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2blues.h" +#include "cf2hints.h" +#include "cf2font.h" + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_cf2blues + + + /* + * For blue values, the FreeType parser produces an array of integers, + * while the Adobe CFF engine produces an array of fixed. + * Define a macro to convert FreeType to fixed. + */ +#define cf2_blueToFixed( x ) cf2_intToFixed( x ) + + + FT_LOCAL_DEF( void ) + cf2_blues_init( CF2_Blues blues, + CF2_Font font ) + { + /* pointer to parsed font object */ + CFF_Decoder* decoder = font->decoder; + + CF2_Fixed zoneHeight; + CF2_Fixed maxZoneHeight = 0; + CF2_Fixed csUnitsPerPixel; + + size_t numBlueValues; + size_t numOtherBlues; + size_t numFamilyBlues; + size_t numFamilyOtherBlues; + + FT_Pos* blueValues; + FT_Pos* otherBlues; + FT_Pos* familyBlues; + FT_Pos* familyOtherBlues; + + size_t i; + CF2_Fixed emBoxBottom, emBoxTop; + +#if 0 + CF2_Int unitsPerEm = font->unitsPerEm; + + + if ( unitsPerEm == 0 ) + unitsPerEm = 1000; +#endif + + FT_ZERO( blues ); + blues->scale = font->innerTransform.d; + + cf2_getBlueMetrics( decoder, + &blues->blueScale, + &blues->blueShift, + &blues->blueFuzz ); + + cf2_getBlueValues( decoder, &numBlueValues, &blueValues ); + cf2_getOtherBlues( decoder, &numOtherBlues, &otherBlues ); + cf2_getFamilyBlues( decoder, &numFamilyBlues, &familyBlues ); + cf2_getFamilyOtherBlues( decoder, &numFamilyOtherBlues, &familyOtherBlues ); + + /* + * synthetic em box hint heuristic + * + * Apply this when ideographic dictionary (LanguageGroup 1) has no + * real alignment zones. Adobe tools generate dummy zones at -250 and + * 1100 for a 1000 unit em. Fonts with ICF-based alignment zones + * should not enable the heuristic. When the heuristic is enabled, + * the font's blue zones are ignored. + * + */ + + /* get em box from OS/2 typoAscender/Descender */ + /* TODO: FreeType does not parse these metrics. Skip them for now. */ +#if 0 + FCM_getHorizontalLineMetrics( &e, + font->font, + &ascender, + &descender, + &linegap ); + if ( ascender - descender == unitsPerEm ) + { + emBoxBottom = cf2_intToFixed( descender ); + emBoxTop = cf2_intToFixed( ascender ); + } + else +#endif + { + emBoxBottom = CF2_ICF_Bottom; + emBoxTop = CF2_ICF_Top; + } + + if ( cf2_getLanguageGroup( decoder ) == 1 && + ( numBlueValues == 0 || + ( numBlueValues == 4 && + cf2_blueToFixed( blueValues[0] ) < emBoxBottom && + cf2_blueToFixed( blueValues[1] ) < emBoxBottom && + cf2_blueToFixed( blueValues[2] ) > emBoxTop && + cf2_blueToFixed( blueValues[3] ) > emBoxTop ) ) ) + { + /* + * Construct hint edges suitable for synthetic ghost hints at top + * and bottom of em box. +-CF2_MIN_COUNTER allows for unhinted + * features above or below the last hinted edge. This also gives a + * net 1 pixel boost to the height of ideographic glyphs. + * + * Note: Adjust synthetic hints outward by epsilon (0x.0001) to + * avoid interference. E.g., some fonts have real hints at + * 880 and -120. + */ + + blues->emBoxBottomEdge.csCoord = emBoxBottom - CF2_FIXED_EPSILON; + blues->emBoxBottomEdge.dsCoord = cf2_fixedRound( + FT_MulFix( + blues->emBoxBottomEdge.csCoord, + blues->scale ) ) - + CF2_MIN_COUNTER; + blues->emBoxBottomEdge.scale = blues->scale; + blues->emBoxBottomEdge.flags = CF2_GhostBottom | + CF2_Locked | + CF2_Synthetic; + + blues->emBoxTopEdge.csCoord = emBoxTop + CF2_FIXED_EPSILON + + 2 * font->darkenY; + blues->emBoxTopEdge.dsCoord = cf2_fixedRound( + FT_MulFix( + blues->emBoxTopEdge.csCoord, + blues->scale ) ) + + CF2_MIN_COUNTER; + blues->emBoxTopEdge.scale = blues->scale; + blues->emBoxTopEdge.flags = CF2_GhostTop | + CF2_Locked | + CF2_Synthetic; + + blues->doEmBoxHints = TRUE; /* enable the heuristic */ + + return; + } + + /* copy `BlueValues' and `OtherBlues' to a combined array of top and */ + /* bottom zones */ + for ( i = 0; i < numBlueValues; i += 2 ) + { + blues->zone[blues->count].csBottomEdge = + cf2_blueToFixed( blueValues[i] ); + blues->zone[blues->count].csTopEdge = + cf2_blueToFixed( blueValues[i + 1] ); + + zoneHeight = blues->zone[blues->count].csTopEdge - + blues->zone[blues->count].csBottomEdge; + + if ( zoneHeight < 0 ) + { + FT_TRACE4(( "cf2_blues_init: ignoring negative zone height\n" )); + continue; /* reject this zone */ + } + + if ( zoneHeight > maxZoneHeight ) + { + /* take maximum before darkening adjustment */ + /* so overshoot suppression point doesn't change */ + maxZoneHeight = zoneHeight; + } + + /* adjust both edges of top zone upward by twice darkening amount */ + if ( i != 0 ) + { + blues->zone[blues->count].csTopEdge += 2 * font->darkenY; + blues->zone[blues->count].csBottomEdge += 2 * font->darkenY; + } + + /* first `BlueValue' is bottom zone; others are top */ + if ( i == 0 ) + { + blues->zone[blues->count].bottomZone = + TRUE; + blues->zone[blues->count].csFlatEdge = + blues->zone[blues->count].csTopEdge; + } + else + { + blues->zone[blues->count].bottomZone = + FALSE; + blues->zone[blues->count].csFlatEdge = + blues->zone[blues->count].csBottomEdge; + } + + blues->count += 1; + } + + for ( i = 0; i < numOtherBlues; i += 2 ) + { + blues->zone[blues->count].csBottomEdge = + cf2_blueToFixed( otherBlues[i] ); + blues->zone[blues->count].csTopEdge = + cf2_blueToFixed( otherBlues[i + 1] ); + + zoneHeight = blues->zone[blues->count].csTopEdge - + blues->zone[blues->count].csBottomEdge; + + if ( zoneHeight < 0 ) + { + FT_TRACE4(( "cf2_blues_init: ignoring negative zone height\n" )); + continue; /* reject this zone */ + } + + if ( zoneHeight > maxZoneHeight ) + { + /* take maximum before darkening adjustment */ + /* so overshoot suppression point doesn't change */ + maxZoneHeight = zoneHeight; + } + + /* Note: bottom zones are not adjusted for darkening amount */ + + /* all OtherBlues are bottom zone */ + blues->zone[blues->count].bottomZone = + TRUE; + blues->zone[blues->count].csFlatEdge = + blues->zone[blues->count].csTopEdge; + + blues->count += 1; + } + + /* Adjust for FamilyBlues */ + + /* Search for the nearest flat edge in `FamilyBlues' or */ + /* `FamilyOtherBlues'. According to the Black Book, any matching edge */ + /* must be within one device pixel */ + + csUnitsPerPixel = FT_DivFix( cf2_intToFixed( 1 ), blues->scale ); + + /* loop on all zones in this font */ + for ( i = 0; i < blues->count; i++ ) + { + size_t j; + CF2_Fixed minDiff; + CF2_Fixed flatFamilyEdge, diff; + /* value for this font */ + CF2_Fixed flatEdge = blues->zone[i].csFlatEdge; + + + if ( blues->zone[i].bottomZone ) + { + /* In a bottom zone, the top edge is the flat edge. */ + /* Search `FamilyOtherBlues' for bottom zones; look for closest */ + /* Family edge that is within the one pixel threshold. */ + + minDiff = CF2_FIXED_MAX; + + for ( j = 0; j < numFamilyOtherBlues; j += 2 ) + { + /* top edge */ + flatFamilyEdge = cf2_blueToFixed( familyOtherBlues[j + 1] ); + + diff = cf2_fixedAbs( flatEdge - flatFamilyEdge ); + + if ( diff < minDiff && diff < csUnitsPerPixel ) + { + blues->zone[i].csFlatEdge = flatFamilyEdge; + minDiff = diff; + + if ( diff == 0 ) + break; + } + } + + /* check the first member of FamilyBlues, which is a bottom zone */ + if ( numFamilyBlues >= 2 ) + { + /* top edge */ + flatFamilyEdge = cf2_blueToFixed( familyBlues[1] ); + + diff = cf2_fixedAbs( flatEdge - flatFamilyEdge ); + + if ( diff < minDiff && diff < csUnitsPerPixel ) + blues->zone[i].csFlatEdge = flatFamilyEdge; + } + } + else + { + /* In a top zone, the bottom edge is the flat edge. */ + /* Search `FamilyBlues' for top zones; skip first zone, which is a */ + /* bottom zone; look for closest Family edge that is within the */ + /* one pixel threshold */ + + minDiff = CF2_FIXED_MAX; + + for ( j = 2; j < numFamilyBlues; j += 2 ) + { + /* bottom edge */ + flatFamilyEdge = cf2_blueToFixed( familyBlues[j] ); + + /* adjust edges of top zone upward by twice darkening amount */ + flatFamilyEdge += 2 * font->darkenY; /* bottom edge */ + + diff = cf2_fixedAbs( flatEdge - flatFamilyEdge ); + + if ( diff < minDiff && diff < csUnitsPerPixel ) + { + blues->zone[i].csFlatEdge = flatFamilyEdge; + minDiff = diff; + + if ( diff == 0 ) + break; + } + } + } + } + + /* TODO: enforce separation of zones, including BlueFuzz */ + + /* Adjust BlueScale; similar to AdjustBlueScale() in coretype */ + /* `bcsetup.c'. */ + + if ( maxZoneHeight > 0 ) + { + if ( blues->blueScale > FT_DivFix( cf2_intToFixed( 1 ), + maxZoneHeight ) ) + { + /* clamp at maximum scale */ + blues->blueScale = FT_DivFix( cf2_intToFixed( 1 ), + maxZoneHeight ); + } + + /* + * TODO: Revisit the bug fix for 613448. The minimum scale + * requirement catches a number of library fonts. For + * example, with default BlueScale (.039625) and 0.4 minimum, + * the test below catches any font with maxZoneHeight < 10.1. + * There are library fonts ranging from 2 to 10 that get + * caught, including e.g., Eurostile LT Std Medium with + * maxZoneHeight of 6. + * + */ +#if 0 + if ( blueScale < .4 / maxZoneHeight ) + { + tetraphilia_assert( 0 ); + /* clamp at minimum scale, per bug 0613448 fix */ + blueScale = .4 / maxZoneHeight; + } +#endif + + } + + /* + * Suppress overshoot and boost blue zones at small sizes. Boost + * amount varies linearly from 0.5 pixel near 0 to 0 pixel at + * blueScale cutoff. + * Note: This boost amount is different from the coretype heuristic. + * + */ + + if ( blues->scale < blues->blueScale ) + { + blues->suppressOvershoot = TRUE; + + /* Change rounding threshold for `dsFlatEdge'. */ + /* Note: constant changed from 0.5 to 0.6 to avoid a problem with */ + /* 10ppem Arial */ + + blues->boost = cf2_floatToFixed( .6 ) - + FT_MulDiv( cf2_floatToFixed ( .6 ), + blues->scale, + blues->blueScale ); + if ( blues->boost > 0x7FFF ) + { + /* boost must remain less than 0.5, or baseline could go negative */ + blues->boost = 0x7FFF; + } + } + + /* boost and darkening have similar effects; don't do both */ + if ( font->stemDarkened ) + blues->boost = 0; + + /* set device space alignment for each zone; */ + /* apply boost amount before rounding flat edge */ + + for ( i = 0; i < blues->count; i++ ) + { + if ( blues->zone[i].bottomZone ) + blues->zone[i].dsFlatEdge = cf2_fixedRound( + FT_MulFix( + blues->zone[i].csFlatEdge, + blues->scale ) - + blues->boost ); + else + blues->zone[i].dsFlatEdge = cf2_fixedRound( + FT_MulFix( + blues->zone[i].csFlatEdge, + blues->scale ) + + blues->boost ); + } + } + + + /* + * Check whether `stemHint' is captured by one of the blue zones. + * + * Zero, one or both edges may be valid; only valid edges can be + * captured. For compatibility with CoolType, search top and bottom + * zones in the same pass (see `BlueLock'). If a hint is captured, + * return true and position the edge(s) in one of 3 ways: + * + * 1) If `BlueScale' suppresses overshoot, position the captured edge + * at the flat edge of the zone. + * 2) If overshoot is not suppressed and `BlueShift' requires + * overshoot, position the captured edge a minimum of 1 device pixel + * from the flat edge. + * 3) If overshoot is not suppressed or required, position the captured + * edge at the nearest device pixel. + * + */ + FT_LOCAL_DEF( FT_Bool ) + cf2_blues_capture( const CF2_Blues blues, + CF2_Hint bottomHintEdge, + CF2_Hint topHintEdge ) + { + /* TODO: validate? */ + CF2_Fixed csFuzz = blues->blueFuzz; + + /* new position of captured edge */ + CF2_Fixed dsNew; + + /* amount that hint is moved when positioned */ + CF2_Fixed dsMove = 0; + + FT_Bool captured = FALSE; + CF2_UInt i; + + + /* assert edge flags are consistent */ + FT_ASSERT( !cf2_hint_isTop( bottomHintEdge ) && + !cf2_hint_isBottom( topHintEdge ) ); + + /* TODO: search once without blue fuzz for compatibility with coretype? */ + for ( i = 0; i < blues->count; i++ ) + { + if ( blues->zone[i].bottomZone && + cf2_hint_isBottom( bottomHintEdge ) ) + { + if ( ( blues->zone[i].csBottomEdge - csFuzz ) <= + bottomHintEdge->csCoord && + bottomHintEdge->csCoord <= + ( blues->zone[i].csTopEdge + csFuzz ) ) + { + /* bottom edge captured by bottom zone */ + + if ( blues->suppressOvershoot ) + dsNew = blues->zone[i].dsFlatEdge; + + else if ( ( blues->zone[i].csTopEdge - bottomHintEdge->csCoord ) >= + blues->blueShift ) + { + /* guarantee minimum of 1 pixel overshoot */ + dsNew = FT_MIN( + cf2_fixedRound( bottomHintEdge->dsCoord ), + blues->zone[i].dsFlatEdge - cf2_intToFixed( 1 ) ); + } + + else + { + /* simply round captured edge */ + dsNew = cf2_fixedRound( bottomHintEdge->dsCoord ); + } + + dsMove = dsNew - bottomHintEdge->dsCoord; + captured = TRUE; + + break; + } + } + + if ( !blues->zone[i].bottomZone && cf2_hint_isTop( topHintEdge ) ) + { + if ( ( blues->zone[i].csBottomEdge - csFuzz ) <= + topHintEdge->csCoord && + topHintEdge->csCoord <= + ( blues->zone[i].csTopEdge + csFuzz ) ) + { + /* top edge captured by top zone */ + + if ( blues->suppressOvershoot ) + dsNew = blues->zone[i].dsFlatEdge; + + else if ( ( topHintEdge->csCoord - blues->zone[i].csBottomEdge ) >= + blues->blueShift ) + { + /* guarantee minimum of 1 pixel overshoot */ + dsNew = FT_MAX( + cf2_fixedRound( topHintEdge->dsCoord ), + blues->zone[i].dsFlatEdge + cf2_intToFixed( 1 ) ); + } + + else + { + /* simply round captured edge */ + dsNew = cf2_fixedRound( topHintEdge->dsCoord ); + } + + dsMove = dsNew - topHintEdge->dsCoord; + captured = TRUE; + + break; + } + } + } + + if ( captured ) + { + /* move both edges and flag them `locked' */ + if ( cf2_hint_isValid( bottomHintEdge ) ) + { + bottomHintEdge->dsCoord += dsMove; + cf2_hint_lock( bottomHintEdge ); + } + + if ( cf2_hint_isValid( topHintEdge ) ) + { + topHintEdge->dsCoord += dsMove; + cf2_hint_lock( topHintEdge ); + } + } + + return captured; + } + + +/* END */ diff --git a/src/cff/cf2blues.h b/src/cff/cf2blues.h new file mode 100644 index 0000000..2f38fca --- /dev/null +++ b/src/cff/cf2blues.h @@ -0,0 +1,185 @@ +/***************************************************************************/ +/* */ +/* cf2blues.h */ +/* */ +/* Adobe's code for handling Blue Zones (specification). */ +/* */ +/* Copyright 2009-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + + /* + * A `CF2_Blues' object stores the blue zones (horizontal alignment + * zones) of a font. These are specified in the CFF private dictionary + * by `BlueValues', `OtherBlues', `FamilyBlues', and `FamilyOtherBlues'. + * Each zone is defined by a top and bottom edge in character space. + * Further, each zone is either a top zone or a bottom zone, as recorded + * by `bottomZone'. + * + * The maximum number of `BlueValues' and `FamilyBlues' is 7 each. + * However, these are combined to produce a total of 7 zones. + * Similarly, the maximum number of `OtherBlues' and `FamilyOtherBlues' + * is 5 and these are combined to produce an additional 5 zones. + * + * Blue zones are used to `capture' hints and force them to a common + * alignment point. This alignment is recorded in device space in + * `dsFlatEdge'. Except for this value, a `CF2_Blues' object could be + * constructed independently of scaling. Construction may occur once + * the matrix is known. Other features implemented in the Capture + * method are overshoot suppression, overshoot enforcement, and Blue + * Boost. + * + * Capture is determined by `BlueValues' and `OtherBlues', but the + * alignment point may be adjusted to the scaled flat edge of + * `FamilyBlues' or `FamilyOtherBlues'. No alignment is done to the + * curved edge of a zone. + * + */ + + +#ifndef __CF2BLUES_H__ +#define __CF2BLUES_H__ + + +#include "cf2glue.h" + + +FT_BEGIN_HEADER + + + /* + * `CF2_Hint' is shared by `cf2hints.h' and + * `cf2blues.h', but `cf2blues.h' depends on + * `cf2hints.h', so define it here. Note: The typedef is in + * `cf2glue.h'. + * + */ + enum + { + CF2_GhostBottom = 0x1, /* a single bottom edge */ + CF2_GhostTop = 0x2, /* a single top edge */ + CF2_PairBottom = 0x4, /* the bottom edge of a stem hint */ + CF2_PairTop = 0x8, /* the top edge of a stem hint */ + CF2_Locked = 0x10, /* this edge has been aligned */ + /* by a blue zone */ + CF2_Synthetic = 0x20 /* this edge was synthesized */ + }; + + + /* + * Default value for OS/2 typoAscender/Descender when their difference + * is not equal to `unitsPerEm'. The default is based on -250 and 1100 + * in `CF2_Blues', assuming 1000 units per em here. + * + */ + enum + { + CF2_ICF_Top = cf2_intToFixed( 880 ), + CF2_ICF_Bottom = cf2_intToFixed( -120 ) + }; + + + /* + * Constant used for hint adjustment and for synthetic em box hint + * placement. + */ +#define CF2_MIN_COUNTER cf2_floatToFixed( 0.5 ) + + + /* shared typedef is in cf2glue.h */ + struct CF2_HintRec_ + { + CF2_UInt flags; /* attributes of the edge */ + size_t index; /* index in original stem hint array */ + /* (if not synthetic) */ + CF2_Fixed csCoord; + CF2_Fixed dsCoord; + CF2_Fixed scale; + }; + + + typedef struct CF2_BlueRec_ + { + CF2_Fixed csBottomEdge; + CF2_Fixed csTopEdge; + CF2_Fixed csFlatEdge; /* may be from either local or Family zones */ + CF2_Fixed dsFlatEdge; /* top edge of bottom zone or bottom edge */ + /* of top zone (rounded) */ + FT_Bool bottomZone; + + } CF2_BlueRec; + + + /* max total blue zones is 12 */ + enum + { + CF2_MAX_BLUES = 7, + CF2_MAX_OTHERBLUES = 5 + }; + + + typedef struct CF2_BluesRec_ + { + CF2_Fixed scale; + CF2_UInt count; + FT_Bool suppressOvershoot; + FT_Bool doEmBoxHints; + + CF2_Fixed blueScale; + CF2_Fixed blueShift; + CF2_Fixed blueFuzz; + + CF2_Fixed boost; + + CF2_HintRec emBoxTopEdge; + CF2_HintRec emBoxBottomEdge; + + CF2_BlueRec zone[CF2_MAX_BLUES + CF2_MAX_OTHERBLUES]; + + } CF2_BluesRec, *CF2_Blues; + + + FT_LOCAL( void ) + cf2_blues_init( CF2_Blues blues, + CF2_Font font ); + FT_LOCAL( FT_Bool ) + cf2_blues_capture( const CF2_Blues blues, + CF2_Hint bottomHintEdge, + CF2_Hint topHintEdge ); + + +FT_END_HEADER + + +#endif /* __CF2BLUES_H__ */ + + +/* END */ diff --git a/src/cff/cf2error.c b/src/cff/cf2error.c new file mode 100644 index 0000000..b5595a3 --- /dev/null +++ b/src/cff/cf2error.c @@ -0,0 +1,52 @@ +/***************************************************************************/ +/* */ +/* cf2error.c */ +/* */ +/* Adobe's code for error handling (body). */ +/* */ +/* Copyright 2006-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include "cf2error.h" + + + FT_LOCAL_DEF( void ) + cf2_setError( FT_Error* error, + FT_Error value ) + { + if ( error && *error == 0 ) + *error = value; + } + + +/* END */ diff --git a/src/cff/cf2error.h b/src/cff/cf2error.h new file mode 100644 index 0000000..6453ebc --- /dev/null +++ b/src/cff/cf2error.h @@ -0,0 +1,119 @@ +/***************************************************************************/ +/* */ +/* cf2error.h */ +/* */ +/* Adobe's code for error handling (specification). */ +/* */ +/* Copyright 2006-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2ERROR_H__ +#define __CF2ERROR_H__ + + +#include FT_MODULE_ERRORS_H + +#undef __FTERRORS_H__ + +#undef FT_ERR_PREFIX +#define FT_ERR_PREFIX CF2_Err_ +#define FT_ERR_BASE FT_Mod_Err_CF2 + + +#include FT_ERRORS_H +#include "cf2ft.h" + + +FT_BEGIN_HEADER + + + /* + * A poor-man error facility. + * + * This code being written in vanilla C, doesn't have the luxury of a + * language-supported exception mechanism such as the one available in + * Java. Instead, we are stuck with using error codes that must be + * carefully managed and preserved. However, it is convenient for us to + * model our error mechanism on a Java-like exception mechanism. + * When we assign an error code we are thus `throwing' an error. + * + * The perservation of an error code is done by coding convention. + * Upon a function call if the error code is anything other than + * `FT_Err_Ok', which is guaranteed to be zero, we + * will return without altering that error. This will allow the + * error to propogate and be handled at the appropriate location in + * the code. + * + * This allows a style of code where the error code is initialized + * up front and a block of calls are made with the error code only + * being checked after the block. If a new error occurs, the original + * error will be preserved and a functional no-op should result in any + * subsequent function that has an initial error code not equal to + * `FT_Err_Ok'. + * + * Errors are encoded by calling the `FT_THROW' macro. For example, + * + * { + * FT_Error e; + * + * + * ... + * e = FT_THROW( Out_Of_Memory ); + * } + * + */ + + + /* Set error code to a particular value. */ + FT_LOCAL( void ) + cf2_setError( FT_Error* error, + FT_Error value ); + + + /* + * A macro that conditionally sets an error code. + * + * This macro will first check whether `error' is set; + * if not, it will set it to `e'. + * + */ +#define CF2_SET_ERROR( error, e ) \ + cf2_setError( error, FT_THROW( e ) ) + + +FT_END_HEADER + + +#endif /* __CF2ERROR_H__ */ + + +/* END */ diff --git a/src/cff/cf2fixed.h b/src/cff/cf2fixed.h new file mode 100644 index 0000000..ed1452a --- /dev/null +++ b/src/cff/cf2fixed.h @@ -0,0 +1,95 @@ +/***************************************************************************/ +/* */ +/* cf2fixed.h */ +/* */ +/* Adobe's code for Fixed Point Mathematics (specification only). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2FIXED_H__ +#define __CF2FIXED_H__ + + +FT_BEGIN_HEADER + + + /* rasterizer integer and fixed point arithmetic must be 32-bit */ + +#define CF2_Fixed CF2_F16Dot16 + typedef FT_Int32 CF2_Frac; /* 2.30 fixed point */ + + +#define CF2_FIXED_MAX ( (CF2_Fixed)0x7FFFFFFFL ) +#define CF2_FIXED_MIN ( (CF2_Fixed)0x80000000L ) +#define CF2_FIXED_ONE 0x10000L +#define CF2_FIXED_EPSILON 0x0001 + + /* in C 89, left and right shift of negative numbers is */ + /* implementation specific behaviour in the general case */ + +#define cf2_intToFixed( i ) \ + ( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) ) +#define cf2_fixedToInt( x ) \ + ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) ) +#define cf2_fixedRound( x ) \ + ( (CF2_Fixed)( ( (x) + 0x8000 ) & 0xFFFF0000L ) ) +#define cf2_floatToFixed( f ) \ + ( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) ) +#define cf2_fixedAbs( x ) \ + ( (x) < 0 ? -(x) : (x) ) +#define cf2_fixedFloor( x ) \ + ( (CF2_Fixed)( (x) & 0xFFFF0000L ) ) +#define cf2_fixedFraction( x ) \ + ( (x) - cf2_fixedFloor( x ) ) +#define cf2_fracToFixed( x ) \ + ( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 ) \ + : ( ( (x) + 0x2000 ) >> 14 ) ) + + + /* signed numeric types */ + typedef enum CF2_NumberType_ + { + CF2_NumberFixed, /* 16.16 */ + CF2_NumberFrac, /* 2.30 */ + CF2_NumberInt /* 32.0 */ + + } CF2_NumberType; + + +FT_END_HEADER + + +#endif /* __CF2FIXED_H__ */ + + +/* END */ diff --git a/src/cff/cf2font.c b/src/cff/cf2font.c new file mode 100644 index 0000000..83fd348 --- /dev/null +++ b/src/cff/cf2font.c @@ -0,0 +1,512 @@ +/***************************************************************************/ +/* */ +/* cf2font.c */ +/* */ +/* Adobe's code for font instances (body). */ +/* */ +/* Copyright 2007-2014 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include <ft2build.h> +#include FT_INTERNAL_CALC_H + +#include "cf2ft.h" + +#include "cf2glue.h" +#include "cf2font.h" +#include "cf2error.h" +#include "cf2intrp.h" + + + /* Compute a stem darkening amount in character space. */ + static void + cf2_computeDarkening( CF2_Fixed emRatio, + CF2_Fixed ppem, + CF2_Fixed stemWidth, + CF2_Fixed* darkenAmount, + CF2_Fixed boldenAmount, + FT_Bool stemDarkened, + FT_Int* darkenParams ) + { + /* + * Total darkening amount is computed in 1000 unit character space + * using the modified 5 part curve as Adobe's Avalon rasterizer. + * The darkening amount is smaller for thicker stems. + * It becomes zero when the stem is thicker than 2.333 pixels. + * + * By default, we use + * + * darkenAmount = 0.4 pixels if scaledStem <= 0.5 pixels, + * darkenAmount = 0.275 pixels if 1 <= scaledStem <= 1.667 pixels, + * darkenAmount = 0 pixel if scaledStem >= 2.333 pixels, + * + * and piecewise linear in-between: + * + * + * darkening + * ^ + * | + * | (x1,y1) + * |--------+ + * | \ + * | \ + * | \ (x3,y3) + * | +----------+ + * | (x2,y2) \ + * | \ + * | \ + * | +----------------- + * | (x4,y4) + * +---------------------------------------------> stem + * thickness + * + * + * This corresponds to the following values for the + * `darkening-parameters' property: + * + * (x1, y1) = (500, 400) + * (x2, y2) = (1000, 275) + * (x3, y3) = (1667, 275) + * (x4, y4) = (2333, 0) + * + */ + + /* Internal calculations are done in units per thousand for */ + /* convenience. The x axis is scaled stem width in */ + /* thousandths of a pixel. That is, 1000 is 1 pixel. */ + /* The y axis is darkening amount in thousandths of a pixel.*/ + /* In the code, below, dividing by ppem and */ + /* adjusting for emRatio converts darkenAmount to character */ + /* space (font units). */ + CF2_Fixed stemWidthPer1000, scaledStem; + FT_Int logBase2; + + + *darkenAmount = 0; + + if ( boldenAmount == 0 && !stemDarkened ) + return; + + /* protect against range problems and divide by zero */ + if ( emRatio < cf2_floatToFixed( .01 ) ) + return; + + if ( stemDarkened ) + { + FT_Int x1 = darkenParams[0]; + FT_Int y1 = darkenParams[1]; + FT_Int x2 = darkenParams[2]; + FT_Int y2 = darkenParams[3]; + FT_Int x3 = darkenParams[4]; + FT_Int y3 = darkenParams[5]; + FT_Int x4 = darkenParams[6]; + FT_Int y4 = darkenParams[7]; + + + /* convert from true character space to 1000 unit character space; */ + /* add synthetic emboldening effect */ + + /* `stemWidthPer1000' will not overflow for a legitimate font */ + + stemWidthPer1000 = FT_MulFix( stemWidth + boldenAmount, emRatio ); + + /* `scaledStem' can easily overflow, so we must clamp its maximum */ + /* value; the test doesn't need to be precise, but must be */ + /* conservative. The clamp value (default 2333) where */ + /* `darkenAmount' is zero is well below the overflow value of */ + /* 32767. */ + /* */ + /* FT_MSB computes the integer part of the base 2 logarithm. The */ + /* number of bits for the product is 1 or 2 more than the sum of */ + /* logarithms; remembering that the 16 lowest bits of the fraction */ + /* are dropped this is correct to within a factor of almost 4. */ + /* For example, 0x80.0000 * 0x80.0000 = 0x4000.0000 is 23+23 and */ + /* is flagged as possible overflow because 0xFF.FFFF * 0xFF.FFFF = */ + /* 0xFFFF.FE00 is also 23+23. */ + + logBase2 = FT_MSB( (FT_UInt32)stemWidthPer1000 ) + + FT_MSB( (FT_UInt32)ppem ); + + if ( logBase2 >= 46 ) + /* possible overflow */ + scaledStem = cf2_intToFixed( x4 ); + else + scaledStem = FT_MulFix( stemWidthPer1000, ppem ); + + /* now apply the darkening parameters */ + + if ( scaledStem < cf2_intToFixed( x1 ) ) + *darkenAmount = FT_DivFix( cf2_intToFixed( y1 ), ppem ); + + else if ( scaledStem < cf2_intToFixed( x2 ) ) + { + FT_Int xdelta = x2 - x1; + FT_Int ydelta = y2 - y1; + FT_Int x = stemWidthPer1000 - + FT_DivFix( cf2_intToFixed( x1 ), ppem ); + + + if ( !xdelta ) + goto Try_x3; + + *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) + + FT_DivFix( cf2_intToFixed( y1 ), ppem ); + } + + else if ( scaledStem < cf2_intToFixed( x3 ) ) + { + Try_x3: + { + FT_Int xdelta = x3 - x2; + FT_Int ydelta = y3 - y2; + FT_Int x = stemWidthPer1000 - + FT_DivFix( cf2_intToFixed( x2 ), ppem ); + + + if ( !xdelta ) + goto Try_x4; + + *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) + + FT_DivFix( cf2_intToFixed( y2 ), ppem ); + } + } + + else if ( scaledStem < cf2_intToFixed( x4 ) ) + { + Try_x4: + { + FT_Int xdelta = x4 - x3; + FT_Int ydelta = y4 - y3; + FT_Int x = stemWidthPer1000 - + FT_DivFix( cf2_intToFixed( x3 ), ppem ); + + + if ( !xdelta ) + goto Use_y4; + + *darkenAmount = FT_MulDiv( x, ydelta, xdelta ) + + FT_DivFix( cf2_intToFixed( y3 ), ppem ); + } + } + + else + { + Use_y4: + *darkenAmount = FT_DivFix( cf2_intToFixed( y4 ), ppem ); + } + + /* use half the amount on each side and convert back to true */ + /* character space */ + *darkenAmount = FT_DivFix( *darkenAmount, 2 * emRatio ); + } + + /* add synthetic emboldening effect in character space */ + *darkenAmount += boldenAmount / 2; + } + + + /* set up values for the current FontDict and matrix */ + + /* caller's transform is adjusted for subpixel positioning */ + static void + cf2_font_setup( CF2_Font font, + const CF2_Matrix* transform ) + { + /* pointer to parsed font object */ + CFF_Decoder* decoder = font->decoder; + + FT_Bool needExtraSetup = FALSE; + + /* character space units */ + CF2_Fixed boldenX = font->syntheticEmboldeningAmountX; + CF2_Fixed boldenY = font->syntheticEmboldeningAmountY; + + CFF_SubFont subFont; + CF2_Fixed ppem; + + + /* clear previous error */ + font->error = FT_Err_Ok; + + /* if a CID fontDict has changed, we need to recompute some cached */ + /* data */ + subFont = cf2_getSubfont( decoder ); + if ( font->lastSubfont != subFont ) + { + font->lastSubfont = subFont; + needExtraSetup = TRUE; + } + + /* if ppem has changed, we need to recompute some cached data */ + /* note: because of CID font matrix concatenation, ppem and transform */ + /* do not necessarily track. */ + ppem = cf2_getPpemY( decoder ); + if ( font->ppem != ppem ) + { + font->ppem = ppem; + needExtraSetup = TRUE; + } + + /* copy hinted flag on each call */ + font->hinted = (FT_Bool)( font->renderingFlags & CF2_FlagsHinted ); + + /* determine if transform has changed; */ + /* include Fontmatrix but ignore translation */ + if ( ft_memcmp( transform, + &font->currentTransform, + 4 * sizeof ( CF2_Fixed ) ) != 0 ) + { + /* save `key' information for `cache of one' matrix data; */ + /* save client transform, without the translation */ + font->currentTransform = *transform; + font->currentTransform.tx = + font->currentTransform.ty = cf2_intToFixed( 0 ); + + /* TODO: FreeType transform is simple scalar; for now, use identity */ + /* for outer */ + font->innerTransform = *transform; + font->outerTransform.a = + font->outerTransform.d = cf2_intToFixed( 1 ); + font->outerTransform.b = + font->outerTransform.c = cf2_intToFixed( 0 ); + + needExtraSetup = TRUE; + } + + /* + * font->darkened is set to true if there is a stem darkening request or + * the font is synthetic emboldened. + * font->darkened controls whether to adjust blue zones, winding order, + * and hinting. + * + */ + if ( font->stemDarkened != ( font->renderingFlags & CF2_FlagsDarkened ) ) + { + font->stemDarkened = + (FT_Bool)( font->renderingFlags & CF2_FlagsDarkened ); + + /* blue zones depend on darkened flag */ + needExtraSetup = TRUE; + } + + /* recompute variables that are dependent on transform or FontDict or */ + /* darken flag */ + if ( needExtraSetup ) + { + /* StdVW is found in the private dictionary; */ + /* recompute darkening amounts whenever private dictionary or */ + /* transform change */ + /* Note: a rendering flag turns darkening on or off, so we want to */ + /* store the `on' amounts; */ + /* darkening amount is computed in character space */ + /* TODO: testing size-dependent darkening here; */ + /* what to do for rotations? */ + + CF2_Fixed emRatio; + CF2_Fixed stdHW; + CF2_Int unitsPerEm = font->unitsPerEm; + + + if ( unitsPerEm == 0 ) + unitsPerEm = 1000; + + ppem = FT_MAX( cf2_intToFixed( 4 ), + font->ppem ); /* use minimum ppem of 4 */ + +#if 0 + /* since vstem is measured in the x-direction, we use the `a' member */ + /* of the fontMatrix */ + emRatio = cf2_fixedFracMul( cf2_intToFixed( 1000 ), fontMatrix->a ); +#endif + + /* Freetype does not preserve the fontMatrix when parsing; use */ + /* unitsPerEm instead. */ + /* TODO: check precision of this */ + emRatio = cf2_intToFixed( 1000 ) / unitsPerEm; + font->stdVW = cf2_getStdVW( decoder ); + + if ( font->stdVW <= 0 ) + font->stdVW = FT_DivFix( cf2_intToFixed( 75 ), emRatio ); + + if ( boldenX > 0 ) + { + /* Ensure that boldenX is at least 1 pixel for synthetic bold font */ + /* (similar to what Avalon does) */ + boldenX = FT_MAX( boldenX, + FT_DivFix( cf2_intToFixed( unitsPerEm ), ppem ) ); + + /* Synthetic emboldening adds at least 1 pixel to darkenX, while */ + /* stem darkening adds at most half pixel. Since the purpose of */ + /* stem darkening (readability at small sizes) is met with */ + /* synthetic emboldening, no need to add stem darkening for a */ + /* synthetic bold font. */ + cf2_computeDarkening( emRatio, + ppem, + font->stdVW, + &font->darkenX, + boldenX, + FALSE, + font->darkenParams ); + } + else + cf2_computeDarkening( emRatio, + ppem, + font->stdVW, + &font->darkenX, + 0, + font->stemDarkened, + font->darkenParams ); + +#if 0 + /* since hstem is measured in the y-direction, we use the `d' member */ + /* of the fontMatrix */ + /* TODO: use the same units per em as above; check this */ + emRatio = cf2_fixedFracMul( cf2_intToFixed( 1000 ), fontMatrix->d ); +#endif + + /* set the default stem width, because it must be the same for all */ + /* family members; */ + /* choose a constant for StdHW that depends on font contrast */ + stdHW = cf2_getStdHW( decoder ); + + if ( stdHW > 0 && font->stdVW > 2 * stdHW ) + font->stdHW = FT_DivFix( cf2_intToFixed( 75 ), emRatio ); + else + { + /* low contrast font gets less hstem darkening */ + font->stdHW = FT_DivFix( cf2_intToFixed( 110 ), emRatio ); + } + + cf2_computeDarkening( emRatio, + ppem, + font->stdHW, + &font->darkenY, + boldenY, + font->stemDarkened, + font->darkenParams ); + + if ( font->darkenX != 0 || font->darkenY != 0 ) + font->darkened = TRUE; + else + font->darkened = FALSE; + + font->reverseWinding = FALSE; /* initial expectation is CCW */ + + /* compute blue zones for this instance */ + cf2_blues_init( &font->blues, font ); + } + } + + + /* equivalent to AdobeGetOutline */ + FT_LOCAL_DEF( FT_Error ) + cf2_getGlyphOutline( CF2_Font font, + CF2_Buffer charstring, + const CF2_Matrix* transform, + CF2_F16Dot16* glyphWidth ) + { + FT_Error lastError = FT_Err_Ok; + + FT_Vector translation; + +#if 0 + FT_Vector advancePoint; +#endif + + CF2_Fixed advWidth = 0; + FT_Bool needWinding; + + + /* Note: use both integer and fraction for outlines. This allows bbox */ + /* to come out directly. */ + + translation.x = transform->tx; + translation.y = transform->ty; + + /* set up values based on transform */ + cf2_font_setup( font, transform ); + if ( font->error ) + goto exit; /* setup encountered an error */ + + /* reset darken direction */ + font->reverseWinding = FALSE; + + /* winding order only affects darkening */ + needWinding = font->darkened; + + while ( 1 ) + { + /* reset output buffer */ + cf2_outline_reset( &font->outline ); + + /* build the outline, passing the full translation */ + cf2_interpT2CharString( font, + charstring, + (CF2_OutlineCallbacks)&font->outline, + &translation, + FALSE, + 0, + 0, + &advWidth ); + + if ( font->error ) + goto exit; + + if ( !needWinding ) + break; + + /* check winding order */ + if ( font->outline.root.windingMomentum >= 0 ) /* CFF is CCW */ + break; + + /* invert darkening and render again */ + /* TODO: this should be a parameter to getOutline-computeOffset */ + font->reverseWinding = TRUE; + + needWinding = FALSE; /* exit after next iteration */ + } + + /* finish storing client outline */ + cf2_outline_close( &font->outline ); + + exit: + /* FreeType just wants the advance width; there is no translation */ + *glyphWidth = advWidth; + + /* free resources and collect errors from objects we've used */ + cf2_setError( &font->error, lastError ); + + return font->error; + } + + +/* END */ diff --git a/src/cff/cf2font.h b/src/cff/cf2font.h new file mode 100644 index 0000000..d8860ce --- /dev/null +++ b/src/cff/cf2font.h @@ -0,0 +1,116 @@ +/***************************************************************************/ +/* */ +/* cf2font.h */ +/* */ +/* Adobe's code for font instances (specification). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2FONT_H__ +#define __CF2FONT_H__ + + +#include "cf2ft.h" +#include "cf2blues.h" + + +FT_BEGIN_HEADER + + +#define CF2_OPERAND_STACK_SIZE 48 +#define CF2_MAX_SUBR 10 /* maximum subroutine nesting */ + + + /* typedef is in `cf2glue.h' */ + struct CF2_FontRec_ + { + FT_Memory memory; + FT_Error error; /* shared error for this instance */ + + CF2_RenderingFlags renderingFlags; + + /* variables that depend on Transform: */ + /* the following have zero translation; */ + /* inner * outer = font * original */ + + CF2_Matrix currentTransform; /* original client matrix */ + CF2_Matrix innerTransform; /* for hinting; erect, scaled */ + CF2_Matrix outerTransform; /* post hinting; includes rotations */ + CF2_Fixed ppem; /* transform-dependent */ + + CF2_Int unitsPerEm; + + CF2_Fixed syntheticEmboldeningAmountX; /* character space units */ + CF2_Fixed syntheticEmboldeningAmountY; /* character space units */ + + /* FreeType related members */ + CF2_OutlineRec outline; /* freetype glyph outline functions */ + CFF_Decoder* decoder; + CFF_SubFont lastSubfont; /* FreeType parsed data; */ + /* top font or subfont */ + + /* these flags can vary from one call to the next */ + FT_Bool hinted; + FT_Bool darkened; /* true if stemDarkened or synthetic bold */ + /* i.e. darkenX != 0 || darkenY != 0 */ + FT_Bool stemDarkened; + + FT_Int darkenParams[8]; /* 1000 unit character space */ + + /* variables that depend on both FontDict and Transform */ + CF2_Fixed stdVW; /* in character space; depends on dict entry */ + CF2_Fixed stdHW; /* in character space; depends on dict entry */ + CF2_Fixed darkenX; /* character space units */ + CF2_Fixed darkenY; /* depends on transform */ + /* and private dict (StdVW) */ + FT_Bool reverseWinding; /* darken assuming */ + /* counterclockwise winding */ + + CF2_BluesRec blues; /* computed zone data */ + }; + + + FT_LOCAL( FT_Error ) + cf2_getGlyphOutline( CF2_Font font, + CF2_Buffer charstring, + const CF2_Matrix* transform, + CF2_F16Dot16* glyphWidth ); + + +FT_END_HEADER + + +#endif /* __CF2FONT_H__ */ + + +/* END */ diff --git a/src/cff/cf2ft.c b/src/cff/cf2ft.c new file mode 100644 index 0000000..ebba469 --- /dev/null +++ b/src/cff/cf2ft.c @@ -0,0 +1,691 @@ +/***************************************************************************/ +/* */ +/* cf2ft.c */ +/* */ +/* FreeType Glue Component to Adobe's Interpreter (body). */ +/* */ +/* Copyright 2013-2014 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2font.h" +#include "cf2error.h" + + +#define CF2_MAX_SIZE cf2_intToFixed( 2000 ) /* max ppem */ + + + /* + * This check should avoid most internal overflow cases. Clients should + * generally respond to `Glyph_Too_Big' by getting a glyph outline + * at EM size, scaling it and filling it as a graphics operation. + * + */ + static FT_Error + cf2_checkTransform( const CF2_Matrix* transform, + CF2_Int unitsPerEm ) + { + CF2_Fixed maxScale; + + + FT_ASSERT( unitsPerEm > 0 ); + + if ( transform->a <= 0 || transform->d <= 0 ) + return FT_THROW( Invalid_Size_Handle ); + + FT_ASSERT( transform->b == 0 && transform->c == 0 ); + FT_ASSERT( transform->tx == 0 && transform->ty == 0 ); + + if ( unitsPerEm > 0x7FFF ) + return FT_THROW( Glyph_Too_Big ); + + maxScale = FT_DivFix( CF2_MAX_SIZE, cf2_intToFixed( unitsPerEm ) ); + + if ( transform->a > maxScale || transform->d > maxScale ) + return FT_THROW( Glyph_Too_Big ); + + return FT_Err_Ok; + } + + + static void + cf2_setGlyphWidth( CF2_Outline outline, + CF2_Fixed width ) + { + CFF_Decoder* decoder = outline->decoder; + + + FT_ASSERT( decoder ); + + decoder->glyph_width = cf2_fixedToInt( width ); + } + + + /* Clean up font instance. */ + static void + cf2_free_instance( void* ptr ) + { + CF2_Font font = (CF2_Font)ptr; + + + if ( font ) + { + FT_Memory memory = font->memory; + + + (void)memory; + } + } + + + /********************************************/ + /* */ + /* functions for handling client outline; */ + /* FreeType uses coordinates in 26.6 format */ + /* */ + /********************************************/ + + static void + cf2_builder_moveTo( CF2_OutlineCallbacks callbacks, + const CF2_CallbackParams params ) + { + /* downcast the object pointer */ + CF2_Outline outline = (CF2_Outline)callbacks; + CFF_Builder* builder; + + (void)params; /* only used in debug mode */ + + + FT_ASSERT( outline && outline->decoder ); + FT_ASSERT( params->op == CF2_PathOpMoveTo ); + + builder = &outline->decoder->builder; + + /* note: two successive moves simply close the contour twice */ + cff_builder_close_contour( builder ); + builder->path_begun = 0; + } + + + static void + cf2_builder_lineTo( CF2_OutlineCallbacks callbacks, + const CF2_CallbackParams params ) + { + FT_Error error; + + /* downcast the object pointer */ + CF2_Outline outline = (CF2_Outline)callbacks; + CFF_Builder* builder; + + + FT_ASSERT( outline && outline->decoder ); + FT_ASSERT( params->op == CF2_PathOpLineTo ); + + builder = &outline->decoder->builder; + + if ( !builder->path_begun ) + { + /* record the move before the line; also check points and set */ + /* `path_begun' */ + error = cff_builder_start_point( builder, + params->pt0.x, + params->pt0.y ); + if ( error ) + { + if ( !*callbacks->error ) + *callbacks->error = error; + return; + } + } + + /* `cff_builder_add_point1' includes a check_points call for one point */ + error = cff_builder_add_point1( builder, + params->pt1.x, + params->pt1.y ); + if ( error ) + { + if ( !*callbacks->error ) + *callbacks->error = error; + return; + } + } + + + static void + cf2_builder_cubeTo( CF2_OutlineCallbacks callbacks, + const CF2_CallbackParams params ) + { + FT_Error error; + + /* downcast the object pointer */ + CF2_Outline outline = (CF2_Outline)callbacks; + CFF_Builder* builder; + + + FT_ASSERT( outline && outline->decoder ); + FT_ASSERT( params->op == CF2_PathOpCubeTo ); + + builder = &outline->decoder->builder; + + if ( !builder->path_begun ) + { + /* record the move before the line; also check points and set */ + /* `path_begun' */ + error = cff_builder_start_point( builder, + params->pt0.x, + params->pt0.y ); + if ( error ) + { + if ( !*callbacks->error ) + *callbacks->error = error; + return; + } + } + + /* prepare room for 3 points: 2 off-curve, 1 on-curve */ + error = cff_check_points( builder, 3 ); + if ( error ) + { + if ( !*callbacks->error ) + *callbacks->error = error; + return; + } + + cff_builder_add_point( builder, + params->pt1.x, + params->pt1.y, 0 ); + cff_builder_add_point( builder, + params->pt2.x, + params->pt2.y, 0 ); + cff_builder_add_point( builder, + params->pt3.x, + params->pt3.y, 1 ); + } + + + static void + cf2_outline_init( CF2_Outline outline, + FT_Memory memory, + FT_Error* error ) + { + FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) ); + + outline->root.memory = memory; + outline->root.error = error; + + outline->root.moveTo = cf2_builder_moveTo; + outline->root.lineTo = cf2_builder_lineTo; + outline->root.cubeTo = cf2_builder_cubeTo; + } + + + /* get scaling and hint flag from GlyphSlot */ + static void + cf2_getScaleAndHintFlag( CFF_Decoder* decoder, + CF2_Fixed* x_scale, + CF2_Fixed* y_scale, + FT_Bool* hinted, + FT_Bool* scaled ) + { + FT_ASSERT( decoder && decoder->builder.glyph ); + + /* note: FreeType scale includes a factor of 64 */ + *hinted = decoder->builder.glyph->hint; + *scaled = decoder->builder.glyph->scaled; + + if ( *hinted ) + { + *x_scale = ( decoder->builder.glyph->x_scale + 32 ) / 64; + *y_scale = ( decoder->builder.glyph->y_scale + 32 ) / 64; + } + else + { + /* for unhinted outlines, `cff_slot_load' does the scaling, */ + /* thus render at `unity' scale */ + + *x_scale = 0x0400; /* 1/64 as 16.16 */ + *y_scale = 0x0400; + } + } + + + /* get units per em from `FT_Face' */ + /* TODO: should handle font matrix concatenation? */ + static FT_UShort + cf2_getUnitsPerEm( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->builder.face ); + FT_ASSERT( decoder->builder.face->root.units_per_EM ); + + return decoder->builder.face->root.units_per_EM; + } + + + /* Main entry point: Render one glyph. */ + FT_LOCAL_DEF( FT_Error ) + cf2_decoder_parse_charstrings( CFF_Decoder* decoder, + FT_Byte* charstring_base, + FT_ULong charstring_len ) + { + FT_Memory memory; + FT_Error error = FT_Err_Ok; + CF2_Font font; + + + FT_ASSERT( decoder && decoder->cff ); + + memory = decoder->builder.memory; + + /* CF2 data is saved here across glyphs */ + font = (CF2_Font)decoder->cff->cf2_instance.data; + + /* on first glyph, allocate instance structure */ + if ( decoder->cff->cf2_instance.data == NULL ) + { + decoder->cff->cf2_instance.finalizer = + (FT_Generic_Finalizer)cf2_free_instance; + + if ( FT_ALLOC( decoder->cff->cf2_instance.data, + sizeof ( CF2_FontRec ) ) ) + return FT_THROW( Out_Of_Memory ); + + font = (CF2_Font)decoder->cff->cf2_instance.data; + + font->memory = memory; + + /* initialize a client outline, to be shared by each glyph rendered */ + cf2_outline_init( &font->outline, font->memory, &font->error ); + } + + /* save decoder; it is a stack variable and will be different on each */ + /* call */ + font->decoder = decoder; + font->outline.decoder = decoder; + + { + /* build parameters for Adobe engine */ + + CFF_Builder* builder = &decoder->builder; + CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); + + /* local error */ + FT_Error error2 = FT_Err_Ok; + CF2_BufferRec buf; + CF2_Matrix transform; + CF2_F16Dot16 glyphWidth; + + FT_Bool hinted; + FT_Bool scaled; + + + /* FreeType has already looked up the GID; convert to */ + /* `RegionBuffer', assuming that the input has been validated */ + FT_ASSERT( charstring_base + charstring_len >= charstring_base ); + + FT_ZERO( &buf ); + buf.start = + buf.ptr = charstring_base; + buf.end = charstring_base + charstring_len; + + FT_ZERO( &transform ); + + cf2_getScaleAndHintFlag( decoder, + &transform.a, + &transform.d, + &hinted, + &scaled ); + + font->renderingFlags = 0; + if ( hinted ) + font->renderingFlags |= CF2_FlagsHinted; + if ( scaled && !driver->no_stem_darkening ) + font->renderingFlags |= CF2_FlagsDarkened; + + font->darkenParams[0] = driver->darken_params[0]; + font->darkenParams[1] = driver->darken_params[1]; + font->darkenParams[2] = driver->darken_params[2]; + font->darkenParams[3] = driver->darken_params[3]; + font->darkenParams[4] = driver->darken_params[4]; + font->darkenParams[5] = driver->darken_params[5]; + font->darkenParams[6] = driver->darken_params[6]; + font->darkenParams[7] = driver->darken_params[7]; + + /* now get an outline for this glyph; */ + /* also get units per em to validate scale */ + font->unitsPerEm = (CF2_Int)cf2_getUnitsPerEm( decoder ); + + if ( scaled ) + { + error2 = cf2_checkTransform( &transform, font->unitsPerEm ); + if ( error2 ) + return error2; + } + + error2 = cf2_getGlyphOutline( font, &buf, &transform, &glyphWidth ); + if ( error2 ) + return FT_ERR( Invalid_File_Format ); + + cf2_setGlyphWidth( &font->outline, glyphWidth ); + + return FT_Err_Ok; + } + } + + + /* get pointer to current FreeType subfont (based on current glyphID) */ + FT_LOCAL_DEF( CFF_SubFont ) + cf2_getSubfont( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + return decoder->current_subfont; + } + + + /* get `y_ppem' from `CFF_Size' */ + FT_LOCAL_DEF( CF2_Fixed ) + cf2_getPpemY( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && + decoder->builder.face && + decoder->builder.face->root.size ); + + /* + * Note that `y_ppem' can be zero if there wasn't a call to + * `FT_Set_Char_Size' or something similar. However, this isn't a + * problem since we come to this place in the code only if + * FT_LOAD_NO_SCALE is set (the other case gets caught by + * `cf2_checkTransform'). The ppem value is needed to compute the stem + * darkening, which is disabled for getting the unscaled outline. + * + */ + return cf2_intToFixed( + decoder->builder.face->root.size->metrics.y_ppem ); + } + + + /* get standard stem widths for the current subfont; */ + /* FreeType stores these as integer font units */ + /* (note: variable names seem swapped) */ + FT_LOCAL_DEF( CF2_Fixed ) + cf2_getStdVW( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + return cf2_intToFixed( + decoder->current_subfont->private_dict.standard_height ); + } + + + FT_LOCAL_DEF( CF2_Fixed ) + cf2_getStdHW( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + return cf2_intToFixed( + decoder->current_subfont->private_dict.standard_width ); + } + + + /* note: FreeType stores 1000 times the actual value for `BlueScale' */ + FT_LOCAL_DEF( void ) + cf2_getBlueMetrics( CFF_Decoder* decoder, + CF2_Fixed* blueScale, + CF2_Fixed* blueShift, + CF2_Fixed* blueFuzz ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + *blueScale = FT_DivFix( + decoder->current_subfont->private_dict.blue_scale, + cf2_intToFixed( 1000 ) ); + *blueShift = cf2_intToFixed( + decoder->current_subfont->private_dict.blue_shift ); + *blueFuzz = cf2_intToFixed( + decoder->current_subfont->private_dict.blue_fuzz ); + } + + + /* get blue values counts and arrays; the FreeType parser has validated */ + /* the counts and verified that each is an even number */ + FT_LOCAL_DEF( void ) + cf2_getBlueValues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + *count = decoder->current_subfont->private_dict.num_blue_values; + *data = (FT_Pos*) + &decoder->current_subfont->private_dict.blue_values; + } + + + FT_LOCAL_DEF( void ) + cf2_getOtherBlues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + *count = decoder->current_subfont->private_dict.num_other_blues; + *data = (FT_Pos*) + &decoder->current_subfont->private_dict.other_blues; + } + + + FT_LOCAL_DEF( void ) + cf2_getFamilyBlues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + *count = decoder->current_subfont->private_dict.num_family_blues; + *data = (FT_Pos*) + &decoder->current_subfont->private_dict.family_blues; + } + + + FT_LOCAL_DEF( void ) + cf2_getFamilyOtherBlues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + *count = decoder->current_subfont->private_dict.num_family_other_blues; + *data = (FT_Pos*) + &decoder->current_subfont->private_dict.family_other_blues; + } + + + FT_LOCAL_DEF( CF2_Int ) + cf2_getLanguageGroup( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + return decoder->current_subfont->private_dict.language_group; + } + + + /* convert unbiased subroutine index to `CF2_Buffer' and */ + /* return 0 on success */ + FT_LOCAL_DEF( CF2_Int ) + cf2_initGlobalRegionBuffer( CFF_Decoder* decoder, + CF2_UInt idx, + CF2_Buffer buf ) + { + FT_ASSERT( decoder ); + + FT_ZERO( buf ); + + idx += decoder->globals_bias; + if ( idx >= decoder->num_globals ) + return TRUE; /* error */ + + FT_ASSERT( decoder->globals ); + + buf->start = + buf->ptr = decoder->globals[idx]; + buf->end = decoder->globals[idx + 1]; + + return FALSE; /* success */ + } + + + /* convert AdobeStandardEncoding code to CF2_Buffer; */ + /* used for seac component */ + FT_LOCAL_DEF( FT_Error ) + cf2_getSeacComponent( CFF_Decoder* decoder, + CF2_UInt code, + CF2_Buffer buf ) + { + CF2_Int gid; + FT_Byte* charstring; + FT_ULong len; + FT_Error error; + + + FT_ASSERT( decoder ); + + FT_ZERO( buf ); + + gid = cff_lookup_glyph_by_stdcharcode( decoder->cff, code ); + if ( gid < 0 ) + return FT_THROW( Invalid_Glyph_Format ); + + error = cff_get_glyph_data( decoder->builder.face, + gid, + &charstring, + &len ); + /* TODO: for now, just pass the FreeType error through */ + if ( error ) + return error; + + /* assume input has been validated */ + FT_ASSERT( charstring + len >= charstring ); + + buf->start = charstring; + buf->end = charstring + len; + buf->ptr = buf->start; + + return FT_Err_Ok; + } + + + FT_LOCAL_DEF( void ) + cf2_freeSeacComponent( CFF_Decoder* decoder, + CF2_Buffer buf ) + { + FT_ASSERT( decoder ); + + cff_free_glyph_data( decoder->builder.face, + (FT_Byte**)&buf->start, + (FT_ULong)( buf->end - buf->start ) ); + } + + + FT_LOCAL_DEF( CF2_Int ) + cf2_initLocalRegionBuffer( CFF_Decoder* decoder, + CF2_UInt idx, + CF2_Buffer buf ) + { + FT_ASSERT( decoder ); + + FT_ZERO( buf ); + + idx += decoder->locals_bias; + if ( idx >= decoder->num_locals ) + return TRUE; /* error */ + + FT_ASSERT( decoder->locals ); + + buf->start = + buf->ptr = decoder->locals[idx]; + buf->end = decoder->locals[idx + 1]; + + return FALSE; /* success */ + } + + + FT_LOCAL_DEF( CF2_Fixed ) + cf2_getDefaultWidthX( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + return cf2_intToFixed( + decoder->current_subfont->private_dict.default_width ); + } + + + FT_LOCAL_DEF( CF2_Fixed ) + cf2_getNominalWidthX( CFF_Decoder* decoder ) + { + FT_ASSERT( decoder && decoder->current_subfont ); + + return cf2_intToFixed( + decoder->current_subfont->private_dict.nominal_width ); + } + + + FT_LOCAL_DEF( void ) + cf2_outline_reset( CF2_Outline outline ) + { + CFF_Decoder* decoder = outline->decoder; + + + FT_ASSERT( decoder ); + + outline->root.windingMomentum = 0; + + FT_GlyphLoader_Rewind( decoder->builder.loader ); + } + + + FT_LOCAL_DEF( void ) + cf2_outline_close( CF2_Outline outline ) + { + CFF_Decoder* decoder = outline->decoder; + + + FT_ASSERT( decoder ); + + cff_builder_close_contour( &decoder->builder ); + + FT_GlyphLoader_Add( decoder->builder.loader ); + } + + +/* END */ diff --git a/src/cff/cf2ft.h b/src/cff/cf2ft.h new file mode 100644 index 0000000..731da3c --- /dev/null +++ b/src/cff/cf2ft.h @@ -0,0 +1,147 @@ +/***************************************************************************/ +/* */ +/* cf2ft.h */ +/* */ +/* FreeType Glue Component to Adobe's Interpreter (specification). */ +/* */ +/* Copyright 2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2FT_H__ +#define __CF2FT_H__ + + +#include "cf2types.h" + + + /* TODO: disable asserts for now */ +#define CF2_NDEBUG + + +#include FT_SYSTEM_H + +#include "cf2glue.h" +#include "cffgload.h" /* for CFF_Decoder */ + + +FT_BEGIN_HEADER + + + FT_LOCAL( FT_Error ) + cf2_decoder_parse_charstrings( CFF_Decoder* decoder, + FT_Byte* charstring_base, + FT_ULong charstring_len ); + + FT_LOCAL( CFF_SubFont ) + cf2_getSubfont( CFF_Decoder* decoder ); + + + FT_LOCAL( CF2_Fixed ) + cf2_getPpemY( CFF_Decoder* decoder ); + FT_LOCAL( CF2_Fixed ) + cf2_getStdVW( CFF_Decoder* decoder ); + FT_LOCAL( CF2_Fixed ) + cf2_getStdHW( CFF_Decoder* decoder ); + + FT_LOCAL( void ) + cf2_getBlueMetrics( CFF_Decoder* decoder, + CF2_Fixed* blueScale, + CF2_Fixed* blueShift, + CF2_Fixed* blueFuzz ); + FT_LOCAL( void ) + cf2_getBlueValues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ); + FT_LOCAL( void ) + cf2_getOtherBlues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ); + FT_LOCAL( void ) + cf2_getFamilyBlues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ); + FT_LOCAL( void ) + cf2_getFamilyOtherBlues( CFF_Decoder* decoder, + size_t* count, + FT_Pos* *data ); + + FT_LOCAL( CF2_Int ) + cf2_getLanguageGroup( CFF_Decoder* decoder ); + + FT_LOCAL( CF2_Int ) + cf2_initGlobalRegionBuffer( CFF_Decoder* decoder, + CF2_UInt idx, + CF2_Buffer buf ); + FT_LOCAL( FT_Error ) + cf2_getSeacComponent( CFF_Decoder* decoder, + CF2_UInt code, + CF2_Buffer buf ); + FT_LOCAL( void ) + cf2_freeSeacComponent( CFF_Decoder* decoder, + CF2_Buffer buf ); + FT_LOCAL( CF2_Int ) + cf2_initLocalRegionBuffer( CFF_Decoder* decoder, + CF2_UInt idx, + CF2_Buffer buf ); + + FT_LOCAL( CF2_Fixed ) + cf2_getDefaultWidthX( CFF_Decoder* decoder ); + FT_LOCAL( CF2_Fixed ) + cf2_getNominalWidthX( CFF_Decoder* decoder ); + + + /* + * FreeType client outline + * + * process output from the charstring interpreter + */ + typedef struct CF2_OutlineRec_ + { + CF2_OutlineCallbacksRec root; /* base class must be first */ + CFF_Decoder* decoder; + + } CF2_OutlineRec, *CF2_Outline; + + + FT_LOCAL( void ) + cf2_outline_reset( CF2_Outline outline ); + FT_LOCAL( void ) + cf2_outline_close( CF2_Outline outline ); + + +FT_END_HEADER + + +#endif /* __CF2FT_H__ */ + + +/* END */ diff --git a/src/cff/cf2glue.h b/src/cff/cf2glue.h new file mode 100644 index 0000000..a24da39 --- /dev/null +++ b/src/cff/cf2glue.h @@ -0,0 +1,144 @@ +/***************************************************************************/ +/* */ +/* cf2glue.h */ +/* */ +/* Adobe's code for shared stuff (specification only). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2GLUE_H__ +#define __CF2GLUE_H__ + + +/* common includes for other modules */ +#include "cf2error.h" +#include "cf2fixed.h" +#include "cf2arrst.h" +#include "cf2read.h" + + +FT_BEGIN_HEADER + + + /* rendering parameters */ + + /* apply hints to rendered glyphs */ +#define CF2_FlagsHinted 1 + /* for testing */ +#define CF2_FlagsDarkened 2 + + /* type for holding the flags */ + typedef CF2_Int CF2_RenderingFlags; + + + /* elements of a glyph outline */ + typedef enum CF2_PathOp_ + { + CF2_PathOpMoveTo = 1, /* change the current point */ + CF2_PathOpLineTo = 2, /* line */ + CF2_PathOpQuadTo = 3, /* quadratic curve */ + CF2_PathOpCubeTo = 4 /* cubic curve */ + + } CF2_PathOp; + + + /* a matrix of fixed point values */ + typedef struct CF2_Matrix_ + { + CF2_F16Dot16 a; + CF2_F16Dot16 b; + CF2_F16Dot16 c; + CF2_F16Dot16 d; + CF2_F16Dot16 tx; + CF2_F16Dot16 ty; + + } CF2_Matrix; + + + /* these typedefs are needed by more than one header file */ + /* and gcc compiler doesn't allow redefinition */ + typedef struct CF2_FontRec_ CF2_FontRec, *CF2_Font; + typedef struct CF2_HintRec_ CF2_HintRec, *CF2_Hint; + + + /* A common structure for all callback parameters. */ + /* */ + /* Some members may be unused. For example, `pt0' is not used for */ + /* `moveTo' and `pt3' is not used for `quadTo'. The initial point `pt0' */ + /* is included for each path element for generality; curve conversions */ + /* need it. The `op' parameter allows one function to handle multiple */ + /* element types. */ + + typedef struct CF2_CallbackParamsRec_ + { + FT_Vector pt0; + FT_Vector pt1; + FT_Vector pt2; + FT_Vector pt3; + + CF2_Int op; + + } CF2_CallbackParamsRec, *CF2_CallbackParams; + + + /* forward reference */ + typedef struct CF2_OutlineCallbacksRec_ CF2_OutlineCallbacksRec, + *CF2_OutlineCallbacks; + + /* callback function pointers */ + typedef void + (*CF2_Callback_Type)( CF2_OutlineCallbacks callbacks, + const CF2_CallbackParams params ); + + + struct CF2_OutlineCallbacksRec_ + { + CF2_Callback_Type moveTo; + CF2_Callback_Type lineTo; + CF2_Callback_Type quadTo; + CF2_Callback_Type cubeTo; + + CF2_Int windingMomentum; /* for winding order detection */ + + FT_Memory memory; + FT_Error* error; + }; + + +FT_END_HEADER + + +#endif /* __CF2GLUE_H__ */ + + +/* END */ diff --git a/src/cff/cf2hints.c b/src/cff/cf2hints.c new file mode 100644 index 0000000..040d193 --- /dev/null +++ b/src/cff/cf2hints.c @@ -0,0 +1,1847 @@ +/***************************************************************************/ +/* */ +/* cf2hints.c */ +/* */ +/* Adobe's code for handling CFF hints (body). */ +/* */ +/* Copyright 2007-2014 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2glue.h" +#include "cf2font.h" +#include "cf2hints.h" +#include "cf2intrp.h" + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_cf2hints + + + typedef struct CF2_HintMoveRec_ + { + size_t j; /* index of upper hint map edge */ + CF2_Fixed moveUp; /* adjustment to optimum position */ + + } CF2_HintMoveRec, *CF2_HintMove; + + + /* Compute angular momentum for winding order detection. It is called */ + /* for all lines and curves, but not necessarily in element order. */ + static CF2_Int + cf2_getWindingMomentum( CF2_Fixed x1, + CF2_Fixed y1, + CF2_Fixed x2, + CF2_Fixed y2 ) + { + /* cross product of pt1 position from origin with pt2 position from */ + /* pt1; we reduce the precision so that the result fits into 32 bits */ + + return ( x1 >> 16 ) * ( ( y2 - y1 ) >> 16 ) - + ( y1 >> 16 ) * ( ( x2 - x1 ) >> 16 ); + } + + + /* + * Construct from a StemHint; this is used as a parameter to + * `cf2_blues_capture'. + * `hintOrigin' is the character space displacement of a seac accent. + * Adjust stem hint for darkening here. + * + */ + static void + cf2_hint_init( CF2_Hint hint, + const CF2_ArrStack stemHintArray, + size_t indexStemHint, + const CF2_Font font, + CF2_Fixed hintOrigin, + CF2_Fixed scale, + FT_Bool bottom ) + { + CF2_Fixed width; + const CF2_StemHintRec* stemHint; + + + FT_ZERO( hint ); + + stemHint = (const CF2_StemHintRec*)cf2_arrstack_getPointer( + stemHintArray, + indexStemHint ); + + width = stemHint->max - stemHint->min; + + if ( width == cf2_intToFixed( -21 ) ) + { + /* ghost bottom */ + + if ( bottom ) + { + hint->csCoord = stemHint->max; + hint->flags = CF2_GhostBottom; + } + else + hint->flags = 0; + } + + else if ( width == cf2_intToFixed( -20 ) ) + { + /* ghost top */ + + if ( bottom ) + hint->flags = 0; + else + { + hint->csCoord = stemHint->min; + hint->flags = CF2_GhostTop; + } + } + + else if ( width < 0 ) + { + /* inverted pair */ + + /* + * Hints with negative widths were produced by an early version of a + * non-Adobe font tool. The Type 2 spec allows edge (ghost) hints + * with negative widths, but says + * + * All other negative widths have undefined meaning. + * + * CoolType has a silent workaround that negates the hint width; for + * permissive mode, we do the same here. + * + * Note: Such fonts cannot use ghost hints, but should otherwise work. + * Note: Some poor hints in our faux fonts can produce negative + * widths at some blends. For example, see a light weight of + * `u' in ASerifMM. + * + */ + if ( bottom ) + { + hint->csCoord = stemHint->max; + hint->flags = CF2_PairBottom; + } + else + { + hint->csCoord = stemHint->min; + hint->flags = CF2_PairTop; + } + } + + else + { + /* normal pair */ + + if ( bottom ) + { + hint->csCoord = stemHint->min; + hint->flags = CF2_PairBottom; + } + else + { + hint->csCoord = stemHint->max; + hint->flags = CF2_PairTop; + } + } + + /* Now that ghost hints have been detected, adjust this edge for */ + /* darkening. Bottoms are not changed; tops are incremented by twice */ + /* `darkenY'. */ + if ( cf2_hint_isTop( hint ) ) + hint->csCoord += 2 * font->darkenY; + + hint->csCoord += hintOrigin; + hint->scale = scale; + hint->index = indexStemHint; /* index in original stem hint array */ + + /* if original stem hint has been used, use the same position */ + if ( hint->flags != 0 && stemHint->used ) + { + if ( cf2_hint_isTop( hint ) ) + hint->dsCoord = stemHint->maxDS; + else + hint->dsCoord = stemHint->minDS; + + cf2_hint_lock( hint ); + } + else + hint->dsCoord = FT_MulFix( hint->csCoord, scale ); + } + + + /* initialize an invalid hint map element */ + static void + cf2_hint_initZero( CF2_Hint hint ) + { + FT_ZERO( hint ); + } + + + FT_LOCAL_DEF( FT_Bool ) + cf2_hint_isValid( const CF2_Hint hint ) + { + return (FT_Bool)( hint->flags != 0 ); + } + + + static FT_Bool + cf2_hint_isPair( const CF2_Hint hint ) + { + return (FT_Bool)( ( hint->flags & + ( CF2_PairBottom | CF2_PairTop ) ) != 0 ); + } + + + static FT_Bool + cf2_hint_isPairTop( const CF2_Hint hint ) + { + return (FT_Bool)( ( hint->flags & CF2_PairTop ) != 0 ); + } + + + FT_LOCAL_DEF( FT_Bool ) + cf2_hint_isTop( const CF2_Hint hint ) + { + return (FT_Bool)( ( hint->flags & + ( CF2_PairTop | CF2_GhostTop ) ) != 0 ); + } + + + FT_LOCAL_DEF( FT_Bool ) + cf2_hint_isBottom( const CF2_Hint hint ) + { + return (FT_Bool)( ( hint->flags & + ( CF2_PairBottom | CF2_GhostBottom ) ) != 0 ); + } + + + static FT_Bool + cf2_hint_isLocked( const CF2_Hint hint ) + { + return (FT_Bool)( ( hint->flags & CF2_Locked ) != 0 ); + } + + + static FT_Bool + cf2_hint_isSynthetic( const CF2_Hint hint ) + { + return (FT_Bool)( ( hint->flags & CF2_Synthetic ) != 0 ); + } + + + FT_LOCAL_DEF( void ) + cf2_hint_lock( CF2_Hint hint ) + { + hint->flags |= CF2_Locked; + } + + + FT_LOCAL_DEF( void ) + cf2_hintmap_init( CF2_HintMap hintmap, + CF2_Font font, + CF2_HintMap initialMap, + CF2_ArrStack hintMoves, + CF2_Fixed scale ) + { + FT_ZERO( hintmap ); + + /* copy parameters from font instance */ + hintmap->hinted = font->hinted; + hintmap->scale = scale; + hintmap->font = font; + hintmap->initialHintMap = initialMap; + /* will clear in `cf2_hintmap_adjustHints' */ + hintmap->hintMoves = hintMoves; + } + + + static FT_Bool + cf2_hintmap_isValid( const CF2_HintMap hintmap ) + { + return hintmap->isValid; + } + + + /* transform character space coordinate to device space using hint map */ + static CF2_Fixed + cf2_hintmap_map( CF2_HintMap hintmap, + CF2_Fixed csCoord ) + { + if ( hintmap->count == 0 || ! hintmap->hinted ) + { + /* there are no hints; use uniform scale and zero offset */ + return FT_MulFix( csCoord, hintmap->scale ); + } + else + { + /* start linear search from last hit */ + CF2_UInt i = hintmap->lastIndex; + + FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES ); + + /* search up */ + while ( i < hintmap->count - 1 && + csCoord >= hintmap->edge[i + 1].csCoord ) + i += 1; + + /* search down */ + while ( i > 0 && csCoord < hintmap->edge[i].csCoord ) + i -= 1; + + hintmap->lastIndex = i; + + if ( i == 0 && csCoord < hintmap->edge[0].csCoord ) + { + /* special case for points below first edge: use uniform scale */ + return FT_MulFix( csCoord - hintmap->edge[0].csCoord, + hintmap->scale ) + + hintmap->edge[0].dsCoord; + } + else + { + /* + * Note: entries with duplicate csCoord are allowed. + * Use edge[i], the highest entry where csCoord >= entry[i].csCoord + */ + return FT_MulFix( csCoord - hintmap->edge[i].csCoord, + hintmap->edge[i].scale ) + + hintmap->edge[i].dsCoord; + } + } + } + + + /* + * This hinting policy moves a hint pair in device space so that one of + * its two edges is on a device pixel boundary (its fractional part is + * zero). `cf2_hintmap_insertHint' guarantees no overlap in CS + * space. Ensure here that there is no overlap in DS. + * + * In the first pass, edges are adjusted relative to adjacent hints. + * Those that are below have already been adjusted. Those that are + * above have not yet been adjusted. If a hint above blocks an + * adjustment to an optimal position, we will try again in a second + * pass. The second pass is top-down. + * + */ + + static void + cf2_hintmap_adjustHints( CF2_HintMap hintmap ) + { + size_t i, j; + + + cf2_arrstack_clear( hintmap->hintMoves ); /* working storage */ + + /* + * First pass is bottom-up (font hint order) without look-ahead. + * Locked edges are already adjusted. + * Unlocked edges begin with dsCoord from `initialHintMap'. + * Save edges that are not optimally adjusted in `hintMoves' array, + * and process them in second pass. + */ + + for ( i = 0; i < hintmap->count; i++ ) + { + FT_Bool isPair = cf2_hint_isPair( &hintmap->edge[i] ); + + + /* index of upper edge (same value for ghost hint) */ + j = isPair ? i + 1 : i; + + FT_ASSERT( j < hintmap->count ); + FT_ASSERT( cf2_hint_isValid( &hintmap->edge[i] ) ); + FT_ASSERT( cf2_hint_isValid( &hintmap->edge[j] ) ); + FT_ASSERT( cf2_hint_isLocked( &hintmap->edge[i] ) == + cf2_hint_isLocked( &hintmap->edge[j] ) ); + + if ( !cf2_hint_isLocked( &hintmap->edge[i] ) ) + { + /* hint edge is not locked, we can adjust it */ + CF2_Fixed fracDown = cf2_fixedFraction( hintmap->edge[i].dsCoord ); + CF2_Fixed fracUp = cf2_fixedFraction( hintmap->edge[j].dsCoord ); + + /* calculate all four possibilities; moves down are negative */ + CF2_Fixed downMoveDown = 0 - fracDown; + CF2_Fixed upMoveDown = 0 - fracUp; + CF2_Fixed downMoveUp = fracDown == 0 + ? 0 + : cf2_intToFixed( 1 ) - fracDown; + CF2_Fixed upMoveUp = fracUp == 0 + ? 0 + : cf2_intToFixed( 1 ) - fracUp; + + /* smallest move up */ + CF2_Fixed moveUp = FT_MIN( downMoveUp, upMoveUp ); + /* smallest move down */ + CF2_Fixed moveDown = FT_MAX( downMoveDown, upMoveDown ); + + /* final amount to move edge or edge pair */ + CF2_Fixed move; + + CF2_Fixed downMinCounter = CF2_MIN_COUNTER; + CF2_Fixed upMinCounter = CF2_MIN_COUNTER; + FT_Bool saveEdge = FALSE; + + + /* minimum counter constraint doesn't apply when adjacent edges */ + /* are synthetic */ + /* TODO: doesn't seem a big effect; for now, reduce the code */ +#if 0 + if ( i == 0 || + cf2_hint_isSynthetic( &hintmap->edge[i - 1] ) ) + downMinCounter = 0; + + if ( j >= hintmap->count - 1 || + cf2_hint_isSynthetic( &hintmap->edge[j + 1] ) ) + upMinCounter = 0; +#endif + + /* is there room to move up? */ + /* there is if we are at top of array or the next edge is at or */ + /* beyond proposed move up? */ + if ( j >= hintmap->count - 1 || + hintmap->edge[j + 1].dsCoord >= + hintmap->edge[j].dsCoord + moveUp + upMinCounter ) + { + /* there is room to move up; is there also room to move down? */ + if ( i == 0 || + hintmap->edge[i - 1].dsCoord <= + hintmap->edge[i].dsCoord + moveDown - downMinCounter ) + { + /* move smaller absolute amount */ + move = ( -moveDown < moveUp ) ? moveDown : moveUp; /* optimum */ + } + else + move = moveUp; + } + else + { + /* is there room to move down? */ + if ( i == 0 || + hintmap->edge[i - 1].dsCoord <= + hintmap->edge[i].dsCoord + moveDown - downMinCounter ) + { + move = moveDown; + /* true if non-optimum move */ + saveEdge = (FT_Bool)( moveUp < -moveDown ); + } + else + { + /* no room to move either way without overlapping or reducing */ + /* the counter too much */ + move = 0; + saveEdge = TRUE; + } + } + + /* Identify non-moves and moves down that aren't optimal, and save */ + /* them for second pass. */ + /* Do this only if there is an unlocked edge above (which could */ + /* possibly move). */ + if ( saveEdge && + j < hintmap->count - 1 && + !cf2_hint_isLocked( &hintmap->edge[j + 1] ) ) + { + CF2_HintMoveRec savedMove; + + + savedMove.j = j; + /* desired adjustment in second pass */ + savedMove.moveUp = moveUp - move; + + cf2_arrstack_push( hintmap->hintMoves, &savedMove ); + } + + /* move the edge(s) */ + hintmap->edge[i].dsCoord += move; + if ( isPair ) + hintmap->edge[j].dsCoord += move; + } + + /* assert there are no overlaps in device space */ + FT_ASSERT( i == 0 || + hintmap->edge[i - 1].dsCoord <= hintmap->edge[i].dsCoord ); + FT_ASSERT( i < j || + hintmap->edge[i].dsCoord <= hintmap->edge[j].dsCoord ); + + /* adjust the scales, avoiding divide by zero */ + if ( i > 0 ) + { + if ( hintmap->edge[i].csCoord != hintmap->edge[i - 1].csCoord ) + hintmap->edge[i - 1].scale = + FT_DivFix( + hintmap->edge[i].dsCoord - hintmap->edge[i - 1].dsCoord, + hintmap->edge[i].csCoord - hintmap->edge[i - 1].csCoord ); + } + + if ( isPair ) + { + if ( hintmap->edge[j].csCoord != hintmap->edge[j - 1].csCoord ) + hintmap->edge[j - 1].scale = + FT_DivFix( + hintmap->edge[j].dsCoord - hintmap->edge[j - 1].dsCoord, + hintmap->edge[j].csCoord - hintmap->edge[j - 1].csCoord ); + + i += 1; /* skip upper edge on next loop */ + } + } + + /* second pass tries to move non-optimal hints up, in case there is */ + /* room now */ + for ( i = cf2_arrstack_size( hintmap->hintMoves ); i > 0; i-- ) + { + CF2_HintMove hintMove = (CF2_HintMove) + cf2_arrstack_getPointer( hintmap->hintMoves, i - 1 ); + + + j = hintMove->j; + + /* this was tested before the push, above */ + FT_ASSERT( j < hintmap->count - 1 ); + + /* is there room to move up? */ + if ( hintmap->edge[j + 1].dsCoord >= + hintmap->edge[j].dsCoord + hintMove->moveUp + CF2_MIN_COUNTER ) + { + /* there is more room now, move edge up */ + hintmap->edge[j].dsCoord += hintMove->moveUp; + + if ( cf2_hint_isPair( &hintmap->edge[j] ) ) + { + FT_ASSERT( j > 0 ); + hintmap->edge[j - 1].dsCoord += hintMove->moveUp; + } + } + } + } + + + /* insert hint edges into map, sorted by csCoord */ + static void + cf2_hintmap_insertHint( CF2_HintMap hintmap, + CF2_Hint bottomHintEdge, + CF2_Hint topHintEdge ) + { + CF2_UInt indexInsert; + + /* set default values, then check for edge hints */ + FT_Bool isPair = TRUE; + CF2_Hint firstHintEdge = bottomHintEdge; + CF2_Hint secondHintEdge = topHintEdge; + + + /* one or none of the input params may be invalid when dealing with */ + /* edge hints; at least one edge must be valid */ + FT_ASSERT( cf2_hint_isValid( bottomHintEdge ) || + cf2_hint_isValid( topHintEdge ) ); + + /* determine how many and which edges to insert */ + if ( !cf2_hint_isValid( bottomHintEdge ) ) + { + /* insert only the top edge */ + firstHintEdge = topHintEdge; + isPair = FALSE; + } + else if ( !cf2_hint_isValid( topHintEdge ) ) + { + /* insert only the bottom edge */ + isPair = FALSE; + } + + /* paired edges must be in proper order */ + FT_ASSERT( !isPair || + topHintEdge->csCoord >= bottomHintEdge->csCoord ); + + /* linear search to find index value of insertion point */ + indexInsert = 0; + for ( ; indexInsert < hintmap->count; indexInsert++ ) + { + if ( hintmap->edge[indexInsert].csCoord >= firstHintEdge->csCoord ) + break; + } + + /* + * Discard any hints that overlap in character space. Most often, this + * is while building the initial map, where captured hints from all + * zones are combined. Define overlap to include hints that `touch' + * (overlap zero). Hiragino Sans/Gothic fonts have numerous hints that + * touch. Some fonts have non-ideographic glyphs that overlap our + * synthetic hints. + * + * Overlap also occurs when darkening stem hints that are close. + * + */ + if ( indexInsert < hintmap->count ) + { + /* we are inserting before an existing edge: */ + /* verify that an existing edge is not the same */ + if ( hintmap->edge[indexInsert].csCoord == firstHintEdge->csCoord ) + return; /* ignore overlapping stem hint */ + + /* verify that a new pair does not straddle the next edge */ + if ( isPair && + hintmap->edge[indexInsert].csCoord <= secondHintEdge->csCoord ) + return; /* ignore overlapping stem hint */ + + /* verify that we are not inserting between paired edges */ + if ( cf2_hint_isPairTop( &hintmap->edge[indexInsert] ) ) + return; /* ignore overlapping stem hint */ + } + + /* recompute device space locations using initial hint map */ + if ( cf2_hintmap_isValid( hintmap->initialHintMap ) && + !cf2_hint_isLocked( firstHintEdge ) ) + { + if ( isPair ) + { + /* Use hint map to position the center of stem, and nominal scale */ + /* to position the two edges. This preserves the stem width. */ + CF2_Fixed midpoint = cf2_hintmap_map( + hintmap->initialHintMap, + ( secondHintEdge->csCoord + + firstHintEdge->csCoord ) / 2 ); + CF2_Fixed halfWidth = FT_MulFix( + ( secondHintEdge->csCoord - + firstHintEdge->csCoord ) / 2, + hintmap->scale ); + + + firstHintEdge->dsCoord = midpoint - halfWidth; + secondHintEdge->dsCoord = midpoint + halfWidth; + } + else + firstHintEdge->dsCoord = cf2_hintmap_map( hintmap->initialHintMap, + firstHintEdge->csCoord ); + } + + /* + * Discard any hints that overlap in device space; this can occur + * because locked hints have been moved to align with blue zones. + * + * TODO: Although we might correct this later during adjustment, we + * don't currently have a way to delete a conflicting hint once it has + * been inserted. See v2.030 MinionPro-Regular, 12 ppem darkened, + * initial hint map for second path, glyph 945 (the perispomeni (tilde) + * in U+1F6E, Greek omega with psili and perispomeni). Darkening is + * 25. Pair 667,747 initially conflicts in design space with top edge + * 660. This is because 667 maps to 7.87, and the top edge was + * captured by a zone at 8.0. The pair is later successfully inserted + * in a zone without the top edge. In this zone it is adjusted to 8.0, + * and no longer conflicts with the top edge in design space. This + * means it can be included in yet a later zone which does have the top + * edge hint. This produces a small mismatch between the first and + * last points of this path, even though the hint masks are the same. + * The density map difference is tiny (1/256). + * + */ + + if ( indexInsert > 0 ) + { + /* we are inserting after an existing edge */ + if ( firstHintEdge->dsCoord < hintmap->edge[indexInsert - 1].dsCoord ) + return; + } + + if ( indexInsert < hintmap->count ) + { + /* we are inserting before an existing edge */ + if ( isPair ) + { + if ( secondHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord ) + return; + } + else + { + if ( firstHintEdge->dsCoord > hintmap->edge[indexInsert].dsCoord ) + return; + } + } + + /* make room to insert */ + { + CF2_Int iSrc = hintmap->count - 1; + CF2_Int iDst = isPair ? hintmap->count + 1 : hintmap->count; + + CF2_Int count = hintmap->count - indexInsert; + + + if ( iDst >= CF2_MAX_HINT_EDGES ) + { + FT_TRACE4(( "cf2_hintmap_insertHint: too many hintmaps\n" )); + return; + } + + while ( count-- ) + hintmap->edge[iDst--] = hintmap->edge[iSrc--]; + + /* insert first edge */ + hintmap->edge[indexInsert] = *firstHintEdge; /* copy struct */ + hintmap->count += 1; + + if ( isPair ) + { + /* insert second edge */ + hintmap->edge[indexInsert + 1] = *secondHintEdge; /* copy struct */ + hintmap->count += 1; + } + } + + return; + } + + + /* + * Build a map from hints and mask. + * + * This function may recur one level if `hintmap->initialHintMap' is not yet + * valid. + * If `initialMap' is true, simply build initial map. + * + * Synthetic hints are used in two ways. A hint at zero is inserted, if + * needed, in the initial hint map, to prevent translations from + * propagating across the origin. If synthetic em box hints are enabled + * for ideographic dictionaries, then they are inserted in all hint + * maps, including the initial one. + * + */ + FT_LOCAL_DEF( void ) + cf2_hintmap_build( CF2_HintMap hintmap, + CF2_ArrStack hStemHintArray, + CF2_ArrStack vStemHintArray, + CF2_HintMask hintMask, + CF2_Fixed hintOrigin, + FT_Bool initialMap ) + { + FT_Byte* maskPtr; + + CF2_Font font = hintmap->font; + CF2_HintMaskRec tempHintMask; + + size_t bitCount, i; + FT_Byte maskByte; + + + /* check whether initial map is constructed */ + if ( !initialMap && !cf2_hintmap_isValid( hintmap->initialHintMap ) ) + { + /* make recursive call with initialHintMap and temporary mask; */ + /* temporary mask will get all bits set, below */ + cf2_hintmask_init( &tempHintMask, hintMask->error ); + cf2_hintmap_build( hintmap->initialHintMap, + hStemHintArray, + vStemHintArray, + &tempHintMask, + hintOrigin, + TRUE ); + } + + if ( !cf2_hintmask_isValid( hintMask ) ) + { + /* without a hint mask, assume all hints are active */ + cf2_hintmask_setAll( hintMask, + cf2_arrstack_size( hStemHintArray ) + + cf2_arrstack_size( vStemHintArray ) ); + if ( !cf2_hintmask_isValid( hintMask ) ) + return; /* too many stem hints */ + } + + /* begin by clearing the map */ + hintmap->count = 0; + hintmap->lastIndex = 0; + + /* make a copy of the hint mask so we can modify it */ + tempHintMask = *hintMask; + maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); + + /* use the hStem hints only, which are first in the mask */ + bitCount = cf2_arrstack_size( hStemHintArray ); + + /* Defense-in-depth. Should never return here. */ + if ( bitCount > hintMask->bitCount ) + return; + + /* synthetic embox hints get highest priority */ + if ( font->blues.doEmBoxHints ) + { + CF2_HintRec dummy; + + + cf2_hint_initZero( &dummy ); /* invalid hint map element */ + + /* ghost bottom */ + cf2_hintmap_insertHint( hintmap, + &font->blues.emBoxBottomEdge, + &dummy ); + /* ghost top */ + cf2_hintmap_insertHint( hintmap, + &dummy, + &font->blues.emBoxTopEdge ); + } + + /* insert hints captured by a blue zone or already locked (higher */ + /* priority) */ + for ( i = 0, maskByte = 0x80; i < bitCount; i++ ) + { + if ( maskByte & *maskPtr ) + { + /* expand StemHint into two `CF2_Hint' elements */ + CF2_HintRec bottomHintEdge, topHintEdge; + + + cf2_hint_init( &bottomHintEdge, + hStemHintArray, + i, + font, + hintOrigin, + hintmap->scale, + TRUE /* bottom */ ); + cf2_hint_init( &topHintEdge, + hStemHintArray, + i, + font, + hintOrigin, + hintmap->scale, + FALSE /* top */ ); + + if ( cf2_hint_isLocked( &bottomHintEdge ) || + cf2_hint_isLocked( &topHintEdge ) || + cf2_blues_capture( &font->blues, + &bottomHintEdge, + &topHintEdge ) ) + { + /* insert captured hint into map */ + cf2_hintmap_insertHint( hintmap, &bottomHintEdge, &topHintEdge ); + + *maskPtr &= ~maskByte; /* turn off the bit for this hint */ + } + } + + if ( ( i & 7 ) == 7 ) + { + /* move to next mask byte */ + maskPtr++; + maskByte = 0x80; + } + else + maskByte >>= 1; + } + + /* initial hint map includes only captured hints plus maybe one at 0 */ + + /* + * TODO: There is a problem here because we are trying to build a + * single hint map containing all captured hints. It is + * possible for there to be conflicts between captured hints, + * either because of darkening or because the hints are in + * separate hint zones (we are ignoring hint zones for the + * initial map). An example of the latter is MinionPro-Regular + * v2.030 glyph 883 (Greek Capital Alpha with Psili) at 15ppem. + * A stem hint for the psili conflicts with the top edge hint + * for the base character. The stem hint gets priority because + * of its sort order. In glyph 884 (Greek Capital Alpha with + * Psili and Oxia), the top of the base character gets a stem + * hint, and the psili does not. This creates different initial + * maps for the two glyphs resulting in different renderings of + * the base character. Will probably defer this either as not + * worth the cost or as a font bug. I don't think there is any + * good reason for an accent to be captured by an alignment + * zone. -darnold 2/12/10 + */ + + if ( initialMap ) + { + /* Apply a heuristic that inserts a point for (0,0), unless it's */ + /* already covered by a mapping. This locks the baseline for glyphs */ + /* that have no baseline hints. */ + + if ( hintmap->count == 0 || + hintmap->edge[0].csCoord > 0 || + hintmap->edge[hintmap->count - 1].csCoord < 0 ) + { + /* all edges are above 0 or all edges are below 0; */ + /* construct a locked edge hint at 0 */ + + CF2_HintRec edge, invalid; + + + cf2_hint_initZero( &edge ); + + edge.flags = CF2_GhostBottom | + CF2_Locked | + CF2_Synthetic; + edge.scale = hintmap->scale; + + cf2_hint_initZero( &invalid ); + cf2_hintmap_insertHint( hintmap, &edge, &invalid ); + } + } + else + { + /* insert remaining hints */ + + maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); + + for ( i = 0, maskByte = 0x80; i < bitCount; i++ ) + { + if ( maskByte & *maskPtr ) + { + CF2_HintRec bottomHintEdge, topHintEdge; + + + cf2_hint_init( &bottomHintEdge, + hStemHintArray, + i, + font, + hintOrigin, + hintmap->scale, + TRUE /* bottom */ ); + cf2_hint_init( &topHintEdge, + hStemHintArray, + i, + font, + hintOrigin, + hintmap->scale, + FALSE /* top */ ); + + cf2_hintmap_insertHint( hintmap, &bottomHintEdge, &topHintEdge ); + } + + if ( ( i & 7 ) == 7 ) + { + /* move to next mask byte */ + maskPtr++; + maskByte = 0x80; + } + else + maskByte >>= 1; + } + } + + /* + * Note: The following line is a convenient place to break when + * debugging hinting. Examine `hintmap->edge' for the list of + * enabled hints, then step over the call to see the effect of + * adjustment. We stop here first on the recursive call that + * creates the initial map, and then on each counter group and + * hint zone. + */ + + /* adjust positions of hint edges that are not locked to blue zones */ + cf2_hintmap_adjustHints( hintmap ); + + /* save the position of all hints that were used in this hint map; */ + /* if we use them again, we'll locate them in the same position */ + if ( !initialMap ) + { + for ( i = 0; i < hintmap->count; i++ ) + { + if ( !cf2_hint_isSynthetic( &hintmap->edge[i] ) ) + { + /* Note: include both valid and invalid edges */ + /* Note: top and bottom edges are copied back separately */ + CF2_StemHint stemhint = (CF2_StemHint) + cf2_arrstack_getPointer( hStemHintArray, + hintmap->edge[i].index ); + + + if ( cf2_hint_isTop( &hintmap->edge[i] ) ) + stemhint->maxDS = hintmap->edge[i].dsCoord; + else + stemhint->minDS = hintmap->edge[i].dsCoord; + + stemhint->used = TRUE; + } + } + } + + /* hint map is ready to use */ + hintmap->isValid = TRUE; + + /* remember this mask has been used */ + cf2_hintmask_setNew( hintMask, FALSE ); + } + + + FT_LOCAL_DEF( void ) + cf2_glyphpath_init( CF2_GlyphPath glyphpath, + CF2_Font font, + CF2_OutlineCallbacks callbacks, + CF2_Fixed scaleY, + /* CF2_Fixed hShift, */ + CF2_ArrStack hStemHintArray, + CF2_ArrStack vStemHintArray, + CF2_HintMask hintMask, + CF2_Fixed hintOriginY, + const CF2_Blues blues, + const FT_Vector* fractionalTranslation ) + { + FT_ZERO( glyphpath ); + + glyphpath->font = font; + glyphpath->callbacks = callbacks; + + cf2_arrstack_init( &glyphpath->hintMoves, + font->memory, + &font->error, + sizeof ( CF2_HintMoveRec ) ); + + cf2_hintmap_init( &glyphpath->initialHintMap, + font, + &glyphpath->initialHintMap, + &glyphpath->hintMoves, + scaleY ); + cf2_hintmap_init( &glyphpath->firstHintMap, + font, + &glyphpath->initialHintMap, + &glyphpath->hintMoves, + scaleY ); + cf2_hintmap_init( &glyphpath->hintMap, + font, + &glyphpath->initialHintMap, + &glyphpath->hintMoves, + scaleY ); + + glyphpath->scaleX = font->innerTransform.a; + glyphpath->scaleC = font->innerTransform.c; + glyphpath->scaleY = font->innerTransform.d; + + glyphpath->fractionalTranslation = *fractionalTranslation; + +#if 0 + glyphpath->hShift = hShift; /* for fauxing */ +#endif + + glyphpath->hStemHintArray = hStemHintArray; + glyphpath->vStemHintArray = vStemHintArray; + glyphpath->hintMask = hintMask; /* ptr to current mask */ + glyphpath->hintOriginY = hintOriginY; + glyphpath->blues = blues; + glyphpath->darken = font->darkened; /* TODO: should we make copies? */ + glyphpath->xOffset = font->darkenX; + glyphpath->yOffset = font->darkenY; + glyphpath->miterLimit = 2 * FT_MAX( + cf2_fixedAbs( glyphpath->xOffset ), + cf2_fixedAbs( glyphpath->yOffset ) ); + + /* .1 character space unit */ + glyphpath->snapThreshold = cf2_floatToFixed( 0.1f ); + + glyphpath->moveIsPending = TRUE; + glyphpath->pathIsOpen = FALSE; + glyphpath->pathIsClosing = FALSE; + glyphpath->elemIsQueued = FALSE; + } + + + FT_LOCAL_DEF( void ) + cf2_glyphpath_finalize( CF2_GlyphPath glyphpath ) + { + cf2_arrstack_finalize( &glyphpath->hintMoves ); + } + + + /* + * Hint point in y-direction and apply outerTransform. + * Input `current' hint map (which is actually delayed by one element). + * Input x,y point in Character Space. + * Output x,y point in Device Space, including translation. + */ + static void + cf2_glyphpath_hintPoint( CF2_GlyphPath glyphpath, + CF2_HintMap hintmap, + FT_Vector* ppt, + CF2_Fixed x, + CF2_Fixed y ) + { + FT_Vector pt; /* hinted point in upright DS */ + + + pt.x = FT_MulFix( glyphpath->scaleX, x ) + + FT_MulFix( glyphpath->scaleC, y ); + pt.y = cf2_hintmap_map( hintmap, y ); + + ppt->x = FT_MulFix( glyphpath->font->outerTransform.a, pt.x ) + + FT_MulFix( glyphpath->font->outerTransform.c, pt.y ) + + glyphpath->fractionalTranslation.x; + ppt->y = FT_MulFix( glyphpath->font->outerTransform.b, pt.x ) + + FT_MulFix( glyphpath->font->outerTransform.d, pt.y ) + + glyphpath->fractionalTranslation.y; + } + + + /* + * From two line segments, (u1,u2) and (v1,v2), compute a point of + * intersection on the corresponding lines. + * Return false if no intersection is found, or if the intersection is + * too far away from the ends of the line segments, u2 and v1. + * + */ + static FT_Bool + cf2_glyphpath_computeIntersection( CF2_GlyphPath glyphpath, + const FT_Vector* u1, + const FT_Vector* u2, + const FT_Vector* v1, + const FT_Vector* v2, + FT_Vector* intersection ) + { + /* + * Let `u' be a zero-based vector from the first segment, `v' from the + * second segment. + * Let `w 'be the zero-based vector from `u1' to `v1'. + * `perp' is the `perpendicular dot product'; see + * http://mathworld.wolfram.com/PerpDotProduct.html. + * `s' is the parameter for the parametric line for the first segment + * (`u'). + * + * See notation in + * http://softsurfer.com/Archive/algorithm_0104/algorithm_0104B.htm. + * Calculations are done in 16.16, but must handle the squaring of + * line lengths in character space. We scale all vectors by 1/32 to + * avoid overflow. This allows values up to 4095 to be squared. The + * scale factor cancels in the divide. + * + * TODO: the scale factor could be computed from UnitsPerEm. + * + */ + +#define cf2_perp( a, b ) \ + ( FT_MulFix( a.x, b.y ) - FT_MulFix( a.y, b.x ) ) + + /* round and divide by 32 */ +#define CF2_CS_SCALE( x ) \ + ( ( (x) + 0x10 ) >> 5 ) + + FT_Vector u, v, w; /* scaled vectors */ + CF2_Fixed denominator, s; + + + u.x = CF2_CS_SCALE( u2->x - u1->x ); + u.y = CF2_CS_SCALE( u2->y - u1->y ); + v.x = CF2_CS_SCALE( v2->x - v1->x ); + v.y = CF2_CS_SCALE( v2->y - v1->y ); + w.x = CF2_CS_SCALE( v1->x - u1->x ); + w.y = CF2_CS_SCALE( v1->y - u1->y ); + + denominator = cf2_perp( u, v ); + + if ( denominator == 0 ) + return FALSE; /* parallel or coincident lines */ + + s = FT_DivFix( cf2_perp( w, v ), denominator ); + + intersection->x = u1->x + FT_MulFix( s, u2->x - u1->x ); + intersection->y = u1->y + FT_MulFix( s, u2->y - u1->y ); + + /* + * Special case snapping for horizontal and vertical lines. + * This cleans up intersections and reduces problems with winding + * order detection. + * Sample case is sbc cd KozGoPr6N-Medium.otf 20 16685. + * Note: these calculations are in character space. + * + */ + + if ( u1->x == u2->x && + cf2_fixedAbs( intersection->x - u1->x ) < glyphpath->snapThreshold ) + intersection->x = u1->x; + if ( u1->y == u2->y && + cf2_fixedAbs( intersection->y - u1->y ) < glyphpath->snapThreshold ) + intersection->y = u1->y; + + if ( v1->x == v2->x && + cf2_fixedAbs( intersection->x - v1->x ) < glyphpath->snapThreshold ) + intersection->x = v1->x; + if ( v1->y == v2->y && + cf2_fixedAbs( intersection->y - v1->y ) < glyphpath->snapThreshold ) + intersection->y = v1->y; + + /* limit the intersection distance from midpoint of u2 and v1 */ + if ( cf2_fixedAbs( intersection->x - ( u2->x + v1->x ) / 2 ) > + glyphpath->miterLimit || + cf2_fixedAbs( intersection->y - ( u2->y + v1->y ) / 2 ) > + glyphpath->miterLimit ) + return FALSE; + + return TRUE; + } + + + /* + * Push the cached element (glyphpath->prevElem*) to the outline + * consumer. When a darkening offset is used, the end point of the + * cached element may be adjusted to an intersection point or we may + * synthesize a connecting line to the current element. If we are + * closing a subpath, we may also generate a connecting line to the start + * point. + * + * This is where Character Space (CS) is converted to Device Space (DS) + * using a hint map. This calculation must use a HintMap that was valid + * at the time the element was saved. For the first point in a subpath, + * that is a saved HintMap. For most elements, it just means the caller + * has delayed building a HintMap from the current HintMask. + * + * Transform each point with outerTransform and call the outline + * callbacks. This is a general 3x3 transform: + * + * x' = a*x + c*y + tx, y' = b*x + d*y + ty + * + * but it uses 4 elements from CF2_Font and the translation part + * from CF2_GlyphPath. + * + */ + static void + cf2_glyphpath_pushPrevElem( CF2_GlyphPath glyphpath, + CF2_HintMap hintmap, + FT_Vector* nextP0, + FT_Vector nextP1, + FT_Bool close ) + { + CF2_CallbackParamsRec params; + + FT_Vector* prevP0; + FT_Vector* prevP1; + + FT_Vector intersection = { 0, 0 }; + FT_Bool useIntersection = FALSE; + + + FT_ASSERT( glyphpath->prevElemOp == CF2_PathOpLineTo || + glyphpath->prevElemOp == CF2_PathOpCubeTo ); + + if ( glyphpath->prevElemOp == CF2_PathOpLineTo ) + { + prevP0 = &glyphpath->prevElemP0; + prevP1 = &glyphpath->prevElemP1; + } + else + { + prevP0 = &glyphpath->prevElemP2; + prevP1 = &glyphpath->prevElemP3; + } + + /* optimization: if previous and next elements are offset by the same */ + /* amount, then there will be no gap, and no need to compute an */ + /* intersection. */ + if ( prevP1->x != nextP0->x || prevP1->y != nextP0->y ) + { + /* previous element does not join next element: */ + /* adjust end point of previous element to the intersection */ + useIntersection = cf2_glyphpath_computeIntersection( glyphpath, + prevP0, + prevP1, + nextP0, + &nextP1, + &intersection ); + if ( useIntersection ) + { + /* modify the last point of the cached element (either line or */ + /* curve) */ + *prevP1 = intersection; + } + } + + params.pt0 = glyphpath->currentDS; + + switch( glyphpath->prevElemOp ) + { + case CF2_PathOpLineTo: + params.op = CF2_PathOpLineTo; + + /* note: pt2 and pt3 are unused */ + + if ( close ) + { + /* use first hint map if closing */ + cf2_glyphpath_hintPoint( glyphpath, + &glyphpath->firstHintMap, + ¶ms.pt1, + glyphpath->prevElemP1.x, + glyphpath->prevElemP1.y ); + } + else + { + cf2_glyphpath_hintPoint( glyphpath, + hintmap, + ¶ms.pt1, + glyphpath->prevElemP1.x, + glyphpath->prevElemP1.y ); + } + + /* output only non-zero length lines */ + if ( params.pt0.x != params.pt1.x || params.pt0.y != params.pt1.y ) + { + glyphpath->callbacks->lineTo( glyphpath->callbacks, ¶ms ); + + glyphpath->currentDS = params.pt1; + } + break; + + case CF2_PathOpCubeTo: + params.op = CF2_PathOpCubeTo; + + /* TODO: should we intersect the interior joins (p1-p2 and p2-p3)? */ + cf2_glyphpath_hintPoint( glyphpath, + hintmap, + ¶ms.pt1, + glyphpath->prevElemP1.x, + glyphpath->prevElemP1.y ); + cf2_glyphpath_hintPoint( glyphpath, + hintmap, + ¶ms.pt2, + glyphpath->prevElemP2.x, + glyphpath->prevElemP2.y ); + cf2_glyphpath_hintPoint( glyphpath, + hintmap, + ¶ms.pt3, + glyphpath->prevElemP3.x, + glyphpath->prevElemP3.y ); + + glyphpath->callbacks->cubeTo( glyphpath->callbacks, ¶ms ); + + glyphpath->currentDS = params.pt3; + + break; + } + + if ( !useIntersection || close ) + { + /* insert connecting line between end of previous element and start */ + /* of current one */ + /* note: at the end of a subpath, we might do both, so use `nextP0' */ + /* before we change it, below */ + + if ( close ) + { + /* if we are closing the subpath, then nextP0 is in the first */ + /* hint zone */ + cf2_glyphpath_hintPoint( glyphpath, + &glyphpath->firstHintMap, + ¶ms.pt1, + nextP0->x, + nextP0->y ); + } + else + { + cf2_glyphpath_hintPoint( glyphpath, + hintmap, + ¶ms.pt1, + nextP0->x, + nextP0->y ); + } + + if ( params.pt1.x != glyphpath->currentDS.x || + params.pt1.y != glyphpath->currentDS.y ) + { + /* length is nonzero */ + params.op = CF2_PathOpLineTo; + params.pt0 = glyphpath->currentDS; + + /* note: pt2 and pt3 are unused */ + glyphpath->callbacks->lineTo( glyphpath->callbacks, ¶ms ); + + glyphpath->currentDS = params.pt1; + } + } + + if ( useIntersection ) + { + /* return intersection point to caller */ + *nextP0 = intersection; + } + } + + + /* push a MoveTo element based on current point and offset of current */ + /* element */ + static void + cf2_glyphpath_pushMove( CF2_GlyphPath glyphpath, + FT_Vector start ) + { + CF2_CallbackParamsRec params; + + + params.op = CF2_PathOpMoveTo; + params.pt0 = glyphpath->currentDS; + + /* Test if move has really happened yet; it would have called */ + /* `cf2_hintmap_build' to set `isValid'. */ + if ( !cf2_hintmap_isValid( &glyphpath->hintMap ) ) + { + /* we are here iff first subpath is missing a moveto operator: */ + /* synthesize first moveTo to finish initialization of hintMap */ + cf2_glyphpath_moveTo( glyphpath, + glyphpath->start.x, + glyphpath->start.y ); + } + + cf2_glyphpath_hintPoint( glyphpath, + &glyphpath->hintMap, + ¶ms.pt1, + start.x, + start.y ); + + /* note: pt2 and pt3 are unused */ + glyphpath->callbacks->moveTo( glyphpath->callbacks, ¶ms ); + + glyphpath->currentDS = params.pt1; + glyphpath->offsetStart0 = start; + } + + + /* + * All coordinates are in character space. + * On input, (x1, y1) and (x2, y2) give line segment. + * On output, (x, y) give offset vector. + * We use a piecewise approximation to trig functions. + * + * TODO: Offset true perpendicular and proper length + * supply the y-translation for hinting here, too, + * that adds yOffset unconditionally to *y. + */ + static void + cf2_glyphpath_computeOffset( CF2_GlyphPath glyphpath, + CF2_Fixed x1, + CF2_Fixed y1, + CF2_Fixed x2, + CF2_Fixed y2, + CF2_Fixed* x, + CF2_Fixed* y ) + { + CF2_Fixed dx = x2 - x1; + CF2_Fixed dy = y2 - y1; + + + /* note: negative offsets don't work here; negate deltas to change */ + /* quadrants, below */ + if ( glyphpath->font->reverseWinding ) + { + dx = -dx; + dy = -dy; + } + + *x = *y = 0; + + if ( !glyphpath->darken ) + return; + + /* add momentum for this path element */ + glyphpath->callbacks->windingMomentum += + cf2_getWindingMomentum( x1, y1, x2, y2 ); + + /* note: allow mixed integer and fixed multiplication here */ + if ( dx >= 0 ) + { + if ( dy >= 0 ) + { + /* first quadrant, +x +y */ + + if ( dx > 2 * dy ) + { + /* +x */ + *x = 0; + *y = 0; + } + else if ( dy > 2 * dx ) + { + /* +y */ + *x = glyphpath->xOffset; + *y = glyphpath->yOffset; + } + else + { + /* +x +y */ + *x = FT_MulFix( cf2_floatToFixed( 0.7 ), + glyphpath->xOffset ); + *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ), + glyphpath->yOffset ); + } + } + else + { + /* fourth quadrant, +x -y */ + + if ( dx > -2 * dy ) + { + /* +x */ + *x = 0; + *y = 0; + } + else if ( -dy > 2 * dx ) + { + /* -y */ + *x = -glyphpath->xOffset; + *y = glyphpath->yOffset; + } + else + { + /* +x -y */ + *x = FT_MulFix( cf2_floatToFixed( -0.7 ), + glyphpath->xOffset ); + *y = FT_MulFix( cf2_floatToFixed( 1.0 - 0.7 ), + glyphpath->yOffset ); + } + } + } + else + { + if ( dy >= 0 ) + { + /* second quadrant, -x +y */ + + if ( -dx > 2 * dy ) + { + /* -x */ + *x = 0; + *y = 2 * glyphpath->yOffset; + } + else if ( dy > -2 * dx ) + { + /* +y */ + *x = glyphpath->xOffset; + *y = glyphpath->yOffset; + } + else + { + /* -x +y */ + *x = FT_MulFix( cf2_floatToFixed( 0.7 ), + glyphpath->xOffset ); + *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ), + glyphpath->yOffset ); + } + } + else + { + /* third quadrant, -x -y */ + + if ( -dx > -2 * dy ) + { + /* -x */ + *x = 0; + *y = 2 * glyphpath->yOffset; + } + else if ( -dy > -2 * dx ) + { + /* -y */ + *x = -glyphpath->xOffset; + *y = glyphpath->yOffset; + } + else + { + /* -x -y */ + *x = FT_MulFix( cf2_floatToFixed( -0.7 ), + glyphpath->xOffset ); + *y = FT_MulFix( cf2_floatToFixed( 1.0 + 0.7 ), + glyphpath->yOffset ); + } + } + } + } + + + /* + * The functions cf2_glyphpath_{moveTo,lineTo,curveTo,closeOpenPath} are + * called by the interpreter with Character Space (CS) coordinates. Each + * path element is placed into a queue of length one to await the + * calculation of the following element. At that time, the darkening + * offset of the following element is known and joins can be computed, + * including possible modification of this element, before mapping to + * Device Space (DS) and passing it on to the outline consumer. + * + */ + FT_LOCAL_DEF( void ) + cf2_glyphpath_moveTo( CF2_GlyphPath glyphpath, + CF2_Fixed x, + CF2_Fixed y ) + { + cf2_glyphpath_closeOpenPath( glyphpath ); + + /* save the parameters of the move for later, when we'll know how to */ + /* offset it; */ + /* also save last move point */ + glyphpath->currentCS.x = glyphpath->start.x = x; + glyphpath->currentCS.y = glyphpath->start.y = y; + + glyphpath->moveIsPending = TRUE; + + /* ensure we have a valid map with current mask */ + if ( !cf2_hintmap_isValid( &glyphpath->hintMap ) || + cf2_hintmask_isNew( glyphpath->hintMask ) ) + cf2_hintmap_build( &glyphpath->hintMap, + glyphpath->hStemHintArray, + glyphpath->vStemHintArray, + glyphpath->hintMask, + glyphpath->hintOriginY, + FALSE ); + + /* save a copy of current HintMap to use when drawing initial point */ + glyphpath->firstHintMap = glyphpath->hintMap; /* structure copy */ + } + + + FT_LOCAL_DEF( void ) + cf2_glyphpath_lineTo( CF2_GlyphPath glyphpath, + CF2_Fixed x, + CF2_Fixed y ) + { + CF2_Fixed xOffset, yOffset; + FT_Vector P0, P1; + FT_Bool newHintMap; + + /* + * New hints will be applied after cf2_glyphpath_pushPrevElem has run. + * In case this is a synthesized closing line, any new hints should be + * delayed until this path is closed (`cf2_hintmask_isNew' will be + * called again before the next line or curve). + */ + + /* true if new hint map not on close */ + newHintMap = cf2_hintmask_isNew( glyphpath->hintMask ) && + !glyphpath->pathIsClosing; + + /* + * Zero-length lines may occur in the charstring. Because we cannot + * compute darkening offsets or intersections from zero-length lines, + * it is best to remove them and avoid artifacts. However, zero-length + * lines in CS at the start of a new hint map can generate non-zero + * lines in DS due to hint substitution. We detect a change in hint + * map here and pass those zero-length lines along. + */ + + /* + * Note: Find explicitly closed paths here with a conditional + * breakpoint using + * + * !gp->pathIsClosing && gp->start.x == x && gp->start.y == y + * + */ + + if ( glyphpath->currentCS.x == x && + glyphpath->currentCS.y == y && + !newHintMap ) + /* + * Ignore zero-length lines in CS where the hint map is the same + * because the line in DS will also be zero length. + * + * Ignore zero-length lines when we synthesize a closing line because + * the close will be handled in cf2_glyphPath_pushPrevElem. + */ + return; + + cf2_glyphpath_computeOffset( glyphpath, + glyphpath->currentCS.x, + glyphpath->currentCS.y, + x, + y, + &xOffset, + &yOffset ); + + /* construct offset points */ + P0.x = glyphpath->currentCS.x + xOffset; + P0.y = glyphpath->currentCS.y + yOffset; + P1.x = x + xOffset; + P1.y = y + yOffset; + + if ( glyphpath->moveIsPending ) + { + /* emit offset 1st point as MoveTo */ + cf2_glyphpath_pushMove( glyphpath, P0 ); + + glyphpath->moveIsPending = FALSE; /* adjust state machine */ + glyphpath->pathIsOpen = TRUE; + + glyphpath->offsetStart1 = P1; /* record second point */ + } + + if ( glyphpath->elemIsQueued ) + { + FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) || + glyphpath->hintMap.count == 0 ); + + cf2_glyphpath_pushPrevElem( glyphpath, + &glyphpath->hintMap, + &P0, + P1, + FALSE ); + } + + /* queue the current element with offset points */ + glyphpath->elemIsQueued = TRUE; + glyphpath->prevElemOp = CF2_PathOpLineTo; + glyphpath->prevElemP0 = P0; + glyphpath->prevElemP1 = P1; + + /* update current map */ + if ( newHintMap ) + cf2_hintmap_build( &glyphpath->hintMap, + glyphpath->hStemHintArray, + glyphpath->vStemHintArray, + glyphpath->hintMask, + glyphpath->hintOriginY, + FALSE ); + + glyphpath->currentCS.x = x; /* pre-offset current point */ + glyphpath->currentCS.y = y; + } + + + FT_LOCAL_DEF( void ) + cf2_glyphpath_curveTo( CF2_GlyphPath glyphpath, + CF2_Fixed x1, + CF2_Fixed y1, + CF2_Fixed x2, + CF2_Fixed y2, + CF2_Fixed x3, + CF2_Fixed y3 ) + { + CF2_Fixed xOffset1, yOffset1, xOffset3, yOffset3; + FT_Vector P0, P1, P2, P3; + + + /* TODO: ignore zero length portions of curve?? */ + cf2_glyphpath_computeOffset( glyphpath, + glyphpath->currentCS.x, + glyphpath->currentCS.y, + x1, + y1, + &xOffset1, + &yOffset1 ); + cf2_glyphpath_computeOffset( glyphpath, + x2, + y2, + x3, + y3, + &xOffset3, + &yOffset3 ); + + /* add momentum from the middle segment */ + glyphpath->callbacks->windingMomentum += + cf2_getWindingMomentum( x1, y1, x2, y2 ); + + /* construct offset points */ + P0.x = glyphpath->currentCS.x + xOffset1; + P0.y = glyphpath->currentCS.y + yOffset1; + P1.x = x1 + xOffset1; + P1.y = y1 + yOffset1; + /* note: preserve angle of final segment by using offset3 at both ends */ + P2.x = x2 + xOffset3; + P2.y = y2 + yOffset3; + P3.x = x3 + xOffset3; + P3.y = y3 + yOffset3; + + if ( glyphpath->moveIsPending ) + { + /* emit offset 1st point as MoveTo */ + cf2_glyphpath_pushMove( glyphpath, P0 ); + + glyphpath->moveIsPending = FALSE; + glyphpath->pathIsOpen = TRUE; + + glyphpath->offsetStart1 = P1; /* record second point */ + } + + if ( glyphpath->elemIsQueued ) + { + FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) || + glyphpath->hintMap.count == 0 ); + + cf2_glyphpath_pushPrevElem( glyphpath, + &glyphpath->hintMap, + &P0, + P1, + FALSE ); + } + + /* queue the current element with offset points */ + glyphpath->elemIsQueued = TRUE; + glyphpath->prevElemOp = CF2_PathOpCubeTo; + glyphpath->prevElemP0 = P0; + glyphpath->prevElemP1 = P1; + glyphpath->prevElemP2 = P2; + glyphpath->prevElemP3 = P3; + + /* update current map */ + if ( cf2_hintmask_isNew( glyphpath->hintMask ) ) + cf2_hintmap_build( &glyphpath->hintMap, + glyphpath->hStemHintArray, + glyphpath->vStemHintArray, + glyphpath->hintMask, + glyphpath->hintOriginY, + FALSE ); + + glyphpath->currentCS.x = x3; /* pre-offset current point */ + glyphpath->currentCS.y = y3; + } + + + FT_LOCAL_DEF( void ) + cf2_glyphpath_closeOpenPath( CF2_GlyphPath glyphpath ) + { + if ( glyphpath->pathIsOpen ) + { + /* + * A closing line in Character Space line is always generated below + * with `cf2_glyphPath_lineTo'. It may be ignored later if it turns + * out to be zero length in Device Space. + */ + glyphpath->pathIsClosing = TRUE; + + cf2_glyphpath_lineTo( glyphpath, + glyphpath->start.x, + glyphpath->start.y ); + + /* empty the final element from the queue and close the path */ + if ( glyphpath->elemIsQueued ) + cf2_glyphpath_pushPrevElem( glyphpath, + &glyphpath->hintMap, + &glyphpath->offsetStart0, + glyphpath->offsetStart1, + TRUE ); + + /* reset state machine */ + glyphpath->moveIsPending = TRUE; + glyphpath->pathIsOpen = FALSE; + glyphpath->pathIsClosing = FALSE; + glyphpath->elemIsQueued = FALSE; + } + } + + +/* END */ diff --git a/src/cff/cf2hints.h b/src/cff/cf2hints.h new file mode 100644 index 0000000..f25d91b --- /dev/null +++ b/src/cff/cf2hints.h @@ -0,0 +1,289 @@ +/***************************************************************************/ +/* */ +/* cf2hints.h */ +/* */ +/* Adobe's code for handling CFF hints (body). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2HINTS_H__ +#define __CF2HINTS_H__ + + +FT_BEGIN_HEADER + + + enum + { + CF2_MAX_HINTS = 96 /* maximum # of hints */ + }; + + + /* + * A HintMask object stores a bit mask that specifies which hints in the + * charstring are active at a given time. Hints in CFF must be declared + * at the start, before any drawing operators, with horizontal hints + * preceding vertical hints. The HintMask is ordered the same way, with + * horizontal hints immediately followed by vertical hints. Clients are + * responsible for knowing how many of each type are present. + * + * The maximum total number of hints is 96, as specified by the CFF + * specification. + * + * A HintMask is built 0 or more times while interpreting a charstring, by + * the HintMask operator. There is only one HintMask, but it is built or + * rebuilt each time there is a hint substitution (HintMask operator) in + * the charstring. A default HintMask with all bits set is built if there + * has been no HintMask operator prior to the first drawing operator. + * + */ + + typedef struct CF2_HintMaskRec_ + { + FT_Error* error; + + FT_Bool isValid; + FT_Bool isNew; + + size_t bitCount; + size_t byteCount; + + FT_Byte mask[( CF2_MAX_HINTS + 7 ) / 8]; + + } CF2_HintMaskRec, *CF2_HintMask; + + + typedef struct CF2_StemHintRec_ + { + FT_Bool used; /* DS positions are valid */ + + CF2_Fixed min; /* original character space value */ + CF2_Fixed max; + + CF2_Fixed minDS; /* DS position after first use */ + CF2_Fixed maxDS; + + } CF2_StemHintRec, *CF2_StemHint; + + + /* + * A HintMap object stores a piecewise linear function for mapping + * y-coordinates from character space to device space, providing + * appropriate pixel alignment to stem edges. + * + * The map is implemented as an array of `CF2_Hint' elements, each + * representing an edge. When edges are paired, as from stem hints, the + * bottom edge must immediately precede the top edge in the array. + * Element character space AND device space positions must both increase + * monotonically in the array. `CF2_Hint' elements are also used as + * parameters to `cf2_blues_capture'. + * + * The `cf2_hintmap_build' method must be called before any drawing + * operation (beginning with a Move operator) and at each hint + * substitution (HintMask operator). + * + * The `cf2_hintmap_map' method is called to transform y-coordinates at + * each drawing operation (move, line, curve). + * + */ + + /* TODO: make this a CF2_ArrStack and add a deep copy method */ + enum + { + CF2_MAX_HINT_EDGES = CF2_MAX_HINTS * 2 + }; + + + typedef struct CF2_HintMapRec_ + { + CF2_Font font; + + /* initial map based on blue zones */ + struct CF2_HintMapRec_* initialHintMap; + + /* working storage for 2nd pass adjustHints */ + CF2_ArrStack hintMoves; + + FT_Bool isValid; + FT_Bool hinted; + + CF2_Fixed scale; + CF2_UInt count; + + /* start search from this index */ + CF2_UInt lastIndex; + + CF2_HintRec edge[CF2_MAX_HINT_EDGES]; /* 192 */ + + } CF2_HintMapRec, *CF2_HintMap; + + + FT_LOCAL( FT_Bool ) + cf2_hint_isValid( const CF2_Hint hint ); + FT_LOCAL( FT_Bool ) + cf2_hint_isTop( const CF2_Hint hint ); + FT_LOCAL( FT_Bool ) + cf2_hint_isBottom( const CF2_Hint hint ); + FT_LOCAL( void ) + cf2_hint_lock( CF2_Hint hint ); + + + FT_LOCAL( void ) + cf2_hintmap_init( CF2_HintMap hintmap, + CF2_Font font, + CF2_HintMap initialMap, + CF2_ArrStack hintMoves, + CF2_Fixed scale ); + FT_LOCAL( void ) + cf2_hintmap_build( CF2_HintMap hintmap, + CF2_ArrStack hStemHintArray, + CF2_ArrStack vStemHintArray, + CF2_HintMask hintMask, + CF2_Fixed hintOrigin, + FT_Bool initialMap ); + + + /* + * GlyphPath is a wrapper for drawing operations that scales the + * coordinates according to the render matrix and HintMap. It also tracks + * open paths to control ClosePath and to insert MoveTo for broken fonts. + * + */ + typedef struct CF2_GlyphPathRec_ + { + /* TODO: gather some of these into a hinting context */ + + CF2_Font font; /* font instance */ + CF2_OutlineCallbacks callbacks; /* outline consumer */ + + + CF2_HintMapRec hintMap; /* current hint map */ + CF2_HintMapRec firstHintMap; /* saved copy */ + CF2_HintMapRec initialHintMap; /* based on all captured hints */ + + CF2_ArrStackRec hintMoves; /* list of hint moves for 2nd pass */ + + CF2_Fixed scaleX; /* matrix a */ + CF2_Fixed scaleC; /* matrix c */ + CF2_Fixed scaleY; /* matrix d */ + + FT_Vector fractionalTranslation; /* including deviceXScale */ +#if 0 + CF2_Fixed hShift; /* character space horizontal shift */ + /* (for fauxing) */ +#endif + + FT_Bool pathIsOpen; /* true after MoveTo */ + FT_Bool pathIsClosing; /* true when synthesizing closepath line */ + FT_Bool darken; /* true if stem darkening */ + FT_Bool moveIsPending; /* true between MoveTo and offset MoveTo */ + + /* references used to call `cf2_hintmap_build', if necessary */ + CF2_ArrStack hStemHintArray; + CF2_ArrStack vStemHintArray; + CF2_HintMask hintMask; /* ptr to the current mask */ + CF2_Fixed hintOriginY; /* copy of current origin */ + const CF2_BluesRec* blues; + + CF2_Fixed xOffset; /* character space offsets */ + CF2_Fixed yOffset; + + /* character space miter limit threshold */ + CF2_Fixed miterLimit; + /* vertical/horzizontal snap distance in character space */ + CF2_Fixed snapThreshold; + + FT_Vector offsetStart0; /* first and second points of first */ + FT_Vector offsetStart1; /* element with offset applied */ + + /* current point, character space, before offset */ + FT_Vector currentCS; + /* current point, device space */ + FT_Vector currentDS; + /* start point of subpath, character space */ + FT_Vector start; + + /* the following members constitute the `queue' of one element */ + FT_Bool elemIsQueued; + CF2_Int prevElemOp; + + FT_Vector prevElemP0; + FT_Vector prevElemP1; + FT_Vector prevElemP2; + FT_Vector prevElemP3; + + } CF2_GlyphPathRec, *CF2_GlyphPath; + + + FT_LOCAL( void ) + cf2_glyphpath_init( CF2_GlyphPath glyphpath, + CF2_Font font, + CF2_OutlineCallbacks callbacks, + CF2_Fixed scaleY, + /* CF2_Fixed hShift, */ + CF2_ArrStack hStemHintArray, + CF2_ArrStack vStemHintArray, + CF2_HintMask hintMask, + CF2_Fixed hintOrigin, + const CF2_Blues blues, + const FT_Vector* fractionalTranslation ); + FT_LOCAL( void ) + cf2_glyphpath_finalize( CF2_GlyphPath glyphpath ); + + FT_LOCAL( void ) + cf2_glyphpath_moveTo( CF2_GlyphPath glyphpath, + CF2_Fixed x, + CF2_Fixed y ); + FT_LOCAL( void ) + cf2_glyphpath_lineTo( CF2_GlyphPath glyphpath, + CF2_Fixed x, + CF2_Fixed y ); + FT_LOCAL( void ) + cf2_glyphpath_curveTo( CF2_GlyphPath glyphpath, + CF2_Fixed x1, + CF2_Fixed y1, + CF2_Fixed x2, + CF2_Fixed y2, + CF2_Fixed x3, + CF2_Fixed y3 ); + FT_LOCAL( void ) + cf2_glyphpath_closeOpenPath( CF2_GlyphPath glyphpath ); + + +FT_END_HEADER + + +#endif /* __CF2HINTS_H__ */ + + +/* END */ diff --git a/src/cff/cf2intrp.c b/src/cff/cf2intrp.c new file mode 100644 index 0000000..a269606 --- /dev/null +++ b/src/cff/cf2intrp.c @@ -0,0 +1,1545 @@ +/***************************************************************************/ +/* */ +/* cf2intrp.c */ +/* */ +/* Adobe's CFF Interpreter (body). */ +/* */ +/* Copyright 2007-2014 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2glue.h" +#include "cf2font.h" +#include "cf2stack.h" +#include "cf2hints.h" + +#include "cf2error.h" + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_cf2interp + + + /* some operators are not implemented yet */ +#define CF2_FIXME FT_TRACE4(( "cf2_interpT2CharString:" \ + " operator not implemented yet\n" )) + + + + FT_LOCAL_DEF( void ) + cf2_hintmask_init( CF2_HintMask hintmask, + FT_Error* error ) + { + FT_ZERO( hintmask ); + + hintmask->error = error; + } + + + FT_LOCAL_DEF( FT_Bool ) + cf2_hintmask_isValid( const CF2_HintMask hintmask ) + { + return hintmask->isValid; + } + + + FT_LOCAL_DEF( FT_Bool ) + cf2_hintmask_isNew( const CF2_HintMask hintmask ) + { + return hintmask->isNew; + } + + + FT_LOCAL_DEF( void ) + cf2_hintmask_setNew( CF2_HintMask hintmask, + FT_Bool val ) + { + hintmask->isNew = val; + } + + + /* clients call `getMaskPtr' in order to iterate */ + /* through hint mask */ + + FT_LOCAL_DEF( FT_Byte* ) + cf2_hintmask_getMaskPtr( CF2_HintMask hintmask ) + { + return hintmask->mask; + } + + + static size_t + cf2_hintmask_setCounts( CF2_HintMask hintmask, + size_t bitCount ) + { + if ( bitCount > CF2_MAX_HINTS ) + { + /* total of h and v stems must be <= 96 */ + CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format ); + return 0; + } + + hintmask->bitCount = bitCount; + hintmask->byteCount = ( hintmask->bitCount + 7 ) / 8; + + hintmask->isValid = TRUE; + hintmask->isNew = TRUE; + + return bitCount; + } + + + /* consume the hintmask bytes from the charstring, advancing the src */ + /* pointer */ + static void + cf2_hintmask_read( CF2_HintMask hintmask, + CF2_Buffer charstring, + size_t bitCount ) + { + size_t i; + +#ifndef CF2_NDEBUG + /* these are the bits in the final mask byte that should be zero */ + /* Note: this variable is only used in an assert expression below */ + /* and then only if CF2_NDEBUG is not defined */ + CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1; +#endif + + + /* initialize counts and isValid */ + if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 ) + return; + + FT_ASSERT( hintmask->byteCount > 0 ); + + FT_TRACE4(( " (maskbytes:" )); + + /* set mask and advance interpreter's charstring pointer */ + for ( i = 0; i < hintmask->byteCount; i++ ) + { + hintmask->mask[i] = (FT_Byte)cf2_buf_readByte( charstring ); + FT_TRACE4(( " 0x%02X", hintmask->mask[i] )); + } + + FT_TRACE4(( ")\n" )); + + /* assert any unused bits in last byte are zero unless there's a prior */ + /* error */ + /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */ +#ifndef CF2_NDEBUG + FT_ASSERT( ( hintmask->mask[hintmask->byteCount - 1] & mask ) == 0 || + *hintmask->error ); +#endif + } + + + FT_LOCAL_DEF( void ) + cf2_hintmask_setAll( CF2_HintMask hintmask, + size_t bitCount ) + { + size_t i; + CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1; + + + /* initialize counts and isValid */ + if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 ) + return; + + FT_ASSERT( hintmask->byteCount > 0 ); + FT_ASSERT( hintmask->byteCount < + sizeof ( hintmask->mask ) / sizeof ( hintmask->mask[0] ) ); + + /* set mask to all ones */ + for ( i = 0; i < hintmask->byteCount; i++ ) + hintmask->mask[i] = 0xFF; + + /* clear unused bits */ + /* bitCount -> mask, 0 -> 0, 1 -> 7f, 2 -> 3f, ... 6 -> 3, 7 -> 1 */ + hintmask->mask[hintmask->byteCount - 1] &= ~mask; + } + + + /* Type2 charstring opcodes */ + enum + { + cf2_cmdRESERVED_0, /* 0 */ + cf2_cmdHSTEM, /* 1 */ + cf2_cmdRESERVED_2, /* 2 */ + cf2_cmdVSTEM, /* 3 */ + cf2_cmdVMOVETO, /* 4 */ + cf2_cmdRLINETO, /* 5 */ + cf2_cmdHLINETO, /* 6 */ + cf2_cmdVLINETO, /* 7 */ + cf2_cmdRRCURVETO, /* 8 */ + cf2_cmdRESERVED_9, /* 9 */ + cf2_cmdCALLSUBR, /* 10 */ + cf2_cmdRETURN, /* 11 */ + cf2_cmdESC, /* 12 */ + cf2_cmdRESERVED_13, /* 13 */ + cf2_cmdENDCHAR, /* 14 */ + cf2_cmdRESERVED_15, /* 15 */ + cf2_cmdRESERVED_16, /* 16 */ + cf2_cmdRESERVED_17, /* 17 */ + cf2_cmdHSTEMHM, /* 18 */ + cf2_cmdHINTMASK, /* 19 */ + cf2_cmdCNTRMASK, /* 20 */ + cf2_cmdRMOVETO, /* 21 */ + cf2_cmdHMOVETO, /* 22 */ + cf2_cmdVSTEMHM, /* 23 */ + cf2_cmdRCURVELINE, /* 24 */ + cf2_cmdRLINECURVE, /* 25 */ + cf2_cmdVVCURVETO, /* 26 */ + cf2_cmdHHCURVETO, /* 27 */ + cf2_cmdEXTENDEDNMBR, /* 28 */ + cf2_cmdCALLGSUBR, /* 29 */ + cf2_cmdVHCURVETO, /* 30 */ + cf2_cmdHVCURVETO /* 31 */ + }; + + enum + { + cf2_escDOTSECTION, /* 0 */ + cf2_escRESERVED_1, /* 1 */ + cf2_escRESERVED_2, /* 2 */ + cf2_escAND, /* 3 */ + cf2_escOR, /* 4 */ + cf2_escNOT, /* 5 */ + cf2_escRESERVED_6, /* 6 */ + cf2_escRESERVED_7, /* 7 */ + cf2_escRESERVED_8, /* 8 */ + cf2_escABS, /* 9 */ + cf2_escADD, /* 10 like otherADD */ + cf2_escSUB, /* 11 like otherSUB */ + cf2_escDIV, /* 12 */ + cf2_escRESERVED_13, /* 13 */ + cf2_escNEG, /* 14 */ + cf2_escEQ, /* 15 */ + cf2_escRESERVED_16, /* 16 */ + cf2_escRESERVED_17, /* 17 */ + cf2_escDROP, /* 18 */ + cf2_escRESERVED_19, /* 19 */ + cf2_escPUT, /* 20 like otherPUT */ + cf2_escGET, /* 21 like otherGET */ + cf2_escIFELSE, /* 22 like otherIFELSE */ + cf2_escRANDOM, /* 23 like otherRANDOM */ + cf2_escMUL, /* 24 like otherMUL */ + cf2_escRESERVED_25, /* 25 */ + cf2_escSQRT, /* 26 */ + cf2_escDUP, /* 27 like otherDUP */ + cf2_escEXCH, /* 28 like otherEXCH */ + cf2_escINDEX, /* 29 */ + cf2_escROLL, /* 30 */ + cf2_escRESERVED_31, /* 31 */ + cf2_escRESERVED_32, /* 32 */ + cf2_escRESERVED_33, /* 33 */ + cf2_escHFLEX, /* 34 */ + cf2_escFLEX, /* 35 */ + cf2_escHFLEX1, /* 36 */ + cf2_escFLEX1 /* 37 */ + }; + + + /* `stemHintArray' does not change once we start drawing the outline. */ + static void + cf2_doStems( const CF2_Font font, + CF2_Stack opStack, + CF2_ArrStack stemHintArray, + CF2_Fixed* width, + FT_Bool* haveWidth, + CF2_Fixed hintOffset ) + { + CF2_UInt i; + CF2_UInt count = cf2_stack_count( opStack ); + FT_Bool hasWidthArg = (FT_Bool)( count & 1 ); + + /* variable accumulates delta values from operand stack */ + CF2_Fixed position = hintOffset; + + if ( hasWidthArg && ! *haveWidth ) + *width = cf2_stack_getReal( opStack, 0 ) + + cf2_getNominalWidthX( font->decoder ); + + if ( font->decoder->width_only ) + goto exit; + + for ( i = hasWidthArg ? 1 : 0; i < count; i += 2 ) + { + /* construct a CF2_StemHint and push it onto the list */ + CF2_StemHintRec stemhint; + + + stemhint.min = + position += cf2_stack_getReal( opStack, i ); + stemhint.max = + position += cf2_stack_getReal( opStack, i + 1 ); + + stemhint.used = FALSE; + stemhint.maxDS = + stemhint.minDS = 0; + + cf2_arrstack_push( stemHintArray, &stemhint ); /* defer error check */ + } + + cf2_stack_clear( opStack ); + + exit: + /* cf2_doStems must define a width (may be default) */ + *haveWidth = TRUE; + } + + + static void + cf2_doFlex( CF2_Stack opStack, + CF2_Fixed* curX, + CF2_Fixed* curY, + CF2_GlyphPath glyphPath, + const FT_Bool* readFromStack, + FT_Bool doConditionalLastRead ) + { + CF2_Fixed vals[14]; + CF2_UInt index; + FT_Bool isHFlex; + CF2_Int top, i, j; + + + vals[0] = *curX; + vals[1] = *curY; + index = 0; + isHFlex = readFromStack[9] == FALSE; + top = isHFlex ? 9 : 10; + + for ( i = 0; i < top; i++ ) + { + vals[i + 2] = vals[i]; + if ( readFromStack[i] ) + vals[i + 2] += cf2_stack_getReal( opStack, index++ ); + } + + if ( isHFlex ) + vals[9 + 2] = *curY; + + if ( doConditionalLastRead ) + { + FT_Bool lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) > + cf2_fixedAbs( vals[11] - *curY ) ); + CF2_Fixed lastVal = cf2_stack_getReal( opStack, index ); + + + if ( lastIsX ) + { + vals[12] = vals[10] + lastVal; + vals[13] = *curY; + } + else + { + vals[12] = *curX; + vals[13] = vals[11] + lastVal; + } + } + else + { + if ( readFromStack[10] ) + vals[12] = vals[10] + cf2_stack_getReal( opStack, index++ ); + else + vals[12] = *curX; + + if ( readFromStack[11] ) + vals[13] = vals[11] + cf2_stack_getReal( opStack, index ); + else + vals[13] = *curY; + } + + for ( j = 0; j < 2; j++ ) + cf2_glyphpath_curveTo( glyphPath, vals[j * 6 + 2], + vals[j * 6 + 3], + vals[j * 6 + 4], + vals[j * 6 + 5], + vals[j * 6 + 6], + vals[j * 6 + 7] ); + + cf2_stack_clear( opStack ); + + *curX = vals[12]; + *curY = vals[13]; + } + + + /* + * `error' is a shared error code used by many objects in this + * routine. Before the code continues from an error, it must check and + * record the error in `*error'. The idea is that this shared + * error code will record the first error encountered. If testing + * for an error anyway, the cost of `goto exit' is small, so we do it, + * even if continuing would be safe. In this case, `lastError' is + * set, so the testing and storing can be done in one place, at `exit'. + * + * Continuing after an error is intended for objects which do their own + * testing of `*error', e.g., array stack functions. This allows us to + * avoid an extra test after the call. + * + * Unimplemented opcodes are ignored. + * + */ + FT_LOCAL_DEF( void ) + cf2_interpT2CharString( CF2_Font font, + CF2_Buffer buf, + CF2_OutlineCallbacks callbacks, + const FT_Vector* translation, + FT_Bool doingSeac, + CF2_Fixed curX, + CF2_Fixed curY, + CF2_Fixed* width ) + { + /* lastError is used for errors that are immediately tested */ + FT_Error lastError = FT_Err_Ok; + + /* pointer to parsed font object */ + CFF_Decoder* decoder = font->decoder; + + FT_Error* error = &font->error; + FT_Memory memory = font->memory; + + CF2_Fixed scaleY = font->innerTransform.d; + CF2_Fixed nominalWidthX = cf2_getNominalWidthX( decoder ); + + /* save this for hinting seac accents */ + CF2_Fixed hintOriginY = curY; + + CF2_Stack opStack = NULL; + FT_Byte op1; /* first opcode byte */ + + /* instruction limit; 20,000,000 matches Avalon */ + FT_UInt32 instructionLimit = 20000000UL; + + CF2_ArrStackRec subrStack; + + FT_Bool haveWidth; + CF2_Buffer charstring = NULL; + + CF2_Int charstringIndex = -1; /* initialize to empty */ + + /* TODO: placeholders for hint structures */ + + /* objects used for hinting */ + CF2_ArrStackRec hStemHintArray; + CF2_ArrStackRec vStemHintArray; + + CF2_HintMaskRec hintMask; + CF2_GlyphPathRec glyphPath; + + + /* initialize the remaining objects */ + cf2_arrstack_init( &subrStack, + memory, + error, + sizeof ( CF2_BufferRec ) ); + cf2_arrstack_init( &hStemHintArray, + memory, + error, + sizeof ( CF2_StemHintRec ) ); + cf2_arrstack_init( &vStemHintArray, + memory, + error, + sizeof ( CF2_StemHintRec ) ); + + /* initialize CF2_StemHint arrays */ + cf2_hintmask_init( &hintMask, error ); + + /* initialize path map to manage drawing operations */ + + /* Note: last 4 params are used to handle `MoveToPermissive', which */ + /* may need to call `hintMap.Build' */ + /* TODO: MoveToPermissive is gone; are these still needed? */ + cf2_glyphpath_init( &glyphPath, + font, + callbacks, + scaleY, + /* hShift, */ + &hStemHintArray, + &vStemHintArray, + &hintMask, + hintOriginY, + &font->blues, + translation ); + + /* + * Initialize state for width parsing. From the CFF Spec: + * + * The first stack-clearing operator, which must be one of hstem, + * hstemhm, vstem, vstemhm, cntrmask, hintmask, hmoveto, vmoveto, + * rmoveto, or endchar, takes an additional argument - the width (as + * described earlier), which may be expressed as zero or one numeric + * argument. + * + * What we implement here uses the first validly specified width, but + * does not detect errors for specifying more than one width. + * + * If one of the above operators occurs without explicitly specifying + * a width, we assume the default width. + * + */ + haveWidth = FALSE; + *width = cf2_getDefaultWidthX( decoder ); + + /* + * Note: at this point, all pointers to resources must be NULL + * and all local objects must be initialized. + * There must be no branches to exit: above this point. + * + */ + + /* allocate an operand stack */ + opStack = cf2_stack_init( memory, error ); + if ( !opStack ) + { + lastError = FT_THROW( Out_Of_Memory ); + goto exit; + } + + /* initialize subroutine stack by placing top level charstring as */ + /* first element (max depth plus one for the charstring) */ + /* Note: Caller owns and must finalize the first charstring. */ + /* Our copy of it does not change that requirement. */ + cf2_arrstack_setCount( &subrStack, CF2_MAX_SUBR + 1 ); + + charstring = (CF2_Buffer)cf2_arrstack_getBuffer( &subrStack ); + *charstring = *buf; /* structure copy */ + + charstringIndex = 0; /* entry is valid now */ + + /* catch errors so far */ + if ( *error ) + goto exit; + + /* main interpreter loop */ + while ( 1 ) + { + if ( cf2_buf_isEnd( charstring ) ) + { + /* If we've reached the end of the charstring, simulate a */ + /* cf2_cmdRETURN or cf2_cmdENDCHAR. */ + if ( charstringIndex ) + op1 = cf2_cmdRETURN; /* end of buffer for subroutine */ + else + op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */ + } + else + op1 = (FT_Byte)cf2_buf_readByte( charstring ); + + /* check for errors once per loop */ + if ( *error ) + goto exit; + + instructionLimit--; + if ( instructionLimit == 0 ) + { + lastError = FT_THROW( Invalid_Glyph_Format ); + goto exit; + } + + switch( op1 ) + { + case cf2_cmdRESERVED_0: + case cf2_cmdRESERVED_2: + case cf2_cmdRESERVED_9: + case cf2_cmdRESERVED_13: + case cf2_cmdRESERVED_15: + case cf2_cmdRESERVED_16: + case cf2_cmdRESERVED_17: + /* we may get here if we have a prior error */ + FT_TRACE4(( " unknown op (%d)\n", op1 )); + break; + + case cf2_cmdHSTEMHM: + case cf2_cmdHSTEM: + FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" )); + + /* never add hints after the mask is computed */ + if ( cf2_hintmask_isValid( &hintMask ) ) + { + FT_TRACE4(( "cf2_interpT2CharString:" + " invalid horizontal hint mask\n" )); + break; + } + + cf2_doStems( font, + opStack, + &hStemHintArray, + width, + &haveWidth, + 0 ); + + if ( font->decoder->width_only ) + goto exit; + + break; + + case cf2_cmdVSTEMHM: + case cf2_cmdVSTEM: + FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" )); + + /* never add hints after the mask is computed */ + if ( cf2_hintmask_isValid( &hintMask ) ) + { + FT_TRACE4(( "cf2_interpT2CharString:" + " invalid vertical hint mask\n" )); + break; + } + + cf2_doStems( font, + opStack, + &vStemHintArray, + width, + &haveWidth, + 0 ); + + if ( font->decoder->width_only ) + goto exit; + + break; + + case cf2_cmdVMOVETO: + FT_TRACE4(( " vmoveto\n" )); + + if ( cf2_stack_count( opStack ) > 1 && !haveWidth ) + *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX; + + /* width is defined or default after this */ + haveWidth = TRUE; + + if ( font->decoder->width_only ) + goto exit; + + curY += cf2_stack_popFixed( opStack ); + + cf2_glyphpath_moveTo( &glyphPath, curX, curY ); + + break; + + case cf2_cmdRLINETO: + { + CF2_UInt index; + CF2_UInt count = cf2_stack_count( opStack ); + + + FT_TRACE4(( " rlineto\n" )); + + for ( index = 0; index < count; index += 2 ) + { + curX += cf2_stack_getReal( opStack, index + 0 ); + curY += cf2_stack_getReal( opStack, index + 1 ); + + cf2_glyphpath_lineTo( &glyphPath, curX, curY ); + } + + cf2_stack_clear( opStack ); + } + continue; /* no need to clear stack again */ + + case cf2_cmdHLINETO: + case cf2_cmdVLINETO: + { + CF2_UInt index; + CF2_UInt count = cf2_stack_count( opStack ); + + FT_Bool isX = op1 == cf2_cmdHLINETO; + + + FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" )); + + for ( index = 0; index < count; index++ ) + { + CF2_Fixed v = cf2_stack_getReal( opStack, index ); + + + if ( isX ) + curX += v; + else + curY += v; + + isX = !isX; + + cf2_glyphpath_lineTo( &glyphPath, curX, curY ); + } + + cf2_stack_clear( opStack ); + } + continue; + + case cf2_cmdRCURVELINE: + case cf2_cmdRRCURVETO: + { + CF2_UInt count = cf2_stack_count( opStack ); + CF2_UInt index = 0; + + + FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n" + : " rrcurveto\n" )); + + while ( index + 6 <= count ) + { + CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; + CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY; + CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1; + CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1; + CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; + CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2; + + + cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); + + curX = x3; + curY = y3; + index += 6; + } + + if ( op1 == cf2_cmdRCURVELINE ) + { + curX += cf2_stack_getReal( opStack, index + 0 ); + curY += cf2_stack_getReal( opStack, index + 1 ); + + cf2_glyphpath_lineTo( &glyphPath, curX, curY ); + } + + cf2_stack_clear( opStack ); + } + continue; /* no need to clear stack again */ + + case cf2_cmdCALLGSUBR: + case cf2_cmdCALLSUBR: + { + CF2_UInt subrIndex; + + + FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr" + : " callsubr" )); + + if ( charstringIndex > CF2_MAX_SUBR ) + { + /* max subr plus one for charstring */ + lastError = FT_THROW( Invalid_Glyph_Format ); + goto exit; /* overflow of stack */ + } + + /* push our current CFF charstring region on subrStack */ + charstring = (CF2_Buffer) + cf2_arrstack_getPointer( &subrStack, + charstringIndex + 1 ); + + /* set up the new CFF region and pointer */ + subrIndex = cf2_stack_popInt( opStack ); + + switch ( op1 ) + { + case cf2_cmdCALLGSUBR: + FT_TRACE4(( "(%d)\n", subrIndex + decoder->globals_bias )); + + if ( cf2_initGlobalRegionBuffer( decoder, + subrIndex, + charstring ) ) + { + lastError = FT_THROW( Invalid_Glyph_Format ); + goto exit; /* subroutine lookup or stream error */ + } + break; + + default: + /* cf2_cmdCALLSUBR */ + FT_TRACE4(( "(%d)\n", subrIndex + decoder->locals_bias )); + + if ( cf2_initLocalRegionBuffer( decoder, + subrIndex, + charstring ) ) + { + lastError = FT_THROW( Invalid_Glyph_Format ); + goto exit; /* subroutine lookup or stream error */ + } + } + + charstringIndex += 1; /* entry is valid now */ + } + continue; /* do not clear the stack */ + + case cf2_cmdRETURN: + FT_TRACE4(( " return\n" )); + + if ( charstringIndex < 1 ) + { + /* Note: cannot return from top charstring */ + lastError = FT_THROW( Invalid_Glyph_Format ); + goto exit; /* underflow of stack */ + } + + /* restore position in previous charstring */ + charstring = (CF2_Buffer) + cf2_arrstack_getPointer( &subrStack, + --charstringIndex ); + continue; /* do not clear the stack */ + + case cf2_cmdESC: + { + FT_Byte op2 = (FT_Byte)cf2_buf_readByte( charstring ); + + + switch ( op2 ) + { + case cf2_escDOTSECTION: + /* something about `flip type of locking' -- ignore it */ + FT_TRACE4(( " dotsection\n" )); + + break; + + /* TODO: should these operators be supported? */ + case cf2_escAND: /* in spec */ + FT_TRACE4(( " and\n" )); + + CF2_FIXME; + break; + + case cf2_escOR: /* in spec */ + FT_TRACE4(( " or\n" )); + + CF2_FIXME; + break; + + case cf2_escNOT: /* in spec */ + FT_TRACE4(( " not\n" )); + + CF2_FIXME; + break; + + case cf2_escABS: /* in spec */ + FT_TRACE4(( " abs\n" )); + + CF2_FIXME; + break; + + case cf2_escADD: /* in spec */ + FT_TRACE4(( " add\n" )); + + CF2_FIXME; + break; + + case cf2_escSUB: /* in spec */ + FT_TRACE4(( " sub\n" )); + + CF2_FIXME; + break; + + case cf2_escDIV: /* in spec */ + FT_TRACE4(( " div\n" )); + + CF2_FIXME; + break; + + case cf2_escNEG: /* in spec */ + FT_TRACE4(( " neg\n" )); + + CF2_FIXME; + break; + + case cf2_escEQ: /* in spec */ + FT_TRACE4(( " eq\n" )); + + CF2_FIXME; + break; + + case cf2_escDROP: /* in spec */ + FT_TRACE4(( " drop\n" )); + + CF2_FIXME; + break; + + case cf2_escPUT: /* in spec */ + FT_TRACE4(( " put\n" )); + + CF2_FIXME; + break; + + case cf2_escGET: /* in spec */ + FT_TRACE4(( " get\n" )); + + CF2_FIXME; + break; + + case cf2_escIFELSE: /* in spec */ + FT_TRACE4(( " ifelse\n" )); + + CF2_FIXME; + break; + + case cf2_escRANDOM: /* in spec */ + FT_TRACE4(( " random\n" )); + + CF2_FIXME; + break; + + case cf2_escMUL: /* in spec */ + FT_TRACE4(( " mul\n" )); + + CF2_FIXME; + break; + + case cf2_escSQRT: /* in spec */ + FT_TRACE4(( " sqrt\n" )); + + CF2_FIXME; + break; + + case cf2_escDUP: /* in spec */ + FT_TRACE4(( " dup\n" )); + + CF2_FIXME; + break; + + case cf2_escEXCH: /* in spec */ + FT_TRACE4(( " exch\n" )); + + CF2_FIXME; + break; + + case cf2_escINDEX: /* in spec */ + FT_TRACE4(( " index\n" )); + + CF2_FIXME; + break; + + case cf2_escROLL: /* in spec */ + FT_TRACE4(( " roll\n" )); + + CF2_FIXME; + break; + + case cf2_escHFLEX: + { + static const FT_Bool readFromStack[12] = + { + TRUE /* dx1 */, FALSE /* dy1 */, + TRUE /* dx2 */, TRUE /* dy2 */, + TRUE /* dx3 */, FALSE /* dy3 */, + TRUE /* dx4 */, FALSE /* dy4 */, + TRUE /* dx5 */, FALSE /* dy5 */, + TRUE /* dx6 */, FALSE /* dy6 */ + }; + + + FT_TRACE4(( " hflex\n" )); + + cf2_doFlex( opStack, + &curX, + &curY, + &glyphPath, + readFromStack, + FALSE /* doConditionalLastRead */ ); + } + continue; + + case cf2_escFLEX: + { + static const FT_Bool readFromStack[12] = + { + TRUE /* dx1 */, TRUE /* dy1 */, + TRUE /* dx2 */, TRUE /* dy2 */, + TRUE /* dx3 */, TRUE /* dy3 */, + TRUE /* dx4 */, TRUE /* dy4 */, + TRUE /* dx5 */, TRUE /* dy5 */, + TRUE /* dx6 */, TRUE /* dy6 */ + }; + + + FT_TRACE4(( " flex\n" )); + + cf2_doFlex( opStack, + &curX, + &curY, + &glyphPath, + readFromStack, + FALSE /* doConditionalLastRead */ ); + } + break; /* TODO: why is this not a continue? */ + + case cf2_escHFLEX1: + { + static const FT_Bool readFromStack[12] = + { + TRUE /* dx1 */, TRUE /* dy1 */, + TRUE /* dx2 */, TRUE /* dy2 */, + TRUE /* dx3 */, FALSE /* dy3 */, + TRUE /* dx4 */, FALSE /* dy4 */, + TRUE /* dx5 */, TRUE /* dy5 */, + TRUE /* dx6 */, FALSE /* dy6 */ + }; + + + FT_TRACE4(( " hflex1\n" )); + + cf2_doFlex( opStack, + &curX, + &curY, + &glyphPath, + readFromStack, + FALSE /* doConditionalLastRead */ ); + } + continue; + + case cf2_escFLEX1: + { + static const FT_Bool readFromStack[12] = + { + TRUE /* dx1 */, TRUE /* dy1 */, + TRUE /* dx2 */, TRUE /* dy2 */, + TRUE /* dx3 */, TRUE /* dy3 */, + TRUE /* dx4 */, TRUE /* dy4 */, + TRUE /* dx5 */, TRUE /* dy5 */, + FALSE /* dx6 */, FALSE /* dy6 */ + }; + + + FT_TRACE4(( " flex1\n" )); + + cf2_doFlex( opStack, + &curX, + &curY, + &glyphPath, + readFromStack, + TRUE /* doConditionalLastRead */ ); + } + continue; + + case cf2_escRESERVED_1: + case cf2_escRESERVED_2: + case cf2_escRESERVED_6: + case cf2_escRESERVED_7: + case cf2_escRESERVED_8: + case cf2_escRESERVED_13: + case cf2_escRESERVED_16: + case cf2_escRESERVED_17: + case cf2_escRESERVED_19: + case cf2_escRESERVED_25: + case cf2_escRESERVED_31: + case cf2_escRESERVED_32: + case cf2_escRESERVED_33: + default: + FT_TRACE4(( " unknown op (12, %d)\n", op2 )); + + }; /* end of switch statement checking `op2' */ + + } /* case cf2_cmdESC */ + break; + + case cf2_cmdENDCHAR: + FT_TRACE4(( " endchar\n" )); + + if ( cf2_stack_count( opStack ) == 1 || + cf2_stack_count( opStack ) == 5 ) + { + if ( !haveWidth ) + *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX; + } + + /* width is defined or default after this */ + haveWidth = TRUE; + + if ( font->decoder->width_only ) + goto exit; + + /* close path if still open */ + cf2_glyphpath_closeOpenPath( &glyphPath ); + + if ( cf2_stack_count( opStack ) > 1 ) + { + /* must be either 4 or 5 -- */ + /* this is a (deprecated) implied `seac' operator */ + + CF2_UInt achar; + CF2_UInt bchar; + CF2_BufferRec component; + CF2_Fixed dummyWidth; /* ignore component width */ + FT_Error error2; + + + if ( doingSeac ) + { + lastError = FT_THROW( Invalid_Glyph_Format ); + goto exit; /* nested seac */ + } + + achar = cf2_stack_popInt( opStack ); + bchar = cf2_stack_popInt( opStack ); + + curY = cf2_stack_popFixed( opStack ); + curX = cf2_stack_popFixed( opStack ); + + error2 = cf2_getSeacComponent( decoder, achar, &component ); + if ( error2 ) + { + lastError = error2; /* pass FreeType error through */ + goto exit; + } + cf2_interpT2CharString( font, + &component, + callbacks, + translation, + TRUE, + curX, + curY, + &dummyWidth ); + cf2_freeSeacComponent( decoder, &component ); + + error2 = cf2_getSeacComponent( decoder, bchar, &component ); + if ( error2 ) + { + lastError = error2; /* pass FreeType error through */ + goto exit; + } + cf2_interpT2CharString( font, + &component, + callbacks, + translation, + TRUE, + 0, + 0, + &dummyWidth ); + cf2_freeSeacComponent( decoder, &component ); + } + goto exit; + + case cf2_cmdCNTRMASK: + case cf2_cmdHINTMASK: + /* the final \n in the tracing message gets added in */ + /* `cf2_hintmask_read' (which also traces the mask bytes) */ + FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" )); + + /* never add hints after the mask is computed */ + if ( cf2_stack_count( opStack ) > 1 && + cf2_hintmask_isValid( &hintMask ) ) + { + FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" )); + break; + } + + /* if there are arguments on the stack, there this is an */ + /* implied cf2_cmdVSTEMHM */ + cf2_doStems( font, + opStack, + &vStemHintArray, + width, + &haveWidth, + 0 ); + + if ( font->decoder->width_only ) + goto exit; + + if ( op1 == cf2_cmdHINTMASK ) + { + /* consume the hint mask bytes which follow the operator */ + cf2_hintmask_read( &hintMask, + charstring, + cf2_arrstack_size( &hStemHintArray ) + + cf2_arrstack_size( &vStemHintArray ) ); + } + else + { + /* + * Consume the counter mask bytes which follow the operator: + * Build a temporary hint map, just to place and lock those + * stems participating in the counter mask. These are most + * likely the dominant hstems, and are grouped together in a + * few counter groups, not necessarily in correspondence + * with the hint groups. This reduces the chances of + * conflicts between hstems that are initially placed in + * separate hint groups and then brought together. The + * positions are copied back to `hStemHintArray', so we can + * discard `counterMask' and `counterHintMap'. + * + */ + CF2_HintMapRec counterHintMap; + CF2_HintMaskRec counterMask; + + + cf2_hintmap_init( &counterHintMap, + font, + &glyphPath.initialHintMap, + &glyphPath.hintMoves, + scaleY ); + cf2_hintmask_init( &counterMask, error ); + + cf2_hintmask_read( &counterMask, + charstring, + cf2_arrstack_size( &hStemHintArray ) + + cf2_arrstack_size( &vStemHintArray ) ); + cf2_hintmap_build( &counterHintMap, + &hStemHintArray, + &vStemHintArray, + &counterMask, + 0, + FALSE ); + } + break; + + case cf2_cmdRMOVETO: + FT_TRACE4(( " rmoveto\n" )); + + if ( cf2_stack_count( opStack ) > 2 && !haveWidth ) + *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX; + + /* width is defined or default after this */ + haveWidth = TRUE; + + if ( font->decoder->width_only ) + goto exit; + + curY += cf2_stack_popFixed( opStack ); + curX += cf2_stack_popFixed( opStack ); + + cf2_glyphpath_moveTo( &glyphPath, curX, curY ); + + break; + + case cf2_cmdHMOVETO: + FT_TRACE4(( " hmoveto\n" )); + + if ( cf2_stack_count( opStack ) > 1 && !haveWidth ) + *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX; + + /* width is defined or default after this */ + haveWidth = TRUE; + + if ( font->decoder->width_only ) + goto exit; + + curX += cf2_stack_popFixed( opStack ); + + cf2_glyphpath_moveTo( &glyphPath, curX, curY ); + + break; + + case cf2_cmdRLINECURVE: + { + CF2_UInt count = cf2_stack_count( opStack ); + CF2_UInt index = 0; + + + FT_TRACE4(( " rlinecurve\n" )); + + while ( index + 6 < count ) + { + curX += cf2_stack_getReal( opStack, index + 0 ); + curY += cf2_stack_getReal( opStack, index + 1 ); + + cf2_glyphpath_lineTo( &glyphPath, curX, curY ); + index += 2; + } + + while ( index < count ) + { + CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; + CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY; + CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1; + CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1; + CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; + CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2; + + + cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); + + curX = x3; + curY = y3; + index += 6; + } + + cf2_stack_clear( opStack ); + } + continue; /* no need to clear stack again */ + + case cf2_cmdVVCURVETO: + { + CF2_UInt count = cf2_stack_count( opStack ); + CF2_UInt index = 0; + + + FT_TRACE4(( " vvcurveto\n" )); + + while ( index < count ) + { + CF2_Fixed x1, y1, x2, y2, x3, y3; + + + if ( ( count - index ) & 1 ) + { + x1 = cf2_stack_getReal( opStack, index ) + curX; + + ++index; + } + else + x1 = curX; + + y1 = cf2_stack_getReal( opStack, index + 0 ) + curY; + x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; + x3 = x2; + y3 = cf2_stack_getReal( opStack, index + 3 ) + y2; + + cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); + + curX = x3; + curY = y3; + index += 4; + } + + cf2_stack_clear( opStack ); + } + continue; /* no need to clear stack again */ + + case cf2_cmdHHCURVETO: + { + CF2_UInt count = cf2_stack_count( opStack ); + CF2_UInt index = 0; + + + FT_TRACE4(( " hhcurveto\n" )); + + while ( index < count ) + { + CF2_Fixed x1, y1, x2, y2, x3, y3; + + + if ( ( count - index ) & 1 ) + { + y1 = cf2_stack_getReal( opStack, index ) + curY; + + ++index; + } + else + y1 = curY; + + x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; + x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; + x3 = cf2_stack_getReal( opStack, index + 3 ) + x2; + y3 = y2; + + cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); + + curX = x3; + curY = y3; + index += 4; + } + + cf2_stack_clear( opStack ); + } + continue; /* no need to clear stack again */ + + case cf2_cmdVHCURVETO: + case cf2_cmdHVCURVETO: + { + CF2_UInt count = cf2_stack_count( opStack ); + CF2_UInt index = 0; + + FT_Bool alternate = op1 == cf2_cmdHVCURVETO; + + + FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" )); + + while ( index < count ) + { + CF2_Fixed x1, x2, x3, y1, y2, y3; + + + if ( alternate ) + { + x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; + y1 = curY; + x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; + y3 = cf2_stack_getReal( opStack, index + 3 ) + y2; + + if ( count - index == 5 ) + { + x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; + + ++index; + } + else + x3 = x2; + + alternate = FALSE; + } + else + { + x1 = curX; + y1 = cf2_stack_getReal( opStack, index + 0 ) + curY; + x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; + y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; + x3 = cf2_stack_getReal( opStack, index + 3 ) + x2; + + if ( count - index == 5 ) + { + y3 = cf2_stack_getReal( opStack, index + 4 ) + y2; + + ++index; + } + else + y3 = y2; + + alternate = TRUE; + } + + cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); + + curX = x3; + curY = y3; + index += 4; + } + + cf2_stack_clear( opStack ); + } + continue; /* no need to clear stack again */ + + case cf2_cmdEXTENDEDNMBR: + { + CF2_Int v; + + + v = (FT_Short)( ( cf2_buf_readByte( charstring ) << 8 ) | + cf2_buf_readByte( charstring ) ); + + FT_TRACE4(( " %d", v )); + + cf2_stack_pushInt( opStack, v ); + } + continue; + + default: + /* numbers */ + { + if ( /* op1 >= 32 && */ op1 <= 246 ) + { + CF2_Int v; + + + v = op1 - 139; + + FT_TRACE4(( " %d", v )); + + /* -107 .. 107 */ + cf2_stack_pushInt( opStack, v ); + } + + else if ( /* op1 >= 247 && */ op1 <= 250 ) + { + CF2_Int v; + + + v = op1; + v -= 247; + v *= 256; + v += cf2_buf_readByte( charstring ); + v += 108; + + FT_TRACE4(( " %d", v )); + + /* 108 .. 1131 */ + cf2_stack_pushInt( opStack, v ); + } + + else if ( /* op1 >= 251 && */ op1 <= 254 ) + { + CF2_Int v; + + + v = op1; + v -= 251; + v *= 256; + v += cf2_buf_readByte( charstring ); + v = -v - 108; + + FT_TRACE4(( " %d", v )); + + /* -1131 .. -108 */ + cf2_stack_pushInt( opStack, v ); + } + + else /* op1 == 255 */ + { + CF2_Fixed v; + + + v = (CF2_Fixed) + ( ( (FT_UInt32)cf2_buf_readByte( charstring ) << 24 ) | + ( (FT_UInt32)cf2_buf_readByte( charstring ) << 16 ) | + ( (FT_UInt32)cf2_buf_readByte( charstring ) << 8 ) | + (FT_UInt32)cf2_buf_readByte( charstring ) ); + + FT_TRACE4(( " %.2f", v / 65536.0 )); + + cf2_stack_pushFixed( opStack, v ); + } + } + continue; /* don't clear stack */ + + } /* end of switch statement checking `op1' */ + + cf2_stack_clear( opStack ); + + } /* end of main interpreter loop */ + + /* we get here if the charstring ends without cf2_cmdENDCHAR */ + FT_TRACE4(( "cf2_interpT2CharString:" + " charstring ends without ENDCHAR\n" )); + + exit: + /* check whether last error seen is also the first one */ + cf2_setError( error, lastError ); + + /* free resources from objects we've used */ + cf2_glyphpath_finalize( &glyphPath ); + cf2_arrstack_finalize( &vStemHintArray ); + cf2_arrstack_finalize( &hStemHintArray ); + cf2_arrstack_finalize( &subrStack ); + cf2_stack_free( opStack ); + + FT_TRACE4(( "\n" )); + + return; + } + + +/* END */ diff --git a/src/cff/cf2intrp.h b/src/cff/cf2intrp.h new file mode 100644 index 0000000..b5d8947 --- /dev/null +++ b/src/cff/cf2intrp.h @@ -0,0 +1,83 @@ +/***************************************************************************/ +/* */ +/* cf2font.h */ +/* */ +/* Adobe's CFF Interpreter (specification). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2INTRP_H__ +#define __CF2INTRP_H__ + + +#include "cf2ft.h" +#include "cf2hints.h" + + +FT_BEGIN_HEADER + + + FT_LOCAL( void ) + cf2_hintmask_init( CF2_HintMask hintmask, + FT_Error* error ); + FT_LOCAL( FT_Bool ) + cf2_hintmask_isValid( const CF2_HintMask hintmask ); + FT_LOCAL( FT_Bool ) + cf2_hintmask_isNew( const CF2_HintMask hintmask ); + FT_LOCAL( void ) + cf2_hintmask_setNew( CF2_HintMask hintmask, + FT_Bool val ); + FT_LOCAL( FT_Byte* ) + cf2_hintmask_getMaskPtr( CF2_HintMask hintmask ); + FT_LOCAL( void ) + cf2_hintmask_setAll( CF2_HintMask hintmask, + size_t bitCount ); + + FT_LOCAL( void ) + cf2_interpT2CharString( CF2_Font font, + CF2_Buffer charstring, + CF2_OutlineCallbacks callbacks, + const FT_Vector* translation, + FT_Bool doingSeac, + CF2_Fixed curX, + CF2_Fixed curY, + CF2_Fixed* width ); + + +FT_END_HEADER + + +#endif /* __CF2INTRP_H__ */ + + +/* END */ diff --git a/src/cff/cf2read.c b/src/cff/cf2read.c new file mode 100644 index 0000000..2b429e3 --- /dev/null +++ b/src/cff/cf2read.c @@ -0,0 +1,112 @@ +/***************************************************************************/ +/* */ +/* cf2read.c */ +/* */ +/* Adobe's code for stream handling (body). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2glue.h" + +#include "cf2error.h" + + + /* Define CF2_IO_FAIL as 1 to enable random errors and random */ + /* value errors in I/O. */ +#define CF2_IO_FAIL 0 + + +#if CF2_IO_FAIL + + /* set the .00 value to a nonzero probability */ + static int + randomError2( void ) + { + /* for region buffer ReadByte (interp) function */ + return (double)rand() / RAND_MAX < .00; + } + + /* set the .00 value to a nonzero probability */ + static CF2_Int + randomValue() + { + return (double)rand() / RAND_MAX < .00 ? rand() : 0; + } + +#endif /* CF2_IO_FAIL */ + + + /* Region Buffer */ + /* */ + /* Can be constructed from a copied buffer managed by */ + /* `FCM_getDatablock'. */ + /* Reads bytes with check for end of buffer. */ + + /* reading past the end of the buffer sets error and returns zero */ + FT_LOCAL_DEF( CF2_Int ) + cf2_buf_readByte( CF2_Buffer buf ) + { + if ( buf->ptr < buf->end ) + { +#if CF2_IO_FAIL + if ( randomError2() ) + { + CF2_SET_ERROR( buf->error, Invalid_Stream_Operation ); + return 0; + } + + return *(buf->ptr)++ + randomValue(); +#else + return *(buf->ptr)++; +#endif + } + else + { + CF2_SET_ERROR( buf->error, Invalid_Stream_Operation ); + return 0; + } + } + + + /* note: end condition can occur without error */ + FT_LOCAL_DEF( FT_Bool ) + cf2_buf_isEnd( CF2_Buffer buf ) + { + return (FT_Bool)( buf->ptr >= buf->end ); + } + + +/* END */ diff --git a/src/cff/cf2read.h b/src/cff/cf2read.h new file mode 100644 index 0000000..7ef7c8c --- /dev/null +++ b/src/cff/cf2read.h @@ -0,0 +1,68 @@ +/***************************************************************************/ +/* */ +/* cf2read.h */ +/* */ +/* Adobe's code for stream handling (specification). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2READ_H__ +#define __CF2READ_H__ + + +FT_BEGIN_HEADER + + + typedef struct CF2_BufferRec_ + { + FT_Error* error; + const FT_Byte* start; + const FT_Byte* end; + const FT_Byte* ptr; + + } CF2_BufferRec, *CF2_Buffer; + + + FT_LOCAL( CF2_Int ) + cf2_buf_readByte( CF2_Buffer buf ); + FT_LOCAL( FT_Bool ) + cf2_buf_isEnd( CF2_Buffer buf ); + + +FT_END_HEADER + + +#endif /* __CF2READ_H__ */ + + +/* END */ diff --git a/src/cff/cf2stack.c b/src/cff/cf2stack.c new file mode 100644 index 0000000..8332b5d --- /dev/null +++ b/src/cff/cf2stack.c @@ -0,0 +1,205 @@ +/***************************************************************************/ +/* */ +/* cf2stack.c */ +/* */ +/* Adobe's code for emulating a CFF stack (body). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#include "cf2ft.h" +#include FT_INTERNAL_DEBUG_H + +#include "cf2glue.h" +#include "cf2font.h" +#include "cf2stack.h" + +#include "cf2error.h" + + + /* Allocate and initialize an instance of CF2_Stack. */ + /* Note: This function returns NULL on error (does not set */ + /* `error'). */ + FT_LOCAL_DEF( CF2_Stack ) + cf2_stack_init( FT_Memory memory, + FT_Error* e ) + { + FT_Error error = FT_Err_Ok; /* for FT_QNEW */ + + CF2_Stack stack = NULL; + + + if ( !FT_QNEW( stack ) ) + { + /* initialize the structure; FT_QNEW zeroes it */ + stack->memory = memory; + stack->error = e; + stack->top = &stack->buffer[0]; /* empty stack */ + } + + return stack; + } + + + FT_LOCAL_DEF( void ) + cf2_stack_free( CF2_Stack stack ) + { + if ( stack ) + { + FT_Memory memory = stack->memory; + + + /* free the main structure */ + FT_FREE( stack ); + } + } + + + FT_LOCAL_DEF( CF2_UInt ) + cf2_stack_count( CF2_Stack stack ) + { + return (CF2_UInt)( stack->top - &stack->buffer[0] ); + } + + + FT_LOCAL_DEF( void ) + cf2_stack_pushInt( CF2_Stack stack, + CF2_Int val ) + { + if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] ) + { + CF2_SET_ERROR( stack->error, Stack_Overflow ); + return; /* stack overflow */ + } + + stack->top->u.i = val; + stack->top->type = CF2_NumberInt; + ++stack->top; + } + + + FT_LOCAL_DEF( void ) + cf2_stack_pushFixed( CF2_Stack stack, + CF2_Fixed val ) + { + if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] ) + { + CF2_SET_ERROR( stack->error, Stack_Overflow ); + return; /* stack overflow */ + } + + stack->top->u.r = val; + stack->top->type = CF2_NumberFixed; + ++stack->top; + } + + + /* this function is only allowed to pop an integer type */ + FT_LOCAL_DEF( CF2_Int ) + cf2_stack_popInt( CF2_Stack stack ) + { + if ( stack->top == &stack->buffer[0] ) + { + CF2_SET_ERROR( stack->error, Stack_Underflow ); + return 0; /* underflow */ + } + if ( stack->top[-1].type != CF2_NumberInt ) + { + CF2_SET_ERROR( stack->error, Syntax_Error ); + return 0; /* type mismatch */ + } + + --stack->top; + + return stack->top->u.i; + } + + + /* Note: type mismatch is silently cast */ + /* TODO: check this */ + FT_LOCAL_DEF( CF2_Fixed ) + cf2_stack_popFixed( CF2_Stack stack ) + { + if ( stack->top == &stack->buffer[0] ) + { + CF2_SET_ERROR( stack->error, Stack_Underflow ); + return cf2_intToFixed( 0 ); /* underflow */ + } + + --stack->top; + + switch ( stack->top->type ) + { + case CF2_NumberInt: + return cf2_intToFixed( stack->top->u.i ); + case CF2_NumberFrac: + return cf2_fracToFixed( stack->top->u.f ); + default: + return stack->top->u.r; + } + } + + + /* Note: type mismatch is silently cast */ + /* TODO: check this */ + FT_LOCAL_DEF( CF2_Fixed ) + cf2_stack_getReal( CF2_Stack stack, + CF2_UInt idx ) + { + FT_ASSERT( cf2_stack_count( stack ) <= CF2_OPERAND_STACK_SIZE ); + + if ( idx >= cf2_stack_count( stack ) ) + { + CF2_SET_ERROR( stack->error, Stack_Overflow ); + return cf2_intToFixed( 0 ); /* bounds error */ + } + + switch ( stack->buffer[idx].type ) + { + case CF2_NumberInt: + return cf2_intToFixed( stack->buffer[idx].u.i ); + case CF2_NumberFrac: + return cf2_fracToFixed( stack->buffer[idx].u.f ); + default: + return stack->buffer[idx].u.r; + } + } + + + FT_LOCAL_DEF( void ) + cf2_stack_clear( CF2_Stack stack ) + { + stack->top = &stack->buffer[0]; + } + + +/* END */ diff --git a/src/cff/cf2stack.h b/src/cff/cf2stack.h new file mode 100644 index 0000000..7d6d196 --- /dev/null +++ b/src/cff/cf2stack.h @@ -0,0 +1,106 @@ +/***************************************************************************/ +/* */ +/* cf2stack.h */ +/* */ +/* Adobe's code for emulating a CFF stack (specification). */ +/* */ +/* Copyright 2007-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2STACK_H__ +#define __CF2STACK_H__ + + +FT_BEGIN_HEADER + + + /* CFF operand stack; specified maximum of 48 or 192 values */ + typedef struct CF2_StackNumber_ + { + union + { + CF2_Fixed r; /* 16.16 fixed point */ + CF2_Frac f; /* 2.30 fixed point (for font matrix) */ + CF2_Int i; + } u; + + CF2_NumberType type; + + } CF2_StackNumber; + + + typedef struct CF2_StackRec_ + { + FT_Memory memory; + FT_Error* error; + CF2_StackNumber buffer[CF2_OPERAND_STACK_SIZE]; + CF2_StackNumber* top; + + } CF2_StackRec, *CF2_Stack; + + + FT_LOCAL( CF2_Stack ) + cf2_stack_init( FT_Memory memory, + FT_Error* error ); + FT_LOCAL( void ) + cf2_stack_free( CF2_Stack stack ); + + FT_LOCAL( CF2_UInt ) + cf2_stack_count( CF2_Stack stack ); + + FT_LOCAL( void ) + cf2_stack_pushInt( CF2_Stack stack, + CF2_Int val ); + FT_LOCAL( void ) + cf2_stack_pushFixed( CF2_Stack stack, + CF2_Fixed val ); + + FT_LOCAL( CF2_Int ) + cf2_stack_popInt( CF2_Stack stack ); + FT_LOCAL( CF2_Fixed ) + cf2_stack_popFixed( CF2_Stack stack ); + + FT_LOCAL( CF2_Fixed ) + cf2_stack_getReal( CF2_Stack stack, + CF2_UInt idx ); + + FT_LOCAL( void ) + cf2_stack_clear( CF2_Stack stack ); + + +FT_END_HEADER + + +#endif /* __CF2STACK_H__ */ + + +/* END */ diff --git a/src/cff/cf2types.h b/src/cff/cf2types.h new file mode 100644 index 0000000..ac6a022 --- /dev/null +++ b/src/cff/cf2types.h @@ -0,0 +1,78 @@ +/***************************************************************************/ +/* */ +/* cf2types.h */ +/* */ +/* Adobe's code for defining data types (specification only). */ +/* */ +/* Copyright 2011-2013 Adobe Systems Incorporated. */ +/* */ +/* This software, and all works of authorship, whether in source or */ +/* object code form as indicated by the copyright notice(s) included */ +/* herein (collectively, the "Work") is made available, and may only be */ +/* used, modified, and distributed under the FreeType Project License, */ +/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ +/* FreeType Project License, each contributor to the Work hereby grants */ +/* to any individual or legal entity exercising permissions granted by */ +/* the FreeType Project License and this section (hereafter, "You" or */ +/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ +/* royalty-free, irrevocable (except as stated in this section) patent */ +/* license to make, have made, use, offer to sell, sell, import, and */ +/* otherwise transfer the Work, where such license applies only to those */ +/* patent claims licensable by such contributor that are necessarily */ +/* infringed by their contribution(s) alone or by combination of their */ +/* contribution(s) with the Work to which such contribution(s) was */ +/* submitted. If You institute patent litigation against any entity */ +/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ +/* the Work or a contribution incorporated within the Work constitutes */ +/* direct or contributory patent infringement, then any patent licenses */ +/* granted to You under this License for that Work shall terminate as of */ +/* the date such litigation is filed. */ +/* */ +/* By using, modifying, or distributing the Work you indicate that you */ +/* have read and understood the terms and conditions of the */ +/* FreeType Project License as well as those provided in this section, */ +/* and you accept them fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __CF2TYPES_H__ +#define __CF2TYPES_H__ + +#include <ft2build.h> +#include FT_FREETYPE_H + + +FT_BEGIN_HEADER + + + /* + * The data models that we expect to support are as follows: + * + * name char short int long long-long pointer example + * ----------------------------------------------------- + * ILP32 8 16 32 32 64* 32 32-bit MacOS, x86 + * LLP64 8 16 32 32 64 64 x64 + * LP64 8 16 32 64 64 64 64-bit MacOS + * + * *) type may be supported by emulation on a 32-bit architecture + * + */ + + + /* integers at least 32 bits wide */ +#define CF2_UInt FT_UFast +#define CF2_Int FT_Fast + + + /* fixed-float numbers */ + typedef FT_Int32 CF2_F16Dot16; + + +FT_END_HEADER + + +#endif /* __CF2TYPES_H__ */ + + +/* END */ diff --git a/src/cff/cff.c b/src/cff/cff.c index fccfd44..c3840b5 100644 --- a/src/cff/cff.c +++ b/src/cff/cff.c @@ -4,7 +4,7 @@ /* */ /* FreeType OpenType driver component (body only). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -19,6 +19,7 @@ #define FT_MAKE_OPTION_SINGLE_OBJECT #include <ft2build.h> + #include "cffpic.c" #include "cffdrivr.c" #include "cffparse.c" @@ -27,4 +28,14 @@ #include "cffgload.c" #include "cffcmap.c" +#include "cf2arrst.c" +#include "cf2blues.c" +#include "cf2error.c" +#include "cf2font.c" +#include "cf2ft.c" +#include "cf2hints.c" +#include "cf2intrp.c" +#include "cf2read.c" +#include "cf2stack.c" + /* END */ diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c index 1298371..52248b2 100644 --- a/src/cff/cffcmap.c +++ b/src/cff/cffcmap.c @@ -4,7 +4,7 @@ /* */ /* CFF character mapping table (cmap) support (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */ +/* Copyright 2002-2007, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,6 +16,8 @@ /***************************************************************************/ +#include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include "cffcmap.h" #include "cffload.h" @@ -31,12 +33,15 @@ /*************************************************************************/ FT_CALLBACK_DEF( FT_Error ) - cff_cmap_encoding_init( CFF_CMapStd cmap ) + cff_cmap_encoding_init( CFF_CMapStd cmap, + FT_Pointer pointer ) { TT_Face face = (TT_Face)FT_CMAP_FACE( cmap ); CFF_Font cff = (CFF_Font)face->extra.data; CFF_Encoding encoding = &cff->encoding; + FT_UNUSED( pointer ); + cmap->gids = encoding->codes; @@ -133,7 +138,8 @@ FT_CALLBACK_DEF( FT_Error ) - cff_cmap_unicode_init( PS_Unicodes unicodes ) + cff_cmap_unicode_init( PS_Unicodes unicodes, + FT_Pointer pointer ) { TT_Face face = (TT_Face)FT_CMAP_FACE( unicodes ); FT_Memory memory = FT_FACE_MEMORY( face ); @@ -141,11 +147,13 @@ CFF_Charset charset = &cff->charset; FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames; + FT_UNUSED( pointer ); + /* can't build Unicode map for CID-keyed font */ /* because we don't know glyph names. */ if ( !charset->sids ) - return CFF_Err_No_Unicode_Glyph_Name; + return FT_THROW( No_Unicode_Glyph_Name ); return psnames->unicodes_init( memory, unicodes, diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index eb4c14e..3e8898e 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -4,7 +4,7 @@ /* */ /* OpenType font driver implementation (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -37,6 +37,8 @@ #include FT_SERVICE_XFREE86_NAME_H #include FT_SERVICE_GLYPH_DICT_H +#include FT_SERVICE_PROPERTIES_H +#include FT_CFF_DRIVER_H /*************************************************************************/ @@ -115,7 +117,7 @@ if ( sfnt ) kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph ); - return CFF_Err_Ok; + return FT_Err_Ok; } @@ -160,7 +162,9 @@ if ( !slot ) - return CFF_Err_Invalid_Slot_Handle; + return FT_THROW( Invalid_Slot_Handle ); + + FT_TRACE1(( "cff_glyph_load: glyph index %d\n", glyph_index )); /* check whether we want a scaled outline or bitmap */ if ( !size ) @@ -174,7 +178,7 @@ { /* these two objects must have the same parent */ if ( cffsize->face != cffslot->face ) - return CFF_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); } /* now load the glyph outline if necessary */ @@ -195,7 +199,7 @@ FT_Fixed* advances ) { FT_UInt nn; - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_GlyphSlot slot = face->glyph; @@ -239,7 +243,7 @@ " cannot get glyph name from CFF & CEF fonts\n" " " " without the `PSNames' module\n" )); - error = CFF_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -252,7 +256,7 @@ if ( gname ) FT_STRCPYN( buffer, gname, buffer_max ); - error = CFF_Err_Ok; + error = FT_Err_Ok; Exit: return error; @@ -298,7 +302,8 @@ } - FT_DEFINE_SERVICE_GLYPHDICTREC(cff_service_glyph_dict, + FT_DEFINE_SERVICE_GLYPHDICTREC( + cff_service_glyph_dict, (FT_GlyphDict_GetNameFunc) cff_get_glyph_name, (FT_GlyphDict_NameIndexFunc)cff_get_name_index ) @@ -321,7 +326,7 @@ PS_FontInfoRec* afont_info ) { CFF_Font cff = (CFF_Font)face->extra.data; - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; if ( cff && cff->font_info == NULL ) @@ -360,7 +365,8 @@ } - FT_DEFINE_SERVICE_PSINFOREC(cff_service_ps_info, + FT_DEFINE_SERVICE_PSINFOREC( + cff_service_ps_info, (PS_GetFontInfoFunc) cff_ps_get_font_info, (PS_GetFontExtraFunc) NULL, (PS_HasGlyphNamesFunc) cff_ps_has_glyph_names, @@ -384,7 +390,8 @@ } - FT_DEFINE_SERVICE_PSFONTNAMEREC(cff_service_ps_name, + FT_DEFINE_SERVICE_PSFONTNAMEREC( + cff_service_ps_name, (FT_PsName_GetFunc)cff_get_ps_name ) @@ -404,16 +411,17 @@ TT_CMapInfo *cmap_info ) { FT_CMap cmap = FT_CMAP( charmap ); - FT_Error error = CFF_Err_Ok; - FT_Face face = FT_CMAP_FACE( cmap ); - FT_Library library = FT_FACE_LIBRARY( face ); + FT_Error error = FT_Err_Ok; + + FT_Face face = FT_CMAP_FACE( cmap ); + FT_Library library = FT_FACE_LIBRARY( face ); cmap_info->language = 0; cmap_info->format = 0; - if ( cmap->clazz != &FT_CFF_CMAP_ENCODING_CLASS_REC_GET && - cmap->clazz != &FT_CFF_CMAP_UNICODE_CLASS_REC_GET ) + if ( cmap->clazz != &CFF_CMAP_ENCODING_CLASS_REC_GET && + cmap->clazz != &CFF_CMAP_UNICODE_CLASS_REC_GET ) { FT_Module sfnt = FT_Get_Module( library, "sfnt" ); FT_Service_TTCMaps service = @@ -429,7 +437,8 @@ } - FT_DEFINE_SERVICE_TTCMAPSREC(cff_service_get_cmap_info, + FT_DEFINE_SERVICE_TTCMAPSREC( + cff_service_get_cmap_info, (TT_CMap_Info_GetFunc)cff_get_cmap_info ) @@ -444,7 +453,7 @@ const char* *ordering, FT_Int *supplement ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; CFF_Font cff = (CFF_Font)face->extra.data; @@ -455,7 +464,7 @@ if ( dict->cid_registry == 0xFFFFU ) { - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } @@ -499,7 +508,7 @@ cff_get_is_cid( CFF_Face face, FT_Bool *is_cid ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; CFF_Font cff = (CFF_Font)face->extra.data; @@ -523,7 +532,7 @@ FT_UInt glyph_index, FT_UInt *cid ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; CFF_Font cff; @@ -537,13 +546,13 @@ if ( dict->cid_registry == 0xFFFFU ) { - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } if ( glyph_index > cff->num_glyphs ) { - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } @@ -558,13 +567,147 @@ } - FT_DEFINE_SERVICE_CIDREC(cff_service_cid_info, + FT_DEFINE_SERVICE_CIDREC( + cff_service_cid_info, (FT_CID_GetRegistryOrderingSupplementFunc)cff_get_ros, (FT_CID_GetIsInternallyCIDKeyedFunc) cff_get_is_cid, (FT_CID_GetCIDFromGlyphIndexFunc) cff_get_cid_from_glyph_index ) + /* + * PROPERTY SERVICE + * + */ + static FT_Error + cff_property_set( FT_Module module, /* CFF_Driver */ + const char* property_name, + const void* value ) + { + FT_Error error = FT_Err_Ok; + CFF_Driver driver = (CFF_Driver)module; + + + if ( !ft_strcmp( property_name, "darkening-parameters" ) ) + { + FT_Int* darken_params = (FT_Int*)value; + + FT_Int x1 = darken_params[0]; + FT_Int y1 = darken_params[1]; + FT_Int x2 = darken_params[2]; + FT_Int y2 = darken_params[3]; + FT_Int x3 = darken_params[4]; + FT_Int y3 = darken_params[5]; + FT_Int x4 = darken_params[6]; + FT_Int y4 = darken_params[7]; + + + if ( x1 < 0 || x2 < 0 || x3 < 0 || x4 < 0 || + y1 < 0 || y2 < 0 || y3 < 0 || y4 < 0 || + x1 > x2 || x2 > x3 || x3 > x4 || + y1 > 500 || y2 > 500 || y3 > 500 || y4 > 500 ) + return FT_THROW( Invalid_Argument ); + + driver->darken_params[0] = x1; + driver->darken_params[1] = y1; + driver->darken_params[2] = x2; + driver->darken_params[3] = y2; + driver->darken_params[4] = x3; + driver->darken_params[5] = y3; + driver->darken_params[6] = x4; + driver->darken_params[7] = y4; + + return error; + } + else if ( !ft_strcmp( property_name, "hinting-engine" ) ) + { + FT_UInt* hinting_engine = (FT_UInt*)value; + + +#ifndef CFF_CONFIG_OPTION_OLD_ENGINE + if ( *hinting_engine != FT_CFF_HINTING_ADOBE ) + error = FT_ERR( Unimplemented_Feature ); + else +#endif + driver->hinting_engine = *hinting_engine; + + return error; + } + else if ( !ft_strcmp( property_name, "no-stem-darkening" ) ) + { + FT_Bool* no_stem_darkening = (FT_Bool*)value; + + + driver->no_stem_darkening = *no_stem_darkening; + + return error; + } + + FT_TRACE0(( "cff_property_set: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + static FT_Error + cff_property_get( FT_Module module, /* CFF_Driver */ + const char* property_name, + const void* value ) + { + FT_Error error = FT_Err_Ok; + CFF_Driver driver = (CFF_Driver)module; + + + if ( !ft_strcmp( property_name, "darkening-parameters" ) ) + { + FT_Int* darken_params = driver->darken_params; + FT_Int* val = (FT_Int*)value; + + + val[0] = darken_params[0]; + val[1] = darken_params[1]; + val[2] = darken_params[2]; + val[3] = darken_params[3]; + val[4] = darken_params[4]; + val[5] = darken_params[5]; + val[6] = darken_params[6]; + val[7] = darken_params[7]; + + return error; + } + else if ( !ft_strcmp( property_name, "hinting-engine" ) ) + { + FT_UInt hinting_engine = driver->hinting_engine; + FT_UInt* val = (FT_UInt*)value; + + + *val = hinting_engine; + + return error; + } + else if ( !ft_strcmp( property_name, "no-stem-darkening" ) ) + { + FT_Bool no_stem_darkening = driver->no_stem_darkening; + FT_Bool* val = (FT_Bool*)value; + + + *val = no_stem_darkening; + + return error; + } + + FT_TRACE0(( "cff_property_get: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + FT_DEFINE_SERVICE_PROPERTIESREC( + cff_service_properties, + (FT_Properties_SetFunc)cff_property_set, + (FT_Properties_GetFunc)cff_property_get ) + + /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ @@ -576,25 +719,31 @@ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ + #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES - FT_DEFINE_SERVICEDESCREC6(cff_services, + FT_DEFINE_SERVICEDESCREC7( + cff_services, FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF, - FT_SERVICE_ID_POSTSCRIPT_INFO, &FT_CFF_SERVICE_PS_INFO_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_CFF_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_GLYPH_DICT, &FT_CFF_SERVICE_GLYPH_DICT_GET, - FT_SERVICE_ID_TT_CMAP, &FT_CFF_SERVICE_GET_CMAP_INFO_GET, - FT_SERVICE_ID_CID, &FT_CFF_SERVICE_CID_INFO_GET + FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET, + FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET, + FT_SERVICE_ID_GLYPH_DICT, &CFF_SERVICE_GLYPH_DICT_GET, + FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET, + FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET, + FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET ) #else - FT_DEFINE_SERVICEDESCREC5(cff_services, + FT_DEFINE_SERVICEDESCREC6( + cff_services, FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF, - FT_SERVICE_ID_POSTSCRIPT_INFO, &FT_CFF_SERVICE_PS_INFO_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_CFF_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_TT_CMAP, &FT_CFF_SERVICE_GET_CMAP_INFO_GET, - FT_SERVICE_ID_CID, &FT_CFF_SERVICE_CID_INFO_GET + FT_SERVICE_ID_POSTSCRIPT_INFO, &CFF_SERVICE_PS_INFO_GET, + FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET, + FT_SERVICE_ID_TT_CMAP, &CFF_SERVICE_GET_CMAP_INFO_GET, + FT_SERVICE_ID_CID, &CFF_SERVICE_CID_INFO_GET, + FT_SERVICE_ID_PROPERTIES, &CFF_SERVICE_PROPERTIES_GET ) #endif + FT_CALLBACK_DEF( FT_Module_Interface ) cff_get_interface( FT_Module driver, /* CFF_Driver */ const char* module_interface ) @@ -604,7 +753,7 @@ FT_Module_Interface result; - /* FT_CFF_SERVICES_GET derefers `library' in PIC mode */ + /* CFF_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC if ( !driver ) return NULL; @@ -613,7 +762,7 @@ return NULL; #endif - result = ft_service_list_lookup( FT_CFF_SERVICES_GET, module_interface ); + result = ft_service_list_lookup( CFF_SERVICES_GET, module_interface ); if ( result != NULL ) return result; @@ -641,7 +790,8 @@ #define CFF_SIZE_SELECT 0 #endif - FT_DEFINE_DRIVER( cff_driver_class, + FT_DEFINE_DRIVER( + cff_driver_class, FT_MODULE_FONT_DRIVER | FT_MODULE_DRIVER_SCALABLE | @@ -670,9 +820,6 @@ cff_slot_init, cff_slot_done, - ft_stub_set_char_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - ft_stub_set_pixel_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - cff_glyph_load, cff_get_kerning, diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index 84847fd..758a3d3 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -21,10 +21,12 @@ #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H #include FT_OUTLINE_H +#include FT_CFF_DRIVER_H #include "cffobjs.h" #include "cffload.h" #include "cffgload.h" +#include "cf2ft.h" /* for cf2_decoder_parse_charstrings */ #include "cfferrs.h" @@ -39,6 +41,8 @@ #define FT_COMPONENT trace_cffgload +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE + typedef enum CFF_Operator_ { cff_op_unknown = 0, @@ -209,6 +213,8 @@ 2 /* setcurrentpoint */ }; +#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */ + /*************************************************************************/ /*************************************************************************/ @@ -412,7 +418,7 @@ CFF_Builder *builder = &decoder->builder; CFF_Font cff = (CFF_Font)builder->face->extra.data; CFF_SubFont sub = &cff->top_font; - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; /* manage CID fonts */ @@ -424,11 +430,11 @@ if ( fd_index >= cff->num_subfonts ) { FT_TRACE4(( "cff_decoder_prepare: invalid CID subfont index\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } - FT_TRACE3(( "glyph index %d (subfont %d):\n", glyph_index, fd_index )); + FT_TRACE3(( " in subfont %d:\n", fd_index )); sub = cff->subfonts[fd_index]; @@ -441,10 +447,6 @@ builder->hints_globals = (void *)internal->subfonts[fd_index]; } } -#ifdef FT_DEBUG_LEVEL_TRACE - else - FT_TRACE3(( "glyph index %d:\n", glyph_index )); -#endif decoder->num_locals = sub->local_subrs_index.count; decoder->locals = sub->local_subrs; @@ -455,22 +457,24 @@ decoder->glyph_width = sub->private_dict.default_width; decoder->nominal_width = sub->private_dict.nominal_width; + decoder->current_subfont = sub; /* for Adobe's CFF handler */ + Exit: return error; } /* check that there is enough space for `count' more points */ - static FT_Error - check_points( CFF_Builder* builder, - FT_Int count ) + FT_LOCAL_DEF( FT_Error ) + cff_check_points( CFF_Builder* builder, + FT_Int count ) { return FT_GLYPHLOADER_CHECK_POINTS( builder->loader, count, 0 ); } /* add a new point, do not check space */ - static void + FT_LOCAL_DEF( void ) cff_builder_add_point( CFF_Builder* builder, FT_Pos x, FT_Pos y, @@ -484,9 +488,22 @@ FT_Vector* point = outline->points + outline->n_points; FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE + CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); + - point->x = x >> 16; - point->y = y >> 16; + if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE ) + { + point->x = x >> 16; + point->y = y >> 16; + } + else +#endif + { + /* cf2_decoder_parse_charstrings uses 16.16 coordinates */ + point->x = x >> 10; + point->y = y >> 10; + } *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC ); } @@ -495,7 +512,7 @@ /* check space for a new on-curve point, then add it */ - static FT_Error + FT_LOCAL_DEF( FT_Error ) cff_builder_add_point1( CFF_Builder* builder, FT_Pos x, FT_Pos y ) @@ -503,7 +520,7 @@ FT_Error error; - error = check_points( builder, 1 ); + error = cff_check_points( builder, 1 ); if ( !error ) cff_builder_add_point( builder, x, y, 1 ); @@ -522,7 +539,7 @@ if ( !builder->load_points ) { outline->n_contours++; - return CFF_Err_Ok; + return FT_Err_Ok; } error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 ); @@ -540,12 +557,12 @@ /* if a path was begun, add its first on-curve point */ - static FT_Error + FT_LOCAL_DEF( FT_Error ) cff_builder_start_point( CFF_Builder* builder, FT_Pos x, FT_Pos y ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; /* test whether we are building a new contour */ @@ -562,7 +579,7 @@ /* close the current contour */ - static void + FT_LOCAL_DEF( void ) cff_builder_close_contour( CFF_Builder* builder ) { FT_Outline* outline = builder->current; @@ -607,7 +624,7 @@ } - static FT_Int + FT_LOCAL_DEF( FT_Int ) cff_lookup_glyph_by_stdcharcode( CFF_Font cff, FT_Int charcode ) { @@ -636,7 +653,7 @@ } - static FT_Error + FT_LOCAL_DEF( FT_Error ) cff_get_glyph_data( TT_Face face, FT_UInt glyph_index, FT_Byte** pointer, @@ -672,7 +689,7 @@ } - static void + FT_LOCAL_DEF( void ) cff_free_glyph_data( TT_Face face, FT_Byte** pointer, FT_ULong length ) @@ -686,7 +703,7 @@ /* callback function. */ if ( face->root.internal->incremental_interface ) { - FT_Data data; + FT_Data data; data.pointer = *pointer; @@ -707,6 +724,8 @@ } +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE + static FT_Error cff_operator_seac( CFF_Decoder* decoder, FT_Pos asb, @@ -728,7 +747,7 @@ if ( decoder->seac ) { FT_ERROR(( "cff_operator_seac: invalid nested seac\n" )); - return CFF_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } adx += decoder->builder.left_bearing.x; @@ -756,7 +775,7 @@ { FT_ERROR(( "cff_operator_seac:" " invalid seac character code arguments\n" )); - return CFF_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } /* If we are trying to load a composite glyph, do not load the */ @@ -925,7 +944,7 @@ limit = zone->limit = charstring_base + charstring_len; ip = zone->cursor = zone->base; - error = CFF_Err_Ok; + error = FT_Err_Ok; x = builder->pos_x; y = builder->pos_y; @@ -953,11 +972,14 @@ /* this is an operand, push it on the stack */ + + /* if we use shifts, all computations are done with unsigned */ + /* values; the conversion to a signed value is the last step */ if ( v == 28 ) { if ( ip + 1 >= limit ) goto Syntax_Error; - val = (FT_Short)( ( (FT_Short)ip[0] << 8 ) | ip[1] ); + val = (FT_Short)( ( (FT_UShort)ip[0] << 8 ) | ip[1] ); ip += 2; } else if ( v < 247 ) @@ -978,10 +1000,10 @@ { if ( ip + 3 >= limit ) goto Syntax_Error; - val = ( (FT_Int32)ip[0] << 24 ) | - ( (FT_Int32)ip[1] << 16 ) | - ( (FT_Int32)ip[2] << 8 ) | - ip[3]; + val = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) | + ( (FT_UInt32)ip[1] << 16 ) | + ( (FT_UInt32)ip[2] << 8 ) | + (FT_UInt32)ip[3] ); ip += 4; if ( charstring_type == 2 ) shift = 0; @@ -989,12 +1011,12 @@ if ( decoder->top - stack >= CFF_MAX_OPERANDS ) goto Stack_Overflow; - val <<= shift; + val = (FT_Int32)( (FT_UInt32)val << shift ); *decoder->top++ = val; #ifdef FT_DEBUG_LEVEL_TRACE if ( !( val & 0xFFFFL ) ) - FT_TRACE4(( " %ld", (FT_Int32)( val >> 16 ) )); + FT_TRACE4(( " %hd", (FT_Short)( (FT_UInt32)val >> 16 ) )); else FT_TRACE4(( " %.2f", val / 65536.0 )); #endif @@ -1411,8 +1433,8 @@ case cff_op_rlineto: FT_TRACE4(( " rlineto\n" )); - if ( cff_builder_start_point ( builder, x, y ) || - check_points( builder, num_args / 2 ) ) + if ( cff_builder_start_point( builder, x, y ) || + cff_check_points( builder, num_args / 2 ) ) goto Fail; if ( num_args < 2 ) @@ -1446,8 +1468,8 @@ if ( num_args == 0 ) break; - if ( cff_builder_start_point ( builder, x, y ) || - check_points( builder, num_args ) ) + if ( cff_builder_start_point( builder, x, y ) || + cff_check_points( builder, num_args ) ) goto Fail; args = stack; @@ -1480,8 +1502,8 @@ nargs = num_args - num_args % 6; - if ( cff_builder_start_point ( builder, x, y ) || - check_points( builder, nargs / 2 ) ) + if ( cff_builder_start_point( builder, x, y ) || + cff_check_points( builder, nargs / 2 ) ) goto Fail; args -= nargs; @@ -1529,7 +1551,7 @@ nargs--; } - if ( check_points( builder, 3 * ( nargs / 4 ) ) ) + if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) ) goto Fail; while ( args < decoder->top ) @@ -1573,7 +1595,7 @@ nargs--; } - if ( check_points( builder, 3 * ( nargs / 4 ) ) ) + if ( cff_check_points( builder, 3 * ( nargs / 4 ) ) ) goto Fail; while ( args < decoder->top ) @@ -1613,7 +1635,7 @@ nargs = num_args & ~2; args -= nargs; - if ( check_points( builder, ( nargs / 4 ) * 3 ) ) + if ( cff_check_points( builder, ( nargs / 4 ) * 3 ) ) goto Stack_Underflow; phase = ( op == cff_op_hvcurveto ); @@ -1666,8 +1688,8 @@ nargs = num_args & ~1; num_lines = ( nargs - 6 ) / 2; - if ( cff_builder_start_point( builder, x, y ) || - check_points( builder, num_lines + 3 ) ) + if ( cff_builder_start_point( builder, x, y ) || + cff_check_points( builder, num_lines + 3 ) ) goto Fail; args -= nargs; @@ -1711,8 +1733,8 @@ nargs = nargs - nargs % 6 + 2; num_curves = ( nargs - 2 ) / 6; - if ( cff_builder_start_point ( builder, x, y ) || - check_points( builder, num_curves * 3 + 2 ) ) + if ( cff_builder_start_point( builder, x, y ) || + cff_check_points( builder, num_curves * 3 + 2 ) ) goto Fail; args -= nargs; @@ -1752,7 +1774,7 @@ /* -- make sure we have enough space for the start point if it */ /* needs to be added */ if ( cff_builder_start_point( builder, x, y ) || - check_points( builder, 6 ) ) + cff_check_points( builder, 6 ) ) goto Fail; /* record the starting point's y position for later use */ @@ -1801,7 +1823,7 @@ /* adding six more points; 4 control points, 2 on-curve points */ if ( cff_builder_start_point( builder, x, y ) || - check_points( builder, 6 ) ) + cff_check_points( builder, 6 ) ) goto Fail; /* record the starting point's y-position for later use */ @@ -1854,7 +1876,7 @@ /* adding six more points; 4 control points, 2 on-curve points */ if ( cff_builder_start_point( builder, x, y ) || - check_points( builder, 6 ) ) + cff_check_points( builder, 6 ) ) goto Fail; /* record the starting point's x, y position for later use */ @@ -1917,7 +1939,7 @@ FT_TRACE4(( " flex\n" )); if ( cff_builder_start_point( builder, x, y ) || - check_points( builder, 6 ) ) + cff_check_points( builder, 6 ) ) goto Fail; for ( count = 6; count > 0; count-- ) @@ -1967,9 +1989,6 @@ } else { - if ( !error ) - error = CFF_Err_Ok; - cff_builder_close_contour( builder ); /* close hints recording session */ @@ -1980,10 +1999,12 @@ goto Syntax_Error; /* apply hints to the loaded glyph outline now */ - hinter->apply( hinter->hints, - builder->current, - (PSH_Globals)builder->hints_globals, - decoder->hint_mode ); + error = hinter->apply( hinter->hints, + builder->current, + (PSH_Globals)builder->hints_globals, + decoder->hint_mode ); + if ( error ) + goto Fail; } /* add current outline to the glyph slot */ @@ -2470,7 +2491,7 @@ FT_ERROR(( " %d", ip[0] )); FT_ERROR(( "\n" )); - return CFF_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } decoder->top = args; @@ -2489,17 +2510,19 @@ Syntax_Error: FT_TRACE4(( "cff_decoder_parse_charstrings: syntax error\n" )); - return CFF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); Stack_Underflow: FT_TRACE4(( "cff_decoder_parse_charstrings: stack underflow\n" )); - return CFF_Err_Too_Few_Arguments; + return FT_THROW( Too_Few_Arguments ); Stack_Overflow: FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow\n" )); - return CFF_Err_Stack_Overflow; + return FT_THROW( Stack_Overflow ); } +#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */ + /*************************************************************************/ /*************************************************************************/ @@ -2526,7 +2549,7 @@ cff_compute_max_advance( TT_Face face, FT_Int* max_advance ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; CFF_Decoder decoder; FT_Int glyph_index; CFF_Font cff = (CFF_Font)face->other; @@ -2564,12 +2587,12 @@ } /* ignore the error if one has occurred -- skip to next glyph */ - error = CFF_Err_Ok; + error = FT_Err_Ok; } *max_advance = decoder.builder.advance.x; - return CFF_Err_Ok; + return FT_Err_Ok; } @@ -2585,7 +2608,7 @@ FT_Error error; CFF_Decoder decoder; TT_Face face = (TT_Face)glyph->root.face; - FT_Bool hinting, force_scaling; + FT_Bool hinting, scaled, force_scaling; CFF_Font cff = (CFF_Font)face->extra.data; FT_Matrix font_matrix; @@ -2606,11 +2629,11 @@ glyph_index = cff_charset_cid_to_gindex( &cff->charset, glyph_index ); if ( glyph_index == 0 ) - return CFF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } } else if ( glyph_index >= cff->num_glyphs ) - return CFF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( load_flags & FT_LOAD_NO_RECURSE ) load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING; @@ -2653,6 +2676,11 @@ if ( !error ) { + FT_Bool has_vertical_info; + FT_UShort advance; + FT_Short dummy; + + glyph->root.outline.n_points = 0; glyph->root.outline.n_contours = 0; @@ -2679,6 +2707,39 @@ glyph->root.bitmap_left = metrics.horiBearingX; glyph->root.bitmap_top = metrics.horiBearingY; } + + /* compute linear advance widths */ + + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 0, + glyph_index, + &dummy, + &advance ); + glyph->root.linearHoriAdvance = advance; + + has_vertical_info = FT_BOOL( + face->vertical_info && + face->vertical.number_Of_VMetrics > 0 ); + + /* get the vertical metrics from the vtmx table if we have one */ + if ( has_vertical_info ) + { + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1, + glyph_index, + &dummy, + &advance ); + glyph->root.linearVertAdvance = advance; + } + else + { + /* make up vertical ones */ + if ( face->os2.version != 0xFFFFU ) + glyph->root.linearVertAdvance = (FT_Pos) + ( face->os2.sTypoAscender - face->os2.sTypoDescender ); + else + glyph->root.linearVertAdvance = (FT_Pos) + ( face->horizontal.Ascender - face->horizontal.Descender ); + } + return error; } } @@ -2688,7 +2749,7 @@ /* return immediately if we only want the embedded bitmaps */ if ( load_flags & FT_LOAD_SBITS_ONLY ) - return CFF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* if we have a CID subfont, use its matrix (which has already */ /* been multiplied with the root matrix) */ @@ -2700,6 +2761,7 @@ FT_Byte fd_index = cff_fd_select_get( &cff->fd_select, glyph_index ); + if ( fd_index >= cff->num_subfonts ) fd_index = (FT_Byte)( cff->num_subfonts - 1 ); @@ -2727,12 +2789,21 @@ glyph->root.outline.n_points = 0; glyph->root.outline.n_contours = 0; - hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 && - ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); + /* top-level code ensures that FT_LOAD_NO_HINTING is set */ + /* if FT_LOAD_NO_SCALE is active */ + hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); + scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 ); + glyph->hint = hinting; + glyph->scaled = scaled; glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; /* by default */ { +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE + CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( face ); +#endif + + FT_Byte* charstring; FT_ULong charstring_len; @@ -2756,9 +2827,35 @@ if ( error ) goto Glyph_Build_Finished; - error = cff_decoder_parse_charstrings( &decoder, - charstring, - charstring_len ); +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE + /* choose which CFF renderer to use */ + if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE ) + error = cff_decoder_parse_charstrings( &decoder, + charstring, + charstring_len ); + else +#endif + { + error = cf2_decoder_parse_charstrings( &decoder, + charstring, + charstring_len ); + + /* Adobe's engine uses 16.16 numbers everywhere; */ + /* as a consequence, glyphs larger than 2000ppem get rejected */ + if ( FT_ERR_EQ( error, Glyph_Too_Big ) ) + { + /* this time, we retry unhinted and scale up the glyph later on */ + /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */ + /* 0x400 for both `x_scale' and `y_scale' in this case) */ + hinting = FALSE; + force_scaling = TRUE; + glyph->hint = hinting; + + error = cf2_decoder_parse_charstrings( &decoder, + charstring, + charstring_len ); + } + } cff_free_glyph_data( face, &charstring, charstring_len ); @@ -2856,14 +2953,8 @@ glyph->root.linearHoriAdvance = decoder.glyph_width; glyph->root.internal->glyph_transformed = 0; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - has_vertical_info = FT_BOOL( face->vertical_info && - face->vertical.number_Of_VMetrics > 0 && - face->vertical.long_metrics ); -#else has_vertical_info = FT_BOOL( face->vertical_info && face->vertical.number_Of_VMetrics > 0 ); -#endif /* get the vertical metrics from the vtmx table if we have one */ if ( has_vertical_info ) @@ -2872,10 +2963,10 @@ FT_UShort vertAdvance = 0; - ( (SFNT_Service)face->sfnt )->get_metrics( face, 1, - glyph_index, - &vertBearingY, - &vertAdvance ); + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1, + glyph_index, + &vertBearingY, + &vertAdvance ); metrics->vertBearingY = vertBearingY; metrics->vertAdvance = vertAdvance; } diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h index 38937be..41df7db 100644 --- a/src/cff/cffgload.h +++ b/src/cff/cffgload.h @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ +/* Copyright 1996-2004, 2006-2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -106,6 +106,41 @@ FT_BEGIN_HEADER } CFF_Builder; + FT_LOCAL( FT_Error ) + cff_check_points( CFF_Builder* builder, + FT_Int count ); + + FT_LOCAL( void ) + cff_builder_add_point( CFF_Builder* builder, + FT_Pos x, + FT_Pos y, + FT_Byte flag ); + FT_LOCAL( FT_Error ) + cff_builder_add_point1( CFF_Builder* builder, + FT_Pos x, + FT_Pos y ); + FT_LOCAL( FT_Error ) + cff_builder_start_point( CFF_Builder* builder, + FT_Pos x, + FT_Pos y ); + FT_LOCAL( void ) + cff_builder_close_contour( CFF_Builder* builder ); + + + FT_LOCAL( FT_Int ) + cff_lookup_glyph_by_stdcharcode( CFF_Font cff, + FT_Int charcode ); + FT_LOCAL( FT_Error ) + cff_get_glyph_data( TT_Face face, + FT_UInt glyph_index, + FT_Byte** pointer, + FT_ULong* length ); + FT_LOCAL( void ) + cff_free_glyph_data( TT_Face face, + FT_Byte** pointer, + FT_ULong length ); + + /* execution context charstring zone */ typedef struct CFF_Decoder_Zone_ @@ -156,6 +191,8 @@ FT_BEGIN_HEADER FT_Bool seac; + CFF_SubFont current_subfont; /* for current glyph_index */ + } CFF_Decoder; @@ -181,10 +218,12 @@ FT_BEGIN_HEADER #endif /* 0 */ +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE FT_LOCAL( FT_Error ) cff_decoder_parse_charstrings( CFF_Decoder* decoder, FT_Byte* charstring_base, FT_ULong charstring_len ); +#endif FT_LOCAL( FT_Error ) cff_slot_load( CFF_GlyphSlot glyph, diff --git a/src/cff/cffload.c b/src/cff/cffload.c index 2be6ba0..d9bec59 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -4,7 +4,7 @@ /* */ /* OpenType and CFF data/program tables loader (body). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -250,7 +250,7 @@ if ( offsize < 1 || offsize > 4 ) { - error = CFF_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -269,7 +269,7 @@ if ( size == 0 ) { - error = CFF_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -318,7 +318,7 @@ static FT_Error cff_index_load_offsets( CFF_Index idx ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Stream stream = idx->stream; FT_Memory memory = stream->memory; @@ -384,9 +384,10 @@ FT_Byte*** table, FT_Byte** pool ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = idx->stream->memory; - FT_Byte** t = NULL; + + FT_Byte** t = NULL; FT_Byte* new_bytes = NULL; @@ -413,7 +414,7 @@ cur_offset = idx->offsets[0] - 1; /* sanity check */ - if ( cur_offset >= idx->data_size ) + if ( cur_offset != 0 ) { FT_TRACE0(( "cff_index_get_pointers:" " invalid first offset value %d set to zero\n", @@ -431,11 +432,11 @@ FT_ULong next_offset = idx->offsets[n] - 1; - /* empty slot + two sanity checks for invalid offset tables */ - if ( next_offset == 0 || - next_offset < cur_offset || - ( next_offset >= idx->data_size && n < idx->count ) ) + /* two sanity checks for invalid offset tables */ + if ( next_offset < cur_offset ) next_offset = cur_offset; + else if ( next_offset > idx->data_size ) + next_offset = idx->data_size; if ( !pool ) t[n] = org_bytes + next_offset; @@ -471,7 +472,7 @@ FT_Byte** pbytes, FT_ULong* pbyte_len ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; if ( idx && idx->count > element ) @@ -556,7 +557,7 @@ } } else - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); Exit: return error; @@ -688,6 +689,13 @@ if ( FT_READ_USHORT( num_ranges ) ) goto Exit; + if ( !num_ranges ) + { + FT_TRACE0(( "CFF_Load_FD_Select: empty FDSelect array\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } + fdselect->data_size = num_ranges * 3 + 2; Load_Data: @@ -696,7 +704,7 @@ break; default: /* hmm... that's wrong */ - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); } Exit: @@ -718,7 +726,7 @@ break; case 3: - /* first, compare to cache */ + /* first, compare to the cache */ if ( (FT_UInt)( glyph_index - fdselect->cache_first ) < fdselect->cache_count ) { @@ -726,7 +734,7 @@ break; } - /* then, lookup the ranges array */ + /* then, look up the ranges array */ { FT_Byte* p = fdselect->data; FT_Byte* p_limit = p + fdselect->data_size; @@ -749,7 +757,7 @@ /* update cache */ fdselect->cache_first = first; - fdselect->cache_count = limit-first; + fdselect->cache_count = limit - first; fdselect->cache_fd = fd2; break; } @@ -780,7 +788,7 @@ FT_UInt num_glyphs, FT_Memory memory ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt i; FT_Long j; FT_UShort max_cid = 0; @@ -859,7 +867,7 @@ FT_Bool invert ) { FT_Memory memory = stream->memory; - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UShort glyph_sid; @@ -943,7 +951,7 @@ default: FT_ERROR(( "cff_charset_load: invalid table format\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } } @@ -966,7 +974,7 @@ { FT_ERROR(( "cff_charset_load: implicit charset larger than\n" "predefined charset (Adobe ISO-Latin)\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -984,7 +992,7 @@ { FT_ERROR(( "cff_charset_load: implicit charset larger than\n" "predefined charset (Adobe Expert)\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1002,7 +1010,7 @@ { FT_ERROR(( "cff_charset_load: implicit charset larger than\n" "predefined charset (Adobe Expert Subset)\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1016,7 +1024,7 @@ break; default: - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } } @@ -1057,7 +1065,7 @@ FT_ULong base_offset, FT_ULong offset ) { - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count; FT_UInt j; FT_UShort glyph_sid; @@ -1067,7 +1075,7 @@ /* Check for charset->sids. If we do not have this, we fail. */ if ( !charset->sids ) { - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1187,7 +1195,7 @@ default: FT_ERROR(( "cff_encoding_load: invalid table format\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1280,7 +1288,7 @@ default: FT_ERROR(( "cff_encoding_load: invalid table format\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } } @@ -1313,7 +1321,7 @@ /* set defaults */ FT_MEM_ZERO( top, sizeof ( *top ) ); - top->underline_position = -100L << 16; + top->underline_position = -( 100L << 16 ); top->underline_thickness = 50L << 16; top->charstring_type = 2; top->font_matrix.xx = 0x10000L; @@ -1439,6 +1447,7 @@ FT_ULong base_offset; CFF_FontRecDict dict; CFF_IndexRec string_index; + FT_Int subfont_index; FT_ZERO( font ); @@ -1459,7 +1468,7 @@ font->absolute_offsize > 4 ) { FT_TRACE2(( " not a CFF font header\n" )); - error = CFF_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -1483,13 +1492,35 @@ font->num_strings = string_index.count; - /* well, we don't really forget the `disabled' fonts... */ - font->num_faces = font->name_index.count; - if ( face_index >= (FT_Int)font->num_faces ) + if ( pure_cff ) + { + /* well, we don't really forget the `disabled' fonts... */ + subfont_index = face_index; + + if ( subfont_index >= (FT_Int)font->name_index.count ) + { + FT_ERROR(( "cff_font_load:" + " invalid subfont index for pure CFF font (%d)\n", + subfont_index )); + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + font->num_faces = font->name_index.count; + } + else { - FT_ERROR(( "cff_font_load: incorrect face index = %d\n", - face_index )); - error = CFF_Err_Invalid_Argument; + subfont_index = 0; + + if ( font->name_index.count > 1 ) + { + FT_ERROR(( "cff_font_load:" + " invalid CFF font with multiple subfonts\n" + " " + " in SFNT wrapper\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } } /* in case of a font format check, simply exit now */ @@ -1500,7 +1531,7 @@ FT_TRACE4(( "parsing top-level\n" )); error = cff_subfont_load( &font->top_font, &font->font_dict_index, - face_index, + subfont_index, stream, base_offset, library ); @@ -1576,7 +1607,7 @@ if ( dict->charstrings_offset == 0 ) { FT_ERROR(( "cff_font_load: no charstrings offset\n" )); - error = CFF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1615,7 +1646,7 @@ /* get the font name (/CIDFontName for CID-keyed fonts, */ /* /FontName otherwise) */ - font->font_name = cff_index_get_name( font, face_index ); + font->font_name = cff_index_get_name( font, subfont_index ); Exit: cff_index_done( &string_index ); @@ -1660,6 +1691,12 @@ FT_FREE( font->global_subrs ); FT_FREE( font->strings ); FT_FREE( font->string_pool ); + + if ( font->cf2_instance.finalizer ) + { + font->cf2_instance.finalizer( font->cf2_instance.data ); + FT_FREE( font->cf2_instance.data ); + } } diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index 6ad0e50..da3d019 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> + #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_CALC_H #include FT_INTERNAL_STREAM_H @@ -24,12 +25,15 @@ #include FT_TRUETYPE_IDS_H #include FT_TRUETYPE_TAGS_H #include FT_INTERNAL_SFNT_H +#include FT_CFF_DRIVER_H + #include "cffobjs.h" #include "cffload.h" #include "cffcmap.h" -#include "cfferrs.h" #include "cffpic.h" +#include "cfferrs.h" + /*************************************************************************/ /* */ @@ -153,7 +157,7 @@ cff_size_init( FT_Size cffsize ) /* CFF_Size */ { CFF_Size size = (CFF_Size)cffsize; - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size ); @@ -253,7 +257,7 @@ } } - return CFF_Err_Ok; + return FT_Err_Ok; } #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ @@ -325,7 +329,7 @@ } } - return CFF_Err_Ok; + return FT_Err_Ok; } @@ -367,7 +371,7 @@ } } - return CFF_Err_Ok; + return FT_Err_Ok; } @@ -401,7 +405,7 @@ remove_subset_prefix( FT_String* name ) { FT_Int32 idx = 0; - FT_Int32 length = strlen( name ) + 1; + FT_Int32 length = (FT_Int32)strlen( name ) + 1; FT_Bool continue_search = 1; @@ -438,8 +442,8 @@ FT_Int32 family_name_length, style_name_length; - family_name_length = strlen( family_name ); - style_name_length = strlen( style_name ); + family_name_length = (FT_Int32)strlen( family_name ); + style_name_length = (FT_Int32)strlen( style_name ); if ( family_name_length > style_name_length ) { @@ -496,7 +500,7 @@ if ( !sfnt ) { FT_ERROR(( "cff_face_init: cannot access `sfnt' module\n" )); - error = CFF_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -518,21 +522,13 @@ if ( face->format_tag != TTAG_OTTO ) /* `OTTO'; OpenType/CFF font */ { FT_TRACE2(( " not an OpenType/CFF font\n" )); - error = CFF_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } /* if we are performing a simple font format check, exit immediately */ if ( face_index < 0 ) - return CFF_Err_Ok; - - /* UNDOCUMENTED! A CFF in an SFNT can have only a single font. */ - if ( face_index > 0 ) - { - FT_ERROR(( "cff_face_init: invalid face index\n" )); - error = CFF_Err_Invalid_Argument; - goto Exit; - } + return FT_Err_Ok; sfnt_format = 1; @@ -544,7 +540,8 @@ pure_cff = 0; /* load font directory */ - error = sfnt->load_face( stream, face, 0, num_params, params ); + error = sfnt->load_face( stream, face, face_index, + num_params, params ); if ( error ) goto Exit; } @@ -554,10 +551,6 @@ error = sfnt->load_cmap( face, stream ); if ( error ) goto Exit; - - /* XXX: we don't load the GPOS table, as OpenType Layout */ - /* support will be added later to a layout library on top of */ - /* FreeType 2 */ } /* now load the CFF part of the file */ @@ -570,7 +563,7 @@ /* rewind to start of file; we are going to load a pure-CFF font */ if ( FT_STREAM_SEEK( 0 ) ) goto Exit; - error = CFF_Err_Ok; + error = FT_Err_Ok; } /* now load and parse the CFF table in the file */ @@ -611,7 +604,7 @@ " cannot open CFF & CEF fonts\n" " " " without the `PSNames' module\n" )); - error = CFF_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -873,7 +866,7 @@ flags |= FT_FACE_FLAG_KERNING; #endif - cffface->face_flags = flags; + cffface->face_flags |= flags; /*******************************************************************/ /* */ @@ -950,16 +943,6 @@ if ( pure_cff && cff->top_font.font_dict.cid_registry != 0xFFFFU ) goto Exit; -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( nn + 1 > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "cff_face_init: no Unicode cmap is found, " - "and too many subtables (%d) to add synthesized cmap\n", - nn )); - goto Exit; - } -#endif - /* we didn't find a Unicode charmap -- synthesize one */ cmaprec.face = cffface; cmaprec.platform_id = TT_PLATFORM_MICROSOFT; @@ -968,9 +951,10 @@ nn = (FT_UInt)cffface->num_charmaps; - error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, + error = FT_CMap_New( &CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, &cmaprec, NULL ); - if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + if ( error && + FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) ) goto Exit; error = FT_Err_Ok; @@ -979,15 +963,6 @@ cffface->charmap = cffface->charmaps[nn]; Skip_Unicode: -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( nn > FT_MAX_CHARMAP_CACHEABLE ) - { - FT_ERROR(( "cff_face_init: Unicode cmap is found, " - "but too many preceding subtables (%d) to access\n", - nn - 1 )); - goto Exit; - } -#endif if ( encoding->count > 0 ) { FT_CMap_Class clazz; @@ -1000,19 +975,19 @@ { cmaprec.encoding_id = TT_ADOBE_ID_STANDARD; cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD; - clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; + clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET; } else if ( encoding->offset == 1 ) { cmaprec.encoding_id = TT_ADOBE_ID_EXPERT; cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT; - clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; + clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET; } else { cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM; cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM; - clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; + clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET; } error = FT_CMap_New( clazz, NULL, &cmaprec, NULL ); @@ -1056,16 +1031,35 @@ FT_LOCAL_DEF( FT_Error ) - cff_driver_init( FT_Module module ) + cff_driver_init( FT_Module module ) /* CFF_Driver */ { - FT_UNUSED( module ); + CFF_Driver driver = (CFF_Driver)module; + + + /* set default property values, cf. `ftcffdrv.h' */ +#ifdef CFF_CONFIG_OPTION_OLD_ENGINE + driver->hinting_engine = FT_CFF_HINTING_FREETYPE; +#else + driver->hinting_engine = FT_CFF_HINTING_ADOBE; +#endif + + driver->no_stem_darkening = FALSE; + + driver->darken_params[0] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1; + driver->darken_params[1] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1; + driver->darken_params[2] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2; + driver->darken_params[3] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2; + driver->darken_params[4] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3; + driver->darken_params[5] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3; + driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4; + driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4; - return CFF_Err_Ok; + return FT_Err_Ok; } FT_LOCAL_DEF( void ) - cff_driver_done( FT_Module module ) + cff_driver_done( FT_Module module ) /* CFF_Driver */ { FT_UNUSED( module ); } diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h index 3c81cee..dfbf9a9 100644 --- a/src/cff/cffobjs.h +++ b/src/cff/cffobjs.h @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */ +/* Copyright 1996-2004, 2006-2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -112,12 +112,16 @@ FT_BEGIN_HEADER /***********************************************************************/ /* */ - /* TrueType driver class. */ + /* CFF driver class. */ /* */ typedef struct CFF_DriverRec_ { FT_DriverRec root; - void* extension_component; + + FT_UInt hinting_engine; + FT_Bool no_stem_darkening; + + FT_Int darken_params[8]; } CFF_DriverRec; @@ -167,10 +171,10 @@ FT_BEGIN_HEADER /* Driver functions */ /* */ FT_LOCAL( FT_Error ) - cff_driver_init( FT_Module module ); + cff_driver_init( FT_Module module ); /* CFF_Driver */ FT_LOCAL( void ) - cff_driver_done( FT_Module module ); + cff_driver_done( FT_Module module ); /* CFF_Driver */ FT_END_HEADER diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c index 61fa87c..c79ab62 100644 --- a/src/cff/cffparse.c +++ b/src/cff/cffparse.c @@ -4,7 +4,7 @@ /* */ /* CFF token stream parser (body) */ /* */ -/* Copyright 1996-2004, 2007-2011 by */ +/* Copyright 1996-2004, 2007-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -65,19 +65,17 @@ if ( p + 2 > limit ) goto Bad; - val = (FT_Short)( ( (FT_Int)p[0] << 8 ) | p[1] ); - p += 2; + val = (FT_Short)( ( (FT_UShort)p[0] << 8 ) | p[1] ); } else if ( v == 29 ) { if ( p + 4 > limit ) goto Bad; - val = ( (FT_Long)p[0] << 24 ) | - ( (FT_Long)p[1] << 16 ) | - ( (FT_Long)p[2] << 8 ) | - p[3]; - p += 4; + val = (FT_Long)( ( (FT_ULong)p[0] << 24 ) | + ( (FT_ULong)p[1] << 16 ) | + ( (FT_ULong)p[2] << 8 ) | + (FT_ULong)p[3] ); } else if ( v < 247 ) { @@ -89,7 +87,6 @@ goto Bad; val = ( v - 247 ) * 256 + p[0] + 108; - p++; } else { @@ -97,7 +94,6 @@ goto Bad; val = -( v - 251 ) * 256 - p[0] - 108; - p++; } Exit: @@ -105,6 +101,7 @@ Bad: val = 0; + FT_TRACE4(( "!!!END OF DATA:!!!" )); goto Exit; } @@ -136,7 +133,7 @@ FT_UInt phase; FT_Long result, number, exponent; - FT_Int sign = 0, exponent_sign = 0; + FT_Int sign = 0, exponent_sign = 0, have_overflow = 0; FT_Long exponent_add, integer_length, fraction_length; @@ -165,7 +162,7 @@ /* Make sure we don't read past the end. */ if ( p >= limit ) - goto Exit; + goto Bad; } /* Get the nibble. */ @@ -191,7 +188,7 @@ } /* Read fraction part, if any. */ - if ( nib == 0xa ) + if ( nib == 0xA ) for (;;) { /* If we entered this iteration with phase == 4, we need */ @@ -202,7 +199,7 @@ /* Make sure we don't read past the end. */ if ( p >= limit ) - goto Exit; + goto Bad; } /* Get the nibble. */ @@ -241,7 +238,7 @@ /* Make sure we don't read past the end. */ if ( p >= limit ) - goto Exit; + goto Bad; } /* Get the nibble. */ @@ -250,17 +247,28 @@ if ( nib >= 10 ) break; - exponent = exponent * 10 + nib; - /* Arbitrarily limit exponent. */ if ( exponent > 1000 ) - goto Exit; + have_overflow = 1; + else + exponent = exponent * 10 + nib; } if ( exponent_sign ) exponent = -exponent; } + if ( !number ) + goto Exit; + + if ( have_overflow ) + { + if ( exponent_sign ) + goto Underflow; + else + goto Overflow; + } + /* We don't check `power_ten' and `exponent_add'. */ exponent += power_ten + exponent_add; @@ -286,20 +294,25 @@ /* Make `scaling' as small as possible. */ new_fraction_length = FT_MIN( exponent, 5 ); - exponent -= new_fraction_length; shift = new_fraction_length - fraction_length; - number *= power_tens[shift]; - if ( number > 0x7FFFL ) + if ( shift > 0 ) { - number /= 10; - exponent += 1; + exponent -= new_fraction_length; + number *= power_tens[shift]; + if ( number > 0x7FFFL ) + { + number /= 10; + exponent += 1; + } } + else + exponent -= fraction_length; } else exponent -= fraction_length; - result = number << 16; + result = (FT_Long)( (FT_ULong)number << 16 ); *scaling = exponent; } } @@ -322,9 +335,10 @@ integer_length += exponent; fraction_length -= exponent; - /* Check for overflow and underflow. */ - if ( FT_ABS( integer_length ) > 5 ) - goto Exit; + if ( integer_length > 5 ) + goto Overflow; + if ( integer_length < -5 ) + goto Underflow; /* Remove non-significant digits. */ if ( integer_length < 0 ) @@ -353,17 +367,32 @@ number *= power_tens[-fraction_length]; if ( number > 0x7FFFL ) - goto Exit; + goto Overflow; - result = number << 16; + result = (FT_Long)( (FT_ULong)number << 16 ); } } + Exit: if ( sign ) result = -result; - Exit: return result; + + Overflow: + result = 0x7FFFFFFFL; + FT_TRACE4(( "!!!OVERFLOW:!!!" )); + goto Exit; + + Underflow: + result = 0; + FT_TRACE4(( "!!!UNDERFLOW:!!!" )); + goto Exit; + + Bad: + result = 0; + FT_TRACE4(( "!!!END OF DATA:!!!" )); + goto Exit; } @@ -378,10 +407,44 @@ /* read a floating point number, either integer or real */ static FT_Fixed + do_fixed( FT_Byte** d, + FT_Long scaling ) + { + if ( **d == 30 ) + return cff_parse_real( d[0], d[1], scaling, NULL ); + else + { + FT_Long val = cff_parse_integer( d[0], d[1] ); + + + if ( scaling ) + val *= power_tens[scaling]; + + if ( val > 0x7FFF ) + { + val = 0x7FFFFFFFL; + goto Overflow; + } + else if ( val < -0x7FFF ) + { + val = -0x7FFFFFFFL; + goto Overflow; + } + + return (FT_Long)( (FT_ULong)val << 16 ); + + Overflow: + FT_TRACE4(( "!!!OVERFLOW:!!!" )); + return val; + } + } + + + /* read a floating point number, either integer or real */ + static FT_Fixed cff_parse_fixed( FT_Byte** d ) { - return **d == 30 ? cff_parse_real( d[0], d[1], 0, NULL ) - : cff_parse_integer( d[0], d[1] ) << 16; + return do_fixed( d, 0 ); } @@ -391,9 +454,7 @@ cff_parse_fixed_scaled( FT_Byte** d, FT_Long scaling ) { - return **d == 30 ? cff_parse_real( d[0], d[1], scaling, NULL ) - : ( cff_parse_integer( d[0], d[1] ) * - power_tens[scaling] ) << 16; + return do_fixed( d, scaling ); } @@ -436,7 +497,7 @@ else { *scaling = 0; - return number << 16; + return (FT_Long)( (FT_ULong)number << 16 ); } } } @@ -450,7 +511,7 @@ FT_Vector* offset = &dict->font_offset; FT_ULong* upm = &dict->units_per_em; FT_Byte** data = parser->stack; - FT_Error error = CFF_Err_Stack_Underflow; + FT_Error error = FT_ERR( Stack_Underflow ); if ( parser->top >= parser->stack + 6 ) @@ -458,7 +519,7 @@ FT_Long scaling; - error = CFF_Err_Ok; + error = FT_Err_Ok; dict->has_font_matrix = TRUE; @@ -523,7 +584,7 @@ FT_Error error; - error = CFF_Err_Stack_Underflow; + error = FT_ERR( Stack_Underflow ); if ( parser->top >= parser->stack + 4 ) { @@ -531,7 +592,7 @@ bbox->yMin = FT_RoundFix( cff_parse_fixed( data++ ) ); bbox->xMax = FT_RoundFix( cff_parse_fixed( data++ ) ); bbox->yMax = FT_RoundFix( cff_parse_fixed( data ) ); - error = CFF_Err_Ok; + error = FT_Err_Ok; FT_TRACE4(( " [%d %d %d %d]\n", bbox->xMin / 65536, @@ -552,7 +613,7 @@ FT_Error error; - error = CFF_Err_Stack_Underflow; + error = FT_ERR( Stack_Underflow ); if ( parser->top >= parser->stack + 2 ) { @@ -561,7 +622,7 @@ FT_TRACE4(( " %lu %lu\n", dict->private_size, dict->private_offset )); - error = CFF_Err_Ok; + error = FT_Err_Ok; } return error; @@ -576,7 +637,7 @@ FT_Error error; - error = CFF_Err_Stack_Underflow; + error = FT_ERR( Stack_Underflow ); if ( parser->top >= parser->stack + 3 ) { @@ -588,7 +649,7 @@ if ( dict->cid_supplement < 0 ) FT_TRACE1(( "cff_parse_cid_ros: negative supplement %d is found\n", dict->cid_supplement )); - error = CFF_Err_Ok; + error = FT_Err_Ok; FT_TRACE4(( " %d %d %d\n", dict->cid_registry, @@ -730,7 +791,7 @@ FT_Create_Class_cff_field_handlers( FT_Library library, CFF_Field_Handler** output_class ) { - CFF_Field_Handler* clazz; + CFF_Field_Handler* clazz = NULL; FT_Error error; FT_Memory memory = library->memory; @@ -857,7 +918,7 @@ *output_class = clazz; - return CFF_Err_Ok; + return FT_Err_Ok; } @@ -870,7 +931,7 @@ FT_Byte* limit ) { FT_Byte* p = start; - FT_Error error = CFF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Library library = parser->library; FT_UNUSED( library ); @@ -944,7 +1005,7 @@ } code = code | parser->object_code; - for ( field = FT_CFF_FIELD_HANDLERS_GET; field->kind; field++ ) + for ( field = CFF_FIELD_HANDLERS_GET; field->kind; field++ ) { if ( field->code == (FT_Int)code ) { @@ -1096,15 +1157,15 @@ return error; Stack_Overflow: - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; Stack_Underflow: - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; Syntax_Error: - error = CFF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c index 1c19d58..f22e4f0 100644 --- a/src/cff/cffpic.c +++ b/src/cff/cffpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for cff module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,65 +23,51 @@ #include "cffpic.h" #include "cfferrs.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from cffdrivr.c */ FT_Error - FT_Create_Class_cff_services( - FT_Library library, - FT_ServiceDescRec** output_class ); - + FT_Create_Class_cff_services( FT_Library library, + FT_ServiceDescRec** output_class ); void - FT_Destroy_Class_cff_services( - FT_Library library, - FT_ServiceDescRec* clazz ); - + FT_Destroy_Class_cff_services( FT_Library library, + FT_ServiceDescRec* clazz ); void - FT_Init_Class_cff_service_ps_info( - FT_Library library, - FT_Service_PsInfoRec* clazz ); - + FT_Init_Class_cff_service_ps_info( FT_Library library, + FT_Service_PsInfoRec* clazz ); void - FT_Init_Class_cff_service_glyph_dict( - FT_Library library, - FT_Service_GlyphDictRec* clazz ); - + FT_Init_Class_cff_service_glyph_dict( FT_Library library, + FT_Service_GlyphDictRec* clazz ); void - FT_Init_Class_cff_service_ps_name( - FT_Library library, - FT_Service_PsFontNameRec* clazz ); - + FT_Init_Class_cff_service_ps_name( FT_Library library, + FT_Service_PsFontNameRec* clazz ); void - FT_Init_Class_cff_service_get_cmap_info( - FT_Library library, - FT_Service_TTCMapsRec* clazz ); - + FT_Init_Class_cff_service_get_cmap_info( FT_Library library, + FT_Service_TTCMapsRec* clazz ); void - FT_Init_Class_cff_service_cid_info( - FT_Library library, - FT_Service_CIDRec* clazz ); + FT_Init_Class_cff_service_cid_info( FT_Library library, + FT_Service_CIDRec* clazz ); /* forward declaration of PIC init functions from cffparse.c */ FT_Error - FT_Create_Class_cff_field_handlers( - FT_Library library, - CFF_Field_Handler** output_class ); - + FT_Create_Class_cff_field_handlers( FT_Library library, + CFF_Field_Handler** output_class ); void - FT_Destroy_Class_cff_field_handlers( - FT_Library library, - CFF_Field_Handler* clazz ); + FT_Destroy_Class_cff_field_handlers( FT_Library library, + CFF_Field_Handler* clazz ); + void cff_driver_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->cff ) { - CffModulePIC* container = ( CffModulePIC* )pic_container->cff; + CffModulePIC* container = (CffModulePIC*)pic_container->cff; if ( container->cff_services ) @@ -102,8 +88,8 @@ cff_driver_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = CFF_Err_Ok; - CffModulePIC* container; + FT_Error error = FT_Err_Ok; + CffModulePIC* container = NULL; FT_Memory memory = library->memory; @@ -113,15 +99,18 @@ FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->cff = container; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ error = FT_Create_Class_cff_services( library, &container->cff_services ); if ( error ) goto Exit; + error = FT_Create_Class_cff_field_handlers( library, &container->cff_field_handlers ); if ( error ) goto Exit; + FT_Init_Class_cff_service_ps_info( library, &container->cff_service_ps_info ); FT_Init_Class_cff_service_glyph_dict( @@ -136,7 +125,8 @@ library, &container->cff_cmap_encoding_class_rec ); FT_Init_Class_cff_cmap_unicode_class_rec( library, &container->cff_cmap_unicode_class_rec ); -Exit: + + Exit: if ( error ) cff_driver_class_pic_free( library ); return error; diff --git a/src/cff/cffpic.h b/src/cff/cffpic.h index 342edd8..50bab4c 100644 --- a/src/cff/cffpic.h +++ b/src/cff/cffpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for cff module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,16 +24,19 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H + #ifndef FT_CONFIG_OPTION_PIC -#define FT_CFF_SERVICE_PS_INFO_GET cff_service_ps_info -#define FT_CFF_SERVICE_GLYPH_DICT_GET cff_service_glyph_dict -#define FT_CFF_SERVICE_PS_NAME_GET cff_service_ps_name -#define FT_CFF_SERVICE_GET_CMAP_INFO_GET cff_service_get_cmap_info -#define FT_CFF_SERVICE_CID_INFO_GET cff_service_cid_info -#define FT_CFF_SERVICES_GET cff_services -#define FT_CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec -#define FT_CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec -#define FT_CFF_FIELD_HANDLERS_GET cff_field_handlers + +#define CFF_SERVICE_PS_INFO_GET cff_service_ps_info +#define CFF_SERVICE_GLYPH_DICT_GET cff_service_glyph_dict +#define CFF_SERVICE_PS_NAME_GET cff_service_ps_name +#define CFF_SERVICE_GET_CMAP_INFO_GET cff_service_get_cmap_info +#define CFF_SERVICE_CID_INFO_GET cff_service_cid_info +#define CFF_SERVICE_PROPERTIES_GET cff_service_properties +#define CFF_SERVICES_GET cff_services +#define CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec +#define CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec +#define CFF_FIELD_HANDLERS_GET cff_field_handlers #else /* FT_CONFIG_OPTION_PIC */ @@ -43,30 +46,48 @@ FT_BEGIN_HEADER #include FT_SERVICE_POSTSCRIPT_NAME_H #include FT_SERVICE_TT_CMAP_H #include FT_SERVICE_CID_H +#include FT_SERVICE_PROPERTIES_H + - typedef struct CffModulePIC_ + typedef struct CffModulePIC_ { - FT_ServiceDescRec* cff_services; - CFF_Field_Handler* cff_field_handlers; - FT_Service_PsInfoRec cff_service_ps_info; - FT_Service_GlyphDictRec cff_service_glyph_dict; - FT_Service_PsFontNameRec cff_service_ps_name; - FT_Service_TTCMapsRec cff_service_get_cmap_info; - FT_Service_CIDRec cff_service_cid_info; - FT_CMap_ClassRec cff_cmap_encoding_class_rec; - FT_CMap_ClassRec cff_cmap_unicode_class_rec; + FT_ServiceDescRec* cff_services; + CFF_Field_Handler* cff_field_handlers; + FT_Service_PsInfoRec cff_service_ps_info; + FT_Service_GlyphDictRec cff_service_glyph_dict; + FT_Service_PsFontNameRec cff_service_ps_name; + FT_Service_TTCMapsRec cff_service_get_cmap_info; + FT_Service_CIDRec cff_service_cid_info; + FT_Service_PropertiesRec cff_service_properties; + FT_CMap_ClassRec cff_cmap_encoding_class_rec; + FT_CMap_ClassRec cff_cmap_unicode_class_rec; + } CffModulePIC; -#define GET_PIC(lib) ((CffModulePIC*)((lib)->pic_container.cff)) -#define FT_CFF_SERVICE_PS_INFO_GET (GET_PIC(library)->cff_service_ps_info) -#define FT_CFF_SERVICE_GLYPH_DICT_GET (GET_PIC(library)->cff_service_glyph_dict) -#define FT_CFF_SERVICE_PS_NAME_GET (GET_PIC(library)->cff_service_ps_name) -#define FT_CFF_SERVICE_GET_CMAP_INFO_GET (GET_PIC(library)->cff_service_get_cmap_info) -#define FT_CFF_SERVICE_CID_INFO_GET (GET_PIC(library)->cff_service_cid_info) -#define FT_CFF_SERVICES_GET (GET_PIC(library)->cff_services) -#define FT_CFF_CMAP_ENCODING_CLASS_REC_GET (GET_PIC(library)->cff_cmap_encoding_class_rec) -#define FT_CFF_CMAP_UNICODE_CLASS_REC_GET (GET_PIC(library)->cff_cmap_unicode_class_rec) -#define FT_CFF_FIELD_HANDLERS_GET (GET_PIC(library)->cff_field_handlers) + +#define GET_PIC( lib ) \ + ( (CffModulePIC*)( (lib)->pic_container.cff ) ) + +#define CFF_SERVICE_PS_INFO_GET \ + ( GET_PIC( library )->cff_service_ps_info ) +#define CFF_SERVICE_GLYPH_DICT_GET \ + ( GET_PIC( library )->cff_service_glyph_dict ) +#define CFF_SERVICE_PS_NAME_GET \ + ( GET_PIC( library )->cff_service_ps_name ) +#define CFF_SERVICE_GET_CMAP_INFO_GET \ + ( GET_PIC( library )->cff_service_get_cmap_info ) +#define CFF_SERVICE_CID_INFO_GET \ + ( GET_PIC( library )->cff_service_cid_info ) +#define CFF_SERVICE_PROPERTIES_GET \ + ( GET_PIC( library )->cff_service_properties ) +#define CFF_SERVICES_GET \ + ( GET_PIC( library )->cff_services ) +#define CFF_CMAP_ENCODING_CLASS_REC_GET \ + ( GET_PIC( library )->cff_cmap_encoding_class_rec ) +#define CFF_CMAP_UNICODE_CLASS_REC_GET \ + ( GET_PIC( library )->cff_cmap_unicode_class_rec ) +#define CFF_FIELD_HANDLERS_GET \ + ( GET_PIC( library )->cff_field_handlers ) /* see cffpic.c for the implementation */ void diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h index 7c99036..8727446 100644 --- a/src/cff/cfftypes.h +++ b/src/cff/cfftypes.h @@ -5,7 +5,7 @@ /* Basic OpenType/CFF type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2003, 2006-2008, 2010-2011 by */ +/* Copyright 1996-2003, 2006-2008, 2010-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -270,6 +270,9 @@ FT_BEGIN_HEADER FT_String* registry; FT_String* ordering; + /* since version 2.4.12 */ + FT_Generic cf2_instance; + } CFF_FontRec, *CFF_Font; diff --git a/src/cff/rules.mk b/src/cff/rules.mk index ca7aa5d..13115c2 100644 --- a/src/cff/rules.mk +++ b/src/cff/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2003, 2011 by +# Copyright 1996-2001, 2003, 2011, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -29,14 +29,27 @@ CFF_DRV_SRC := $(CFF_DIR)/cffcmap.c \ $(CFF_DIR)/cffload.c \ $(CFF_DIR)/cffobjs.c \ $(CFF_DIR)/cffparse.c \ - $(CFF_DIR)/cffpic.c + $(CFF_DIR)/cffpic.c \ + $(CFF_DIR)/cf2arrst.c \ + $(CFF_DIR)/cf2blues.c \ + $(CFF_DIR)/cf2error.c \ + $(CFF_DIR)/cf2font.c \ + $(CFF_DIR)/cf2ft.c \ + $(CFF_DIR)/cf2hints.c \ + $(CFF_DIR)/cf2intrp.c \ + $(CFF_DIR)/cf2read.c \ + $(CFF_DIR)/cf2stack.c + # CFF driver headers # CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \ $(CFF_DIR)/cfferrs.h \ $(CFF_DIR)/cfftoken.h \ - $(CFF_DIR)/cfftypes.h + $(CFF_DIR)/cfftypes.h \ + $(CFF_DIR)/cf2fixed.h \ + $(CFF_DIR)/cf2glue.h \ + $(CFF_DIR)/cf2types.h # CFF driver object(s) diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c index bd84023..7febab8 100644 --- a/src/cid/cidgload.c +++ b/src/cid/cidgload.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 Glyph Loader (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */ +/* Copyright 1996-2007, 2009, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -46,7 +46,7 @@ FT_Byte* p; FT_UInt fd_select; FT_Stream stream = face->cid_stream; - FT_Error error = CID_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* charstring = 0; FT_Memory memory = face->root.memory; FT_ULong glyph_length = 0; @@ -58,7 +58,7 @@ #endif - FT_TRACE4(( "cid_load_glyph: glyph index %d\n", glyph_index )); + FT_TRACE1(( "cid_load_glyph: glyph index %d\n", glyph_index )); #ifdef FT_CONFIG_OPTION_INCREMENTAL @@ -117,7 +117,7 @@ if ( fd_select >= (FT_UInt)cid->num_dicts ) { - error = CID_Err_Invalid_Offset; + error = FT_THROW( Invalid_Offset ); goto Exit; } if ( glyph_length == 0 ) @@ -258,7 +258,7 @@ psaux->t1_decoder_funcs->done( &decoder ); - return CID_Err_Ok; + return FT_Err_Ok; } @@ -284,7 +284,7 @@ if ( glyph_index >= (FT_UInt)face->root.num_glyphs ) { - error = CID_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } diff --git a/src/cid/cidload.c b/src/cid/cidload.c index 3b840b7..1cda0ee 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 font loader (body). */ /* */ -/* Copyright 1996-2006, 2009, 2011-2012 by */ +/* Copyright 1996-2006, 2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -42,7 +42,7 @@ cid_get_offset( FT_Byte* *start, FT_Byte offsize ) { - FT_Long result; + FT_ULong result; FT_Byte* p = *start; @@ -53,7 +53,7 @@ } *start = p; - return result; + return (FT_Long)result; } @@ -114,7 +114,7 @@ { FT_ERROR(( "cid_load_keyword: invalid use of `%s'\n", keyword->ident )); - error = CID_Err_Syntax_Error; + error = FT_THROW( Syntax_Error ); goto Exit; } @@ -150,8 +150,6 @@ cid_parse_font_matrix( CID_Face face, CID_Parser* parser ) { - FT_Matrix* matrix; - FT_Vector* offset; CID_FaceDict dict; FT_Face root = (FT_Face)&face->root; FT_Fixed temp[6]; @@ -160,19 +158,33 @@ if ( parser->num_dict >= 0 && parser->num_dict < face->cid.num_dicts ) { + FT_Matrix* matrix; + FT_Vector* offset; + FT_Int result; + + dict = face->cid.font_dicts + parser->num_dict; matrix = &dict->font_matrix; offset = &dict->font_offset; - (void)cid_parser_to_fixed_array( parser, 6, temp, 3 ); + result = cid_parser_to_fixed_array( parser, 6, temp, 3 ); + + if ( result < 6 ) + return FT_THROW( Invalid_File_Format ); temp_scale = FT_ABS( temp[3] ); - /* Set units per EM based on FontMatrix values. We set the value to */ - /* `1000/temp_scale', because temp_scale was already multiplied by */ - /* 1000 (in `t1_tofixed', from psobjs.c). */ - root->units_per_EM = (FT_UShort)( FT_DivFix( 0x10000L, - FT_DivFix( temp_scale, 1000 ) ) ); + if ( temp_scale == 0 ) + { + FT_ERROR(( "cid_parse_font_matrix: invalid font matrix\n" )); + return FT_THROW( Invalid_File_Format ); + } + + /* Set Units per EM based on FontMatrix values. We set the value to */ + /* 1000 / temp_scale, because temp_scale was already multiplied by */ + /* 1000 (in t1_tofixed, from psobjs.c). */ + + root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale ); /* we need to scale the values by 1.0/temp[3] */ if ( temp_scale != 0x10000L ) @@ -182,7 +194,7 @@ temp[2] = FT_DivFix( temp[2], temp_scale ); temp[4] = FT_DivFix( temp[4], temp_scale ); temp[5] = FT_DivFix( temp[5], temp_scale ); - temp[3] = 0x10000L; + temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L; } matrix->xx = temp[0]; @@ -195,8 +207,7 @@ offset->y = temp[5] >> 16; } - return CID_Err_Ok; /* this is a callback function; */ - /* we must return an error code */ + return FT_Err_Ok; } @@ -206,7 +217,7 @@ { CID_FaceInfo cid = &face->cid; FT_Memory memory = face->root.memory; - FT_Error error = CID_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Long num_dicts; @@ -257,7 +268,7 @@ dict->private_dict.expansion_factor = dict->expansion_factor; } - return CID_Err_Ok; + return FT_Err_Ok; } @@ -286,7 +297,7 @@ parser->root.cursor = base; parser->root.limit = base + size; - parser->root.error = CID_Err_Ok; + parser->root.error = FT_Err_Ok; { FT_Byte* cur = base; @@ -416,7 +427,7 @@ /* Check for possible overflow. */ if ( num_subrs == FT_UINT_MAX ) { - error = CID_Err_Syntax_Error; + error = FT_THROW( Syntax_Error ); goto Fail; } @@ -428,7 +439,7 @@ if ( new_max <= max_offsets ) { - error = CID_Err_Syntax_Error; + error = FT_THROW( Syntax_Error ); goto Fail; } @@ -571,7 +582,7 @@ if ( size == 0 ) { - error = CID_Err_Syntax_Error; + error = FT_THROW( Syntax_Error ); goto Exit; } @@ -604,7 +615,7 @@ } else { - error = CID_Err_Syntax_Error; + error = FT_THROW( Syntax_Error ); goto Exit; } @@ -624,7 +635,7 @@ p++; } - error = CID_Err_Ok; + error = FT_Err_Ok; Exit: return error; diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c index cc2a200..5932ffa 100644 --- a/src/cid/cidobjs.c +++ b/src/cid/cidobjs.c @@ -4,7 +4,7 @@ /* */ /* CID objects manager (body). */ /* */ -/* Copyright 1996-2006, 2008, 2010-2011 by */ +/* Copyright 1996-2006, 2008, 2010-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -131,7 +131,7 @@ cid_size_init( FT_Size cidsize ) /* CID_Size */ { CID_Size size = (CID_Size)cidsize; - FT_Error error = CID_Err_Ok; + FT_Error error = FT_Err_Ok; PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size ); @@ -169,7 +169,7 @@ size->metrics.y_scale, 0, 0 ); - return CID_Err_Ok; + return FT_Err_Ok; } @@ -302,7 +302,7 @@ if ( !psaux ) { FT_ERROR(( "cid_face_init: cannot access `psaux' module\n" )); - error = CID_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -337,7 +337,7 @@ if ( face_index != 0 ) { FT_ERROR(( "cid_face_init: invalid face index\n" )); - error = CID_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -355,9 +355,10 @@ cidface->num_charmaps = 0; cidface->face_index = face_index; - cidface->face_flags = FT_FACE_FLAG_SCALABLE | /* scalable outlines */ - FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ - FT_FACE_FLAG_HINTER; /* has native hinter */ + + cidface->face_flags |= FT_FACE_FLAG_SCALABLE | /* scalable outlines */ + FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ + FT_FACE_FLAG_HINTER; /* has native hinter */ if ( info->is_fixed_pitch ) cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH; @@ -466,7 +467,7 @@ { FT_UNUSED( driver ); - return CID_Err_Ok; + return FT_Err_Ok; } diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c index 4d21160..d8476cd 100644 --- a/src/cid/cidparse.c +++ b/src/cid/cidparse.c @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ +/* Copyright 1996-2007, 2009, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -74,7 +74,7 @@ "%!PS-Adobe-3.0 Resource-CIDFont", 31 ) ) { FT_TRACE2(( " not a CID-keyed font\n" )); - error = CID_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); } FT_FRAME_EXIT(); @@ -99,7 +99,7 @@ if ( stream_len == 0 ) { FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" )); - error = CID_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -117,12 +117,12 @@ if ( p[0] == 'S' && ft_strncmp( (char*)p, "StartData", 9 ) == 0 ) { /* save offset of binary data after `StartData' */ - offset += p - buffer + 10; + offset += (FT_ULong)( p - buffer + 10 ); goto Found; } else if ( p[1] == 's' && ft_strncmp( (char*)p, "/sfnts", 6 ) == 0 ) { - offset += p - buffer + 7; + offset += (FT_ULong)( p - buffer + 7 ); goto Found; } } @@ -178,14 +178,12 @@ if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 ) parser->binary_length = ft_atol( (const char *)arg2 ); - limit = parser->root.limit; - cur = parser->root.cursor; goto Exit; } else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 ) { FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" )); - error = CID_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } diff --git a/src/cid/cidparse.h b/src/cid/cidparse.h index ca37dea..f27be65 100644 --- a/src/cid/cidparse.h +++ b/src/cid/cidparse.h @@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 parser (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004 by */ +/* Copyright 1996-2004, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -92,26 +92,26 @@ FT_BEGIN_HEADER /* */ /*************************************************************************/ -#define cid_parser_skip_spaces( p ) \ +#define cid_parser_skip_spaces( p ) \ (p)->root.funcs.skip_spaces( &(p)->root ) -#define cid_parser_skip_PS_token( p ) \ +#define cid_parser_skip_PS_token( p ) \ (p)->root.funcs.skip_PS_token( &(p)->root ) -#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root ) -#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t ) +#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root ) +#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t ) -#define cid_parser_to_coord_array( p, m, c ) \ +#define cid_parser_to_coord_array( p, m, c ) \ (p)->root.funcs.to_coord_array( &(p)->root, m, c ) -#define cid_parser_to_fixed_array( p, m, f, t ) \ +#define cid_parser_to_fixed_array( p, m, f, t ) \ (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t ) -#define cid_parser_to_token( p, t ) \ +#define cid_parser_to_token( p, t ) \ (p)->root.funcs.to_token( &(p)->root, t ) -#define cid_parser_to_token_array( p, t, m, c ) \ +#define cid_parser_to_token_array( p, t, m, c ) \ (p)->root.funcs.to_token_array( &(p)->root, t, m, c ) -#define cid_parser_load_field( p, f, o ) \ +#define cid_parser_load_field( p, f, o ) \ (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 ) -#define cid_parser_load_field_table( p, f, o ) \ +#define cid_parser_load_field_table( p, f, o ) \ (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 ) diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c index 694070a..6132a27 100644 --- a/src/cid/cidriver.c +++ b/src/cid/cidriver.c @@ -4,7 +4,7 @@ /* */ /* CID driver interface (body). */ /* */ -/* Copyright 1996-2004, 2006, 2008, 2009, 2011 by */ +/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -74,7 +74,7 @@ { *afont_info = ((CID_Face)face)->cid.font_info; - return CID_Err_Ok; + return FT_Err_Ok; } static FT_Error @@ -83,7 +83,7 @@ { *afont_extra = ((CID_Face)face)->font_extra; - return CID_Err_Ok; + return FT_Err_Ok; } static const FT_Service_PsInfoRec cid_service_ps_info = @@ -118,7 +118,7 @@ if ( supplement ) *supplement = cid->supplement; - return CID_Err_Ok; + return FT_Err_Ok; } @@ -126,7 +126,7 @@ cid_get_is_cid( CID_Face face, FT_Bool *is_cid ) { - FT_Error error = CID_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( face ); @@ -142,7 +142,7 @@ FT_UInt glyph_index, FT_UInt *cid ) { - FT_Error error = CID_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( face ); @@ -221,11 +221,6 @@ cid_slot_init, cid_slot_done, -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif - cid_slot_load_glyph, 0, /* FT_Face_GetKerningFunc */ diff --git a/src/gxvalid/gxvbsln.c b/src/gxvalid/gxvbsln.c index 3d10031..d165118 100644 --- a/src/gxvalid/gxvbsln.c +++ b/src/gxvalid/gxvbsln.c @@ -72,10 +72,10 @@ static void gxv_bsln_LookupValue_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_UShort v = value_p->u; - FT_UShort* ctlPoints; + FT_UShort v = value_p->u; + FT_UShort* ctlPoints; FT_UNUSED( glyph ); @@ -124,7 +124,7 @@ gxv_bsln_LookupFmt4_transit( FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p; FT_Bytes limit; @@ -135,7 +135,7 @@ offset = (FT_UShort)( base_value_p->u + ( relative_gindex * sizeof ( FT_UShort ) ) ); - p = valid->lookuptbl_head + offset; + p = gxvalid->lookuptbl_head + offset; limit = lookuptbl_limit; GXV_LIMIT_CHECK( 2 ); @@ -148,7 +148,7 @@ static void gxv_bsln_parts_fmt0_validate( FT_Bytes tables, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = tables; @@ -158,7 +158,7 @@ /* deltas */ GXV_LIMIT_CHECK( 2 * GXV_BSLN_VALUE_COUNT ); - valid->table_data = NULL; /* No ctlPoints here. */ + gxvalid->table_data = NULL; /* No ctlPoints here. */ GXV_EXIT; } @@ -167,7 +167,7 @@ static void gxv_bsln_parts_fmt1_validate( FT_Bytes tables, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = tables; @@ -175,15 +175,15 @@ GXV_NAME_ENTER( "parts format 1" ); /* deltas */ - gxv_bsln_parts_fmt0_validate( p, limit, valid ); + gxv_bsln_parts_fmt0_validate( p, limit, gxvalid ); /* mappingData */ - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_bsln_LookupValue_validate; - valid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_bsln_LookupValue_validate; + gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit; gxv_LookupTable_validate( p + 2 * GXV_BSLN_VALUE_COUNT, limit, - valid ); + gxvalid ); GXV_EXIT; } @@ -192,7 +192,7 @@ static void gxv_bsln_parts_fmt2_validate( FT_Bytes tables, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = tables; @@ -211,7 +211,7 @@ stdGlyph = FT_NEXT_USHORT( p ); GXV_TRACE(( " (stdGlyph = %u)\n", stdGlyph )); - gxv_glyphid_validate( stdGlyph, valid ); + gxv_glyphid_validate( stdGlyph, gxvalid ); /* Record the position of ctlPoints */ GXV_BSLN_DATA( ctlPoints_p ) = p; @@ -226,7 +226,7 @@ FT_INVALID_DATA; } else - gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, valid ); + gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, gxvalid ); } GXV_EXIT; @@ -236,7 +236,7 @@ static void gxv_bsln_parts_fmt3_validate( FT_Bytes tables, FT_Bytes limit, - GXV_Validator valid) + GXV_Validator gxvalid) { FT_Bytes p = tables; @@ -244,15 +244,15 @@ GXV_NAME_ENTER( "parts format 3" ); /* stdGlyph + ctlPoints */ - gxv_bsln_parts_fmt2_validate( p, limit, valid ); + gxv_bsln_parts_fmt2_validate( p, limit, gxvalid ); /* mappingData */ - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_bsln_LookupValue_validate; - valid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_bsln_LookupValue_validate; + gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit; gxv_LookupTable_validate( p + ( 2 + 2 * GXV_BSLN_VALUE_COUNT ), limit, - valid ); + gxvalid ); GXV_EXIT; } @@ -271,8 +271,8 @@ FT_Face face, FT_Validator ftvalid ) { - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_bsln_DataRec bslnrec; GXV_bsln_Data bsln = &bslnrec; @@ -293,9 +293,9 @@ }; - valid->root = ftvalid; - valid->table_data = bsln; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = bsln; + gxvalid->face = face; FT_TRACE3(( "validating `bsln' table\n" )); GXV_INIT; @@ -320,7 +320,7 @@ bsln->defaultBaseline = defaultBaseline; - fmt_funcs_table[format]( p, limit, valid ); + fmt_funcs_table[format]( p, limit, gxvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c index 72efd6f..8e72a72 100644 --- a/src/gxvalid/gxvcommn.c +++ b/src/gxvalid/gxvcommn.c @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common tables validation (body). */ /* */ -/* Copyright 2004, 2005, 2009, 2010 */ +/* Copyright 2004, 2005, 2009, 2010, 2013 */ /* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -65,7 +65,7 @@ FT_UShort* buff, FT_UInt nmemb, FT_UShort limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UInt i; @@ -130,7 +130,7 @@ FT_ULong* buff, FT_UInt nmemb, FT_ULong limit, - GXV_Validator valid) + GXV_Validator gxvalid) { FT_UInt i; @@ -182,7 +182,7 @@ FT_Bytes limit, FT_Byte* min, FT_Byte* max, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -202,7 +202,7 @@ *max = (FT_Byte)FT_MAX( *max, val ); } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } @@ -211,7 +211,7 @@ FT_Bytes limit, FT_UShort* min, FT_UShort* max, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -231,7 +231,7 @@ *max = (FT_Byte)FT_MAX( *max, val ); } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } @@ -256,7 +256,7 @@ static void gxv_BinSrchHeader_check_consistency( GXV_BinSrchHeader* binSrchHeader, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort searchRange; FT_UShort entrySelector; @@ -329,7 +329,7 @@ FT_Bytes limit, FT_UShort* unitSize_p, FT_UShort* nUnits_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_BinSrchHeader binSrchHeader; @@ -359,7 +359,7 @@ binSrchHeader.rangeShift = FT_NEXT_USHORT( p ); GXV_TRACE(( "nUnits %d\n", binSrchHeader.nUnits )); - gxv_BinSrchHeader_check_consistency( &binSrchHeader, valid ); + gxv_BinSrchHeader_check_consistency( &binSrchHeader, gxvalid ); if ( *unitSize_p == 0 ) *unitSize_p = binSrchHeader.unitSize; @@ -367,7 +367,7 @@ if ( *nUnits_p == 0 ) *nUnits_p = binSrchHeader.nUnits; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -422,7 +422,7 @@ static void gxv_LookupTable_fmt0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort i; @@ -432,24 +432,24 @@ GXV_NAME_ENTER( "LookupTable format 0" ); - GXV_LIMIT_CHECK( 2 * valid->face->num_glyphs ); + GXV_LIMIT_CHECK( 2 * gxvalid->face->num_glyphs ); - for ( i = 0; i < valid->face->num_glyphs; i++ ) + for ( i = 0; i < gxvalid->face->num_glyphs; i++ ) { GXV_LIMIT_CHECK( 2 ); if ( p + 2 >= limit ) /* some fonts have too-short fmt0 array */ { GXV_TRACE(( "too short, glyphs %d - %d are missing\n", - i, valid->face->num_glyphs )); + i, gxvalid->face->num_glyphs )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); break; } - value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign ); - valid->lookupval_func( i, &value, valid ); + value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign ); + gxvalid->lookupval_func( i, &value, gxvalid ); } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -473,12 +473,12 @@ static void gxv_LookupTable_fmt2_skip_endmarkers( FT_Bytes table, FT_UShort unitSize, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; - while ( ( p + 4 ) < valid->root->limit ) + while ( ( p + 4 ) < gxvalid->root->limit ) { if ( p[0] != 0xFF || p[1] != 0xFF || /* lastGlyph */ p[2] != 0xFF || p[3] != 0xFF ) /* firstGlyph */ @@ -486,14 +486,14 @@ p += unitSize; } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_LookupTable_fmt2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort gid; @@ -509,8 +509,8 @@ GXV_NAME_ENTER( "LookupTable format 2" ); unitSize = nUnits = 0; - gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid ); - p += valid->subtable_length; + gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid ); + p += gxvalid->subtable_length; GXV_UNITSIZE_VALIDATE( "format2", unitSize, nUnits, 6 ); @@ -519,10 +519,10 @@ GXV_LIMIT_CHECK( 2 + 2 + 2 ); lastGlyph = FT_NEXT_USHORT( p ); firstGlyph = FT_NEXT_USHORT( p ); - value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign ); + value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign ); - gxv_glyphid_validate( firstGlyph, valid ); - gxv_glyphid_validate( lastGlyph, valid ); + gxv_glyphid_validate( firstGlyph, gxvalid ); + gxv_glyphid_validate( lastGlyph, gxvalid ); if ( lastGlyph < gid ) { @@ -539,7 +539,7 @@ unit, lastGlyph, firstGlyph )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); - if ( valid->root->level == FT_VALIDATE_TIGHT ) + if ( gxvalid->root->level == FT_VALIDATE_TIGHT ) continue; /* ftxvalidator silently skips such an entry */ FT_TRACE4(( "continuing with exchanged values\n" )); @@ -549,13 +549,13 @@ } for ( gid = firstGlyph; gid <= lastGlyph; gid++ ) - valid->lookupval_func( gid, &value, valid ); + gxvalid->lookupval_func( gid, &value, gxvalid ); } - gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid ); - p += valid->subtable_length; + gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid ); + p += gxvalid->subtable_length; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -564,7 +564,7 @@ static void gxv_LookupTable_fmt4_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort unit; @@ -581,8 +581,8 @@ GXV_NAME_ENTER( "LookupTable format 4" ); unitSize = nUnits = 0; - gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid ); - p += valid->subtable_length; + gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid ); + p += gxvalid->subtable_length; GXV_UNITSIZE_VALIDATE( "format4", unitSize, nUnits, 6 ); @@ -592,8 +592,8 @@ lastGlyph = FT_NEXT_USHORT( p ); firstGlyph = FT_NEXT_USHORT( p ); - gxv_glyphid_validate( firstGlyph, valid ); - gxv_glyphid_validate( lastGlyph, valid ); + gxv_glyphid_validate( firstGlyph, gxvalid ); + gxv_glyphid_validate( lastGlyph, gxvalid ); if ( lastGlyph < gid ) { @@ -610,7 +610,7 @@ unit, lastGlyph, firstGlyph )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); - if ( valid->root->level == FT_VALIDATE_TIGHT ) + if ( gxvalid->root->level == FT_VALIDATE_TIGHT ) continue; /* ftxvalidator silently skips such an entry */ FT_TRACE4(( "continuing with exchanged values\n" )); @@ -624,19 +624,19 @@ for ( gid = firstGlyph; gid <= lastGlyph; gid++ ) { - value = valid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ), + value = gxvalid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ), &base_value, limit, - valid ); + gxvalid ); - valid->lookupval_func( gid, &value, valid ); + gxvalid->lookupval_func( gid, &value, gxvalid ); } } - gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid ); - p += valid->subtable_length; + gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid ); + p += gxvalid->subtable_length; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -645,26 +645,26 @@ static void gxv_LookupTable_fmt6_skip_endmarkers( FT_Bytes table, FT_UShort unitSize, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; - while ( p < valid->root->limit ) + while ( p < gxvalid->root->limit ) { if ( p[0] != 0xFF || p[1] != 0xFF ) break; p += unitSize; } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_LookupTable_fmt6_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort unit; @@ -679,8 +679,8 @@ GXV_NAME_ENTER( "LookupTable format 6" ); unitSize = nUnits = 0; - gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid ); - p += valid->subtable_length; + gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid ); + p += gxvalid->subtable_length; GXV_UNITSIZE_VALIDATE( "format6", unitSize, nUnits, 4 ); @@ -688,9 +688,9 @@ { GXV_LIMIT_CHECK( 2 + 2 ); glyph = FT_NEXT_USHORT( p ); - value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign ); + value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign ); - if ( gxv_glyphid_validate( glyph, valid ) ) + if ( gxv_glyphid_validate( glyph, gxvalid ) ) GXV_TRACE(( " endmarker found within defined range" " (entry %d < nUnits=%d)\n", unit, nUnits )); @@ -703,13 +703,13 @@ } prev_glyph = glyph; - valid->lookupval_func( glyph, &value, valid ); + gxvalid->lookupval_func( glyph, &value, gxvalid ); } - gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, valid ); - p += valid->subtable_length; + gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, gxvalid ); + p += gxvalid->subtable_length; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -718,7 +718,7 @@ static void gxv_LookupTable_fmt8_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort i; @@ -735,18 +735,18 @@ firstGlyph = FT_NEXT_USHORT( p ); glyphCount = FT_NEXT_USHORT( p ); - gxv_glyphid_validate( firstGlyph, valid ); - gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), valid ); + gxv_glyphid_validate( firstGlyph, gxvalid ); + gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), gxvalid ); /* valueArray */ for ( i = 0; i < glyphCount; i++ ) { GXV_LIMIT_CHECK( 2 ); - value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign ); - valid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, valid ); + value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign ); + gxvalid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, gxvalid ); } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -754,7 +754,7 @@ FT_LOCAL_DEF( void ) gxv_LookupTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort format; @@ -778,7 +778,7 @@ GXV_NAME_ENTER( "LookupTable" ); /* lookuptbl_head may be used in fmt4 transit function. */ - valid->lookuptbl_head = table; + gxvalid->lookuptbl_head = table; /* format */ GXV_LIMIT_CHECK( 2 ); @@ -792,10 +792,10 @@ if ( func == NULL ) FT_INVALID_FORMAT; - func( p, limit, valid ); - p += valid->subtable_length; + func( p, limit, gxvalid ); + p += gxvalid->subtable_length; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -811,7 +811,7 @@ FT_LOCAL_DEF( FT_Int ) gxv_glyphid_validate( FT_UShort gid, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Face face; @@ -822,7 +822,7 @@ return 1; } - face = valid->face; + face = gxvalid->face; if ( face->num_glyphs < gid ) { GXV_TRACE(( " gxv_glyphid_check() gid overflow: num_glyphs %d < %d\n", @@ -845,7 +845,7 @@ FT_LOCAL_DEF( void ) gxv_ctlPoint_validate( FT_UShort gid, FT_Short ctl_point, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Face face; FT_Error error; @@ -855,7 +855,7 @@ short n_points; - face = valid->face; + face = gxvalid->face; error = FT_Load_Glyph( face, gid, @@ -885,7 +885,7 @@ gxv_sfntName_validate( FT_UShort name_index, FT_UShort min_index, FT_UShort max_index, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_SfntName name; FT_UInt i; @@ -897,10 +897,10 @@ if ( name_index < min_index || max_index < name_index ) FT_INVALID_FORMAT; - nnames = FT_Get_Sfnt_Name_Count( valid->face ); + nnames = FT_Get_Sfnt_Name_Count( gxvalid->face ); for ( i = 0; i < nnames; i++ ) { - if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != GXV_Err_Ok ) + if ( FT_Get_Sfnt_Name( gxvalid->face, i, &name ) != FT_Err_Ok ) continue ; if ( name.name_id == name_index ) @@ -944,7 +944,7 @@ FT_UShort* length_p, FT_UShort stateSize, FT_Byte* maxClassID_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_Bytes limit = table + *length_p; @@ -965,7 +965,7 @@ if ( !nGlyphs ) goto Out; - gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), valid ); + gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), gxvalid ); { FT_Byte nGlyphInClass[256]; @@ -1022,9 +1022,9 @@ FT_UShort stateSize, FT_Byte* maxState_p, FT_Byte* maxEntry_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_Bytes p = table; + FT_Bytes p = table; FT_Bytes limit = table + *length_p; FT_Byte clazz; FT_Byte entry; @@ -1076,7 +1076,7 @@ FT_Byte maxClassID, FT_Bytes statetable_table, FT_Bytes statetable_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_Bytes limit = table + *length_p; @@ -1166,13 +1166,13 @@ goto Exit; } - if ( NULL != valid->statetable.entry_validate_func ) - valid->statetable.entry_validate_func( state, - flags, - &glyphOffset, - statetable_table, - statetable_limit, - valid ); + if ( NULL != gxvalid->statetable.entry_validate_func ) + gxvalid->statetable.entry_validate_func( state, + flags, + &glyphOffset, + statetable_table, + statetable_limit, + gxvalid ); } Exit: @@ -1192,7 +1192,7 @@ FT_UShort* classTable_length_p, FT_UShort* stateArray_length_p, FT_UShort* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort o[3]; FT_UShort* l[3]; @@ -1206,14 +1206,14 @@ l[1] = stateArray_length_p; l[2] = entryTable_length_p; - gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, valid ); + gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, gxvalid ); } FT_LOCAL_DEF( void ) gxv_StateTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort stateSize; FT_UShort classTable; /* offset to Class(Sub)Table */ @@ -1250,11 +1250,11 @@ if ( stateSize > 0xFF ) FT_INVALID_DATA; - if ( valid->statetable.optdata_load_func != NULL ) - valid->statetable.optdata_load_func( p, limit, valid ); + if ( gxvalid->statetable.optdata_load_func != NULL ) + gxvalid->statetable.optdata_load_func( p, limit, gxvalid ); - if ( valid->statetable.subtable_setup_func != NULL) - setup_func = valid->statetable.subtable_setup_func; + if ( gxvalid->statetable.subtable_setup_func != NULL) + setup_func = gxvalid->statetable.subtable_setup_func; else setup_func = gxv_StateTable_subtable_setup; @@ -1265,7 +1265,7 @@ &classTable_length, &stateArray_length, &entryTable_length, - valid ); + gxvalid ); GXV_TRACE(( "StateTable Subtables\n" )); @@ -1274,7 +1274,7 @@ &classTable_length, stateSize, &maxClassID, - valid ); + gxvalid ); else maxClassID = (FT_Byte)( stateSize - 1 ); @@ -1285,10 +1285,12 @@ stateSize, &maxState, &maxEntry, - valid ); + gxvalid ); else { +#if 0 maxState = 1; /* 0:start of text, 1:start of line are predefined */ +#endif maxEntry = 0; } @@ -1304,7 +1306,7 @@ maxClassID, table, limit, - valid ); + gxvalid ); GXV_EXIT; } @@ -1320,7 +1322,7 @@ FT_ULong* classTable_length_p, FT_ULong* stateArray_length_p, FT_ULong* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_ULong o[3]; FT_ULong* l[3]; @@ -1334,21 +1336,21 @@ l[1] = stateArray_length_p; l[2] = entryTable_length_p; - gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, valid ); + gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, gxvalid ); } static void gxv_XClassTable_lookupval_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UNUSED( glyph ); - if ( value_p->u >= valid->xstatetable.nClasses ) + if ( value_p->u >= gxvalid->xstatetable.nClasses ) FT_INVALID_DATA; - if ( value_p->u > valid->xstatetable.maxClassID ) - valid->xstatetable.maxClassID = value_p->u; + if ( value_p->u > gxvalid->xstatetable.maxClassID ) + gxvalid->xstatetable.maxClassID = value_p->u; } @@ -1382,7 +1384,7 @@ gxv_XClassTable_lookupfmt4_transit( FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p; FT_Bytes limit; @@ -1393,7 +1395,7 @@ offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); - p = valid->lookuptbl_head + offset; + p = gxvalid->lookuptbl_head + offset; limit = lookuptbl_limit; GXV_LIMIT_CHECK ( 2 ); @@ -1410,7 +1412,7 @@ FT_ULong stateSize, FT_UShort* maxState_p, FT_UShort* maxEntry_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_Bytes limit = table + *length_p; @@ -1461,7 +1463,7 @@ FT_UShort maxClassID, FT_Bytes xstatetable_table, FT_Bytes xstatetable_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_Bytes limit = table + *length_p; @@ -1538,13 +1540,13 @@ goto Exit; } - if ( NULL != valid->xstatetable.entry_validate_func ) - valid->xstatetable.entry_validate_func( state, - flags, - &glyphOffset, - xstatetable_table, - xstatetable_limit, - valid ); + if ( NULL != gxvalid->xstatetable.entry_validate_func ) + gxvalid->xstatetable.entry_validate_func( state, + flags, + &glyphOffset, + xstatetable_table, + xstatetable_limit, + gxvalid ); } Exit: @@ -1557,7 +1559,7 @@ FT_LOCAL_DEF( void ) gxv_XStateTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* StateHeader members */ FT_ULong classTable; /* offset to Class(Sub)Table */ @@ -1580,26 +1582,26 @@ GXV_TRACE(( "XStateTable header\n" )); GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 ); - valid->xstatetable.nClasses = FT_NEXT_ULONG( p ); + gxvalid->xstatetable.nClasses = FT_NEXT_ULONG( p ); classTable = FT_NEXT_ULONG( p ); stateArray = FT_NEXT_ULONG( p ); entryTable = FT_NEXT_ULONG( p ); - GXV_TRACE(( "nClasses =0x%08x\n", valid->xstatetable.nClasses )); + GXV_TRACE(( "nClasses =0x%08x\n", gxvalid->xstatetable.nClasses )); GXV_TRACE(( "offset to classTable=0x%08x\n", classTable )); GXV_TRACE(( "offset to stateArray=0x%08x\n", stateArray )); GXV_TRACE(( "offset to entryTable=0x%08x\n", entryTable )); - if ( valid->xstatetable.nClasses > 0xFFFFU ) + if ( gxvalid->xstatetable.nClasses > 0xFFFFU ) FT_INVALID_DATA; GXV_TRACE(( "StateTable Subtables\n" )); - if ( valid->xstatetable.optdata_load_func != NULL ) - valid->xstatetable.optdata_load_func( p, limit, valid ); + if ( gxvalid->xstatetable.optdata_load_func != NULL ) + gxvalid->xstatetable.optdata_load_func( p, limit, gxvalid ); - if ( valid->xstatetable.subtable_setup_func != NULL ) - setup_func = valid->xstatetable.subtable_setup_func; + if ( gxvalid->xstatetable.subtable_setup_func != NULL ) + setup_func = gxvalid->xstatetable.subtable_setup_func; else setup_func = gxv_XStateTable_subtable_setup; @@ -1610,38 +1612,42 @@ &classTable_length, &stateArray_length, &entryTable_length, - valid ); + gxvalid ); if ( classTable != 0 ) { - valid->xstatetable.maxClassID = 0; - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_XClassTable_lookupval_validate; - valid->lookupfmt4_trans = gxv_XClassTable_lookupfmt4_transit; + gxvalid->xstatetable.maxClassID = 0; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_XClassTable_lookupval_validate; + gxvalid->lookupfmt4_trans = gxv_XClassTable_lookupfmt4_transit; gxv_LookupTable_validate( table + classTable, table + classTable + classTable_length, - valid ); - if ( valid->subtable_length < classTable_length ) - classTable_length = valid->subtable_length; + gxvalid ); +#if 0 + if ( gxvalid->subtable_length < classTable_length ) + classTable_length = gxvalid->subtable_length; +#endif } else { /* XXX: check range? */ - valid->xstatetable.maxClassID = - (FT_UShort)( valid->xstatetable.nClasses - 1 ); + gxvalid->xstatetable.maxClassID = + (FT_UShort)( gxvalid->xstatetable.nClasses - 1 ); } if ( stateArray != 0 ) gxv_XStateArray_validate( table + stateArray, &stateArray_length, - valid->xstatetable.maxClassID, - valid->xstatetable.nClasses, + gxvalid->xstatetable.maxClassID, + gxvalid->xstatetable.nClasses, &maxState, &maxEntry, - valid ); + gxvalid ); else { +#if 0 maxState = 1; /* 0:start of text, 1:start of line are predefined */ +#endif maxEntry = 0; } @@ -1653,10 +1659,10 @@ &entryTable_length, maxEntry, stateArray_length, - valid->xstatetable.maxClassID, + gxvalid->xstatetable.maxClassID, table, limit, - valid ); + gxvalid ); GXV_EXIT; } @@ -1713,7 +1719,7 @@ FT_LOCAL_DEF( void ) gxv_odtect_validate( GXV_odtect_Range odtect, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UInt i, j; @@ -1727,6 +1733,7 @@ odtect->range[j].start, odtect->range[j].length ) ) { +#ifdef FT_DEBUG_LEVEL_TRACE if ( odtect->range[i].name || odtect->range[j].name ) GXV_TRACE(( "found overlap between range %d and range %d\n", i, j )); @@ -1734,6 +1741,7 @@ GXV_TRACE(( "found overlap between `%s' and `%s\'\n", odtect->range[i].name, odtect->range[j].name )); +#endif FT_INVALID_OFFSET; } diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h index 1ff87e4..f114345 100644 --- a/src/gxvalid/gxvcommn.h +++ b/src/gxvalid/gxvcommn.h @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common tables validation (specification). */ /* */ -/* Copyright 2004, 2005, 2012 */ +/* Copyright 2004, 2005, 2012, 2014 */ /* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -62,7 +62,7 @@ FT_BEGIN_HEADER #undef GXV_LOAD_UNUSED_VARS /* debug purpose */ -#define IS_PARANOID_VALIDATION ( valid->root->level >= FT_VALIDATE_PARANOID ) +#define IS_PARANOID_VALIDATION ( gxvalid->root->level >= FT_VALIDATE_PARANOID ) #define GXV_SET_ERR_IF_PARANOID( err ) { if ( IS_PARANOID_VALIDATION ) ( err ); } /*************************************************************************/ @@ -81,7 +81,7 @@ FT_BEGIN_HEADER typedef void (*GXV_Validate_Func)( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); /* ====================== LookupTable Validator ======================== */ @@ -106,13 +106,13 @@ FT_BEGIN_HEADER typedef void (*GXV_Lookup_Value_Validate_Func)( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ); + GXV_Validator gxvalid ); typedef GXV_LookupValueDesc (*GXV_Lookup_Fmt4_Transit_Func)( FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); /* ====================== StateTable Validator ========================= */ @@ -131,10 +131,10 @@ FT_BEGIN_HEADER #define GXV_GLYPHOFFSET_FMT( table ) \ - ( valid->table.entry_glyphoffset_fmt ) + ( gxvalid->table.entry_glyphoffset_fmt ) #define GXV_GLYPHOFFSET_SIZE( table ) \ - ( valid->table.entry_glyphoffset_fmt / 2 ) + ( gxvalid->table.entry_glyphoffset_fmt / 2 ) /* ----------------------- 16bit StateTable ---------------------------- */ @@ -160,7 +160,7 @@ FT_BEGIN_HEADER FT_UShort* classTable_length_p, FT_UShort* stateArray_length_p, FT_UShort* entryTable_length_p, - GXV_Validator valid ); + GXV_Validator gxvalid ); typedef void (*GXV_StateTable_Entry_Validate_Func)( @@ -169,12 +169,12 @@ FT_BEGIN_HEADER GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes statetable_table, FT_Bytes statetable_limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); typedef void (*GXV_StateTable_OptData_Load_Func)( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); typedef struct GXV_StateTable_ValidatorRec_ { @@ -202,7 +202,7 @@ FT_BEGIN_HEADER FT_ULong* classTable_length_p, FT_ULong* stateArray_length_p, FT_ULong* entryTable_length_p, - GXV_Validator valid ); + GXV_Validator gxvalid ); typedef void (*GXV_XStateTable_Entry_Validate_Func)( @@ -211,7 +211,7 @@ FT_BEGIN_HEADER GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes xstatetable_table, FT_Bytes xstatetable_limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); typedef GXV_StateTable_OptData_Load_Func GXV_XStateTable_OptData_Load_Func; @@ -263,35 +263,35 @@ FT_BEGIN_HEADER #define GXV_TABLE_DATA( tag, field ) \ - ( ( (GXV_ ## tag ## _Data)valid->table_data )->field ) + ( ( (GXV_ ## tag ## _Data)gxvalid->table_data )->field ) #undef FT_INVALID_ -#define FT_INVALID_( _prefix, _error ) \ - ft_validator_error( valid->root, _prefix ## _error ) +#define FT_INVALID_( _error ) \ + ft_validator_error( gxvalid->root, FT_THROW( _error ) ) #define GXV_LIMIT_CHECK( _count ) \ FT_BEGIN_STMNT \ - if ( p + _count > ( limit? limit : valid->root->limit ) ) \ + if ( p + _count > ( limit? limit : gxvalid->root->limit ) ) \ FT_INVALID_TOO_SHORT; \ FT_END_STMNT #ifdef FT_DEBUG_LEVEL_TRACE -#define GXV_INIT valid->debug_indent = 0 +#define GXV_INIT gxvalid->debug_indent = 0 #define GXV_NAME_ENTER( name ) \ FT_BEGIN_STMNT \ - valid->debug_indent += 2; \ - FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ + gxvalid->debug_indent += 2; \ + FT_TRACE4(( "%*.s", gxvalid->debug_indent, 0 )); \ FT_TRACE4(( "%s table\n", name )); \ FT_END_STMNT -#define GXV_EXIT valid->debug_indent -= 2 +#define GXV_EXIT gxvalid->debug_indent -= 2 #define GXV_TRACE( s ) \ FT_BEGIN_STMNT \ - FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ + FT_TRACE4(( "%*.s", gxvalid->debug_indent, 0 )); \ FT_TRACE4( s ); \ FT_END_STMNT @@ -318,7 +318,7 @@ FT_BEGIN_HEADER FT_BEGIN_STMNT \ { \ if ( (a) & 3 ) \ - FT_INVALID_OFFSET ; \ + FT_INVALID_OFFSET; \ } \ FT_END_STMNT @@ -349,7 +349,7 @@ FT_BEGIN_HEADER \ \ for ( b = p; b < (FT_Bytes)p + len; b++ ) \ - if ( 0x40 < *b && *b < 0x7e ) \ + if ( 0x40 < *b && *b < 0x7E ) \ FT_TRACE1(("%c", *b)) ; \ else \ FT_TRACE1(("\\x%02x", *b)) ; \ @@ -373,12 +373,12 @@ FT_BEGIN_HEADER FT_Bytes limit, FT_UShort* unitSize_p, FT_UShort* nUnits_p, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_LookupTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); /*************************************************************************/ @@ -391,7 +391,7 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Int ) gxv_glyphid_validate( FT_UShort gid, - GXV_Validator valid ); + GXV_Validator gxvalid ); /*************************************************************************/ @@ -405,7 +405,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) gxv_ctlPoint_validate( FT_UShort gid, FT_Short ctl_point, - GXV_Validator valid ); + GXV_Validator gxvalid ); /*************************************************************************/ @@ -420,7 +420,7 @@ FT_BEGIN_HEADER gxv_sfntName_validate( FT_UShort name_index, FT_UShort min_index, FT_UShort max_index, - GXV_Validator valid ); + GXV_Validator gxvalid ); /*************************************************************************/ @@ -439,7 +439,7 @@ FT_BEGIN_HEADER FT_UShort* classTable_length_p, FT_UShort* stateArray_length_p, FT_UShort* entryTable_length_p, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_XStateTable_subtable_setup( FT_ULong table_size, @@ -449,17 +449,17 @@ FT_BEGIN_HEADER FT_ULong* classTable_length_p, FT_ULong* stateArray_length_p, FT_ULong* entryTable_length_p, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_StateTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_XStateTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); /*************************************************************************/ @@ -475,14 +475,14 @@ FT_BEGIN_HEADER FT_Bytes limit, FT_Byte* min, FT_Byte* max, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_array_getlimits_ushort( FT_Bytes table, FT_Bytes limit, FT_UShort* min, FT_UShort* max, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_set_length_by_ushort_offset( FT_UShort* offset, @@ -490,7 +490,7 @@ FT_BEGIN_HEADER FT_UShort* buff, FT_UInt nmemb, FT_UShort limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_set_length_by_ulong_offset( FT_ULong* offset, @@ -498,19 +498,19 @@ FT_BEGIN_HEADER FT_ULong* buff, FT_UInt nmemb, FT_ULong limit, - GXV_Validator valid); + GXV_Validator gxvalid); #define GXV_SUBTABLE_OFFSET_CHECK( _offset ) \ FT_BEGIN_STMNT \ - if ( (_offset) > valid->subtable_length ) \ + if ( (_offset) > gxvalid->subtable_length ) \ FT_INVALID_OFFSET; \ FT_END_STMNT #define GXV_SUBTABLE_LIMIT_CHECK( _count ) \ FT_BEGIN_STMNT \ - if ( ( p + (_count) - valid->subtable_start ) > \ - valid->subtable_length ) \ + if ( ( p + (_count) - gxvalid->subtable_start ) > \ + gxvalid->subtable_length ) \ FT_INVALID_TOO_SHORT; \ FT_END_STMNT @@ -556,7 +556,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) gxv_odtect_validate( GXV_odtect_Range odtect, - GXV_Validator valid ); + GXV_Validator gxvalid ); #define GXV_ODTECT( n, odtect ) \ diff --git a/src/gxvalid/gxverror.h b/src/gxvalid/gxverror.h index 7d2ef78..c573b72 100644 --- a/src/gxvalid/gxverror.h +++ b/src/gxvalid/gxverror.h @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT validation module error codes (specification only). */ /* */ -/* Copyright 2004, 2005, 2012 */ +/* Copyright 2004, 2005, 2012-2013 */ /* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -41,9 +41,7 @@ #undef FT_ERR_PREFIX #define FT_ERR_PREFIX GXV_Err_ -#define FT_ERR_BASE FT_Mod_Err_GXV - -#define FT_KEEP_ERR_PREFIX +#define FT_ERR_BASE FT_Mod_Err_GXvalid #include FT_ERRORS_H diff --git a/src/gxvalid/gxvfeat.c b/src/gxvalid/gxvfeat.c index 6f75650..69298b2 100644 --- a/src/gxvalid/gxvfeat.c +++ b/src/gxvalid/gxvfeat.c @@ -82,7 +82,7 @@ gxv_feat_registry_validate( FT_UShort feature, FT_UShort nSettings, FT_Bool exclusive, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_NAME_ENTER( "feature in registry" ); @@ -108,7 +108,7 @@ { /* Don't use here. Apple is reserved. */ GXV_TRACE(( "feature number %d is reserved by Apple\n", feature )); - if ( valid->root->level >= FT_VALIDATE_TIGHT ) + if ( gxvalid->root->level >= FT_VALIDATE_TIGHT ) FT_INVALID_DATA; } @@ -117,7 +117,7 @@ GXV_TRACE(( "feature %d: nSettings %d != defined nSettings %d\n", feature, nSettings, gxv_feat_registry[feature].nSettings )); - if ( valid->root->level >= FT_VALIDATE_TIGHT ) + if ( gxvalid->root->level >= FT_VALIDATE_TIGHT ) FT_INVALID_DATA; } @@ -125,7 +125,7 @@ { GXV_TRACE(( "exclusive flag %d differs from predefined value\n", exclusive )); - if ( valid->root->level >= FT_VALIDATE_TIGHT ) + if ( gxvalid->root->level >= FT_VALIDATE_TIGHT ) FT_INVALID_DATA; } @@ -137,7 +137,7 @@ static void gxv_feat_name_index_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -153,7 +153,7 @@ gxv_sfntName_validate( (FT_UShort)nameIndex, 255, 32768U, - valid ); + gxvalid ); GXV_EXIT; } @@ -163,7 +163,7 @@ gxv_feat_setting_validate( FT_Bytes table, FT_Bytes limit, FT_Bool exclusive, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort setting; @@ -179,7 +179,7 @@ if ( exclusive && ( setting & 1 ) == 0 ) FT_INVALID_DATA; - gxv_feat_name_index_validate( p, limit, valid ); + gxv_feat_name_index_validate( p, limit, gxvalid ); GXV_FEAT_DATA( setting ) = setting; @@ -190,7 +190,7 @@ static void gxv_feat_name_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UInt reserved_size = GXV_FEAT_DATA( reserved_size ); @@ -240,14 +240,14 @@ FT_INVALID_FORMAT; } - gxv_feat_registry_validate( feature, nSettings, exclusive, valid ); + gxv_feat_registry_validate( feature, nSettings, exclusive, gxvalid ); - gxv_feat_name_index_validate( p, limit, valid ); + gxv_feat_name_index_validate( p, limit, gxvalid ); - p = valid->root->base + settingTable; + p = gxvalid->root->base + settingTable; for ( last_setting = -1, i = 0; i < nSettings; i++ ) { - gxv_feat_setting_validate( p, limit, exclusive, valid ); + gxv_feat_setting_validate( p, limit, exclusive, gxvalid ); if ( (FT_Int)GXV_FEAT_DATA( setting ) <= last_setting ) GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT ); @@ -274,8 +274,8 @@ FT_Face face, FT_Validator ftvalid ) { - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_feat_DataRec featrec; GXV_feat_Data feat = &featrec; @@ -289,9 +289,9 @@ FT_Int last_feature; - valid->root = ftvalid; - valid->table_data = feat; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = feat; + gxvalid->face = face; FT_TRACE3(( "validating `feat' table\n" )); GXV_INIT; @@ -323,7 +323,7 @@ for ( last_feature = -1, i = 0; i < featureNameCount; i++ ) { - gxv_feat_name_validate( p, limit, valid ); + gxv_feat_name_validate( p, limit, gxvalid ); if ( (FT_Int)GXV_FEAT_DATA( feature ) <= last_feature ) GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT ); diff --git a/src/gxvalid/gxvjust.c b/src/gxvalid/gxvjust.c index 7816e0b..24c26a5 100644 --- a/src/gxvalid/gxvjust.c +++ b/src/gxvalid/gxvjust.c @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT just table validation (body). */ /* */ -/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ +/* Copyright 2005, 2014 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -69,14 +69,14 @@ static void gxv_just_check_max_gid( FT_UShort gid, const FT_String* msg_tag, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - if ( gid < valid->face->num_glyphs ) + if ( gid < gxvalid->face->num_glyphs ) return; GXV_TRACE(( "just table includes too large %s" " GID=%d > %d (in maxp)\n", - msg_tag, gid, valid->face->num_glyphs )); + msg_tag, gid, gxvalid->face->num_glyphs )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); } @@ -84,7 +84,7 @@ static void gxv_just_wdp_entry_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_ULong justClass; @@ -112,7 +112,7 @@ #endif /* According to Apple spec, only 7bits in justClass is used */ - if ( ( justClass & 0xFFFFFF80 ) != 0 ) + if ( ( justClass & 0xFFFFFF80UL ) != 0 ) { GXV_TRACE(( "just table includes non-zero value" " in unused justClass higher bits" @@ -120,14 +120,14 @@ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA ); } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_just_wdc_entry_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_ULong count, i; @@ -138,18 +138,18 @@ for ( i = 0; i < count; i++ ) { GXV_TRACE(( "validating wdc pair %d/%d\n", i + 1, count )); - gxv_just_wdp_entry_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_just_wdp_entry_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_just_widthDeltaClusters_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table ; FT_Bytes wdc_end = table + GXV_JUST_DATA( wdc_offset_max ); @@ -163,11 +163,11 @@ for ( i = 0; p <= wdc_end; i++ ) { - gxv_just_wdc_entry_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_just_wdc_entry_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -176,7 +176,7 @@ static void gxv_just_actSubrecord_type0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -214,17 +214,17 @@ GXV_LIMIT_CHECK( 2 ); glyphs = FT_NEXT_USHORT( p ); - gxv_just_check_max_gid( glyphs, "type0:glyphs", valid ); + gxv_just_check_max_gid( glyphs, "type0:glyphs", gxvalid ); } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_just_actSubrecord_type1_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort addGlyph; @@ -233,20 +233,20 @@ GXV_LIMIT_CHECK( 2 ); addGlyph = FT_NEXT_USHORT( p ); - gxv_just_check_max_gid( addGlyph, "type1:addGlyph", valid ); + gxv_just_check_max_gid( addGlyph, "type1:addGlyph", gxvalid ); - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_just_actSubrecord_type2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; #ifdef GXV_LOAD_UNUSED_VARS - FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */ + FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */ #endif FT_UShort addGlyph; FT_UShort substGlyph; @@ -262,18 +262,18 @@ substGlyph = FT_NEXT_USHORT( p ); if ( addGlyph != 0xFFFF ) - gxv_just_check_max_gid( addGlyph, "type2:addGlyph", valid ); + gxv_just_check_max_gid( addGlyph, "type2:addGlyph", gxvalid ); - gxv_just_check_max_gid( substGlyph, "type2:substGlyph", valid ); + gxv_just_check_max_gid( substGlyph, "type2:substGlyph", gxvalid ); - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } static void gxv_just_actSubrecord_type4_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_ULong variantsAxis; @@ -288,9 +288,9 @@ noStretchValue = FT_NEXT_ULONG( p ); maximumLimit = FT_NEXT_ULONG( p ); - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; - if ( variantsAxis != 0x64756374 ) /* 'duct' */ + if ( variantsAxis != 0x64756374L ) /* 'duct' */ GXV_TRACE(( "variantsAxis 0x%08x is non default value", variantsAxis )); @@ -310,7 +310,7 @@ static void gxv_just_actSubrecord_type5_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort flags; @@ -324,9 +324,9 @@ if ( flags ) GXV_TRACE(( "type5: nonzero value 0x%04x in unused flags\n", flags )); - gxv_just_check_max_gid( glyph, "type5:glyph", valid ); + gxv_just_check_max_gid( glyph, "type5:glyph", gxvalid ); - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; } @@ -334,7 +334,7 @@ static void gxv_just_actSubrecord_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort actionClass; @@ -354,21 +354,21 @@ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA ); if ( actionType == 0 ) - gxv_just_actSubrecord_type0_validate( p, limit, valid ); + gxv_just_actSubrecord_type0_validate( p, limit, gxvalid ); else if ( actionType == 1 ) - gxv_just_actSubrecord_type1_validate( p, limit, valid ); + gxv_just_actSubrecord_type1_validate( p, limit, gxvalid ); else if ( actionType == 2 ) - gxv_just_actSubrecord_type2_validate( p, limit, valid ); + gxv_just_actSubrecord_type2_validate( p, limit, gxvalid ); else if ( actionType == 3 ) ; /* Stretch glyph action: no actionData */ else if ( actionType == 4 ) - gxv_just_actSubrecord_type4_validate( p, limit, valid ); + gxv_just_actSubrecord_type4_validate( p, limit, gxvalid ); else if ( actionType == 5 ) - gxv_just_actSubrecord_type5_validate( p, limit, valid ); + gxv_just_actSubrecord_type5_validate( p, limit, gxvalid ); else FT_INVALID_DATA; - valid->subtable_length = actionLength; + gxvalid->subtable_length = actionLength; GXV_EXIT; } @@ -377,7 +377,7 @@ static void gxv_just_pcActionRecord_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_ULong actionCount; @@ -390,11 +390,11 @@ for ( i = 0; i < actionCount; i++ ) { - gxv_just_actSubrecord_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_just_actSubrecord_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -403,7 +403,7 @@ static void gxv_just_pcTable_LookupValue_entry_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UNUSED( glyph ); @@ -417,19 +417,19 @@ static void gxv_just_pcLookupTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_Bytes p = table; + FT_Bytes p = table; GXV_NAME_ENTER( "just pcLookupTable" ); GXV_JUST_DATA( pc_offset_max ) = 0x0000; GXV_JUST_DATA( pc_offset_min ) = 0xFFFFU; - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate; - gxv_LookupTable_validate( p, limit, valid ); + gxv_LookupTable_validate( p, limit, gxvalid ); /* subtable_length is set by gxv_LookupTable_validate() */ @@ -440,20 +440,20 @@ static void gxv_just_postcompTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_NAME_ENTER( "just postcompTable" ); - gxv_just_pcLookupTable_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_just_pcLookupTable_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; - gxv_just_pcActionRecord_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_just_pcActionRecord_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -466,7 +466,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS /* TODO: validate markClass & currentClass */ @@ -480,7 +480,7 @@ FT_UNUSED( glyphOffset_p ); FT_UNUSED( table ); FT_UNUSED( limit ); - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); #ifndef GXV_LOAD_UNUSED_VARS FT_UNUSED( flags ); @@ -496,7 +496,7 @@ static void gxv_just_justClassTable_validate ( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort length; @@ -521,14 +521,14 @@ GXV_TRACE(( " justClassTable: nonzero value (0x%08x)" " in unused subFeatureFlags\n", subFeatureFlags )); - valid->statetable.optdata = NULL; - valid->statetable.optdata_load_func = NULL; - valid->statetable.subtable_setup_func = NULL; - valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; - valid->statetable.entry_validate_func = + gxvalid->statetable.optdata = NULL; + gxvalid->statetable.optdata_load_func = NULL; + gxvalid->statetable.subtable_setup_func = NULL; + gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; + gxvalid->statetable.entry_validate_func = gxv_just_classTable_entry_validate; - gxv_StateTable_validate( p, table + length, valid ); + gxv_StateTable_validate( p, table + length, gxvalid ); /* subtable_length is set by gxv_LookupTable_validate() */ @@ -539,7 +539,7 @@ static void gxv_just_wdcTable_LookupValue_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UNUSED( glyph ); @@ -553,7 +553,7 @@ static void gxv_just_justData_lookuptable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -561,10 +561,10 @@ GXV_JUST_DATA( wdc_offset_max ) = 0x0000; GXV_JUST_DATA( wdc_offset_min ) = 0xFFFFU; - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_just_wdcTable_LookupValue_validate; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_just_wdcTable_LookupValue_validate; - gxv_LookupTable_validate( p, limit, valid ); + gxv_LookupTable_validate( p, limit, gxvalid ); /* subtable_length is set by gxv_LookupTable_validate() */ @@ -578,7 +578,7 @@ static void gxv_just_justData_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* * following 3 offsets are measured from the start of `just' @@ -604,36 +604,36 @@ GXV_TRACE(( " (wdcTableOffset = 0x%04x)\n", wdcTableOffset )); GXV_TRACE(( " (pcTableOffset = 0x%04x)\n", pcTableOffset )); - gxv_just_justData_lookuptable_validate( p, limit, valid ); - gxv_odtect_add_range( p, valid->subtable_length, + gxv_just_justData_lookuptable_validate( p, limit, gxvalid ); + gxv_odtect_add_range( p, gxvalid->subtable_length, "just_LookupTable", odtect ); if ( wdcTableOffset ) { gxv_just_widthDeltaClusters_validate( - valid->root->base + wdcTableOffset, limit, valid ); - gxv_odtect_add_range( valid->root->base + wdcTableOffset, - valid->subtable_length, "just_wdcTable", odtect ); + gxvalid->root->base + wdcTableOffset, limit, gxvalid ); + gxv_odtect_add_range( gxvalid->root->base + wdcTableOffset, + gxvalid->subtable_length, "just_wdcTable", odtect ); } if ( pcTableOffset ) { - gxv_just_postcompTable_validate( valid->root->base + pcTableOffset, - limit, valid ); - gxv_odtect_add_range( valid->root->base + pcTableOffset, - valid->subtable_length, "just_pcTable", odtect ); + gxv_just_postcompTable_validate( gxvalid->root->base + pcTableOffset, + limit, gxvalid ); + gxv_odtect_add_range( gxvalid->root->base + pcTableOffset, + gxvalid->subtable_length, "just_pcTable", odtect ); } if ( justClassTableOffset ) { gxv_just_justClassTable_validate( - valid->root->base + justClassTableOffset, limit, valid ); - gxv_odtect_add_range( valid->root->base + justClassTableOffset, - valid->subtable_length, "just_justClassTable", + gxvalid->root->base + justClassTableOffset, limit, gxvalid ); + gxv_odtect_add_range( gxvalid->root->base + justClassTableOffset, + gxvalid->subtable_length, "just_justClassTable", odtect ); } - gxv_odtect_validate( odtect, valid ); + gxv_odtect_validate( odtect, gxvalid ); GXV_EXIT; } @@ -647,8 +647,8 @@ FT_Bytes p = table; FT_Bytes limit = 0; - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_just_DataRec justrec; GXV_just_Data just = &justrec; @@ -662,14 +662,14 @@ GXV_ODTECT_INIT( odtect ); - valid->root = ftvalid; - valid->table_data = just; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = just; + gxvalid->face = face; FT_TRACE3(( "validating `just' table\n" )); GXV_INIT; - limit = valid->root->limit; + limit = gxvalid->root->limit; GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 ); version = FT_NEXT_ULONG( p ); @@ -696,19 +696,19 @@ /* validate justData */ if ( 0 < horizOffset ) { - gxv_just_justData_validate( table + horizOffset, limit, valid ); - gxv_odtect_add_range( table + horizOffset, valid->subtable_length, + gxv_just_justData_validate( table + horizOffset, limit, gxvalid ); + gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length, "horizJustData", odtect ); } if ( 0 < vertOffset ) { - gxv_just_justData_validate( table + vertOffset, limit, valid ); - gxv_odtect_add_range( table + vertOffset, valid->subtable_length, + gxv_just_justData_validate( table + vertOffset, limit, gxvalid ); + gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length, "vertJustData", odtect ); } - gxv_odtect_validate( odtect, valid ); + gxv_odtect_validate( odtect, gxvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/gxvalid/gxvkern.c b/src/gxvalid/gxvkern.c index 0ec978f..787e3db 100644 --- a/src/gxvalid/gxvkern.c +++ b/src/gxvalid/gxvkern.c @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT kern table validation (body). */ /* */ -/* Copyright 2004, 2005, 2006, 2007 */ +/* Copyright 2004-2007, 2013 */ /* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -79,20 +79,20 @@ #define GXV_KERN_DATA( field ) GXV_TABLE_DATA( kern, field ) -#define KERN_IS_CLASSIC( valid ) \ +#define KERN_IS_CLASSIC( gxvalid ) \ ( KERN_VERSION_CLASSIC == GXV_KERN_DATA( version ) ) -#define KERN_IS_NEW( valid ) \ +#define KERN_IS_NEW( gxvalid ) \ ( KERN_VERSION_NEW == GXV_KERN_DATA( version ) ) -#define KERN_DIALECT( valid ) \ +#define KERN_DIALECT( gxvalid ) \ GXV_KERN_DATA( dialect_request ) -#define KERN_ALLOWS_MS( valid ) \ - ( KERN_DIALECT( valid ) & KERN_DIALECT_MS ) -#define KERN_ALLOWS_APPLE( valid ) \ - ( KERN_DIALECT( valid ) & KERN_DIALECT_APPLE ) +#define KERN_ALLOWS_MS( gxvalid ) \ + ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_MS ) +#define KERN_ALLOWS_APPLE( gxvalid ) \ + ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_APPLE ) -#define GXV_KERN_HEADER_SIZE ( KERN_IS_NEW( valid ) ? 8 : 4 ) -#define GXV_KERN_SUBTABLE_HEADER_SIZE ( KERN_IS_NEW( valid ) ? 8 : 6 ) +#define GXV_KERN_HEADER_SIZE ( KERN_IS_NEW( gxvalid ) ? 8 : 4 ) +#define GXV_KERN_SUBTABLE_HEADER_SIZE ( KERN_IS_NEW( gxvalid ) ? 8 : 6 ) /*************************************************************************/ @@ -110,7 +110,7 @@ gxv_kern_subtable_fmt0_pairs_validate( FT_Bytes table, FT_Bytes limit, FT_UShort nPairs, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort i; @@ -134,11 +134,11 @@ /* left */ gid_left = FT_NEXT_USHORT( p ); - gxv_glyphid_validate( gid_left, valid ); + gxv_glyphid_validate( gid_left, gxvalid ); /* right */ gid_right = FT_NEXT_USHORT( p ); - gxv_glyphid_validate( gid_right, valid ); + gxv_glyphid_validate( gid_right, gxvalid ); /* Pairs of left and right GIDs must be unique and sorted. */ GXV_TRACE(( "left gid = %u, right gid = %u\n", gid_left, gid_right )); @@ -171,7 +171,7 @@ static void gxv_kern_subtable_fmt0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table + GXV_KERN_SUBTABLE_HEADER_SIZE; @@ -186,10 +186,10 @@ /* nPairs, searchRange, entrySelector, rangeShift */ GXV_LIMIT_CHECK( 2 + 2 + 2 + 2 ); - gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, valid ); + gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, gxvalid ); p += 2 + 2 + 2 + 2; - gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, valid ); + gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, gxvalid ); GXV_EXIT; } @@ -209,11 +209,11 @@ static void gxv_kern_subtable_fmt1_valueTable_load( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_kern_fmt1_StateOptRecData optdata = - (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata; + (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata; GXV_LIMIT_CHECK( 2 ); @@ -232,14 +232,14 @@ FT_UShort* classTable_length_p, FT_UShort* stateArray_length_p, FT_UShort* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort o[4]; FT_UShort *l[4]; FT_UShort buff[5]; GXV_kern_fmt1_StateOptRecData optdata = - (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata; + (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata; o[0] = classTable; @@ -251,7 +251,7 @@ l[2] = entryTable_length_p; l[3] = &(optdata->valueTable_length); - gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, valid ); + gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid ); } @@ -265,7 +265,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_UShort push; @@ -289,7 +289,7 @@ { GXV_kern_fmt1_StateOptRecData vt_rec = - (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata; + (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata; FT_Bytes p; @@ -303,8 +303,6 @@ #ifdef GXV_LOAD_UNUSED_VARS kernAction = FT_NEXT_USHORT( p ); kernValue = FT_NEXT_USHORT( p ); -#else - p += 4; #endif } } @@ -313,7 +311,7 @@ static void gxv_kern_subtable_fmt1_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_kern_fmt1_StateOptRec vt_rec; @@ -321,18 +319,18 @@ GXV_NAME_ENTER( "kern subtable format 1" ); - valid->statetable.optdata = + gxvalid->statetable.optdata = &vt_rec; - valid->statetable.optdata_load_func = + gxvalid->statetable.optdata_load_func = gxv_kern_subtable_fmt1_valueTable_load; - valid->statetable.subtable_setup_func = + gxvalid->statetable.subtable_setup_func = gxv_kern_subtable_fmt1_subtable_setup; - valid->statetable.entry_glyphoffset_fmt = + gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; - valid->statetable.entry_validate_func = + gxvalid->statetable.entry_validate_func = gxv_kern_subtable_fmt1_entry_validate; - gxv_StateTable_validate( p, limit, valid ); + gxv_StateTable_validate( p, limit, gxvalid ); GXV_EXIT; } @@ -375,7 +373,7 @@ gxv_kern_subtable_fmt2_clstbl_validate( FT_Bytes table, FT_Bytes limit, GXV_kern_ClassSpec spec, - GXV_Validator valid ) + GXV_Validator gxvalid ) { const FT_String* tag = GXV_KERN_FMT2_DATA( class_tag[spec] ); GXV_odtect_Range odtect = GXV_KERN_FMT2_DATA( odtect ); @@ -393,13 +391,13 @@ GXV_TRACE(( " %s firstGlyph=%d, nGlyphs=%d\n", tag, firstGlyph, nGlyphs )); - gxv_glyphid_validate( firstGlyph, valid ); - gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), valid ); + gxv_glyphid_validate( firstGlyph, gxvalid ); + gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), gxvalid ); gxv_array_getlimits_ushort( p, p + ( 2 * nGlyphs ), &( GXV_KERN_FMT2_DATA( offset_min[spec] ) ), &( GXV_KERN_FMT2_DATA( offset_max[spec] ) ), - valid ); + gxvalid ); gxv_odtect_add_range( table, 2 * nGlyphs, tag, odtect ); @@ -410,7 +408,7 @@ static void gxv_kern_subtable_fmt2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_ODTECT( 3, odtect ); GXV_kern_subtable_fmt2_DataRec fmt2_rec = @@ -441,10 +439,10 @@ GXV_LIMIT_CHECK( GXV_KERN_FMT2_DATA( array ) ); gxv_kern_subtable_fmt2_clstbl_validate( table + leftOffsetTable, limit, - GXV_KERN_CLS_L, valid ); + GXV_KERN_CLS_L, gxvalid ); gxv_kern_subtable_fmt2_clstbl_validate( table + rightOffsetTable, limit, - GXV_KERN_CLS_R, valid ); + GXV_KERN_CLS_R, gxvalid ); if ( GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_L] ) + GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_R] ) @@ -457,7 +455,7 @@ - GXV_KERN_FMT2_DATA( array ), "array", odtect ); - gxv_odtect_validate( odtect, valid ); + gxv_odtect_validate( odtect, gxvalid ); GXV_EXIT; } @@ -468,7 +466,7 @@ static void gxv_kern_subtable_fmt3_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table + GXV_KERN_SUBTABLE_HEADER_SIZE; FT_UShort glyphCount; @@ -487,10 +485,10 @@ rightClassCount = FT_NEXT_BYTE( p ); flags = FT_NEXT_BYTE( p ); - if ( valid->face->num_glyphs != glyphCount ) + if ( gxvalid->face->num_glyphs != glyphCount ) { GXV_TRACE(( "maxGID=%d, but glyphCount=%d\n", - valid->face->num_glyphs, glyphCount )); + gxvalid->face->num_glyphs, glyphCount )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); } @@ -511,8 +509,8 @@ GXV_LIMIT_CHECK( glyphCount ); - gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, valid ); - p += valid->subtable_length; + gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid ); + p += gxvalid->subtable_length; if ( leftClassCount < max ) FT_INVALID_DATA; @@ -526,8 +524,8 @@ GXV_LIMIT_CHECK( glyphCount ); - gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, valid ); - p += valid->subtable_length; + gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid ); + p += gxvalid->subtable_length; if ( rightClassCount < max ) FT_INVALID_DATA; @@ -551,7 +549,7 @@ } } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -560,7 +558,7 @@ static FT_Bool gxv_kern_coverage_new_apple_validate( FT_UShort coverage, FT_UShort* format, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* new Apple-dialect */ #ifdef GXV_LOAD_TRACE_VARS @@ -569,7 +567,7 @@ FT_Bool kernVariation; #endif - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); /* reserved bits = 0 */ @@ -597,7 +595,7 @@ static FT_Bool gxv_kern_coverage_classic_apple_validate( FT_UShort coverage, FT_UShort* format, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* classic Apple-dialect */ #ifdef GXV_LOAD_TRACE_VARS @@ -607,7 +605,7 @@ /* check expected flags, but don't check if MS-dialect is impossible */ - if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( valid ) ) + if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( gxvalid ) ) return FALSE; /* reserved bits = 0 */ @@ -638,7 +636,7 @@ static FT_Bool gxv_kern_coverage_classic_microsoft_validate( FT_UShort coverage, FT_UShort* format, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* classic Microsoft-dialect */ #ifdef GXV_LOAD_TRACE_VARS @@ -648,7 +646,7 @@ FT_Bool override; #endif - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); /* reserved bits = 0 */ @@ -688,7 +686,7 @@ static GXV_kern_Dialect gxv_kern_coverage_validate( FT_UShort coverage, FT_UShort* format, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_kern_Dialect result = KERN_DIALECT_UNKNOWN; @@ -697,33 +695,33 @@ GXV_TRACE(( "interprete coverage 0x%04x by Apple style\n", coverage )); - if ( KERN_IS_NEW( valid ) ) + if ( KERN_IS_NEW( gxvalid ) ) { if ( gxv_kern_coverage_new_apple_validate( coverage, format, - valid ) ) + gxvalid ) ) { result = KERN_DIALECT_APPLE; goto Exit; } } - if ( KERN_IS_CLASSIC( valid ) && KERN_ALLOWS_APPLE( valid ) ) + if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_APPLE( gxvalid ) ) { if ( gxv_kern_coverage_classic_apple_validate( coverage, format, - valid ) ) + gxvalid ) ) { result = KERN_DIALECT_APPLE; goto Exit; } } - if ( KERN_IS_CLASSIC( valid ) && KERN_ALLOWS_MS( valid ) ) + if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_MS( gxvalid ) ) { if ( gxv_kern_coverage_classic_microsoft_validate( coverage, format, - valid ) ) + gxvalid ) ) { result = KERN_DIALECT_MS; goto Exit; @@ -741,7 +739,7 @@ static void gxv_kern_subtable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; #ifdef GXV_LOAD_TRACE_VARS @@ -763,7 +761,7 @@ u16[1] = FT_NEXT_USHORT( p ); /* Apple: length_lo MS: length */ coverage = FT_NEXT_USHORT( p ); - switch ( gxv_kern_coverage_validate( coverage, &format, valid ) ) + switch ( gxv_kern_coverage_validate( coverage, &format, gxvalid ) ) { case KERN_DIALECT_MS: #ifdef GXV_LOAD_TRACE_VARS @@ -787,7 +785,7 @@ #endif GXV_TRACE(( "Subtable length = %d\n", length )); - if ( KERN_IS_NEW( valid ) ) + if ( KERN_IS_NEW( gxvalid ) ) { GXV_LIMIT_CHECK( 2 ); #ifdef GXV_LOAD_TRACE_VARS @@ -808,18 +806,18 @@ /* formats 1, 2, 3 require the position of the start of this subtable */ if ( format == 0 ) - gxv_kern_subtable_fmt0_validate( table, table + length, valid ); + gxv_kern_subtable_fmt0_validate( table, table + length, gxvalid ); else if ( format == 1 ) - gxv_kern_subtable_fmt1_validate( table, table + length, valid ); + gxv_kern_subtable_fmt1_validate( table, table + length, gxvalid ); else if ( format == 2 ) - gxv_kern_subtable_fmt2_validate( table, table + length, valid ); + gxv_kern_subtable_fmt2_validate( table, table + length, gxvalid ); else if ( format == 3 ) - gxv_kern_subtable_fmt3_validate( table, table + length, valid ); + gxv_kern_subtable_fmt3_validate( table, table + length, gxvalid ); else FT_INVALID_DATA; Exit: - valid->subtable_length = length; + gxvalid->subtable_length = length; GXV_EXIT; } @@ -839,8 +837,8 @@ GXV_kern_Dialect dialect_request, FT_Validator ftvalid ) { - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_kern_DataRec kernrec; GXV_kern_Data kern = &kernrec; @@ -852,13 +850,13 @@ FT_UInt i; - valid->root = ftvalid; - valid->table_data = kern; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = kern; + gxvalid->face = face; FT_TRACE3(( "validating `kern' table\n" )); GXV_INIT; - KERN_DIALECT( valid ) = dialect_request; + KERN_DIALECT( gxvalid ) = dialect_request; GXV_LIMIT_CHECK( 2 ); GXV_KERN_DATA( version ) = (GXV_kern_Version)FT_NEXT_USHORT( p ); @@ -867,12 +865,12 @@ if ( 0x0001 < GXV_KERN_DATA( version ) ) FT_INVALID_FORMAT; - else if ( KERN_IS_CLASSIC( valid ) ) + else if ( KERN_IS_CLASSIC( gxvalid ) ) { GXV_LIMIT_CHECK( 2 ); nTables = FT_NEXT_USHORT( p ); } - else if ( KERN_IS_NEW( valid ) ) + else if ( KERN_IS_NEW( gxvalid ) ) { if ( classic_only ) FT_INVALID_FORMAT; @@ -888,8 +886,8 @@ { GXV_TRACE(( "validating subtable %d/%d\n", i, nTables )); /* p should be 32bit-aligned? */ - gxv_kern_subtable_validate( p, 0, valid ); - p += valid->subtable_length; + gxv_kern_subtable_validate( p, 0, gxvalid ); + p += gxvalid->subtable_length; } FT_TRACE4(( "\n" )); diff --git a/src/gxvalid/gxvlcar.c b/src/gxvalid/gxvlcar.c index f14fa5b..48308b0 100644 --- a/src/gxvalid/gxvlcar.c +++ b/src/gxvalid/gxvlcar.c @@ -67,14 +67,14 @@ static void gxv_lcar_partial_validate( FT_UShort partial, FT_UShort glyph, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_NAME_ENTER( "partial" ); if ( GXV_LCAR_DATA( format ) != 1 ) goto Exit; - gxv_ctlPoint_validate( glyph, partial, valid ); + gxv_ctlPoint_validate( glyph, partial, gxvalid ); Exit: GXV_EXIT; @@ -84,10 +84,10 @@ static void gxv_lcar_LookupValue_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_Bytes p = valid->root->base + value_p->u; - FT_Bytes limit = valid->root->limit; + FT_Bytes p = gxvalid->root->base + value_p->u; + FT_Bytes limit = gxvalid->root->limit; FT_UShort count; FT_Short partial; FT_UShort i; @@ -102,7 +102,7 @@ for ( i = 0; i < count; i++ ) { partial = FT_NEXT_SHORT( p ); - gxv_lcar_partial_validate( partial, glyph, valid ); + gxv_lcar_partial_validate( partial, glyph, gxvalid ); } GXV_EXIT; @@ -148,7 +148,7 @@ gxv_lcar_LookupFmt4_transit( FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p; FT_Bytes limit; @@ -160,8 +160,8 @@ /* XXX: check range? */ offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); - p = valid->root->base + offset; - limit = valid->root->limit; + p = gxvalid->root->base + offset; + limit = gxvalid->root->limit; GXV_LIMIT_CHECK ( 2 ); value.u = FT_NEXT_USHORT( p ); @@ -185,8 +185,8 @@ { FT_Bytes p = table; FT_Bytes limit = 0; - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_lcar_DataRec lcarrec; GXV_lcar_Data lcar = &lcarrec; @@ -194,9 +194,9 @@ FT_Fixed version; - valid->root = ftvalid; - valid->table_data = lcar; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = lcar; + gxvalid->face = face; FT_TRACE3(( "validating `lcar' table\n" )); GXV_INIT; @@ -211,10 +211,10 @@ if ( GXV_LCAR_DATA( format ) > 1 ) FT_INVALID_FORMAT; - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_lcar_LookupValue_validate; - valid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit; - gxv_LookupTable_validate( p, limit, valid ); + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_lcar_LookupValue_validate; + gxvalid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit; + gxv_LookupTable_validate( p, limit, gxvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/gxvalid/gxvmod.c b/src/gxvalid/gxvmod.c index 502fe5d..278d476 100644 --- a/src/gxvalid/gxvmod.c +++ b/src/gxvalid/gxvmod.c @@ -4,7 +4,7 @@ /* */ /* FreeType's TrueTypeGX/AAT validation module implementation (body). */ /* */ -/* Copyright 2004, 2005, 2006 */ +/* Copyright 2004-2006, 2013 */ /* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -58,8 +58,8 @@ error = FT_Load_Sfnt_Table( face, tag, 0, NULL, table_len ); - if ( error == GXV_Err_Table_Missing ) - return GXV_Err_Ok; + if ( FT_ERR_EQ( error, Table_Missing ) ) + return FT_Err_Ok; if ( error ) goto Exit; @@ -112,7 +112,7 @@ { FT_Memory volatile memory = FT_FACE_MEMORY( face ); - FT_Error error = GXV_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ValidatorRec volatile valid; FT_UInt i; @@ -200,7 +200,7 @@ /* without volatile on `error' GCC 4.1.1. emits: */ /* warning: variable 'error' might be clobbered by 'longjmp' or 'vfork' */ /* this warning seems spurious but --- */ - FT_Error volatile error = GXV_Err_Ok; + FT_Error volatile error; FT_ValidatorRec volatile valid; diff --git a/src/gxvalid/gxvmort.c b/src/gxvalid/gxvmort.c index 465462a..55ff5a8 100644 --- a/src/gxvalid/gxvmort.c +++ b/src/gxvalid/gxvmort.c @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT mort table validation (body). */ /* */ -/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ +/* Copyright 2005, 2013 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -40,7 +40,7 @@ static void gxv_mort_feature_validate( GXV_mort_feature f, - GXV_Validator valid ) + GXV_Validator gxvalid ) { if ( f->featureType >= gxv_feat_registry_length ) { @@ -89,7 +89,7 @@ gxv_mort_featurearray_validate( FT_Bytes table, FT_Bytes limit, FT_ULong nFeatureFlags, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_ULong i; @@ -106,23 +106,24 @@ f.enableFlags = FT_NEXT_ULONG( p ); f.disableFlags = FT_NEXT_ULONG( p ); - gxv_mort_feature_validate( &f, valid ); + gxv_mort_feature_validate( &f, gxvalid ); } if ( !IS_GXV_MORT_FEATURE_OFF( f ) ) FT_INVALID_DATA; - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } FT_LOCAL_DEF( void ) gxv_mort_coverage_validate( FT_UShort coverage, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); +#ifdef FT_DEBUG_LEVEL_TRACE if ( coverage & 0x8000U ) GXV_TRACE(( " this subtable is for vertical text only\n" )); else @@ -141,6 +142,7 @@ if ( coverage & 0x1FF8 ) GXV_TRACE(( " coverage has non-zero bits in reserved area\n" )); +#endif } @@ -148,7 +150,7 @@ gxv_mort_subtables_validate( FT_Bytes table, FT_Bytes limit, FT_UShort nSubtables, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -163,14 +165,15 @@ }; - GXV_Validate_Func func; - FT_UShort i; + FT_UShort i; GXV_NAME_ENTER( "subtables in a chain" ); for ( i = 0; i < nSubtables; i++ ) { + GXV_Validate_Func func; + FT_UShort length; FT_UShort coverage; #ifdef GXV_LOAD_UNUSED_VARS @@ -195,7 +198,7 @@ rest = length - ( 2 + 2 + 4 ); GXV_LIMIT_CHECK( rest ); - gxv_mort_coverage_validate( coverage, valid ); + gxv_mort_coverage_validate( coverage, gxvalid ); if ( type > 5 ) FT_INVALID_FORMAT; @@ -204,13 +207,13 @@ if ( func == NULL ) GXV_TRACE(( "morx type %d is reserved\n", type )); - func( p, p + rest, valid ); + func( p, p + rest, gxvalid ); p += rest; /* TODO: validate subFeatureFlags */ } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -219,7 +222,7 @@ static void gxv_mort_chain_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; #ifdef GXV_LOAD_UNUSED_VARS @@ -243,10 +246,10 @@ nSubtables = FT_NEXT_USHORT( p ); gxv_mort_featurearray_validate( p, table + chainLength, - nFeatureFlags, valid ); - p += valid->subtable_length; - gxv_mort_subtables_validate( p, table + chainLength, nSubtables, valid ); - valid->subtable_length = chainLength; + nFeatureFlags, gxvalid ); + p += gxvalid->subtable_length; + gxv_mort_subtables_validate( p, table + chainLength, nSubtables, gxvalid ); + gxvalid->subtable_length = chainLength; /* TODO: validate defaultFlags */ GXV_EXIT; @@ -258,8 +261,8 @@ FT_Face face, FT_Validator ftvalid ) { - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; FT_Bytes p = table; FT_Bytes limit = 0; FT_ULong version; @@ -267,9 +270,9 @@ FT_ULong i; - valid->root = ftvalid; - valid->face = face; - limit = valid->root->limit; + gxvalid->root = ftvalid; + gxvalid->face = face; + limit = gxvalid->root->limit; FT_TRACE3(( "validating `mort' table\n" )); GXV_INIT; @@ -285,8 +288,8 @@ { GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains )); GXV_32BIT_ALIGNMENT_VALIDATE( p - table ); - gxv_mort_chain_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_mort_chain_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; } FT_TRACE4(( "\n" )); diff --git a/src/gxvalid/gxvmort.h b/src/gxvalid/gxvmort.h index 1e5a1f5..8e62e52 100644 --- a/src/gxvalid/gxvmort.h +++ b/src/gxvalid/gxvmort.h @@ -55,36 +55,36 @@ gxv_mort_featurearray_validate( FT_Bytes table, FT_Bytes limit, FT_ULong nFeatureFlags, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_mort_coverage_validate( FT_UShort coverage, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_mort_subtable_type0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_mort_subtable_type1_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_mort_subtable_type2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_mort_subtable_type4_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_mort_subtable_type5_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); #endif /* __GXVMORT_H__ */ diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c index b136ced..f19016e 100644 --- a/src/gxvalid/gxvmort0.c +++ b/src/gxvalid/gxvmort0.c @@ -67,7 +67,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort markFirst; FT_UShort dontAdvance; @@ -125,7 +125,7 @@ FT_LOCAL_DEF( void ) gxv_mort_subtable_type0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -135,14 +135,14 @@ GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE ); - valid->statetable.optdata = NULL; - valid->statetable.optdata_load_func = NULL; - valid->statetable.subtable_setup_func = NULL; - valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; - valid->statetable.entry_validate_func = + gxvalid->statetable.optdata = NULL; + gxvalid->statetable.optdata_load_func = NULL; + gxvalid->statetable.subtable_setup_func = NULL; + gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; + gxvalid->statetable.entry_validate_func = gxv_mort_subtable_type0_entry_validate; - gxv_StateTable_validate( p, limit, valid ); + gxv_StateTable_validate( p, limit, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmort1.c b/src/gxvalid/gxvmort1.c index 1c17a5d..0189504 100644 --- a/src/gxvalid/gxvmort1.c +++ b/src/gxvalid/gxvmort1.c @@ -53,12 +53,12 @@ static void gxv_mort_subtable_type1_substitutionTable_load( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_mort_subtable_type1_StateOptRecData optdata = - (GXV_mort_subtable_type1_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata; GXV_LIMIT_CHECK( 2 ); @@ -74,14 +74,14 @@ FT_UShort* classTable_length_p, FT_UShort* stateArray_length_p, FT_UShort* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort o[4]; FT_UShort *l[4]; FT_UShort buff[5]; GXV_mort_subtable_type1_StateOptRecData optdata = - (GXV_mort_subtable_type1_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata; o[0] = classTable; @@ -93,7 +93,7 @@ l[2] = entryTable_length_p; l[3] = &( optdata->substitutionTable_length ); - gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, valid ); + gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid ); } @@ -102,7 +102,7 @@ FT_Short wordOffset, const FT_String* tag, FT_Byte state, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort substTable; FT_UShort substTable_limit; @@ -113,16 +113,16 @@ substTable = ((GXV_mort_subtable_type1_StateOptRec *) - (valid->statetable.optdata))->substitutionTable; + (gxvalid->statetable.optdata))->substitutionTable; substTable_limit = (FT_UShort)( substTable + ((GXV_mort_subtable_type1_StateOptRec *) - (valid->statetable.optdata))->substitutionTable_length ); + (gxvalid->statetable.optdata))->substitutionTable_length ); - valid->min_gid = (FT_UShort)( ( substTable - wordOffset * 2 ) / 2 ); - valid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 ); - valid->max_gid = (FT_UShort)( FT_MAX( valid->max_gid, - valid->face->num_glyphs ) ); + gxvalid->min_gid = (FT_UShort)( ( substTable - wordOffset * 2 ) / 2 ); + gxvalid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 ); + gxvalid->max_gid = (FT_UShort)( FT_MAX( gxvalid->max_gid, + gxvalid->face->num_glyphs ) ); /* XXX: check range? */ @@ -137,7 +137,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_UShort setMark; @@ -169,24 +169,24 @@ gxv_mort_subtable_type1_offset_to_subst_validate( markOffset, "markOffset", state, - valid ); + gxvalid ); gxv_mort_subtable_type1_offset_to_subst_validate( currentOffset, "currentOffset", state, - valid ); + gxvalid ); } static void gxv_mort_subtable_type1_substTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort num_gids = (FT_UShort)( ((GXV_mort_subtable_type1_StateOptRec *) - (valid->statetable.optdata))->substitutionTable_length / 2 ); + (gxvalid->statetable.optdata))->substitutionTable_length / 2 ); FT_UShort i; @@ -202,11 +202,11 @@ if ( dst_gid >= 0xFFFFU ) continue; - if ( dst_gid < valid->min_gid || valid->max_gid < dst_gid ) + if ( dst_gid < gxvalid->min_gid || gxvalid->max_gid < dst_gid ) { GXV_TRACE(( "substTable include a strange gid[%d]=%d >" " out of define range (%d..%d)\n", - i, dst_gid, valid->min_gid, valid->max_gid )); + i, dst_gid, gxvalid->min_gid, gxvalid->max_gid )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); } } @@ -223,7 +223,7 @@ FT_LOCAL_DEF( void ) gxv_mort_subtable_type1_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -234,23 +234,23 @@ GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE ); - valid->statetable.optdata = + gxvalid->statetable.optdata = &st_rec; - valid->statetable.optdata_load_func = + gxvalid->statetable.optdata_load_func = gxv_mort_subtable_type1_substitutionTable_load; - valid->statetable.subtable_setup_func = + gxvalid->statetable.subtable_setup_func = gxv_mort_subtable_type1_subtable_setup; - valid->statetable.entry_glyphoffset_fmt = + gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_ULONG; - valid->statetable.entry_validate_func = + gxvalid->statetable.entry_validate_func = gxv_mort_subtable_type1_entry_validate; - gxv_StateTable_validate( p, limit, valid ); + gxv_StateTable_validate( p, limit, gxvalid ); gxv_mort_subtable_type1_substTable_validate( table + st_rec.substitutionTable, table + st_rec.substitutionTable + st_rec.substitutionTable_length, - valid ); + gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmort2.c b/src/gxvalid/gxvmort2.c index 9e08fb7..099ffd4 100644 --- a/src/gxvalid/gxvmort2.c +++ b/src/gxvalid/gxvmort2.c @@ -57,11 +57,11 @@ static void gxv_mort_subtable_type2_opttable_load( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_Bytes p = table; + FT_Bytes p = table; GXV_mort_subtable_type2_StateOptRecData optdata = - (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata; GXV_LIMIT_CHECK( 2 + 2 + 2 ); @@ -86,14 +86,14 @@ FT_UShort *classTable_length_p, FT_UShort *stateArray_length_p, FT_UShort *entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UShort o[6]; FT_UShort *l[6]; FT_UShort buff[7]; GXV_mort_subtable_type2_StateOptRecData optdata = - (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata; GXV_NAME_ENTER( "subtable boundaries setup" ); @@ -111,7 +111,7 @@ l[4] = &(optdata->componentTable_length); l[5] = &(optdata->ligatureTable_length); - gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, valid ); + gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, gxvalid ); GXV_TRACE(( "classTable: offset=0x%04x length=0x%04x\n", classTable, *classTable_length_p )); @@ -137,11 +137,11 @@ gxv_mort_subtable_type2_ligActionOffset_validate( FT_Bytes table, FT_UShort ligActionOffset, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* access ligActionTable */ GXV_mort_subtable_type2_StateOptRecData optdata = - (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata; FT_Bytes lat_base = table + optdata->ligActionTable; FT_Bytes p = table + ligActionOffset; @@ -214,7 +214,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_UShort setComponent; @@ -236,16 +236,16 @@ if ( 0 < offset ) gxv_mort_subtable_type2_ligActionOffset_validate( table, offset, - valid ); + gxvalid ); } static void gxv_mort_subtable_type2_ligatureTable_validate( FT_Bytes table, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_mort_subtable_type2_StateOptRecData optdata = - (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata; FT_Bytes p = table + optdata->ligatureTable; FT_Bytes limit = table + optdata->ligatureTable @@ -264,7 +264,7 @@ GXV_LIMIT_CHECK( 2 ); lig_gid = FT_NEXT_USHORT( p ); - if ( valid->face->num_glyphs < lig_gid ) + if ( gxvalid->face->num_glyphs < lig_gid ) GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); } } @@ -275,7 +275,7 @@ FT_LOCAL_DEF( void ) gxv_mort_subtable_type2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -286,23 +286,23 @@ GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE ); - valid->statetable.optdata = + gxvalid->statetable.optdata = &lig_rec; - valid->statetable.optdata_load_func = + gxvalid->statetable.optdata_load_func = gxv_mort_subtable_type2_opttable_load; - valid->statetable.subtable_setup_func = + gxvalid->statetable.subtable_setup_func = gxv_mort_subtable_type2_subtable_setup; - valid->statetable.entry_glyphoffset_fmt = + gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; - valid->statetable.entry_validate_func = + gxvalid->statetable.entry_validate_func = gxv_mort_subtable_type2_entry_validate; - gxv_StateTable_validate( p, limit, valid ); + gxv_StateTable_validate( p, limit, gxvalid ); - p += valid->subtable_length; - gxv_mort_subtable_type2_ligatureTable_validate( table, valid ); + p += gxvalid->subtable_length; + gxv_mort_subtable_type2_ligatureTable_validate( table, gxvalid ); - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } diff --git a/src/gxvalid/gxvmort4.c b/src/gxvalid/gxvmort4.c index 8347098..9e86af4 100644 --- a/src/gxvalid/gxvmort4.c +++ b/src/gxvalid/gxvmort4.c @@ -41,11 +41,11 @@ static void gxv_mort_subtable_type4_lookupval_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UNUSED( glyph ); - gxv_glyphid_validate( value_p->u, valid ); + gxv_glyphid_validate( value_p->u, gxvalid ); } /* @@ -80,7 +80,7 @@ FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p; FT_Bytes limit; @@ -91,7 +91,7 @@ offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); - p = valid->lookuptbl_head + offset; + p = gxvalid->lookuptbl_head + offset; limit = lookuptbl_limit; GXV_LIMIT_CHECK( 2 ); @@ -104,7 +104,7 @@ FT_LOCAL_DEF( void ) gxv_mort_subtable_type4_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -112,11 +112,11 @@ GXV_NAME_ENTER( "mort chain subtable type4 " "(Non-Contextual Glyph Substitution)" ); - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_mort_subtable_type4_lookupval_validate; - valid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_mort_subtable_type4_lookupval_validate; + gxvalid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit; - gxv_LookupTable_validate( p, limit, valid ); + gxv_LookupTable_validate( p, limit, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmort5.c b/src/gxvalid/gxvmort5.c index 32cfb03..9498b10 100644 --- a/src/gxvalid/gxvmort5.c +++ b/src/gxvalid/gxvmort5.c @@ -70,10 +70,10 @@ FT_UShort* classTable_length_p, FT_UShort* stateArray_length_p, FT_UShort* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_mort_subtable_type5_StateOptRecData optdata = - (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata; gxv_StateTable_subtable_setup( table_size, @@ -83,7 +83,7 @@ classTable_length_p, stateArray_length_p, entryTable_length_p, - valid ); + gxvalid ); optdata->classTable = classTable; optdata->stateArray = stateArray; @@ -100,7 +100,7 @@ FT_UShort count, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* * We don't know the range of insertion-glyph-list. @@ -109,7 +109,7 @@ FT_Bytes p = table + offset; GXV_mort_subtable_type5_StateOptRecData optdata = - (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata; + (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata; if ( optdata->classTable < offset && offset < optdata->classTable + *(optdata->classTable_length_p) ) @@ -145,7 +145,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_Bool setMark; @@ -184,7 +184,7 @@ currentInsertCount, table, limit, - valid ); + gxvalid ); } if ( 0 != markedInsertList && 0 != markedInsertCount ) @@ -193,7 +193,7 @@ markedInsertCount, table, limit, - valid ); + gxvalid ); } } @@ -201,7 +201,7 @@ FT_LOCAL_DEF( void ) gxv_mort_subtable_type5_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -213,18 +213,18 @@ GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE ); - valid->statetable.optdata = + gxvalid->statetable.optdata = et; - valid->statetable.optdata_load_func = + gxvalid->statetable.optdata_load_func = NULL; - valid->statetable.subtable_setup_func = + gxvalid->statetable.subtable_setup_func = gxv_mort_subtable_type5_subtable_setup; - valid->statetable.entry_glyphoffset_fmt = + gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_ULONG; - valid->statetable.entry_validate_func = + gxvalid->statetable.entry_validate_func = gxv_mort_subtable_type5_entry_validate; - gxv_StateTable_validate( p, limit, valid ); + gxv_StateTable_validate( p, limit, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmorx.c b/src/gxvalid/gxvmorx.c index 4b1dd00..96dba63 100644 --- a/src/gxvalid/gxvmorx.c +++ b/src/gxvalid/gxvmorx.c @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT morx table validation (body). */ /* */ -/* Copyright 2005, 2008 by */ +/* Copyright 2005, 2008, 2013 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -42,7 +42,7 @@ gxv_morx_subtables_validate( FT_Bytes table, FT_Bytes limit, FT_UShort nSubtables, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -57,8 +57,6 @@ }; - GXV_Validate_Func func; - FT_UShort i; @@ -66,6 +64,8 @@ for ( i = 0; i < nSubtables; i++ ) { + GXV_Validate_Func func; + FT_ULong length; FT_ULong coverage; #ifdef GXV_LOAD_UNUSED_VARS @@ -93,7 +93,7 @@ /* morx coverage consists of mort_coverage & 16bit padding */ gxv_mort_coverage_validate( (FT_UShort)( ( coverage >> 16 ) | coverage ), - valid ); + gxvalid ); if ( type > 5 ) FT_INVALID_FORMAT; @@ -101,13 +101,13 @@ if ( func == NULL ) GXV_TRACE(( "morx type %d is reserved\n", type )); - func( p, p + rest, valid ); + func( p, p + rest, gxvalid ); /* TODO: subFeatureFlags should be unique in a table? */ p += rest; } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -116,7 +116,7 @@ static void gxv_morx_chain_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; #ifdef GXV_LOAD_UNUSED_VARS @@ -140,16 +140,16 @@ nSubtables = FT_NEXT_ULONG( p ); /* feature-array of morx is same with that of mort */ - gxv_mort_featurearray_validate( p, limit, nFeatureFlags, valid ); - p += valid->subtable_length; + gxv_mort_featurearray_validate( p, limit, nFeatureFlags, gxvalid ); + p += gxvalid->subtable_length; if ( nSubtables >= 0x10000L ) FT_INVALID_DATA; gxv_morx_subtables_validate( p, table + chainLength, - (FT_UShort)nSubtables, valid ); + (FT_UShort)nSubtables, gxvalid ); - valid->subtable_length = chainLength; + gxvalid->subtable_length = chainLength; /* TODO: defaultFlags should be compared with the flags in tables */ @@ -162,8 +162,8 @@ FT_Face face, FT_Validator ftvalid ) { - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; FT_Bytes p = table; FT_Bytes limit = 0; FT_ULong version; @@ -171,8 +171,8 @@ FT_ULong i; - valid->root = ftvalid; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->face = face; FT_TRACE3(( "validating `morx' table\n" )); GXV_INIT; @@ -188,8 +188,8 @@ { GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains )); GXV_32BIT_ALIGNMENT_VALIDATE( p - table ); - gxv_morx_chain_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_morx_chain_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; } FT_TRACE4(( "\n" )); diff --git a/src/gxvalid/gxvmorx.h b/src/gxvalid/gxvmorx.h index 28c1a44..9ed907a 100644 --- a/src/gxvalid/gxvmorx.h +++ b/src/gxvalid/gxvmorx.h @@ -38,27 +38,27 @@ FT_LOCAL( void ) gxv_morx_subtable_type0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_morx_subtable_type1_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_morx_subtable_type2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_morx_subtable_type4_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); FT_LOCAL( void ) gxv_morx_subtable_type5_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ); + GXV_Validator gxvalid ); #endif /* __GXVMORX_H__ */ diff --git a/src/gxvalid/gxvmorx0.c b/src/gxvalid/gxvmorx0.c index 6a736c1..db165f4 100644 --- a/src/gxvalid/gxvmorx0.c +++ b/src/gxvalid/gxvmorx0.c @@ -45,7 +45,7 @@ GXV_XStateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_UShort markFirst; @@ -85,7 +85,7 @@ FT_LOCAL_DEF( void ) gxv_morx_subtable_type0_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -95,14 +95,14 @@ GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE ); - valid->xstatetable.optdata = NULL; - valid->xstatetable.optdata_load_func = NULL; - valid->xstatetable.subtable_setup_func = NULL; - valid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; - valid->xstatetable.entry_validate_func = + gxvalid->xstatetable.optdata = NULL; + gxvalid->xstatetable.optdata_load_func = NULL; + gxvalid->xstatetable.subtable_setup_func = NULL; + gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE; + gxvalid->xstatetable.entry_validate_func = gxv_morx_subtable_type0_entry_validate; - gxv_XStateTable_validate( p, limit, valid ); + gxv_XStateTable_validate( p, limit, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmorx1.c b/src/gxvalid/gxvmorx1.c index ce0009a..49f53d1 100644 --- a/src/gxvalid/gxvmorx1.c +++ b/src/gxvalid/gxvmorx1.c @@ -55,12 +55,12 @@ static void gxv_morx_subtable_type1_substitutionTable_load( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_morx_subtable_type1_StateOptRecData optdata = - (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata; GXV_LIMIT_CHECK( 2 ); @@ -76,14 +76,14 @@ FT_ULong* classTable_length_p, FT_ULong* stateArray_length_p, FT_ULong* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_ULong o[4]; FT_ULong *l[4]; FT_ULong buff[5]; GXV_morx_subtable_type1_StateOptRecData optdata = - (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata; o[0] = classTable; @@ -95,7 +95,7 @@ l[2] = entryTable_length_p; l[3] = &(optdata->substitutionTable_length); - gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid ); + gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid ); } @@ -106,7 +106,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_TRACE_VARS FT_UShort setMark; @@ -117,7 +117,7 @@ FT_Short currentIndex; GXV_morx_subtable_type1_StateOptRecData optdata = - (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata; FT_UNUSED( state ); FT_UNUSED( table ); @@ -159,13 +159,13 @@ static void gxv_morx_subtable_type1_LookupValue_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_UNUSED( glyph ); /* for the non-debugging case */ GXV_TRACE(( "morx subtable type1 subst.: %d -> %d\n", glyph, value_p->u )); - if ( value_p->u > valid->face->num_glyphs ) + if ( value_p->u > gxvalid->face->num_glyphs ) FT_INVALID_GLYPH_ID; } @@ -175,7 +175,7 @@ FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p; FT_Bytes limit; @@ -186,7 +186,7 @@ offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); - p = valid->lookuptbl_head + offset; + p = gxvalid->lookuptbl_head + offset; limit = lookuptbl_limit; GXV_LIMIT_CHECK ( 2 ); @@ -202,19 +202,19 @@ static void gxv_morx_subtable_type1_substitutionTable_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort i; GXV_morx_subtable_type1_StateOptRecData optdata = - (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata; /* TODO: calculate offset/length for each lookupTables */ - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_morx_subtable_type1_LookupValue_validate; - valid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_morx_subtable_type1_LookupValue_validate; + gxvalid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit; for ( i = 0; i < optdata->substitutionTable_num_lookupTables; i++ ) { @@ -224,7 +224,7 @@ GXV_LIMIT_CHECK( 4 ); offset = FT_NEXT_ULONG( p ); - gxv_LookupTable_validate( table + offset, limit, valid ); + gxv_LookupTable_validate( table + offset, limit, gxvalid ); } /* TODO: overlapping of lookupTables in substitutionTable */ @@ -239,7 +239,7 @@ FT_LOCAL_DEF( void ) gxv_morx_subtable_type1_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -252,23 +252,23 @@ st_rec.substitutionTable_num_lookupTables = 0; - valid->xstatetable.optdata = + gxvalid->xstatetable.optdata = &st_rec; - valid->xstatetable.optdata_load_func = + gxvalid->xstatetable.optdata_load_func = gxv_morx_subtable_type1_substitutionTable_load; - valid->xstatetable.subtable_setup_func = + gxvalid->xstatetable.subtable_setup_func = gxv_morx_subtable_type1_subtable_setup; - valid->xstatetable.entry_glyphoffset_fmt = + gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_ULONG; - valid->xstatetable.entry_validate_func = + gxvalid->xstatetable.entry_validate_func = gxv_morx_subtable_type1_entry_validate; - gxv_XStateTable_validate( p, limit, valid ); + gxv_XStateTable_validate( p, limit, gxvalid ); gxv_morx_subtable_type1_substitutionTable_validate( table + st_rec.substitutionTable, table + st_rec.substitutionTable + st_rec.substitutionTable_length, - valid ); + gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmorx2.c b/src/gxvalid/gxvmorx2.c index 9d2b0bc..e44445d 100644 --- a/src/gxvalid/gxvmorx2.c +++ b/src/gxvalid/gxvmorx2.c @@ -5,7 +5,7 @@ /* TrueTypeGX/AAT morx table validation */ /* body for type2 (Ligature Substitution) subtable. */ /* */ -/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ +/* Copyright 2005, 2013 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -58,12 +58,12 @@ static void gxv_morx_subtable_type2_opttable_load( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_morx_subtable_type2_StateOptRecData optdata = - (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata; GXV_LIMIT_CHECK( 4 + 4 + 4 ); @@ -88,14 +88,14 @@ FT_ULong* classTable_length_p, FT_ULong* stateArray_length_p, FT_ULong* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_ULong o[6]; FT_ULong* l[6]; FT_ULong buff[7]; GXV_morx_subtable_type2_StateOptRecData optdata = - (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata; GXV_NAME_ENTER( "subtable boundaries setup" ); @@ -113,7 +113,7 @@ l[4] = &(optdata->componentTable_length); l[5] = &(optdata->ligatureTable_length); - gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, valid ); + gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, gxvalid ); GXV_TRACE(( "classTable: offset=0x%08x length=0x%08x\n", classTable, *classTable_length_p )); @@ -142,11 +142,11 @@ gxv_morx_subtable_type2_ligActionIndex_validate( FT_Bytes table, FT_UShort ligActionIndex, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* access ligActionTable */ GXV_morx_subtable_type2_StateOptRecData optdata = - (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata; FT_Bytes lat_base = table + optdata->ligActionTable; FT_Bytes p = lat_base + @@ -188,7 +188,7 @@ /* it is different from the location offset in mort */ if ( ( offset & 0x3FFF0000UL ) == 0x3FFF0000UL ) { /* negative offset */ - gid_limit = valid->face->num_glyphs - ( offset & 0x0000FFFFUL ); + gid_limit = gxvalid->face->num_glyphs - ( offset & 0x0000FFFFUL ); if ( gid_limit > 0 ) return; @@ -198,9 +198,9 @@ offset & 0xFFFFU )); GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET ); } - else if ( ( offset & 0x3FFF0000UL ) == 0x0000000UL ) + else if ( ( offset & 0x3FFF0000UL ) == 0x00000000UL ) { /* positive offset */ - if ( (FT_Long)offset < valid->face->num_glyphs ) + if ( (FT_Long)offset < gxvalid->face->num_glyphs ) return; GXV_TRACE(( "ligature action table includes" @@ -225,7 +225,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_UShort setComponent; @@ -253,16 +253,16 @@ if ( 0 < ligActionIndex ) gxv_morx_subtable_type2_ligActionIndex_validate( - table, ligActionIndex, valid ); + table, ligActionIndex, gxvalid ); } static void gxv_morx_subtable_type2_ligatureTable_validate( FT_Bytes table, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_morx_subtable_type2_StateOptRecData optdata = - (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata; FT_Bytes p = table + optdata->ligatureTable; FT_Bytes limit = table + optdata->ligatureTable @@ -281,7 +281,7 @@ GXV_LIMIT_CHECK( 2 ); lig_gid = FT_NEXT_USHORT( p ); - if ( lig_gid < valid->face->num_glyphs ) + if ( lig_gid < gxvalid->face->num_glyphs ) GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID ); } } @@ -293,7 +293,7 @@ FT_LOCAL_DEF( void ) gxv_morx_subtable_type2_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -304,21 +304,23 @@ GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE ); - valid->xstatetable.optdata = + gxvalid->xstatetable.optdata = &lig_rec; - valid->xstatetable.optdata_load_func = + gxvalid->xstatetable.optdata_load_func = gxv_morx_subtable_type2_opttable_load; - valid->xstatetable.subtable_setup_func = + gxvalid->xstatetable.subtable_setup_func = gxv_morx_subtable_type2_subtable_setup; - valid->xstatetable.entry_glyphoffset_fmt = + gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_USHORT; - valid->xstatetable.entry_validate_func = + gxvalid->xstatetable.entry_validate_func = gxv_morx_subtable_type2_entry_validate; - gxv_XStateTable_validate( p, limit, valid ); + gxv_XStateTable_validate( p, limit, gxvalid ); - p += valid->subtable_length; - gxv_morx_subtable_type2_ligatureTable_validate( table, valid ); +#if 0 + p += gxvalid->subtable_length; +#endif + gxv_morx_subtable_type2_ligatureTable_validate( table, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmorx4.c b/src/gxvalid/gxvmorx4.c index c0d2f78..68ab678 100644 --- a/src/gxvalid/gxvmorx4.c +++ b/src/gxvalid/gxvmorx4.c @@ -41,12 +41,12 @@ FT_LOCAL_DEF( void ) gxv_morx_subtable_type4_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_NAME_ENTER( "morx chain subtable type4 " "(Non-Contextual Glyph Substitution)" ); - gxv_mort_subtable_type4_validate( table, limit, valid ); + gxv_mort_subtable_type4_validate( table, limit, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c index d8cf700..5e095dd 100644 --- a/src/gxvalid/gxvmorx5.c +++ b/src/gxvalid/gxvmorx5.c @@ -64,12 +64,12 @@ static void gxv_morx_subtable_type5_insertionGlyphList_load( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; GXV_morx_subtable_type5_StateOptRecData optdata = - (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata; GXV_LIMIT_CHECK( 4 ); @@ -85,14 +85,14 @@ FT_ULong* classTable_length_p, FT_ULong* stateArray_length_p, FT_ULong* entryTable_length_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_ULong o[4]; FT_ULong* l[4]; FT_ULong buff[5]; GXV_morx_subtable_type5_StateOptRecData optdata = - (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata; + (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata; o[0] = classTable; @@ -104,7 +104,7 @@ l[2] = entryTable_length_p; l[3] = &(optdata->insertionGlyphList_length); - gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid ); + gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid ); } @@ -113,9 +113,9 @@ FT_UShort count, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_Bytes p = table + table_index * 2; + FT_Bytes p = table + table_index * 2; #ifndef GXV_LOAD_TRACE_VARS @@ -143,7 +143,7 @@ GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { #ifdef GXV_LOAD_UNUSED_VARS FT_Bool setMark; @@ -180,20 +180,20 @@ gxv_morx_subtable_type5_InsertList_validate( currentInsertList, currentInsertCount, table, limit, - valid ); + gxvalid ); if ( markedInsertList && 0 != markedInsertCount ) gxv_morx_subtable_type5_InsertList_validate( markedInsertList, markedInsertCount, table, limit, - valid ); + gxvalid ); } FT_LOCAL_DEF( void ) gxv_morx_subtable_type5_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; @@ -205,18 +205,18 @@ GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE ); - valid->xstatetable.optdata = + gxvalid->xstatetable.optdata = et; - valid->xstatetable.optdata_load_func = + gxvalid->xstatetable.optdata_load_func = gxv_morx_subtable_type5_insertionGlyphList_load; - valid->xstatetable.subtable_setup_func = + gxvalid->xstatetable.subtable_setup_func = gxv_morx_subtable_type5_subtable_setup; - valid->xstatetable.entry_glyphoffset_fmt = + gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_ULONG; - valid->xstatetable.entry_validate_func = + gxvalid->xstatetable.entry_validate_func = gxv_morx_subtable_type5_entry_validate; - gxv_XStateTable_validate( p, limit, valid ); + gxv_XStateTable_validate( p, limit, gxvalid ); GXV_EXIT; } diff --git a/src/gxvalid/gxvopbd.c b/src/gxvalid/gxvopbd.c index e125060..ab0cd72 100644 --- a/src/gxvalid/gxvopbd.c +++ b/src/gxvalid/gxvopbd.c @@ -68,11 +68,11 @@ static void gxv_opbd_LookupValue_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { /* offset in LookupTable is measured from the head of opbd table */ - FT_Bytes p = valid->root->base + value_p->u; - FT_Bytes limit = valid->root->limit; + FT_Bytes p = gxvalid->root->base + value_p->u; + FT_Bytes limit = gxvalid->root->limit; FT_Short delta_value; int i; @@ -90,7 +90,7 @@ if ( delta_value == -1 ) continue; - gxv_ctlPoint_validate( glyph, delta_value, valid ); + gxv_ctlPoint_validate( glyph, delta_value, gxvalid ); } else /* format 0, value is distance */ continue; @@ -134,12 +134,12 @@ gxv_opbd_LookupFmt4_transit( FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { GXV_LookupValueDesc value; FT_UNUSED( lookuptbl_limit ); - FT_UNUSED( valid ); + FT_UNUSED( gxvalid ); /* XXX: check range? */ value.u = (FT_UShort)( base_value_p->u + @@ -162,8 +162,8 @@ FT_Face face, FT_Validator ftvalid ) { - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_opbd_DataRec opbdrec; GXV_opbd_Data opbd = &opbdrec; FT_Bytes p = table; @@ -172,9 +172,9 @@ FT_ULong version; - valid->root = ftvalid; - valid->table_data = opbd; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = opbd; + gxvalid->face = face; FT_TRACE3(( "validating `opbd' table\n" )); GXV_INIT; @@ -196,12 +196,12 @@ if ( 0x0001 < GXV_OPBD_DATA( format ) ) FT_INVALID_FORMAT; - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_opbd_LookupValue_validate; - valid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_opbd_LookupValue_validate; + gxvalid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit; - gxv_LookupTable_validate( p, limit, valid ); - p += valid->subtable_length; + gxv_LookupTable_validate( p, limit, gxvalid ); + p += gxvalid->subtable_length; if ( p > table + GXV_OPBD_DATA( valueOffset_min ) ) { diff --git a/src/gxvalid/gxvprop.c b/src/gxvalid/gxvprop.c index 0be2133..aa5c8ee 100644 --- a/src/gxvalid/gxvprop.c +++ b/src/gxvalid/gxvprop.c @@ -75,7 +75,7 @@ static void gxv_prop_zero_advance_validate( FT_UShort gid, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Face face; FT_Error error; @@ -84,7 +84,7 @@ GXV_NAME_ENTER( "zero advance" ); - face = valid->face; + face = gxvalid->face; error = FT_Load_Glyph( face, gid, @@ -109,10 +109,10 @@ static void gxv_prop_property_validate( FT_UShort property, FT_UShort glyph, - GXV_Validator valid ) + GXV_Validator gxvalid ) { if ( glyph != 0 && ( property & GXV_PROP_FLOATER ) ) - gxv_prop_zero_advance_validate( glyph, valid ); + gxv_prop_zero_advance_validate( glyph, gxvalid ); if ( property & GXV_PROP_USE_COMPLEMENTARY_BRACKET ) { @@ -145,7 +145,7 @@ else { /* The gid for complement must be the face. */ - gxv_glyphid_validate( (FT_UShort)( glyph + complement ), valid ); + gxv_glyphid_validate( (FT_UShort)( glyph + complement ), gxvalid ); } } else @@ -187,9 +187,9 @@ static void gxv_prop_LookupValue_validate( FT_UShort glyph, GXV_LookupValueCPtr value_p, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - gxv_prop_property_validate( value_p->u, glyph, valid ); + gxv_prop_property_validate( value_p->u, glyph, gxvalid ); } @@ -224,7 +224,7 @@ gxv_prop_LookupFmt4_transit( FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p; FT_Bytes limit; @@ -234,7 +234,7 @@ /* XXX: check range? */ offset = (FT_UShort)( base_value_p->u + relative_gindex * sizeof ( FT_UShort ) ); - p = valid->lookuptbl_head + offset; + p = gxvalid->lookuptbl_head + offset; limit = lookuptbl_limit; GXV_LIMIT_CHECK ( 2 ); @@ -259,8 +259,8 @@ { FT_Bytes p = table; FT_Bytes limit = 0; - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_prop_DataRec proprec; GXV_prop_Data prop = &proprec; @@ -270,9 +270,9 @@ FT_UShort defaultProp; - valid->root = ftvalid; - valid->table_data = prop; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = prop; + gxvalid->face = face; FT_TRACE3(( "validating `prop' table\n" )); GXV_INIT; @@ -303,7 +303,7 @@ FT_INVALID_FORMAT; } - gxv_prop_property_validate( defaultProp, 0, valid ); + gxv_prop_property_validate( defaultProp, 0, gxvalid ); if ( format == 0 ) { @@ -315,11 +315,11 @@ /* format == 1 */ GXV_PROP_DATA( version ) = version; - valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; - valid->lookupval_func = gxv_prop_LookupValue_validate; - valid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit; + gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; + gxvalid->lookupval_func = gxv_prop_LookupValue_validate; + gxvalid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit; - gxv_LookupTable_validate( p, limit, valid ); + gxv_LookupTable_validate( p, limit, gxvalid ); Exit: FT_TRACE4(( "\n" )); diff --git a/src/gxvalid/gxvtrak.c b/src/gxvalid/gxvtrak.c index 11fbd7c..3ec1a56 100644 --- a/src/gxvalid/gxvtrak.c +++ b/src/gxvalid/gxvtrak.c @@ -93,9 +93,9 @@ gxv_trak_trackTable_validate( FT_Bytes table, FT_Bytes limit, FT_UShort nTracks, - GXV_Validator valid ) + GXV_Validator gxvalid ) { - FT_Bytes p = table; + FT_Bytes p = table; FT_Fixed track, t; FT_UShort nameIndex; @@ -122,7 +122,7 @@ if ( offset > GXV_TRAK_DATA( trackValueOffset_max ) ) GXV_TRAK_DATA( trackValueOffset_max ) = offset; - gxv_sfntName_validate( nameIndex, 256, 32767, valid ); + gxv_sfntName_validate( nameIndex, 256, 32767, gxvalid ); for ( j = i; j < nTracks; j ++ ) { @@ -134,7 +134,7 @@ } } - valid->subtable_length = p - table; + gxvalid->subtable_length = p - table; GXV_EXIT; } @@ -142,7 +142,7 @@ static void gxv_trak_trackData_validate( FT_Bytes table, FT_Bytes limit, - GXV_Validator valid ) + GXV_Validator gxvalid ) { FT_Bytes p = table; FT_UShort nTracks; @@ -164,31 +164,31 @@ gxv_odtect_add_range( table, p - table, "trackData header", odtect ); /* validate trackTable */ - gxv_trak_trackTable_validate( p, limit, nTracks, valid ); - gxv_odtect_add_range( p, valid->subtable_length, + gxv_trak_trackTable_validate( p, limit, nTracks, gxvalid ); + gxv_odtect_add_range( p, gxvalid->subtable_length, "trackTable", odtect ); /* sizeTable is array of FT_Fixed, don't check contents */ - p = valid->root->base + sizeTableOffset; + p = gxvalid->root->base + sizeTableOffset; GXV_LIMIT_CHECK( nSizes * 4 ); gxv_odtect_add_range( p, nSizes * 4, "sizeTable", odtect ); /* validate trackValueOffet */ - p = valid->root->base + GXV_TRAK_DATA( trackValueOffset_min ); + p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_min ); if ( limit - p < nTracks * nSizes * 2 ) GXV_TRACE(( "too short trackValue array\n" )); - p = valid->root->base + GXV_TRAK_DATA( trackValueOffset_max ); + p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_max ); GXV_LIMIT_CHECK( nSizes * 2 ); - gxv_odtect_add_range( valid->root->base + gxv_odtect_add_range( gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_min ), GXV_TRAK_DATA( trackValueOffset_max ) - GXV_TRAK_DATA( trackValueOffset_min ) + nSizes * 2, "trackValue array", odtect ); - gxv_odtect_validate( odtect, valid ); + gxv_odtect_validate( odtect, gxvalid ); GXV_EXIT; } @@ -210,8 +210,8 @@ FT_Bytes p = table; FT_Bytes limit = 0; - GXV_ValidatorRec validrec; - GXV_Validator valid = &validrec; + GXV_ValidatorRec gxvalidrec; + GXV_Validator gxvalid = &gxvalidrec; GXV_trak_DataRec trakrec; GXV_trak_Data trak = &trakrec; @@ -225,11 +225,11 @@ GXV_ODTECT( 3, odtect ); GXV_ODTECT_INIT( odtect ); - valid->root = ftvalid; - valid->table_data = trak; - valid->face = face; + gxvalid->root = ftvalid; + gxvalid->table_data = trak; + gxvalid->face = face; - limit = valid->root->limit; + limit = gxvalid->root->limit; FT_TRACE3(( "validating `trak' table\n" )); GXV_INIT; @@ -265,19 +265,19 @@ /* validate trackData */ if ( 0 < horizOffset ) { - gxv_trak_trackData_validate( table + horizOffset, limit, valid ); - gxv_odtect_add_range( table + horizOffset, valid->subtable_length, + gxv_trak_trackData_validate( table + horizOffset, limit, gxvalid ); + gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length, "horizJustData", odtect ); } if ( 0 < vertOffset ) { - gxv_trak_trackData_validate( table + vertOffset, limit, valid ); - gxv_odtect_add_range( table + vertOffset, valid->subtable_length, + gxv_trak_trackData_validate( table + vertOffset, limit, gxvalid ); + gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length, "vertJustData", odtect ); } - gxv_odtect_validate( odtect, valid ); + gxv_odtect_validate( odtect, gxvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c index f3d2ef9..2d4200d 100644 --- a/src/gzip/ftgzip.c +++ b/src/gzip/ftgzip.c @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2002-2006, 2009-2012 by */ +/* Copyright 2002-2006, 2009-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -68,6 +68,15 @@ #undef SLOW #define SLOW 1 /* we can't use asm-optimized sources here! */ +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + /* We disable the warning `conversion from XXX to YYY, */ + /* possible loss of data' in order to compile cleanly with */ + /* the maximum level of warnings: zlib is non-FreeType */ + /* code. */ +#pragma warning( push ) +#pragma warning( disable : 4244 ) +#endif /* _MSC_VER */ + /* Urgh. `inflate_mask' must not be declared twice -- C++ doesn't like this. We temporarily disable it and load all necessary header files. */ #define NO_INFLATE_MASK @@ -87,6 +96,10 @@ #include "inflate.c" #include "adler32.c" +#if defined( _MSC_VER ) +#pragma warning( pop ) +#endif + #endif /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */ @@ -195,12 +208,12 @@ /* head[0] && head[1] are the magic numbers; */ /* head[2] is the method, and head[3] the flags */ - if ( head[0] != 0x1f || - head[1] != 0x8b || + if ( head[0] != 0x1F || + head[1] != 0x8B || head[2] != Z_DEFLATED || (head[3] & FT_GZIP_RESERVED) ) { - error = Gzip_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -262,7 +275,7 @@ FT_Stream source ) { z_stream* zstream = &zip->zstream; - FT_Error error = Gzip_Err_Ok; + FT_Error error = FT_Err_Ok; zip->stream = stream; @@ -294,7 +307,7 @@ if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK || zstream->next_in == NULL ) - error = Gzip_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); Exit: return error; @@ -365,7 +378,7 @@ size = stream->read( stream, stream->pos, zip->input, FT_GZIP_BUFFER_SIZE ); if ( size == 0 ) - return Gzip_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); } else { @@ -374,7 +387,7 @@ size = FT_GZIP_BUFFER_SIZE; if ( size == 0 ) - return Gzip_Err_Invalid_Stream_Operation; + return FT_THROW( Invalid_Stream_Operation ); FT_MEM_COPY( zip->input, stream->base + stream->pos, size ); } @@ -383,7 +396,7 @@ zstream->next_in = zip->input; zstream->avail_in = size; - return Gzip_Err_Ok; + return FT_Err_Ok; } @@ -391,7 +404,7 @@ ft_gzip_file_fill_output( FT_GZipFile zip ) { z_stream* zstream = &zip->zstream; - FT_Error error = Gzip_Err_Ok; + FT_Error error = FT_Err_Ok; zip->cursor = zip->buffer; @@ -416,12 +429,12 @@ { zip->limit = zstream->next_out; if ( zip->limit == zip->cursor ) - error = Gzip_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } else if ( err != Z_OK ) { - error = Gzip_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } } @@ -435,7 +448,7 @@ ft_gzip_file_skip_output( FT_GZipFile zip, FT_ULong count ) { - FT_Error error = Gzip_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ULong delta; @@ -583,15 +596,25 @@ } + /* documentation is in ftgzip.h */ + FT_EXPORT_DEF( FT_Error ) FT_Stream_OpenGzip( FT_Stream stream, FT_Stream source ) { FT_Error error; - FT_Memory memory = source->memory; + FT_Memory memory; FT_GZipFile zip = NULL; + if ( !stream || !source ) + { + error = FT_THROW( Invalid_Stream_Handle ); + goto Exit; + } + + memory = source->memory; + /* * check the header right now; this prevents allocating un-necessary * objects when we don't need them @@ -657,7 +680,7 @@ ft_gzip_file_io( zip, 0, NULL, 0 ); FT_FREE( zip_buff ); } - error = Gzip_Err_Ok; + error = FT_Err_Ok; } } @@ -671,7 +694,69 @@ return error; } -#else /* !FT_CONFIG_OPTION_USE_ZLIB */ + + /* documentation is in ftgzip.h */ + + FT_EXPORT_DEF( FT_Error ) + FT_Gzip_Uncompress( FT_Memory memory, + FT_Byte* output, + FT_ULong* output_len, + const FT_Byte* input, + FT_ULong input_len ) + { + z_stream stream; + int err; + + + /* check for `input' delayed to `inflate' */ + + if ( !memory || ! output_len || !output ) + return FT_THROW( Invalid_Argument ); + + /* this function is modeled after zlib's `uncompress' function */ + + stream.next_in = (Bytef*)input; + stream.avail_in = (uInt)input_len; + + stream.next_out = output; + stream.avail_out = (uInt)*output_len; + + stream.zalloc = (alloc_func)ft_gzip_alloc; + stream.zfree = (free_func) ft_gzip_free; + stream.opaque = memory; + + err = inflateInit2( &stream, MAX_WBITS ); + if ( err != Z_OK ) + return FT_THROW( Invalid_Argument ); + + err = inflate( &stream, Z_FINISH ); + if ( err != Z_STREAM_END ) + { + inflateEnd( &stream ); + if ( err == Z_OK ) + err = Z_BUF_ERROR; + } + else + { + *output_len = stream.total_out; + + err = inflateEnd( &stream ); + } + + if ( err == Z_MEM_ERROR ) + return FT_THROW( Out_Of_Memory ); + + if ( err == Z_BUF_ERROR ) + return FT_THROW( Array_Too_Large ); + + if ( err == Z_DATA_ERROR ) + return FT_THROW( Invalid_Table ); + + return FT_Err_Ok; + } + + +#else /* !FT_CONFIG_OPTION_USE_ZLIB */ FT_EXPORT_DEF( FT_Error ) FT_Stream_OpenGzip( FT_Stream stream, @@ -680,7 +765,24 @@ FT_UNUSED( stream ); FT_UNUSED( source ); - return Gzip_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); + } + + + FT_EXPORT_DEF( FT_Error ) + FT_Gzip_Uncompress( FT_Memory memory, + FT_Byte* output, + FT_ULong* output_len, + const FT_Byte* input, + FT_ULong input_len ) + { + FT_UNUSED( memory ); + FT_UNUSED( output ); + FT_UNUSED( output_len ); + FT_UNUSED( input ); + FT_UNUSED( input_len ); + + return FT_THROW( Unimplemented_Feature ); } #endif /* !FT_CONFIG_OPTION_USE_ZLIB */ diff --git a/src/gzip/inftrees.c b/src/gzip/inftrees.c index ef53652..56f52b1 100644 --- a/src/gzip/inftrees.c +++ b/src/gzip/inftrees.c @@ -115,16 +115,16 @@ uIntf *v /* working area: values in order of bit length */ uInt f; /* i repeats in table every f entries */ int g; /* maximum code length */ int h; /* table level */ - register uInt i; /* counter, current code */ - register uInt j; /* counter */ - register int k; /* number of bits in current code */ + uInt i; /* counter, current code */ + uInt j; /* counter */ + int k; /* number of bits in current code */ int l; /* bits per table (returned in m) */ uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ - register uIntf *p; /* pointer into c[], b[], or v[] */ + uIntf *p; /* pointer into c[], b[], or v[] */ inflate_huft *q; /* points to current table */ struct inflate_huft_s r; /* table entry for structure assignment */ inflate_huft *u[BMAX]; /* table stack */ - register int w; /* bits before this table == (l * h) */ + int w; /* bits before this table == (l * h) */ uInt x[BMAX+1]; /* bit offsets, then code stack */ uIntf *xp; /* pointer into x */ int y; /* number of dummy codes added */ diff --git a/src/gzip/rules.mk b/src/gzip/rules.mk index d2a43a6..37cd991 100644 --- a/src/gzip/rules.mk +++ b/src/gzip/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 2002, 2003 by +# Copyright 2002, 2003, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -27,49 +27,52 @@ else endif -# gzip support sources (i.e., C files) +# gzip support sources # -GZIP_DRV_SRC := $(GZIP_DIR)/ftgzip.c - -# gzip support headers +# All source and header files get loaded by `ftgzip.c' only if SYTEM_ZLIB is +# not defined (regardless whether we have a `single' or a `multi' build). +# However, it doesn't harm if we add everything as a dependency +# unconditionally. # -GZIP_DRV_H := +GZIP_DRV_SRCS := $(GZIP_DIR)/adler32.c \ + $(GZIP_DIR)/infblock.c \ + $(GZIP_DIR)/infblock.h \ + $(GZIP_DIR)/infcodes.c \ + $(GZIP_DIR)/infcodes.h \ + $(GZIP_DIR)/inffixed.h \ + $(GZIP_DIR)/inflate.c \ + $(GZIP_DIR)/inftrees.c \ + $(GZIP_DIR)/inftrees.h \ + $(GZIP_DIR)/infutil.c \ + $(GZIP_DIR)/infutil.h \ + $(GZIP_DIR)/zconf.h \ + $(GZIP_DIR)/zlib.h \ + $(GZIP_DIR)/zutil.c \ + $(GZIP_DIR)/zutil.h # gzip driver object(s) # -# GZIP_DRV_OBJ_M is used during `multi' builds -# GZIP_DRV_OBJ_S is used during `single' builds -# -ifeq ($(SYSTEM_ZLIB),) - GZIP_DRV_OBJ_M := $(GZIP_DRV_SRC:$(GZIP_DIR)/%.c=$(OBJ_DIR)/%.$O) -else - GZIP_DRV_OBJ_M := $(OBJ_DIR)/ftgzip.$O -endif -GZIP_DRV_OBJ_S := $(OBJ_DIR)/ftgzip.$O - -# gzip support source file for single build +# GZIP_DRV_OBJ is used during both `single' and `multi' builds # -GZIP_DRV_SRC_S := $(GZIP_DIR)/ftgzip.c +GZIP_DRV_OBJ := $(OBJ_DIR)/ftgzip.$O -# gzip support - single object +# gzip main source file # -$(GZIP_DRV_OBJ_S): $(GZIP_DRV_SRC_S) $(GZIP_DRV_SRC) $(FREETYPE_H) \ - $(GZIP_DRV_H) - $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GZIP_DRV_SRC_S)) +GZIP_DRV_SRC := $(GZIP_DIR)/ftgzip.c -# gzip support - multiple objects +# gzip support - object # -$(OBJ_DIR)/%.$O: $(GZIP_DIR)/%.c $(FREETYPE_H) $(GZIP_DRV_H) - $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) +$(GZIP_DRV_OBJ): $(GZIP_DRV_SRC) $(GZIP_DRV_SRCS) $(FREETYPE_H) + $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GZIP_DRV_SRC)) # update main driver object lists # -DRV_OBJS_S += $(GZIP_DRV_OBJ_S) -DRV_OBJS_M += $(GZIP_DRV_OBJ_M) +DRV_OBJS_S += $(GZIP_DRV_OBJ) +DRV_OBJS_M += $(GZIP_DRV_OBJ) # EOF diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c index 35e392b..e1b3564 100644 --- a/src/lzw/ftlzw.c +++ b/src/lzw/ftlzw.c @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2004-2006, 2009, 2010, 2012 by */ +/* Copyright 2004-2006, 2009, 2010, 2012-2014 by */ /* Albert Chin-A-Young. */ /* */ /* Based on code in src/gzip/ftgzip.c, Copyright 2004 by */ @@ -96,9 +96,9 @@ goto Exit; /* head[0] && head[1] are the magic numbers */ - if ( head[0] != 0x1f || - head[1] != 0x9d ) - error = LZW_Err_Invalid_File_Format; + if ( head[0] != 0x1F || + head[1] != 0x9D ) + error = FT_THROW( Invalid_File_Format ); Exit: return error; @@ -111,7 +111,7 @@ FT_Stream source ) { FT_LzwState lzw = &zip->lzw; - FT_Error error = LZW_Err_Ok; + FT_Error error; zip->stream = stream; @@ -172,7 +172,7 @@ { FT_LzwState lzw = &zip->lzw; FT_ULong count; - FT_Error error = LZW_Err_Ok; + FT_Error error = FT_Err_Ok; zip->cursor = zip->buffer; @@ -182,7 +182,7 @@ zip->limit = zip->cursor + count; if ( count == 0 ) - error = LZW_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); return error; } @@ -193,7 +193,7 @@ ft_lzw_file_skip_output( FT_LZWFile zip, FT_ULong count ) { - FT_Error error = LZW_Err_Ok; + FT_Error error = FT_Err_Ok; /* first, we skip what we can from the output buffer */ @@ -224,7 +224,7 @@ if ( numread < delta ) { /* not enough bytes */ - error = LZW_Err_Invalid_Stream_Operation; + error = FT_THROW( Invalid_Stream_Operation ); break; } @@ -349,10 +349,18 @@ FT_Stream source ) { FT_Error error; - FT_Memory memory = source->memory; + FT_Memory memory; FT_LZWFile zip = NULL; + if ( !stream || !source ) + { + error = FT_THROW( Invalid_Stream_Handle ); + goto Exit; + } + + memory = source->memory; + /* * Check the header right now; this prevents allocation of a huge * LZWFile object (400 KByte of heap memory) if not necessary. @@ -403,7 +411,7 @@ FT_UNUSED( stream ); FT_UNUSED( source ); - return LZW_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } diff --git a/src/lzw/ftzopen.h b/src/lzw/ftzopen.h index f7d2936..cdc8fd7 100644 --- a/src/lzw/ftzopen.h +++ b/src/lzw/ftzopen.h @@ -41,7 +41,7 @@ #define LZW_CLEAR 256 #define LZW_FIRST 257 -#define LZW_BIT_MASK 0x1f +#define LZW_BIT_MASK 0x1F #define LZW_BLOCK_MASK 0x80 #define LZW_MASK( n ) ( ( 1U << (n) ) - 1U ) diff --git a/src/otvalid/otvbase.c b/src/otvalid/otvbase.c index d742d2d..4f9d2fa 100644 --- a/src/otvalid/otvbase.c +++ b/src/otvalid/otvbase.c @@ -32,7 +32,7 @@ static void otv_BaseCoord_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt BaseCoordFormat; @@ -58,7 +58,7 @@ case 3: /* BaseCoordFormat3 */ OTV_LIMIT_CHECK( 2 ); /* DeviceTable */ - otv_Device_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_Device_validate( table + FT_NEXT_USHORT( p ), otvalid ); break; default: @@ -71,7 +71,7 @@ static void otv_BaseTagList_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt BaseTagCount; @@ -93,7 +93,7 @@ static void otv_BaseValues_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt BaseCoordCount; @@ -112,7 +112,7 @@ /* BaseCoord */ for ( ; BaseCoordCount > 0; BaseCoordCount-- ) - otv_BaseCoord_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_BaseCoord_validate( table + FT_NEXT_USHORT( p ), otvalid ); OTV_EXIT; } @@ -120,7 +120,7 @@ static void otv_MinMax_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt table_size; @@ -144,11 +144,11 @@ OTV_SIZE_CHECK( MinCoord ); if ( MinCoord ) - otv_BaseCoord_validate( table + MinCoord, valid ); + otv_BaseCoord_validate( table + MinCoord, otvalid ); OTV_SIZE_CHECK( MaxCoord ); if ( MaxCoord ) - otv_BaseCoord_validate( table + MaxCoord, valid ); + otv_BaseCoord_validate( table + MaxCoord, otvalid ); OTV_LIMIT_CHECK( FeatMinMaxCount * 8 ); @@ -162,11 +162,11 @@ OTV_SIZE_CHECK( MinCoord ); if ( MinCoord ) - otv_BaseCoord_validate( table + MinCoord, valid ); + otv_BaseCoord_validate( table + MinCoord, otvalid ); OTV_SIZE_CHECK( MaxCoord ); if ( MaxCoord ) - otv_BaseCoord_validate( table + MaxCoord, valid ); + otv_BaseCoord_validate( table + MaxCoord, otvalid ); } OTV_EXIT; @@ -175,7 +175,7 @@ static void otv_BaseScript_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt table_size; @@ -198,11 +198,11 @@ OTV_SIZE_CHECK( BaseValues ); if ( BaseValues ) - otv_BaseValues_validate( table + BaseValues, valid ); + otv_BaseValues_validate( table + BaseValues, otvalid ); OTV_SIZE_CHECK( DefaultMinMax ); if ( DefaultMinMax ) - otv_MinMax_validate( table + DefaultMinMax, valid ); + otv_MinMax_validate( table + DefaultMinMax, otvalid ); OTV_LIMIT_CHECK( BaseLangSysCount * 6 ); @@ -211,7 +211,7 @@ { p += 4; /* skip BaseLangSysTag */ - otv_MinMax_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_MinMax_validate( table + FT_NEXT_USHORT( p ), otvalid ); } OTV_EXIT; @@ -220,7 +220,7 @@ static void otv_BaseScriptList_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt BaseScriptCount; @@ -241,7 +241,7 @@ p += 4; /* skip BaseScriptTag */ /* BaseScript */ - otv_BaseScript_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_BaseScript_validate( table + FT_NEXT_USHORT( p ), otvalid ); } OTV_EXIT; @@ -250,7 +250,7 @@ static void otv_Axis_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt table_size; @@ -267,10 +267,10 @@ OTV_SIZE_CHECK( BaseTagList ); if ( BaseTagList ) - otv_BaseTagList_validate( table + BaseTagList, valid ); + otv_BaseTagList_validate( table + BaseTagList, otvalid ); /* BaseScriptList */ - otv_BaseScriptList_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_BaseScriptList_validate( table + FT_NEXT_USHORT( p ), otvalid ); OTV_EXIT; } @@ -280,16 +280,16 @@ otv_BASE_validate( FT_Bytes table, FT_Validator ftvalid ) { - OTV_ValidatorRec validrec; - OTV_Validator valid = &validrec; - FT_Bytes p = table; + OTV_ValidatorRec otvalidrec; + OTV_Validator otvalid = &otvalidrec; + FT_Bytes p = table; FT_UInt table_size; OTV_OPTIONAL_TABLE( HorizAxis ); OTV_OPTIONAL_TABLE( VertAxis ); - valid->root = ftvalid; + otvalid->root = ftvalid; FT_TRACE3(( "validating BASE table\n" )); OTV_INIT; @@ -304,12 +304,12 @@ OTV_OPTIONAL_OFFSET( HorizAxis ); OTV_SIZE_CHECK( HorizAxis ); if ( HorizAxis ) - otv_Axis_validate( table + HorizAxis, valid ); + otv_Axis_validate( table + HorizAxis, otvalid ); OTV_OPTIONAL_OFFSET( VertAxis ); OTV_SIZE_CHECK( VertAxis ); if ( VertAxis ) - otv_Axis_validate( table + VertAxis, valid ); + otv_Axis_validate( table + VertAxis, otvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c index a4f885b..3c3de63 100644 --- a/src/otvalid/otvcommn.c +++ b/src/otvalid/otvcommn.c @@ -39,7 +39,7 @@ FT_LOCAL_DEF( void ) otv_Coverage_validate( FT_Bytes table, - OTV_Validator valid, + OTV_Validator otvalid, FT_Int expected_count ) { FT_Bytes p = table; @@ -74,7 +74,7 @@ gid = FT_NEXT_USHORT( p ); - if ( gid >= valid->glyph_count ) + if ( gid >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; } @@ -104,7 +104,7 @@ if ( Start > End || StartCoverageIndex != total ) FT_INVALID_DATA; - if ( End >= valid->glyph_count ) + if ( End >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; if ( n > 0 && Start <= last ) @@ -219,7 +219,7 @@ FT_LOCAL_DEF( void ) otv_ClassDef_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt ClassFormat; @@ -249,7 +249,7 @@ OTV_LIMIT_CHECK( GlyphCount * 2 ); /* ClassValueArray */ - if ( StartGlyph + GlyphCount - 1 >= valid->glyph_count ) + if ( StartGlyph + GlyphCount - 1 >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; } break; @@ -276,7 +276,7 @@ if ( Start > End || ( n > 0 && Start <= last ) ) FT_INVALID_DATA; - if ( End >= valid->glyph_count ) + if ( End >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; last = End; @@ -305,7 +305,7 @@ FT_LOCAL_DEF( void ) otv_Device_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt StartSize, EndSize, DeltaFormat, count; @@ -339,12 +339,12 @@ /*************************************************************************/ /*************************************************************************/ - /* uses valid->type_count */ - /* uses valid->type_funcs */ + /* uses otvalid->type_count */ + /* uses otvalid->type_funcs */ FT_LOCAL_DEF( void ) otv_Lookup_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt LookupType, SubTableCount; @@ -360,10 +360,10 @@ OTV_TRACE(( " (type %d)\n", LookupType )); - if ( LookupType == 0 || LookupType > valid->type_count ) + if ( LookupType == 0 || LookupType > otvalid->type_count ) FT_INVALID_DATA; - validate = valid->type_funcs[LookupType - 1]; + validate = otvalid->type_funcs[LookupType - 1]; OTV_TRACE(( " (SubTableCount = %d)\n", SubTableCount )); @@ -371,7 +371,7 @@ /* SubTable */ for ( ; SubTableCount > 0; SubTableCount-- ) - validate( table + FT_NEXT_USHORT( p ), valid ); + validate( table + FT_NEXT_USHORT( p ), otvalid ); OTV_EXIT; } @@ -381,7 +381,7 @@ FT_LOCAL_DEF( void ) otv_LookupList_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt LookupCount; @@ -396,11 +396,11 @@ OTV_LIMIT_CHECK( LookupCount * 2 ); - valid->lookup_count = LookupCount; + otvalid->lookup_count = LookupCount; /* Lookup */ for ( ; LookupCount > 0; LookupCount-- ) - otv_Lookup_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_Lookup_validate( table + FT_NEXT_USHORT( p ), otvalid ); OTV_EXIT; } @@ -421,11 +421,11 @@ /*************************************************************************/ /*************************************************************************/ - /* uses valid->lookup_count */ + /* uses otvalid->lookup_count */ FT_LOCAL_DEF( void ) otv_Feature_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt LookupCount; @@ -443,7 +443,7 @@ /* LookupListIndex */ for ( ; LookupCount > 0; LookupCount-- ) - if ( FT_NEXT_USHORT( p ) >= valid->lookup_count ) + if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count ) FT_INVALID_DATA; OTV_EXIT; @@ -457,12 +457,12 @@ } - /* sets valid->lookup_count */ + /* sets otvalid->lookup_count */ FT_LOCAL_DEF( void ) otv_FeatureList_validate( FT_Bytes table, FT_Bytes lookups, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt FeatureCount; @@ -477,7 +477,7 @@ OTV_LIMIT_CHECK( FeatureCount * 2 ); - valid->lookup_count = otv_LookupList_get_count( lookups ); + otvalid->lookup_count = otv_LookupList_get_count( lookups ); /* FeatureRecord */ for ( ; FeatureCount > 0; FeatureCount-- ) @@ -485,7 +485,7 @@ p += 4; /* skip FeatureTag */ /* Feature */ - otv_Feature_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_Feature_validate( table + FT_NEXT_USHORT( p ), otvalid ); } OTV_EXIT; @@ -501,11 +501,11 @@ /*************************************************************************/ - /* uses valid->extra1 (number of features) */ + /* uses otvalid->extra1 (number of features) */ FT_LOCAL_DEF( void ) otv_LangSys_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt ReqFeatureIndex; @@ -522,14 +522,14 @@ OTV_TRACE(( " (ReqFeatureIndex = %d)\n", ReqFeatureIndex )); OTV_TRACE(( " (FeatureCount = %d)\n", FeatureCount )); - if ( ReqFeatureIndex != 0xFFFFU && ReqFeatureIndex >= valid->extra1 ) + if ( ReqFeatureIndex != 0xFFFFU && ReqFeatureIndex >= otvalid->extra1 ) FT_INVALID_DATA; OTV_LIMIT_CHECK( FeatureCount * 2 ); /* FeatureIndex */ for ( ; FeatureCount > 0; FeatureCount-- ) - if ( FT_NEXT_USHORT( p ) >= valid->extra1 ) + if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 ) FT_INVALID_DATA; OTV_EXIT; @@ -546,7 +546,7 @@ FT_LOCAL_DEF( void ) otv_Script_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_UInt DefaultLangSys, LangSysCount; FT_Bytes p = table; @@ -561,7 +561,7 @@ OTV_TRACE(( " (LangSysCount = %d)\n", LangSysCount )); if ( DefaultLangSys != 0 ) - otv_LangSys_validate( table + DefaultLangSys, valid ); + otv_LangSys_validate( table + DefaultLangSys, otvalid ); OTV_LIMIT_CHECK( LangSysCount * 6 ); @@ -571,19 +571,19 @@ p += 4; /* skip LangSysTag */ /* LangSys */ - otv_LangSys_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_LangSys_validate( table + FT_NEXT_USHORT( p ), otvalid ); } OTV_EXIT; } - /* sets valid->extra1 (number of features) */ + /* sets otvalid->extra1 (number of features) */ FT_LOCAL_DEF( void ) otv_ScriptList_validate( FT_Bytes table, FT_Bytes features, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_UInt ScriptCount; FT_Bytes p = table; @@ -598,14 +598,14 @@ OTV_LIMIT_CHECK( ScriptCount * 6 ); - valid->extra1 = otv_Feature_get_count( features ); + otvalid->extra1 = otv_Feature_get_count( features ); /* ScriptRecord */ for ( ; ScriptCount > 0; ScriptCount-- ) { p += 4; /* skip ScriptTag */ - otv_Script_validate( table + FT_NEXT_USHORT( p ), valid ); /* Script */ + otv_Script_validate( table + FT_NEXT_USHORT( p ), otvalid ); /* Script */ } OTV_EXIT; @@ -640,7 +640,7 @@ FT_LOCAL_DEF( void ) otv_x_Ox( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Count; @@ -656,13 +656,13 @@ OTV_LIMIT_CHECK( Count * 2 ); - valid->nesting_level++; - func = valid->func[valid->nesting_level]; + otvalid->nesting_level++; + func = otvalid->func[otvalid->nesting_level]; for ( ; Count > 0; Count-- ) - func( table + FT_NEXT_USHORT( p ), valid ); + func( table + FT_NEXT_USHORT( p ), otvalid ); - valid->nesting_level--; + otvalid->nesting_level--; OTV_EXIT; } @@ -670,7 +670,7 @@ FT_LOCAL_DEF( void ) otv_u_C_x_Ox( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Count, Coverage; @@ -687,27 +687,27 @@ OTV_TRACE(( " (Count = %d)\n", Count )); - otv_Coverage_validate( table + Coverage, valid, Count ); + otv_Coverage_validate( table + Coverage, otvalid, Count ); OTV_LIMIT_CHECK( Count * 2 ); - valid->nesting_level++; - func = valid->func[valid->nesting_level]; + otvalid->nesting_level++; + func = otvalid->func[otvalid->nesting_level]; for ( ; Count > 0; Count-- ) - func( table + FT_NEXT_USHORT( p ), valid ); + func( table + FT_NEXT_USHORT( p ), otvalid ); - valid->nesting_level--; + otvalid->nesting_level--; OTV_EXIT; } - /* uses valid->extra1 (if > 0: array value limit) */ + /* uses otvalid->extra1 (if > 0: array value limit) */ FT_LOCAL_DEF( void ) otv_x_ux( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Count; @@ -722,10 +722,10 @@ OTV_LIMIT_CHECK( Count * 2 ); - if ( valid->extra1 ) + if ( otvalid->extra1 ) { for ( ; Count > 0; Count-- ) - if ( FT_NEXT_USHORT( p ) >= valid->extra1 ) + if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 ) FT_INVALID_DATA; } @@ -736,11 +736,11 @@ /* `ux' in the function's name is not really correct since only x-1 */ /* elements are tested */ - /* uses valid->extra1 (array value limit) */ + /* uses otvalid->extra1 (array value limit) */ FT_LOCAL_DEF( void ) otv_x_y_ux_sy( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Count1, Count2; @@ -766,7 +766,7 @@ if ( FT_NEXT_USHORT( p ) >= Count1 ) FT_INVALID_DATA; - if ( FT_NEXT_USHORT( p ) >= valid->extra1 ) + if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 ) FT_INVALID_DATA; } @@ -777,11 +777,11 @@ /* `uy' in the function's name is not really correct since only y-1 */ /* elements are tested */ - /* uses valid->extra1 (array value limit) */ + /* uses otvalid->extra1 (array value limit) */ FT_LOCAL_DEF( void ) otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt BacktrackCount, InputCount, LookaheadCount; @@ -825,7 +825,7 @@ if ( FT_NEXT_USHORT( p ) >= InputCount ) FT_INVALID_DATA; - if ( FT_NEXT_USHORT( p ) >= valid->extra1 ) + if ( FT_NEXT_USHORT( p ) >= otvalid->extra1 ) FT_INVALID_DATA; } @@ -833,11 +833,11 @@ } - /* sets valid->extra1 (valid->lookup_count) */ + /* sets otvalid->extra1 (valid->lookup_count) */ FT_LOCAL_DEF( void ) otv_u_O_O_x_Onx( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Coverage, ClassDef, ClassSetCount; @@ -855,14 +855,14 @@ OTV_TRACE(( " (ClassSetCount = %d)\n", ClassSetCount )); - otv_Coverage_validate( table + Coverage, valid, -1 ); - otv_ClassDef_validate( table + ClassDef, valid ); + otv_Coverage_validate( table + Coverage, otvalid, -1 ); + otv_ClassDef_validate( table + ClassDef, otvalid ); OTV_LIMIT_CHECK( ClassSetCount * 2 ); - valid->nesting_level++; - func = valid->func[valid->nesting_level]; - valid->extra1 = valid->lookup_count; + otvalid->nesting_level++; + func = otvalid->func[otvalid->nesting_level]; + otvalid->extra1 = otvalid->lookup_count; for ( ; ClassSetCount > 0; ClassSetCount-- ) { @@ -870,20 +870,20 @@ if ( offset ) - func( table + offset, valid ); + func( table + offset, otvalid ); } - valid->nesting_level--; + otvalid->nesting_level--; OTV_EXIT; } - /* uses valid->lookup_count */ + /* uses otvalid->lookup_count */ FT_LOCAL_DEF( void ) otv_u_x_y_Ox_sy( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt GlyphCount, Count, count1; @@ -903,14 +903,14 @@ OTV_LIMIT_CHECK( GlyphCount * 2 + Count * 4 ); for ( count1 = GlyphCount; count1 > 0; count1-- ) - otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 ); + otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 ); for ( ; Count > 0; Count-- ) { if ( FT_NEXT_USHORT( p ) >= GlyphCount ) FT_INVALID_DATA; - if ( FT_NEXT_USHORT( p ) >= valid->lookup_count ) + if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count ) FT_INVALID_DATA; } @@ -918,11 +918,11 @@ } - /* sets valid->extra1 (valid->lookup_count) */ + /* sets otvalid->extra1 (valid->lookup_count) */ FT_LOCAL_DEF( void ) otv_u_O_O_O_O_x_Onx( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Coverage; @@ -944,17 +944,17 @@ OTV_TRACE(( " (ChainClassSetCount = %d)\n", ChainClassSetCount )); - otv_Coverage_validate( table + Coverage, valid, -1 ); + otv_Coverage_validate( table + Coverage, otvalid, -1 ); - otv_ClassDef_validate( table + BacktrackClassDef, valid ); - otv_ClassDef_validate( table + InputClassDef, valid ); - otv_ClassDef_validate( table + LookaheadClassDef, valid ); + otv_ClassDef_validate( table + BacktrackClassDef, otvalid ); + otv_ClassDef_validate( table + InputClassDef, otvalid ); + otv_ClassDef_validate( table + LookaheadClassDef, otvalid ); OTV_LIMIT_CHECK( ChainClassSetCount * 2 ); - valid->nesting_level++; - func = valid->func[valid->nesting_level]; - valid->extra1 = valid->lookup_count; + otvalid->nesting_level++; + func = otvalid->func[otvalid->nesting_level]; + otvalid->extra1 = otvalid->lookup_count; for ( ; ChainClassSetCount > 0; ChainClassSetCount-- ) { @@ -962,20 +962,20 @@ if ( offset ) - func( table + offset, valid ); + func( table + offset, otvalid ); } - valid->nesting_level--; + otvalid->nesting_level--; OTV_EXIT; } - /* uses valid->lookup_count */ + /* uses otvalid->lookup_count */ FT_LOCAL_DEF( void ) otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt BacktrackGlyphCount, InputGlyphCount, LookaheadGlyphCount; @@ -994,7 +994,7 @@ OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 ); for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- ) - otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 ); + otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 ); InputGlyphCount = FT_NEXT_USHORT( p ); @@ -1003,7 +1003,7 @@ OTV_LIMIT_CHECK( InputGlyphCount * 2 + 2 ); for ( count1 = InputGlyphCount; count1 > 0; count1-- ) - otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 ); + otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 ); LookaheadGlyphCount = FT_NEXT_USHORT( p ); @@ -1012,7 +1012,7 @@ OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 ); for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- ) - otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 ); + otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 ); count2 = FT_NEXT_USHORT( p ); @@ -1025,7 +1025,7 @@ if ( FT_NEXT_USHORT( p ) >= InputGlyphCount ) FT_INVALID_DATA; - if ( FT_NEXT_USHORT( p ) >= valid->lookup_count ) + if ( FT_NEXT_USHORT( p ) >= otvalid->lookup_count ) FT_INVALID_DATA; } diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h index 898887f..5c93ba7 100644 --- a/src/otvalid/otvcommn.h +++ b/src/otvalid/otvcommn.h @@ -4,7 +4,7 @@ /* */ /* OpenType common tables validation (specification). */ /* */ -/* Copyright 2004, 2005, 2007, 2009 by */ +/* Copyright 2004, 2005, 2007, 2009, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -39,7 +39,7 @@ FT_BEGIN_HEADER typedef struct OTV_ValidatorRec_* OTV_Validator; typedef void (*OTV_Validate_Func)( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); typedef struct OTV_ValidatorRec_ { @@ -67,8 +67,8 @@ FT_BEGIN_HEADER #undef FT_INVALID_ -#define FT_INVALID_( _prefix, _error ) \ - ft_validator_error( valid->root, _prefix ## _error ) +#define FT_INVALID_( _error ) \ + ft_validator_error( otvalid->root, FT_THROW( _error ) ) #define OTV_OPTIONAL_TABLE( _table ) FT_UShort _table; \ FT_Bytes _table ## _p @@ -81,7 +81,7 @@ FT_BEGIN_HEADER #define OTV_LIMIT_CHECK( _count ) \ FT_BEGIN_STMNT \ - if ( p + (_count) > valid->root->limit ) \ + if ( p + (_count) > otvalid->root->limit ) \ FT_INVALID_TOO_SHORT; \ FT_END_STMNT @@ -89,7 +89,7 @@ FT_BEGIN_HEADER FT_BEGIN_STMNT \ if ( _size > 0 && _size < table_size ) \ { \ - if ( valid->root->level == FT_VALIDATE_PARANOID ) \ + if ( otvalid->root->level == FT_VALIDATE_PARANOID ) \ FT_INVALID_OFFSET; \ else \ { \ @@ -117,79 +117,79 @@ FT_BEGIN_HEADER #ifdef FT_DEBUG_LEVEL_TRACE -#define OTV_NEST1( x ) \ - FT_BEGIN_STMNT \ - valid->nesting_level = 0; \ - valid->func[0] = OTV_FUNC( x ); \ - valid->debug_function_name[0] = OTV_NAME( x ); \ +#define OTV_NEST1( x ) \ + FT_BEGIN_STMNT \ + otvalid->nesting_level = 0; \ + otvalid->func[0] = OTV_FUNC( x ); \ + otvalid->debug_function_name[0] = OTV_NAME( x ); \ FT_END_STMNT -#define OTV_NEST2( x, y ) \ - FT_BEGIN_STMNT \ - valid->nesting_level = 0; \ - valid->func[0] = OTV_FUNC( x ); \ - valid->func[1] = OTV_FUNC( y ); \ - valid->debug_function_name[0] = OTV_NAME( x ); \ - valid->debug_function_name[1] = OTV_NAME( y ); \ +#define OTV_NEST2( x, y ) \ + FT_BEGIN_STMNT \ + otvalid->nesting_level = 0; \ + otvalid->func[0] = OTV_FUNC( x ); \ + otvalid->func[1] = OTV_FUNC( y ); \ + otvalid->debug_function_name[0] = OTV_NAME( x ); \ + otvalid->debug_function_name[1] = OTV_NAME( y ); \ FT_END_STMNT -#define OTV_NEST3( x, y, z ) \ - FT_BEGIN_STMNT \ - valid->nesting_level = 0; \ - valid->func[0] = OTV_FUNC( x ); \ - valid->func[1] = OTV_FUNC( y ); \ - valid->func[2] = OTV_FUNC( z ); \ - valid->debug_function_name[0] = OTV_NAME( x ); \ - valid->debug_function_name[1] = OTV_NAME( y ); \ - valid->debug_function_name[2] = OTV_NAME( z ); \ +#define OTV_NEST3( x, y, z ) \ + FT_BEGIN_STMNT \ + otvalid->nesting_level = 0; \ + otvalid->func[0] = OTV_FUNC( x ); \ + otvalid->func[1] = OTV_FUNC( y ); \ + otvalid->func[2] = OTV_FUNC( z ); \ + otvalid->debug_function_name[0] = OTV_NAME( x ); \ + otvalid->debug_function_name[1] = OTV_NAME( y ); \ + otvalid->debug_function_name[2] = OTV_NAME( z ); \ FT_END_STMNT -#define OTV_INIT valid->debug_indent = 0 +#define OTV_INIT otvalid->debug_indent = 0 -#define OTV_ENTER \ - FT_BEGIN_STMNT \ - valid->debug_indent += 2; \ - FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ - FT_TRACE4(( "%s table\n", \ - valid->debug_function_name[valid->nesting_level] )); \ +#define OTV_ENTER \ + FT_BEGIN_STMNT \ + otvalid->debug_indent += 2; \ + FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \ + FT_TRACE4(( "%s table\n", \ + otvalid->debug_function_name[otvalid->nesting_level] )); \ FT_END_STMNT -#define OTV_NAME_ENTER( name ) \ - FT_BEGIN_STMNT \ - valid->debug_indent += 2; \ - FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ - FT_TRACE4(( "%s table\n", name )); \ +#define OTV_NAME_ENTER( name ) \ + FT_BEGIN_STMNT \ + otvalid->debug_indent += 2; \ + FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \ + FT_TRACE4(( "%s table\n", name )); \ FT_END_STMNT -#define OTV_EXIT valid->debug_indent -= 2 +#define OTV_EXIT otvalid->debug_indent -= 2 -#define OTV_TRACE( s ) \ - FT_BEGIN_STMNT \ - FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \ - FT_TRACE4( s ); \ +#define OTV_TRACE( s ) \ + FT_BEGIN_STMNT \ + FT_TRACE4(( "%*.s", otvalid->debug_indent, 0 )); \ + FT_TRACE4( s ); \ FT_END_STMNT #else /* !FT_DEBUG_LEVEL_TRACE */ -#define OTV_NEST1( x ) \ - FT_BEGIN_STMNT \ - valid->nesting_level = 0; \ - valid->func[0] = OTV_FUNC( x ); \ +#define OTV_NEST1( x ) \ + FT_BEGIN_STMNT \ + otvalid->nesting_level = 0; \ + otvalid->func[0] = OTV_FUNC( x ); \ FT_END_STMNT -#define OTV_NEST2( x, y ) \ - FT_BEGIN_STMNT \ - valid->nesting_level = 0; \ - valid->func[0] = OTV_FUNC( x ); \ - valid->func[1] = OTV_FUNC( y ); \ +#define OTV_NEST2( x, y ) \ + FT_BEGIN_STMNT \ + otvalid->nesting_level = 0; \ + otvalid->func[0] = OTV_FUNC( x ); \ + otvalid->func[1] = OTV_FUNC( y ); \ FT_END_STMNT -#define OTV_NEST3( x, y, z ) \ - FT_BEGIN_STMNT \ - valid->nesting_level = 0; \ - valid->func[0] = OTV_FUNC( x ); \ - valid->func[1] = OTV_FUNC( y ); \ - valid->func[2] = OTV_FUNC( z ); \ +#define OTV_NEST3( x, y, z ) \ + FT_BEGIN_STMNT \ + otvalid->nesting_level = 0; \ + otvalid->func[0] = OTV_FUNC( x ); \ + otvalid->func[1] = OTV_FUNC( y ); \ + otvalid->func[2] = OTV_FUNC( z ); \ FT_END_STMNT #define OTV_INIT do { } while ( 0 ) @@ -202,7 +202,7 @@ FT_BEGIN_HEADER #endif /* !FT_DEBUG_LEVEL_TRACE */ -#define OTV_RUN valid->func[0] +#define OTV_RUN otvalid->func[0] /*************************************************************************/ @@ -215,7 +215,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_Coverage_validate( FT_Bytes table, - OTV_Validator valid, + OTV_Validator otvalid, FT_Int expected_count ); /* return first covered glyph */ @@ -241,7 +241,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_ClassDef_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -254,7 +254,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_Device_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -267,11 +267,11 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_Lookup_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); FT_LOCAL( void ) otv_LookupList_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -284,13 +284,13 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_Feature_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /* lookups must already be validated */ FT_LOCAL( void ) otv_FeatureList_validate( FT_Bytes table, FT_Bytes lookups, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -303,7 +303,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_LangSys_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -316,13 +316,13 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_Script_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /* features must already be validated */ FT_LOCAL( void ) otv_ScriptList_validate( FT_Bytes table, FT_Bytes features, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -349,7 +349,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_x_Ox ( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define AlternateSubstFormat1Func otv_u_C_x_Ox #define ChainContextPosFormat1Func otv_u_C_x_Ox @@ -361,7 +361,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_u_C_x_Ox( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define AlternateSetFunc otv_x_ux #define AttachPointFunc otv_x_ux @@ -372,7 +372,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_x_ux( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define PosClassRuleFunc otv_x_y_ux_sy #define PosRuleFunc otv_x_y_ux_sy @@ -381,7 +381,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_x_y_ux_sy( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define ChainPosClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp #define ChainPosRuleFunc otv_x_ux_y_uy_z_uz_p_sp @@ -390,35 +390,35 @@ FT_BEGIN_HEADER FT_LOCAL( void ) otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define ContextPosFormat2Func otv_u_O_O_x_Onx #define ContextSubstFormat2Func otv_u_O_O_x_Onx FT_LOCAL( void ) otv_u_O_O_x_Onx( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define ContextPosFormat3Func otv_u_x_y_Ox_sy #define ContextSubstFormat3Func otv_u_x_y_Ox_sy FT_LOCAL( void ) otv_u_x_y_Ox_sy( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define ChainContextPosFormat2Func otv_u_O_O_O_O_x_Onx #define ChainContextSubstFormat2Func otv_u_O_O_O_O_x_Onx FT_LOCAL( void ) otv_u_O_O_O_O_x_Onx( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); #define ChainContextPosFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp #define ChainContextSubstFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp FT_LOCAL( void ) otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); FT_LOCAL( FT_UInt ) diff --git a/src/otvalid/otverror.h b/src/otvalid/otverror.h index 522f4a2..b6f00c9 100644 --- a/src/otvalid/otverror.h +++ b/src/otvalid/otverror.h @@ -4,7 +4,7 @@ /* */ /* OpenType validation module error codes (specification only). */ /* */ -/* Copyright 2004, 2005, 2012 by */ +/* Copyright 2004, 2005, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -34,8 +34,6 @@ #define FT_ERR_PREFIX OTV_Err_ #define FT_ERR_BASE FT_Mod_Err_OTvalid -#define FT_KEEP_ERR_PREFIX - #include FT_ERRORS_H #endif /* __OTVERROR_H__ */ diff --git a/src/otvalid/otvgdef.c b/src/otvalid/otvgdef.c index 3633ad0..e60ef36 100644 --- a/src/otvalid/otvgdef.c +++ b/src/otvalid/otvgdef.c @@ -45,7 +45,7 @@ static void otv_O_x_Ox( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_Bytes Coverage; @@ -61,20 +61,20 @@ OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount )); - otv_Coverage_validate( Coverage, valid, GlyphCount ); + otv_Coverage_validate( Coverage, otvalid, GlyphCount ); if ( GlyphCount != otv_Coverage_get_count( Coverage ) ) FT_INVALID_DATA; OTV_LIMIT_CHECK( GlyphCount * 2 ); - valid->nesting_level++; - func = valid->func[valid->nesting_level]; - valid->extra1 = 0; + otvalid->nesting_level++; + func = otvalid->func[otvalid->nesting_level]; + otvalid->extra1 = 0; for ( ; GlyphCount > 0; GlyphCount-- ) - func( table + FT_NEXT_USHORT( p ), valid ); + func( table + FT_NEXT_USHORT( p ), otvalid ); - valid->nesting_level--; + otvalid->nesting_level--; OTV_EXIT; } @@ -92,7 +92,7 @@ static void otv_CaretValue_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt CaretValueFormat; @@ -122,7 +122,7 @@ OTV_LIMIT_CHECK( 2 ); /* DeviceTable */ - otv_Device_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_Device_validate( table + FT_NEXT_USHORT( p ), otvalid ); break; default: @@ -141,7 +141,7 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->glyph_count */ + /* sets otvalid->glyph_count */ FT_LOCAL_DEF( void ) otv_GDEF_validate( FT_Bytes table, @@ -150,8 +150,8 @@ FT_UInt glyph_count, FT_Validator ftvalid ) { - OTV_ValidatorRec validrec; - OTV_Validator valid = &validrec; + OTV_ValidatorRec otvalidrec; + OTV_Validator otvalid = &otvalidrec; FT_Bytes p = table; FT_UInt table_size; FT_Bool need_MarkAttachClassDef; @@ -162,7 +162,7 @@ OTV_OPTIONAL_TABLE( MarkAttachClassDef ); - valid->root = ftvalid; + otvalid->root = ftvalid; FT_TRACE3(( "validating GDEF table\n" )); OTV_INIT; @@ -186,19 +186,19 @@ else table_size = 10; /* OpenType < 1.2 */ - valid->glyph_count = glyph_count; + otvalid->glyph_count = glyph_count; OTV_OPTIONAL_OFFSET( GlyphClassDef ); OTV_SIZE_CHECK( GlyphClassDef ); if ( GlyphClassDef ) - otv_ClassDef_validate( table + GlyphClassDef, valid ); + otv_ClassDef_validate( table + GlyphClassDef, otvalid ); OTV_OPTIONAL_OFFSET( AttachListOffset ); OTV_SIZE_CHECK( AttachListOffset ); if ( AttachListOffset ) { OTV_NEST2( AttachList, AttachPoint ); - OTV_RUN( table + AttachListOffset, valid ); + OTV_RUN( table + AttachListOffset, otvalid ); } OTV_OPTIONAL_OFFSET( LigCaretListOffset ); @@ -206,7 +206,7 @@ if ( LigCaretListOffset ) { OTV_NEST3( LigCaretList, LigGlyph, CaretValue ); - OTV_RUN( table + LigCaretListOffset, valid ); + OTV_RUN( table + LigCaretListOffset, otvalid ); } if ( need_MarkAttachClassDef ) @@ -214,7 +214,7 @@ OTV_OPTIONAL_OFFSET( MarkAttachClassDef ); OTV_SIZE_CHECK( MarkAttachClassDef ); if ( MarkAttachClassDef ) - otv_ClassDef_validate( table + MarkAttachClassDef, valid ); + otv_ClassDef_validate( table + MarkAttachClassDef, otvalid ); } FT_TRACE4(( "\n" )); diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c index 49b4618..1a9dbaa 100644 --- a/src/otvalid/otvgpos.c +++ b/src/otvalid/otvgpos.c @@ -57,7 +57,7 @@ static void otv_x_sxy( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Count, count1, table_size; @@ -71,26 +71,26 @@ OTV_TRACE(( " (Count = %d)\n", Count )); - OTV_LIMIT_CHECK( Count * valid->extra1 * 2 ); + OTV_LIMIT_CHECK( Count * otvalid->extra1 * 2 ); - table_size = Count * valid->extra1 * 2 + 2; + table_size = Count * otvalid->extra1 * 2 + 2; for ( ; Count > 0; Count-- ) - for ( count1 = valid->extra1; count1 > 0; count1-- ) + for ( count1 = otvalid->extra1; count1 > 0; count1-- ) { OTV_OPTIONAL_TABLE( anchor_offset ); OTV_OPTIONAL_OFFSET( anchor_offset ); - if ( valid->extra2 ) + if ( otvalid->extra2 ) { OTV_SIZE_CHECK( anchor_offset ); if ( anchor_offset ) - otv_Anchor_validate( table + anchor_offset, valid ); + otv_Anchor_validate( table + anchor_offset, otvalid ); } else - otv_Anchor_validate( table + anchor_offset, valid ); + otv_Anchor_validate( table + anchor_offset, otvalid ); } OTV_EXIT; @@ -101,11 +101,11 @@ #define MarkLigPosFormat1Func otv_u_O_O_u_O_O #define MarkMarkPosFormat1Func otv_u_O_O_u_O_O - /* sets valid->extra1 (class count) */ + /* sets otvalid->extra1 (class count) */ static void otv_u_O_O_u_O_O( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt Coverage1, Coverage2, ClassCount; @@ -124,18 +124,18 @@ Array1 = FT_NEXT_USHORT( p ); Array2 = FT_NEXT_USHORT( p ); - otv_Coverage_validate( table + Coverage1, valid, -1 ); - otv_Coverage_validate( table + Coverage2, valid, -1 ); + otv_Coverage_validate( table + Coverage1, otvalid, -1 ); + otv_Coverage_validate( table + Coverage2, otvalid, -1 ); - otv_MarkArray_validate( table + Array1, valid ); + otv_MarkArray_validate( table + Array1, otvalid ); - valid->nesting_level++; - func = valid->func[valid->nesting_level]; - valid->extra1 = ClassCount; + otvalid->nesting_level++; + func = otvalid->func[otvalid->nesting_level]; + otvalid->extra1 = ClassCount; - func( table + Array2, valid ); + func( table + Array2, otvalid ); - valid->nesting_level--; + otvalid->nesting_level--; OTV_EXIT; } @@ -163,12 +163,12 @@ } - /* uses valid->extra3 (pointer to base table) */ + /* uses otvalid->extra3 (pointer to base table) */ static void otv_ValueRecord_validate( FT_Bytes table, FT_UInt format, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt count; @@ -222,11 +222,11 @@ /* ValueRecord is part of an array -- getting the correct table */ /* size is probably not worth the trouble */ - table_size = p - valid->extra3; + table_size = p - otvalid->extra3; OTV_SIZE_CHECK( device ); if ( device ) - otv_Device_validate( valid->extra3 + device, valid ); + otv_Device_validate( otvalid->extra3 + device, otvalid ); } format >>= 1; } @@ -245,7 +245,7 @@ static void otv_Anchor_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt AnchorFormat; @@ -285,11 +285,11 @@ OTV_SIZE_CHECK( XDeviceTable ); if ( XDeviceTable ) - otv_Device_validate( table + XDeviceTable, valid ); + otv_Device_validate( table + XDeviceTable, otvalid ); OTV_SIZE_CHECK( YDeviceTable ); if ( YDeviceTable ) - otv_Device_validate( table + YDeviceTable, valid ); + otv_Device_validate( table + YDeviceTable, otvalid ); } break; @@ -311,7 +311,7 @@ static void otv_MarkArray_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt MarkCount; @@ -331,7 +331,7 @@ { p += 2; /* skip Class */ /* MarkAnchor */ - otv_Anchor_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_Anchor_validate( table + FT_NEXT_USHORT( p ), otvalid ); } OTV_EXIT; @@ -346,11 +346,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra3 (pointer to base table) */ + /* sets otvalid->extra3 (pointer to base table) */ static void otv_SinglePos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -363,7 +363,7 @@ OTV_TRACE(( " (format %d)\n", PosFormat )); - valid->extra3 = table; + otvalid->extra3 = table; switch ( PosFormat ) { @@ -376,8 +376,8 @@ Coverage = FT_NEXT_USHORT( p ); ValueFormat = FT_NEXT_USHORT( p ); - otv_Coverage_validate( table + Coverage, valid, -1 ); - otv_ValueRecord_validate( p, ValueFormat, valid ); /* Value */ + otv_Coverage_validate( table + Coverage, otvalid, -1 ); + otv_ValueRecord_validate( p, ValueFormat, otvalid ); /* Value */ } break; @@ -395,14 +395,14 @@ len_value = otv_value_length( ValueFormat ); - otv_Coverage_validate( table + Coverage, valid, ValueCount ); + otv_Coverage_validate( table + Coverage, otvalid, ValueCount ); OTV_LIMIT_CHECK( ValueCount * len_value ); /* Value */ for ( ; ValueCount > 0; ValueCount-- ) { - otv_ValueRecord_validate( p, ValueFormat, valid ); + otv_ValueRecord_validate( p, ValueFormat, otvalid ); p += len_value; } } @@ -428,7 +428,7 @@ otv_PairSet_validate( FT_Bytes table, FT_UInt format1, FT_UInt format2, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt value_len1, value_len2, PairValueCount; @@ -452,11 +452,11 @@ p += 2; /* skip SecondGlyph */ if ( format1 ) - otv_ValueRecord_validate( p, format1, valid ); /* Value1 */ + otv_ValueRecord_validate( p, format1, otvalid ); /* Value1 */ p += value_len1; if ( format2 ) - otv_ValueRecord_validate( p, format2, valid ); /* Value2 */ + otv_ValueRecord_validate( p, format2, otvalid ); /* Value2 */ p += value_len2; } @@ -464,11 +464,11 @@ } - /* sets valid->extra3 (pointer to base table) */ + /* sets otvalid->extra3 (pointer to base table) */ static void otv_PairPos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -481,7 +481,7 @@ OTV_TRACE(( " (format %d)\n", PosFormat )); - valid->extra3 = table; + otvalid->extra3 = table; switch ( PosFormat ) { @@ -498,14 +498,14 @@ OTV_TRACE(( " (PairSetCount = %d)\n", PairSetCount )); - otv_Coverage_validate( table + Coverage, valid, -1 ); + otv_Coverage_validate( table + Coverage, otvalid, -1 ); OTV_LIMIT_CHECK( PairSetCount * 2 ); /* PairSetOffset */ for ( ; PairSetCount > 0; PairSetCount-- ) otv_PairSet_validate( table + FT_NEXT_USHORT( p ), - ValueFormat1, ValueFormat2, valid ); + ValueFormat1, ValueFormat2, otvalid ); } break; @@ -530,9 +530,9 @@ len_value1 = otv_value_length( ValueFormat1 ); len_value2 = otv_value_length( ValueFormat2 ); - otv_Coverage_validate( table + Coverage, valid, -1 ); - otv_ClassDef_validate( table + ClassDef1, valid ); - otv_ClassDef_validate( table + ClassDef2, valid ); + otv_Coverage_validate( table + Coverage, otvalid, -1 ); + otv_ClassDef_validate( table + ClassDef1, otvalid ); + otv_ClassDef_validate( table + ClassDef2, otvalid ); OTV_LIMIT_CHECK( ClassCount1 * ClassCount2 * ( len_value1 + len_value2 ) ); @@ -545,12 +545,12 @@ { if ( ValueFormat1 ) /* Value1 */ - otv_ValueRecord_validate( p, ValueFormat1, valid ); + otv_ValueRecord_validate( p, ValueFormat1, otvalid ); p += len_value1; if ( ValueFormat2 ) /* Value2 */ - otv_ValueRecord_validate( p, ValueFormat2, valid ); + otv_ValueRecord_validate( p, ValueFormat2, otvalid ); p += len_value2; } } @@ -575,7 +575,7 @@ static void otv_CursivePos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -605,7 +605,7 @@ OTV_TRACE(( " (EntryExitCount = %d)\n", EntryExitCount )); - otv_Coverage_validate( table + Coverage, valid, EntryExitCount ); + otv_Coverage_validate( table + Coverage, otvalid, EntryExitCount ); OTV_LIMIT_CHECK( EntryExitCount * 4 ); @@ -619,11 +619,11 @@ OTV_SIZE_CHECK( EntryAnchor ); if ( EntryAnchor ) - otv_Anchor_validate( table + EntryAnchor, valid ); + otv_Anchor_validate( table + EntryAnchor, otvalid ); OTV_SIZE_CHECK( ExitAnchor ); if ( ExitAnchor ) - otv_Anchor_validate( table + ExitAnchor, valid ); + otv_Anchor_validate( table + ExitAnchor, otvalid ); } } break; @@ -647,11 +647,11 @@ /* UNDOCUMENTED (in OpenType 1.5): */ /* BaseRecord tables can contain NULL pointers. */ - /* sets valid->extra2 (1) */ + /* sets otvalid->extra2 (1) */ static void otv_MarkBasePos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -667,9 +667,9 @@ switch ( PosFormat ) { case 1: - valid->extra2 = 1; + otvalid->extra2 = 1; OTV_NEST2( MarkBasePosFormat1, BaseArray ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -688,11 +688,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra2 (1) */ + /* sets otvalid->extra2 (1) */ static void otv_MarkLigPos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -708,9 +708,9 @@ switch ( PosFormat ) { case 1: - valid->extra2 = 1; + otvalid->extra2 = 1; OTV_NEST3( MarkLigPosFormat1, LigatureArray, LigatureAttach ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -729,11 +729,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra2 (0) */ + /* sets otvalid->extra2 (0) */ static void otv_MarkMarkPos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -749,9 +749,9 @@ switch ( PosFormat ) { case 1: - valid->extra2 = 0; + otvalid->extra2 = 0; OTV_NEST2( MarkMarkPosFormat1, Mark2Array ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -770,11 +770,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra1 (lookup count) */ + /* sets otvalid->extra1 (lookup count) */ static void otv_ContextPos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -794,9 +794,9 @@ /* context rules since even invalid glyph indices/classes return */ /* meaningful results */ - valid->extra1 = valid->lookup_count; + otvalid->extra1 = otvalid->lookup_count; OTV_NEST3( ContextPosFormat1, PosRuleSet, PosRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 2: @@ -805,12 +805,12 @@ /* meaningful results */ OTV_NEST3( ContextPosFormat2, PosClassSet, PosClassRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 3: OTV_NEST1( ContextPosFormat3 ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -829,11 +829,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra1 (lookup count) */ + /* sets otvalid->extra1 (lookup count) */ static void otv_ChainContextPos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -853,10 +853,10 @@ /* context rules since even invalid glyph indices/classes return */ /* meaningful results */ - valid->extra1 = valid->lookup_count; + otvalid->extra1 = otvalid->lookup_count; OTV_NEST3( ChainContextPosFormat1, ChainPosRuleSet, ChainPosRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 2: @@ -866,12 +866,12 @@ OTV_NEST3( ChainContextPosFormat2, ChainPosClassSet, ChainPosClassRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 3: OTV_NEST1( ChainContextPosFormat3 ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -890,11 +890,11 @@ /*************************************************************************/ /*************************************************************************/ - /* uses valid->type_funcs */ + /* uses otvalid->type_funcs */ static void otv_ExtensionPos_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt PosFormat; @@ -923,8 +923,8 @@ if ( ExtensionLookupType == 0 || ExtensionLookupType >= 9 ) FT_INVALID_DATA; - validate = valid->type_funcs[ExtensionLookupType - 1]; - validate( table + ExtensionOffset, valid ); + validate = otvalid->type_funcs[ExtensionLookupType - 1]; + validate( table + ExtensionOffset, otvalid ); } break; @@ -950,17 +950,17 @@ }; - /* sets valid->type_count */ - /* sets valid->type_funcs */ + /* sets otvalid->type_count */ + /* sets otvalid->type_funcs */ FT_LOCAL_DEF( void ) otv_GPOS_subtable_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { - valid->type_count = 9; - valid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs; + otvalid->type_count = 9; + otvalid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs; - otv_Lookup_validate( table, valid ); + otv_Lookup_validate( table, otvalid ); } @@ -972,7 +972,7 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->glyph_count */ + /* sets otvalid->glyph_count */ FT_LOCAL_DEF( void ) otv_GPOS_validate( FT_Bytes table, @@ -980,12 +980,12 @@ FT_Validator ftvalid ) { OTV_ValidatorRec validrec; - OTV_Validator valid = &validrec; + OTV_Validator otvalid = &validrec; FT_Bytes p = table; FT_UInt ScriptList, FeatureList, LookupList; - valid->root = ftvalid; + otvalid->root = ftvalid; FT_TRACE3(( "validating GPOS table\n" )); OTV_INIT; @@ -999,16 +999,16 @@ FeatureList = FT_NEXT_USHORT( p ); LookupList = FT_NEXT_USHORT( p ); - valid->type_count = 9; - valid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs; - valid->glyph_count = glyph_count; + otvalid->type_count = 9; + otvalid->type_funcs = (OTV_Validate_Func*)otv_gpos_validate_funcs; + otvalid->glyph_count = glyph_count; otv_LookupList_validate( table + LookupList, - valid ); + otvalid ); otv_FeatureList_validate( table + FeatureList, table + LookupList, - valid ); + otvalid ); otv_ScriptList_validate( table + ScriptList, table + FeatureList, - valid ); + otvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/otvalid/otvgsub.c b/src/otvalid/otvgsub.c index ed499d1..024b8ca 100644 --- a/src/otvalid/otvgsub.c +++ b/src/otvalid/otvgsub.c @@ -38,11 +38,11 @@ /*************************************************************************/ /*************************************************************************/ - /* uses valid->glyph_count */ + /* uses otvalid->glyph_count */ static void otv_SingleSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -68,14 +68,14 @@ Coverage = table + FT_NEXT_USHORT( p ); DeltaGlyphID = FT_NEXT_SHORT( p ); - otv_Coverage_validate( Coverage, valid, -1 ); + otv_Coverage_validate( Coverage, otvalid, -1 ); idx = otv_Coverage_get_first( Coverage ) + DeltaGlyphID; if ( idx < 0 ) FT_INVALID_DATA; idx = otv_Coverage_get_last( Coverage ) + DeltaGlyphID; - if ( (FT_UInt)idx >= valid->glyph_count ) + if ( (FT_UInt)idx >= otvalid->glyph_count ) FT_INVALID_DATA; } break; @@ -91,13 +91,13 @@ OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount )); - otv_Coverage_validate( table + Coverage, valid, GlyphCount ); + otv_Coverage_validate( table + Coverage, otvalid, GlyphCount ); OTV_LIMIT_CHECK( GlyphCount * 2 ); /* Substitute */ for ( ; GlyphCount > 0; GlyphCount-- ) - if ( FT_NEXT_USHORT( p ) >= valid->glyph_count ) + if ( FT_NEXT_USHORT( p ) >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; } break; @@ -118,11 +118,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra1 (glyph count) */ + /* sets otvalid->extra1 (glyph count) */ static void otv_MultipleSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -138,9 +138,9 @@ switch ( SubstFormat ) { case 1: - valid->extra1 = valid->glyph_count; + otvalid->extra1 = otvalid->glyph_count; OTV_NEST2( MultipleSubstFormat1, Sequence ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -159,11 +159,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra1 (glyph count) */ + /* sets otvalid->extra1 (glyph count) */ static void otv_AlternateSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -179,9 +179,9 @@ switch ( SubstFormat ) { case 1: - valid->extra1 = valid->glyph_count; + otvalid->extra1 = otvalid->glyph_count; OTV_NEST2( AlternateSubstFormat1, AlternateSet ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -202,11 +202,11 @@ #define LigatureFunc otv_Ligature_validate - /* uses valid->glyph_count */ + /* uses otvalid->glyph_count */ static void otv_Ligature_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt LigatureGlyph, CompCount; @@ -216,7 +216,7 @@ OTV_LIMIT_CHECK( 4 ); LigatureGlyph = FT_NEXT_USHORT( p ); - if ( LigatureGlyph >= valid->glyph_count ) + if ( LigatureGlyph >= otvalid->glyph_count ) FT_INVALID_DATA; CompCount = FT_NEXT_USHORT( p ); @@ -238,7 +238,7 @@ static void otv_LigatureSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -255,7 +255,7 @@ { case 1: OTV_NEST3( LigatureSubstFormat1, LigatureSet, Ligature ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -274,11 +274,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra1 (lookup count) */ + /* sets otvalid->extra1 (lookup count) */ static void otv_ContextSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -298,9 +298,9 @@ /* context rules since even invalid glyph indices/classes return */ /* meaningful results */ - valid->extra1 = valid->lookup_count; + otvalid->extra1 = otvalid->lookup_count; OTV_NEST3( ContextSubstFormat1, SubRuleSet, SubRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 2: @@ -309,12 +309,12 @@ /* meaningful results */ OTV_NEST3( ContextSubstFormat2, SubClassSet, SubClassRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 3: OTV_NEST1( ContextSubstFormat3 ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -333,11 +333,11 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->extra1 (lookup count) */ + /* sets otvalid->extra1 (lookup count) */ static void otv_ChainContextSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -357,10 +357,10 @@ /* context rules since even invalid glyph indices/classes return */ /* meaningful results */ - valid->extra1 = valid->lookup_count; + otvalid->extra1 = otvalid->lookup_count; OTV_NEST3( ChainContextSubstFormat1, ChainSubRuleSet, ChainSubRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 2: @@ -370,12 +370,12 @@ OTV_NEST3( ChainContextSubstFormat2, ChainSubClassSet, ChainSubClassRule ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; case 3: OTV_NEST1( ChainContextSubstFormat3 ); - OTV_RUN( table, valid ); + OTV_RUN( table, otvalid ); break; default: @@ -394,11 +394,11 @@ /*************************************************************************/ /*************************************************************************/ - /* uses valid->type_funcs */ + /* uses otvalid->type_funcs */ static void otv_ExtensionSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt SubstFormat; @@ -429,8 +429,8 @@ ExtensionLookupType > 8 ) FT_INVALID_DATA; - validate = valid->type_funcs[ExtensionLookupType - 1]; - validate( table + ExtensionOffset, valid ); + validate = otvalid->type_funcs[ExtensionLookupType - 1]; + validate( table + ExtensionOffset, otvalid ); } break; @@ -450,11 +450,11 @@ /*************************************************************************/ /*************************************************************************/ - /* uses valid->glyph_count */ + /* uses otvalid->glyph_count */ static void otv_ReverseChainSingleSubst_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table, Coverage; FT_UInt SubstFormat; @@ -477,12 +477,12 @@ OTV_TRACE(( " (BacktrackGlyphCount = %d)\n", BacktrackGlyphCount )); - otv_Coverage_validate( Coverage, valid, -1 ); + otv_Coverage_validate( Coverage, otvalid, -1 ); OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 ); for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- ) - otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 ); + otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 ); LookaheadGlyphCount = FT_NEXT_USHORT( p ); @@ -491,7 +491,7 @@ OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 ); for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- ) - otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 ); + otv_Coverage_validate( table + FT_NEXT_USHORT( p ), otvalid, -1 ); GlyphCount = FT_NEXT_USHORT( p ); @@ -504,7 +504,7 @@ /* Substitute */ for ( ; GlyphCount > 0; GlyphCount-- ) - if ( FT_NEXT_USHORT( p ) >= valid->glyph_count ) + if ( FT_NEXT_USHORT( p ) >= otvalid->glyph_count ) FT_INVALID_DATA; break; @@ -538,22 +538,22 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->type_count */ - /* sets valid->type_funcs */ - /* sets valid->glyph_count */ + /* sets otvalid->type_count */ + /* sets otvalid->type_funcs */ + /* sets otvalid->glyph_count */ FT_LOCAL_DEF( void ) otv_GSUB_validate( FT_Bytes table, FT_UInt glyph_count, FT_Validator ftvalid ) { - OTV_ValidatorRec validrec; - OTV_Validator valid = &validrec; - FT_Bytes p = table; + OTV_ValidatorRec otvalidrec; + OTV_Validator otvalid = &otvalidrec; + FT_Bytes p = table; FT_UInt ScriptList, FeatureList, LookupList; - valid->root = ftvalid; + otvalid->root = ftvalid; FT_TRACE3(( "validating GSUB table\n" )); OTV_INIT; @@ -567,16 +567,16 @@ FeatureList = FT_NEXT_USHORT( p ); LookupList = FT_NEXT_USHORT( p ); - valid->type_count = 8; - valid->type_funcs = (OTV_Validate_Func*)otv_gsub_validate_funcs; - valid->glyph_count = glyph_count; + otvalid->type_count = 8; + otvalid->type_funcs = (OTV_Validate_Func*)otv_gsub_validate_funcs; + otvalid->glyph_count = glyph_count; otv_LookupList_validate( table + LookupList, - valid ); + otvalid ); otv_FeatureList_validate( table + FeatureList, table + LookupList, - valid ); + otvalid ); otv_ScriptList_validate( table + ScriptList, table + FeatureList, - valid ); + otvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/otvalid/otvjstf.c b/src/otvalid/otvjstf.c index a616a23..f273be8 100644 --- a/src/otvalid/otvjstf.c +++ b/src/otvalid/otvjstf.c @@ -34,13 +34,13 @@ #define JstfPriorityFunc otv_JstfPriority_validate #define JstfLookupFunc otv_GPOS_subtable_validate - /* uses valid->extra1 (GSUB lookup count) */ - /* uses valid->extra2 (GPOS lookup count) */ - /* sets valid->extra1 (counter) */ + /* uses otvalid->extra1 (GSUB lookup count) */ + /* uses otvalid->extra2 (GPOS lookup count) */ + /* sets otvalid->extra1 (counter) */ static void otv_JstfPriority_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt table_size; @@ -63,34 +63,34 @@ OTV_LIMIT_CHECK( 20 ); - gsub_lookup_count = valid->extra1; - gpos_lookup_count = valid->extra2; + gsub_lookup_count = otvalid->extra1; + gpos_lookup_count = otvalid->extra2; table_size = 20; - valid->extra1 = gsub_lookup_count; + otvalid->extra1 = gsub_lookup_count; OTV_OPTIONAL_OFFSET( ShrinkageEnableGSUB ); OTV_SIZE_CHECK( ShrinkageEnableGSUB ); if ( ShrinkageEnableGSUB ) - otv_x_ux( table + ShrinkageEnableGSUB, valid ); + otv_x_ux( table + ShrinkageEnableGSUB, otvalid ); OTV_OPTIONAL_OFFSET( ShrinkageDisableGSUB ); OTV_SIZE_CHECK( ShrinkageDisableGSUB ); if ( ShrinkageDisableGSUB ) - otv_x_ux( table + ShrinkageDisableGSUB, valid ); + otv_x_ux( table + ShrinkageDisableGSUB, otvalid ); - valid->extra1 = gpos_lookup_count; + otvalid->extra1 = gpos_lookup_count; OTV_OPTIONAL_OFFSET( ShrinkageEnableGPOS ); OTV_SIZE_CHECK( ShrinkageEnableGPOS ); if ( ShrinkageEnableGPOS ) - otv_x_ux( table + ShrinkageEnableGPOS, valid ); + otv_x_ux( table + ShrinkageEnableGPOS, otvalid ); OTV_OPTIONAL_OFFSET( ShrinkageDisableGPOS ); OTV_SIZE_CHECK( ShrinkageDisableGPOS ); if ( ShrinkageDisableGPOS ) - otv_x_ux( table + ShrinkageDisableGPOS, valid ); + otv_x_ux( table + ShrinkageDisableGPOS, otvalid ); OTV_OPTIONAL_OFFSET( ShrinkageJstfMax ); OTV_SIZE_CHECK( ShrinkageJstfMax ); @@ -98,32 +98,32 @@ { /* XXX: check lookup types? */ OTV_NEST2( JstfMax, JstfLookup ); - OTV_RUN( table + ShrinkageJstfMax, valid ); + OTV_RUN( table + ShrinkageJstfMax, otvalid ); } - valid->extra1 = gsub_lookup_count; + otvalid->extra1 = gsub_lookup_count; OTV_OPTIONAL_OFFSET( ExtensionEnableGSUB ); OTV_SIZE_CHECK( ExtensionEnableGSUB ); if ( ExtensionEnableGSUB ) - otv_x_ux( table + ExtensionEnableGSUB, valid ); + otv_x_ux( table + ExtensionEnableGSUB, otvalid ); OTV_OPTIONAL_OFFSET( ExtensionDisableGSUB ); OTV_SIZE_CHECK( ExtensionDisableGSUB ); if ( ExtensionDisableGSUB ) - otv_x_ux( table + ExtensionDisableGSUB, valid ); + otv_x_ux( table + ExtensionDisableGSUB, otvalid ); - valid->extra1 = gpos_lookup_count; + otvalid->extra1 = gpos_lookup_count; OTV_OPTIONAL_OFFSET( ExtensionEnableGPOS ); OTV_SIZE_CHECK( ExtensionEnableGPOS ); if ( ExtensionEnableGPOS ) - otv_x_ux( table + ExtensionEnableGPOS, valid ); + otv_x_ux( table + ExtensionEnableGPOS, otvalid ); OTV_OPTIONAL_OFFSET( ExtensionDisableGPOS ); OTV_SIZE_CHECK( ExtensionDisableGPOS ); if ( ExtensionDisableGPOS ) - otv_x_ux( table + ExtensionDisableGPOS, valid ); + otv_x_ux( table + ExtensionDisableGPOS, otvalid ); OTV_OPTIONAL_OFFSET( ExtensionJstfMax ); OTV_SIZE_CHECK( ExtensionJstfMax ); @@ -131,22 +131,22 @@ { /* XXX: check lookup types? */ OTV_NEST2( JstfMax, JstfLookup ); - OTV_RUN( table + ExtensionJstfMax, valid ); + OTV_RUN( table + ExtensionJstfMax, otvalid ); } - valid->extra1 = gsub_lookup_count; - valid->extra2 = gpos_lookup_count; + otvalid->extra1 = gsub_lookup_count; + otvalid->extra2 = gpos_lookup_count; OTV_EXIT; } - /* sets valid->extra (glyph count) */ - /* sets valid->func1 (otv_JstfPriority_validate) */ + /* sets otvalid->extra (glyph count) */ + /* sets otvalid->func1 (otv_JstfPriority_validate) */ static void otv_JstfScript_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt table_size; @@ -170,16 +170,16 @@ OTV_SIZE_CHECK( ExtGlyph ); if ( ExtGlyph ) { - valid->extra1 = valid->glyph_count; + otvalid->extra1 = otvalid->glyph_count; OTV_NEST1( ExtenderGlyph ); - OTV_RUN( table + ExtGlyph, valid ); + OTV_RUN( table + ExtGlyph, otvalid ); } OTV_SIZE_CHECK( DefJstfLangSys ); if ( DefJstfLangSys ) { OTV_NEST2( JstfLangSys, JstfPriority ); - OTV_RUN( table + DefJstfLangSys, valid ); + OTV_RUN( table + DefJstfLangSys, otvalid ); } OTV_LIMIT_CHECK( 6 * JstfLangSysCount ); @@ -190,16 +190,16 @@ { p += 4; /* skip JstfLangSysTag */ - OTV_RUN( table + FT_NEXT_USHORT( p ), valid ); + OTV_RUN( table + FT_NEXT_USHORT( p ), otvalid ); } OTV_EXIT; } - /* sets valid->extra1 (GSUB lookup count) */ - /* sets valid->extra2 (GPOS lookup count) */ - /* sets valid->glyph_count */ + /* sets otvalid->extra1 (GSUB lookup count) */ + /* sets otvalid->extra2 (GPOS lookup count) */ + /* sets otvalid->glyph_count */ FT_LOCAL_DEF( void ) otv_JSTF_validate( FT_Bytes table, @@ -208,13 +208,14 @@ FT_UInt glyph_count, FT_Validator ftvalid ) { - OTV_ValidatorRec validrec; - OTV_Validator valid = &validrec; + OTV_ValidatorRec otvalidrec; + OTV_Validator otvalid = &otvalidrec; FT_Bytes p = table; FT_UInt JstfScriptCount; - valid->root = ftvalid; + otvalid->root = ftvalid; + FT_TRACE3(( "validating JSTF table\n" )); OTV_INIT; @@ -231,16 +232,16 @@ OTV_LIMIT_CHECK( JstfScriptCount * 6 ); if ( gsub ) - valid->extra1 = otv_GSUBGPOS_get_Lookup_count( gsub ); + otvalid->extra1 = otv_GSUBGPOS_get_Lookup_count( gsub ); else - valid->extra1 = 0; + otvalid->extra1 = 0; if ( gpos ) - valid->extra2 = otv_GSUBGPOS_get_Lookup_count( gpos ); + otvalid->extra2 = otv_GSUBGPOS_get_Lookup_count( gpos ); else - valid->extra2 = 0; + otvalid->extra2 = 0; - valid->glyph_count = glyph_count; + otvalid->glyph_count = glyph_count; /* JstfScriptRecord */ for ( ; JstfScriptCount > 0; JstfScriptCount-- ) @@ -248,7 +249,7 @@ p += 4; /* skip JstfScriptTag */ /* JstfScript */ - otv_JstfScript_validate( table + FT_NEXT_USHORT( p ), valid ); + otv_JstfScript_validate( table + FT_NEXT_USHORT( p ), otvalid ); } FT_TRACE4(( "\n" )); diff --git a/src/otvalid/otvmath.c b/src/otvalid/otvmath.c index 96f841f..d1791f8 100644 --- a/src/otvalid/otvmath.c +++ b/src/otvalid/otvmath.c @@ -44,7 +44,7 @@ static void otv_MathConstants_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt i; @@ -66,7 +66,7 @@ OTV_OPTIONAL_OFFSET( DeviceTableOffset ); OTV_SIZE_CHECK( DeviceTableOffset ); if ( DeviceTableOffset ) - otv_Device_validate( table + DeviceTableOffset, valid ); + otv_Device_validate( table + DeviceTableOffset, otvalid ); } OTV_EXIT; @@ -84,7 +84,7 @@ static void otv_MathItalicsCorrectionInfo_validate( FT_Bytes table, - OTV_Validator valid, + OTV_Validator otvalid, FT_Int isItalic ) { FT_Bytes p = table; @@ -108,7 +108,7 @@ table_size = 4 + 4 * cnt; OTV_SIZE_CHECK( Coverage ); - otv_Coverage_validate( table + Coverage, valid, cnt ); + otv_Coverage_validate( table + Coverage, otvalid, cnt ); for ( i = 0; i < cnt; ++i ) { @@ -116,7 +116,7 @@ OTV_OPTIONAL_OFFSET( DeviceTableOffset ); OTV_SIZE_CHECK( DeviceTableOffset ); if ( DeviceTableOffset ) - otv_Device_validate( table + DeviceTableOffset, valid ); + otv_Device_validate( table + DeviceTableOffset, otvalid ); } OTV_EXIT; @@ -133,7 +133,7 @@ static void otv_MathKern_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt i, cnt, table_size; @@ -157,7 +157,7 @@ OTV_OPTIONAL_OFFSET( DeviceTableOffset ); OTV_SIZE_CHECK( DeviceTableOffset ); if ( DeviceTableOffset ) - otv_Device_validate( table + DeviceTableOffset, valid ); + otv_Device_validate( table + DeviceTableOffset, otvalid ); } /* One more Kerning value */ @@ -167,7 +167,7 @@ OTV_OPTIONAL_OFFSET( DeviceTableOffset ); OTV_SIZE_CHECK( DeviceTableOffset ); if ( DeviceTableOffset ) - otv_Device_validate( table + DeviceTableOffset, valid ); + otv_Device_validate( table + DeviceTableOffset, otvalid ); } OTV_EXIT; @@ -176,7 +176,7 @@ static void otv_MathKernInfo_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt i, j, cnt, table_size; @@ -196,7 +196,7 @@ table_size = 4 + 8 * cnt; OTV_SIZE_CHECK( Coverage ); - otv_Coverage_validate( table + Coverage, valid, cnt ); + otv_Coverage_validate( table + Coverage, otvalid, cnt ); for ( i = 0; i < cnt; ++i ) { @@ -205,7 +205,7 @@ OTV_OPTIONAL_OFFSET( MKRecordOffset ); OTV_SIZE_CHECK( MKRecordOffset ); if ( MKRecordOffset ) - otv_MathKern_validate( table + MKRecordOffset, valid ); + otv_MathKern_validate( table + MKRecordOffset, otvalid ); } } @@ -223,7 +223,7 @@ static void otv_MathGlyphInfo_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt MathItalicsCorrectionInfo, MathTopAccentAttachment; @@ -241,22 +241,22 @@ if ( MathItalicsCorrectionInfo ) otv_MathItalicsCorrectionInfo_validate( - table + MathItalicsCorrectionInfo, valid, TRUE ); + table + MathItalicsCorrectionInfo, otvalid, TRUE ); /* Italic correction and Top Accent Attachment have the same format */ if ( MathTopAccentAttachment ) otv_MathItalicsCorrectionInfo_validate( - table + MathTopAccentAttachment, valid, FALSE ); + table + MathTopAccentAttachment, otvalid, FALSE ); if ( ExtendedShapeCoverage ) { OTV_NAME_ENTER( "ExtendedShapeCoverage" ); - otv_Coverage_validate( table + ExtendedShapeCoverage, valid, -1 ); + otv_Coverage_validate( table + ExtendedShapeCoverage, otvalid, -1 ); OTV_EXIT; } if ( MathKernInfo ) - otv_MathKernInfo_validate( table + MathKernInfo, valid ); + otv_MathKernInfo_validate( table + MathKernInfo, otvalid ); OTV_EXIT; } @@ -272,7 +272,7 @@ static void otv_GlyphAssembly_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt pcnt, table_size; @@ -294,7 +294,7 @@ OTV_SIZE_CHECK( DeviceTableOffset ); if ( DeviceTableOffset ) - otv_Device_validate( table + DeviceTableOffset, valid ); + otv_Device_validate( table + DeviceTableOffset, otvalid ); for ( i = 0; i < pcnt; ++i ) { @@ -302,7 +302,7 @@ gid = FT_NEXT_USHORT( p ); - if ( gid >= valid->glyph_count ) + if ( gid >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; p += 2*4; /* skip the Start, End, Full, and Flags fields */ } @@ -313,7 +313,7 @@ static void otv_MathGlyphConstruction_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt vcnt, table_size; @@ -338,14 +338,14 @@ gid = FT_NEXT_USHORT( p ); - if ( gid >= valid->glyph_count ) + if ( gid >= otvalid->glyph_count ) FT_INVALID_GLYPH_ID; p += 2; /* skip the size */ } OTV_SIZE_CHECK( GlyphAssembly ); if ( GlyphAssembly ) - otv_GlyphAssembly_validate( table+GlyphAssembly, valid ); + otv_GlyphAssembly_validate( table+GlyphAssembly, otvalid ); /* OTV_EXIT; */ } @@ -353,7 +353,7 @@ static void otv_MathVariants_validate( FT_Bytes table, - OTV_Validator valid ) + OTV_Validator otvalid ) { FT_Bytes p = table; FT_UInt vcnt, hcnt, i, table_size; @@ -378,24 +378,24 @@ OTV_SIZE_CHECK( VCoverage ); if ( VCoverage ) - otv_Coverage_validate( table + VCoverage, valid, vcnt ); + otv_Coverage_validate( table + VCoverage, otvalid, vcnt ); OTV_SIZE_CHECK( HCoverage ); if ( HCoverage ) - otv_Coverage_validate( table + HCoverage, valid, hcnt ); + otv_Coverage_validate( table + HCoverage, otvalid, hcnt ); for ( i = 0; i < vcnt; ++i ) { OTV_OPTIONAL_OFFSET( Offset ); OTV_SIZE_CHECK( Offset ); - otv_MathGlyphConstruction_validate( table + Offset, valid ); + otv_MathGlyphConstruction_validate( table + Offset, otvalid ); } for ( i = 0; i < hcnt; ++i ) { OTV_OPTIONAL_OFFSET( Offset ); OTV_SIZE_CHECK( Offset ); - otv_MathGlyphConstruction_validate( table + Offset, valid ); + otv_MathGlyphConstruction_validate( table + Offset, otvalid ); } OTV_EXIT; @@ -410,20 +410,20 @@ /*************************************************************************/ /*************************************************************************/ - /* sets valid->glyph_count */ + /* sets otvalid->glyph_count */ FT_LOCAL_DEF( void ) otv_MATH_validate( FT_Bytes table, FT_UInt glyph_count, FT_Validator ftvalid ) { - OTV_ValidatorRec validrec; - OTV_Validator valid = &validrec; - FT_Bytes p = table; + OTV_ValidatorRec otvalidrec; + OTV_Validator otvalid = &otvalidrec; + FT_Bytes p = table; FT_UInt MathConstants, MathGlyphInfo, MathVariants; - valid->root = ftvalid; + otvalid->root = ftvalid; FT_TRACE3(( "validating MATH table\n" )); OTV_INIT; @@ -437,14 +437,14 @@ MathGlyphInfo = FT_NEXT_USHORT( p ); MathVariants = FT_NEXT_USHORT( p ); - valid->glyph_count = glyph_count; + otvalid->glyph_count = glyph_count; otv_MathConstants_validate( table + MathConstants, - valid ); + otvalid ); otv_MathGlyphInfo_validate( table + MathGlyphInfo, - valid ); + otvalid ); otv_MathVariants_validate ( table + MathVariants, - valid ); + otvalid ); FT_TRACE4(( "\n" )); } diff --git a/src/otvalid/otvmod.c b/src/otvalid/otvmod.c index acf213f..37c6e86 100644 --- a/src/otvalid/otvmod.c +++ b/src/otvalid/otvmod.c @@ -4,7 +4,7 @@ /* */ /* FreeType's OpenType validation module implementation (body). */ /* */ -/* Copyright 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 2004-2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -49,8 +49,8 @@ error = FT_Load_Sfnt_Table( face, tag, 0, NULL, table_len ); - if ( error == OTV_Err_Table_Missing ) - return OTV_Err_Ok; + if ( FT_ERR_EQ( error, Table_Missing ) ) + return FT_Err_Ok; if ( error ) goto Exit; @@ -73,7 +73,7 @@ FT_Bytes *ot_gsub, FT_Bytes *ot_jstf ) { - FT_Error error = OTV_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* volatile base; FT_Byte* volatile gdef; FT_Byte* volatile gpos; diff --git a/src/pcf/README b/src/pcf/README index 8858d68..10eff15 100644 --- a/src/pcf/README +++ b/src/pcf/README @@ -33,7 +33,7 @@ Encodings Use `FT_Get_BDF_Charset_ID' to access the encoding and registry. -The driver always exports `ft_encoding_none' as face->charmap.encoding. +The driver always exports `ft_encoding_none' as face->charmap.encoding. FT_Get_Char_Index() behavior is unmodified, that is, it converts the ULong value given as argument into the corresponding glyph number. diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c index ba54488..96f6912 100644 --- a/src/pcf/pcfdrivr.c +++ b/src/pcf/pcfdrivr.c @@ -2,7 +2,7 @@ FreeType font driver for pcf files - Copyright (C) 2000-2004, 2006-2011 by + Copyright (C) 2000-2004, 2006-2011, 2013, 2014 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy @@ -83,7 +83,7 @@ THE SOFTWARE. cmap->num_encodings = (FT_UInt)face->nencodings; cmap->encodings = face->encodings; - return PCF_Err_Ok; + return FT_Err_Ok; } @@ -189,7 +189,7 @@ THE SOFTWARE. } - FT_CALLBACK_TABLE_DEF + static const FT_CMap_ClassRec pcf_cmap_class = { sizeof ( PCF_CMapRec ), @@ -218,25 +218,24 @@ THE SOFTWARE. FT_FREE( face->metrics ); /* free properties */ + if ( face->properties ) { - PCF_Property prop; - FT_Int i; + FT_Int i; - if ( face->properties ) + for ( i = 0; i < face->nprops; i++ ) { - for ( i = 0; i < face->nprops; i++ ) + PCF_Property prop = &face->properties[i]; + + + if ( prop ) { - prop = &face->properties[i]; - - if ( prop ) - { - FT_FREE( prop->name ); - if ( prop->isString ) - FT_FREE( prop->value.atom ); - } + FT_FREE( prop->name ); + if ( prop->isString ) + FT_FREE( prop->value.atom ); } } + FT_FREE( face->properties ); } @@ -264,11 +263,10 @@ THE SOFTWARE. FT_Parameter* params ) { PCF_Face face = (PCF_Face)pcfface; - FT_Error error = PCF_Err_Ok; + FT_Error error; FT_UNUSED( num_params ); FT_UNUSED( params ); - FT_UNUSED( face_index ); FT_TRACE2(( "PCF driver\n" )); @@ -289,7 +287,7 @@ THE SOFTWARE. /* this didn't work, try gzip support! */ error2 = FT_Stream_OpenGzip( &face->comp_stream, stream ); - if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature ) + if ( FT_ERR_EQ( error2, Unimplemented_Feature ) ) goto Fail; error = error2; @@ -304,7 +302,7 @@ THE SOFTWARE. /* this didn't work, try LZW support! */ error3 = FT_Stream_OpenLZW( &face->comp_stream, stream ); - if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature ) + if ( FT_ERR_EQ( error3, Unimplemented_Feature ) ) goto Fail; error = error3; @@ -319,7 +317,7 @@ THE SOFTWARE. /* this didn't work, try Bzip2 support! */ error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream ); - if ( FT_ERROR_BASE( error4 ) == FT_Err_Unimplemented_Feature ) + if ( FT_ERR_EQ( error4, Unimplemented_Feature ) ) goto Fail; error = error4; @@ -347,6 +345,18 @@ THE SOFTWARE. #endif } + /* PCF could not have multiple face in single font file. + * XXX: non-zero face_index is already invalid argument, but + * Type1, Type42 driver has a convention to return + * an invalid argument error when the font could be + * opened by the specified driver. + */ + if ( face_index > 0 ) { + FT_ERROR(( "PCF_Face_Init: invalid face index\n" )); + PCF_Face_Done( pcfface ); + return FT_THROW( Invalid_Argument ); + } + /* set up charmap */ { FT_String *charset_registry = face->charset_registry; @@ -406,7 +416,7 @@ THE SOFTWARE. Fail: FT_TRACE2(( " not a PCF file\n" )); PCF_Face_Done( pcfface ); - error = PCF_Err_Unknown_File_Format; /* error */ + error = FT_THROW( Unknown_File_Format ); /* error */ goto Exit; } @@ -424,7 +434,7 @@ THE SOFTWARE. size->metrics.descender = -accel->fontDescent << 6; size->metrics.max_advance = accel->maxbounds.characterWidth << 6; - return PCF_Err_Ok; + return FT_Err_Ok; } @@ -434,7 +444,7 @@ THE SOFTWARE. { PCF_Face face = (PCF_Face)size->face; FT_Bitmap_Size* bsize = size->face->available_sizes; - FT_Error error = PCF_Err_Invalid_Pixel_Size; + FT_Error error = FT_ERR( Invalid_Pixel_Size ); FT_Long height; @@ -445,17 +455,17 @@ THE SOFTWARE. { case FT_SIZE_REQUEST_TYPE_NOMINAL: if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) ) - error = PCF_Err_Ok; + error = FT_Err_Ok; break; case FT_SIZE_REQUEST_TYPE_REAL_DIM: if ( height == ( face->accel.fontAscent + face->accel.fontDescent ) ) - error = PCF_Err_Ok; + error = FT_Err_Ok; break; default: - error = PCF_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); break; } @@ -474,7 +484,7 @@ THE SOFTWARE. { PCF_Face face = (PCF_Face)FT_SIZE_FACE( size ); FT_Stream stream; - FT_Error error = PCF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; PCF_Metric metric; FT_Offset bytes; @@ -482,11 +492,17 @@ THE SOFTWARE. FT_UNUSED( load_flags ); - FT_TRACE4(( "load_glyph %d ---", glyph_index )); + FT_TRACE1(( "PCF_Glyph_Load: glyph index %d\n", glyph_index )); - if ( !face || glyph_index >= (FT_UInt)face->root.num_glyphs ) + if ( !face ) { - error = PCF_Err_Invalid_Argument; + error = FT_THROW( Invalid_Face_Handle ); + goto Exit; + } + + if ( glyph_index >= (FT_UInt)face->root.num_glyphs ) + { + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -526,13 +542,13 @@ THE SOFTWARE. break; default: - return PCF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); } /* XXX: to do: are there cases that need repadding the bitmap? */ bytes = bitmap->pitch * bitmap->rows; - error = ft_glyphslot_alloc_bitmap( slot, bytes ); + error = ft_glyphslot_alloc_bitmap( slot, (FT_ULong)bytes ); if ( error ) goto Exit; @@ -576,8 +592,6 @@ THE SOFTWARE. ( face->accel.fontAscent + face->accel.fontDescent ) << 6 ); - FT_TRACE4(( " --- ok\n" )); - Exit: return error; } @@ -622,7 +636,7 @@ THE SOFTWARE. return 0; } - return PCF_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } @@ -699,10 +713,6 @@ THE SOFTWARE. 0, /* FT_Slot_InitFunc */ 0, /* FT_Slot_DoneFunc */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif PCF_Glyph_Load, 0, /* FT_Face_GetKerningFunc */ diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index d9914c0..a29a9e3 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -2,7 +2,7 @@ FreeType font driver for pcf fonts - Copyright 2000-2010, 2012 by + Copyright 2000-2010, 2012-2014 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy @@ -78,7 +78,7 @@ THE SOFTWARE. FT_FRAME_START( 16 ), FT_FRAME_ULONG_LE( type ), FT_FRAME_ULONG_LE( format ), - FT_FRAME_ULONG_LE( size ), + FT_FRAME_ULONG_LE( size ), /* rounded up to a multiple of 4 */ FT_FRAME_ULONG_LE( offset ), FT_FRAME_END }; @@ -92,21 +92,23 @@ THE SOFTWARE. PCF_Toc toc = &face->toc; PCF_Table tables; - FT_Memory memory = FT_FACE(face)->memory; + FT_Memory memory = FT_FACE( face )->memory; FT_UInt n; + FT_ULong size; - if ( FT_STREAM_SEEK ( 0 ) || - FT_STREAM_READ_FIELDS ( pcf_toc_header, toc ) ) - return PCF_Err_Cannot_Open_Resource; + + if ( FT_STREAM_SEEK( 0 ) || + FT_STREAM_READ_FIELDS( pcf_toc_header, toc ) ) + return FT_THROW( Cannot_Open_Resource ); if ( toc->version != PCF_FILE_VERSION || toc->count > FT_ARRAY_MAX( face->toc.tables ) || toc->count == 0 ) - return PCF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); if ( FT_NEW_ARRAY( face->toc.tables, toc->count ) ) - return PCF_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); tables = face->toc.tables; for ( n = 0; n < toc->count; n++ ) @@ -144,13 +146,62 @@ THE SOFTWARE. if ( ( tables[i].size > tables[i + 1].offset ) || ( tables[i].offset > tables[i + 1].offset - tables[i].size ) ) - return PCF_Err_Invalid_Offset; + { + error = FT_THROW( Invalid_Offset ); + goto Exit; + } } if ( !have_change ) break; } + /* + * We now check whether the `size' and `offset' values are reasonable: + * `offset' + `size' must not exceed the stream size. + * + * Note, however, that X11's `pcfWriteFont' routine (used by the + * `bdftopcf' program to create PDF font files) has two special + * features. + * + * - It always assigns the accelerator table a size of 100 bytes in the + * TOC, regardless of its real size, which can vary between 34 and 72 + * bytes. + * + * - Due to the way the routine is designed, it ships out the last font + * table with its real size, ignoring the TOC's size value. Since + * the TOC size values are always rounded up to a multiple of 4, the + * difference can be up to three bytes for all tables except the + * accelerator table, for which the difference can be as large as 66 + * bytes. + * + */ + + tables = face->toc.tables; + size = stream->size; + + for ( n = 0; n < toc->count - 1; n++ ) + { + /* we need two checks to avoid overflow */ + if ( ( tables->size > size ) || + ( tables->offset > size - tables->size ) ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + tables++; + } + + /* only check `tables->offset' for last table element ... */ + if ( ( tables->offset > size ) ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + /* ... and adjust `tables->size' to the real value if necessary */ + if ( tables->size > size - tables->offset ) + tables->size = size - tables->offset; + #ifdef FT_DEBUG_LEVEL_TRACE { @@ -181,7 +232,7 @@ THE SOFTWARE. #endif - return PCF_Err_Ok; + return FT_Err_Ok; Exit: FT_FREE( face->toc.tables ); @@ -248,7 +299,7 @@ THE SOFTWARE. FT_ULong format, PCF_Metric metric ) { - FT_Error error = PCF_Err_Ok; + FT_Error error = FT_Err_Ok; if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) @@ -294,7 +345,7 @@ THE SOFTWARE. FT_ULong *aformat, FT_ULong *asize ) { - FT_Error error = PCF_Err_Invalid_File_Format; + FT_Error error = FT_ERR( Invalid_File_Format ); FT_ULong i; @@ -303,20 +354,20 @@ THE SOFTWARE. { if ( stream->pos > tables[i].offset ) { - error = PCF_Err_Invalid_Stream_Skip; + error = FT_THROW( Invalid_Stream_Skip ); goto Fail; } if ( FT_STREAM_SKIP( tables[i].offset - stream->pos ) ) { - error = PCF_Err_Invalid_Stream_Skip; + error = FT_THROW( Invalid_Stream_Skip ); goto Fail; } *asize = tables[i].size; *aformat = tables[i].format; - return PCF_Err_Ok; + return FT_Err_Ok; } Fail: @@ -402,7 +453,7 @@ THE SOFTWARE. FT_ULong nprops, i; FT_ULong format, size; FT_Error error; - FT_Memory memory = FT_FACE(face)->memory; + FT_Memory memory = FT_FACE( face )->memory; FT_ULong string_size; FT_String* strings = 0; @@ -441,7 +492,7 @@ THE SOFTWARE. /* rough estimate */ if ( nprops > size / PCF_PROPERTY_SIZE ) { - error = PCF_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Bail; } @@ -474,7 +525,7 @@ THE SOFTWARE. i = 4 - ( nprops & 3 ); if ( FT_STREAM_SKIP( i ) ) { - error = PCF_Err_Invalid_Stream_Skip; + error = FT_THROW( Invalid_Stream_Skip ); goto Bail; } } @@ -491,7 +542,7 @@ THE SOFTWARE. /* rough estimate */ if ( string_size > size - nprops * PCF_PROPERTY_SIZE ) { - error = PCF_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Bail; } @@ -516,7 +567,7 @@ THE SOFTWARE. if ( ( name_offset < 0 ) || ( (FT_ULong)name_offset > string_size ) ) { - error = PCF_Err_Invalid_Offset; + error = FT_THROW( Invalid_Offset ); goto Bail; } @@ -535,7 +586,7 @@ THE SOFTWARE. if ( ( value_offset < 0 ) || ( (FT_ULong)value_offset > string_size ) ) { - error = PCF_Err_Invalid_Offset; + error = FT_THROW( Invalid_Offset ); goto Bail; } @@ -552,7 +603,7 @@ THE SOFTWARE. } } - error = PCF_Err_Ok; + error = FT_Err_Ok; Bail: FT_FREE( props ); @@ -566,10 +617,10 @@ THE SOFTWARE. pcf_get_metrics( FT_Stream stream, PCF_Face face ) { - FT_Error error = PCF_Err_Ok; - FT_Memory memory = FT_FACE(face)->memory; + FT_Error error; + FT_Memory memory = FT_FACE( face )->memory; FT_ULong format, size; - PCF_Metric metrics = 0; + PCF_Metric metrics = 0; FT_ULong nmetrics, i; @@ -587,7 +638,7 @@ THE SOFTWARE. if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) && !PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) ) - return PCF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) { @@ -604,12 +655,12 @@ THE SOFTWARE. (void)FT_READ_USHORT_LE( nmetrics ); } if ( error ) - return PCF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); face->nmetrics = nmetrics; if ( !nmetrics ) - return PCF_Err_Invalid_Table; + return FT_THROW( Invalid_Table ); FT_TRACE4(( "pcf_get_metrics:\n" )); @@ -619,36 +670,52 @@ THE SOFTWARE. if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) { if ( nmetrics > size / PCF_METRIC_SIZE ) - return PCF_Err_Invalid_Table; + return FT_THROW( Invalid_Table ); } else { if ( nmetrics > size / PCF_COMPRESSED_METRIC_SIZE ) - return PCF_Err_Invalid_Table; + return FT_THROW( Invalid_Table ); } if ( FT_NEW_ARRAY( face->metrics, nmetrics ) ) - return PCF_Err_Out_Of_Memory; + return FT_THROW( Out_Of_Memory ); metrics = face->metrics; - for ( i = 0; i < nmetrics; i++ ) + for ( i = 0; i < nmetrics; i++, metrics++ ) { - error = pcf_get_metric( stream, format, metrics + i ); + error = pcf_get_metric( stream, format, metrics ); - metrics[i].bits = 0; + metrics->bits = 0; FT_TRACE5(( " idx %d: width=%d, " "lsb=%d, rsb=%d, ascent=%d, descent=%d, swidth=%d\n", i, - ( metrics + i )->characterWidth, - ( metrics + i )->leftSideBearing, - ( metrics + i )->rightSideBearing, - ( metrics + i )->ascent, - ( metrics + i )->descent, - ( metrics + i )->attributes )); + metrics->characterWidth, + metrics->leftSideBearing, + metrics->rightSideBearing, + metrics->ascent, + metrics->descent, + metrics->attributes )); if ( error ) break; + + /* sanity checks -- those values are used in `PCF_Glyph_Load' to */ + /* compute a glyph's bitmap dimensions, thus setting them to zero in */ + /* case of an error disables this particular glyph only */ + if ( metrics->rightSideBearing < metrics->leftSideBearing || + metrics->ascent + metrics->descent < 0 ) + { + metrics->characterWidth = 0; + metrics->leftSideBearing = 0; + metrics->rightSideBearing = 0; + metrics->ascent = 0; + metrics->descent = 0; + + FT_TRACE0(( "pcf_get_metrics:" + " invalid metrics for glyph %d\n", i )); + } } if ( error ) @@ -663,8 +730,8 @@ THE SOFTWARE. pcf_get_bitmaps( FT_Stream stream, PCF_Face face ) { - FT_Error error = PCF_Err_Ok; - FT_Memory memory = FT_FACE(face)->memory; + FT_Error error; + FT_Memory memory = FT_FACE( face )->memory; FT_Long* offsets = NULL; FT_Long bitmapSizes[GLYPHPADOPTIONS]; FT_ULong format, size; @@ -693,15 +760,15 @@ THE SOFTWARE. FT_Stream_ExitFrame( stream ); if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) - return PCF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); FT_TRACE4(( "pcf_get_bitmaps:\n" )); FT_TRACE4(( " number of bitmaps: %d\n", nbitmaps )); - /* XXX: PCF_Face->nmetrics is singed FT_Long, see pcf.h */ - if ( face->nmetrics < 0 || nbitmaps != ( FT_ULong )face->nmetrics ) - return PCF_Err_Invalid_File_Format; + /* XXX: PCF_Face->nmetrics is signed FT_Long, see pcf.h */ + if ( face->nmetrics < 0 || nbitmaps != (FT_ULong)face->nmetrics ) + return FT_THROW( Invalid_File_Format ); if ( FT_NEW_ARRAY( offsets, nbitmaps ) ) return error; @@ -765,14 +832,14 @@ THE SOFTWARE. pcf_get_encodings( FT_Stream stream, PCF_Face face ) { - FT_Error error = PCF_Err_Ok; - FT_Memory memory = FT_FACE(face)->memory; + FT_Error error; + FT_Memory memory = FT_FACE( face )->memory; FT_ULong format, size; int firstCol, lastCol; int firstRow, lastRow; int nencoding, encodingOffset; - int i, j; - PCF_Encoding tmpEncoding = NULL, encoding = 0; + int i, j, k; + PCF_Encoding encoding = NULL; error = pcf_seek_to_table_type( stream, @@ -810,7 +877,16 @@ THE SOFTWARE. FT_Stream_ExitFrame( stream ); if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) - return PCF_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); + + /* sanity checks */ + if ( firstCol < 0 || + firstCol > lastCol || + lastCol > 0xFF || + firstRow < 0 || + firstRow > lastRow || + lastRow > 0xFF ) + return FT_THROW( Invalid_Table ); FT_TRACE4(( "pdf_get_encodings:\n" )); @@ -819,56 +895,47 @@ THE SOFTWARE. nencoding = ( lastCol - firstCol + 1 ) * ( lastRow - firstRow + 1 ); - if ( FT_NEW_ARRAY( tmpEncoding, nencoding ) ) - return PCF_Err_Out_Of_Memory; + if ( FT_NEW_ARRAY( encoding, nencoding ) ) + return FT_THROW( Out_Of_Memory ); error = FT_Stream_EnterFrame( stream, 2 * nencoding ); if ( error ) goto Bail; - for ( i = 0, j = 0 ; i < nencoding; i++ ) + k = 0; + for ( i = firstRow; i <= lastRow; i++ ) { - if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - encodingOffset = FT_GET_SHORT(); - else - encodingOffset = FT_GET_SHORT_LE(); - - if ( encodingOffset != -1 ) + for ( j = firstCol; j <= lastCol; j++ ) { - tmpEncoding[j].enc = ( ( ( i / ( lastCol - firstCol + 1 ) ) + - firstRow ) * 256 ) + - ( ( i % ( lastCol - firstCol + 1 ) ) + - firstCol ); + if ( PCF_BYTE_ORDER( format ) == MSBFirst ) + encodingOffset = FT_GET_SHORT(); + else + encodingOffset = FT_GET_SHORT_LE(); - tmpEncoding[j].glyph = (FT_Short)encodingOffset; + if ( encodingOffset != -1 ) + { + encoding[k].enc = i * 256 + j; + encoding[k].glyph = (FT_Short)encodingOffset; - FT_TRACE5(( " code %d (0x%04X): idx %d\n", - tmpEncoding[j].enc, tmpEncoding[j].enc, - tmpEncoding[j].glyph )); + FT_TRACE5(( " code %d (0x%04X): idx %d\n", + encoding[k].enc, encoding[k].enc, encoding[k].glyph )); - j++; + k++; + } } } FT_Stream_ExitFrame( stream ); - if ( FT_NEW_ARRAY( encoding, j ) ) + if ( FT_RENEW_ARRAY( encoding, nencoding, k ) ) goto Bail; - for ( i = 0; i < j; i++ ) - { - encoding[i].enc = tmpEncoding[i].enc; - encoding[i].glyph = tmpEncoding[i].glyph; - } - - face->nencodings = j; + face->nencodings = k; face->encodings = encoding; - FT_FREE( tmpEncoding ); return error; Bail: FT_FREE( encoding ); - FT_FREE( tmpEncoding ); return error; } @@ -923,7 +990,7 @@ THE SOFTWARE. FT_ULong type ) { FT_ULong format, size; - FT_Error error = PCF_Err_Ok; + FT_Error error; PCF_Accel accel = &face->accel; @@ -994,7 +1061,7 @@ THE SOFTWARE. static FT_Error pcf_interpret_style( PCF_Face pcf ) { - FT_Error error = PCF_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Face face = FT_FACE( pcf ); FT_Memory memory = face->memory; @@ -1023,20 +1090,20 @@ THE SOFTWARE. ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) ) { face->style_flags |= FT_STYLE_FLAG_BOLD; - strings[1] = (char *)"Bold"; + strings[1] = (char*)"Bold"; } prop = pcf_find_property( pcf, "SETWIDTH_NAME" ); if ( prop && prop->isString && *(prop->value.atom) && !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) - strings[3] = (char *)(prop->value.atom); + strings[3] = (char*)( prop->value.atom ); prop = pcf_find_property( pcf, "ADD_STYLE_NAME" ); if ( prop && prop->isString && *(prop->value.atom) && !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) ) - strings[0] = (char *)(prop->value.atom); + strings[0] = (char*)( prop->value.atom ); for ( len = 0, nn = 0; nn < 4; nn++ ) { @@ -1050,7 +1117,7 @@ THE SOFTWARE. if ( len == 0 ) { - strings[0] = (char *)"Regular"; + strings[0] = (char*)"Regular"; lengths[0] = ft_strlen( strings[0] ); len = lengths[0] + 1; } @@ -1088,7 +1155,7 @@ THE SOFTWARE. for ( mm = 0; mm < len; mm++ ) - if (s[mm] == ' ') + if ( s[mm] == ' ' ) s[mm] = '-'; } @@ -1105,8 +1172,8 @@ THE SOFTWARE. pcf_load_font( FT_Stream stream, PCF_Face face ) { - FT_Error error = PCF_Err_Ok; - FT_Memory memory = FT_FACE(face)->memory; + FT_Error error; + FT_Memory memory = FT_FACE( face )->memory; FT_Bool hasBDFAccelerators; @@ -1162,9 +1229,10 @@ THE SOFTWARE. root->num_faces = 1; root->face_index = 0; - root->face_flags = FT_FACE_FLAG_FIXED_SIZES | - FT_FACE_FLAG_HORIZONTAL | - FT_FACE_FLAG_FAST_GLYPHS; + + root->face_flags |= FT_FACE_FLAG_FIXED_SIZES | + FT_FACE_FLAG_HORIZONTAL | + FT_FACE_FLAG_FAST_GLYPHS; if ( face->accel.constantWidth ) root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH; @@ -1268,7 +1336,7 @@ THE SOFTWARE. { /* This is done to respect the behaviour of the original */ /* PCF font driver. */ - error = PCF_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); } return error; diff --git a/src/pcf/pcfutil.c b/src/pcf/pcfutil.c index b91274f..0451ee8 100644 --- a/src/pcf/pcfutil.c +++ b/src/pcf/pcfutil.c @@ -66,11 +66,11 @@ in this Software without prior written authorization from The Open Group. TwoByteSwap( unsigned char* buf, size_t nbytes ) { - unsigned char c; - - for ( ; nbytes >= 2; nbytes -= 2, buf += 2 ) { + unsigned char c; + + c = buf[0]; buf[0] = buf[1]; buf[1] = c; @@ -85,11 +85,11 @@ in this Software without prior written authorization from The Open Group. FourByteSwap( unsigned char* buf, size_t nbytes ) { - unsigned char c; - - for ( ; nbytes >= 4; nbytes -= 4, buf += 4 ) { + unsigned char c; + + c = buf[0]; buf[0] = buf[3]; buf[3] = c; diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c index 9c8f9ed..90ba010 100644 --- a/src/pfr/pfrcmap.c +++ b/src/pfr/pfrcmap.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR cmap handling (body). */ /* */ -/* Copyright 2002, 2007, 2009 by */ +/* Copyright 2002, 2007, 2009, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -16,6 +16,8 @@ /***************************************************************************/ +#include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include "pfrcmap.h" #include "pfrobjs.h" @@ -23,11 +25,14 @@ FT_CALLBACK_DEF( FT_Error ) - pfr_cmap_init( PFR_CMap cmap ) + pfr_cmap_init( PFR_CMap cmap, + FT_Pointer pointer ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; PFR_Face face = (PFR_Face)FT_CMAP_FACE( cmap ); + FT_UNUSED( pointer ); + cmap->num_chars = face->phy_font.num_chars; cmap->chars = face->phy_font.chars; @@ -42,7 +47,7 @@ { if ( cmap->chars[n - 1].char_code >= cmap->chars[n].char_code ) { - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } } @@ -65,14 +70,16 @@ pfr_cmap_char_index( PFR_CMap cmap, FT_UInt32 char_code ) { - FT_UInt min = 0; - FT_UInt max = cmap->num_chars; - FT_UInt mid; - PFR_Char gchar; + FT_UInt min = 0; + FT_UInt max = cmap->num_chars; while ( min < max ) { + PFR_Char gchar; + FT_UInt mid; + + mid = min + ( max - min ) / 2; gchar = cmap->chars + mid; diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c index c59d8ae..db66281 100644 --- a/src/pfr/pfrdrivr.c +++ b/src/pfr/pfrdrivr.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR driver interface (body). */ /* */ -/* Copyright 2002-2004, 2006, 2008, 2010, 2011 by */ +/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -37,7 +37,7 @@ PFR_PhyFont phys = &face->phy_font; - pfr_face_get_kerning( pfrface, left, right, avector ); + (void)pfr_face_get_kerning( pfrface, left, right, avector ); /* convert from metrics to outline units when necessary */ if ( phys->outline_resolution != phys->metrics_resolution ) @@ -51,7 +51,7 @@ phys->metrics_resolution ); } - return PFR_Err_Ok; + return FT_Err_Ok; } @@ -66,7 +66,7 @@ FT_Pos *anadvance ) { PFR_Face face = (PFR_Face)pfrface; - FT_Error error = PFR_Err_Invalid_Argument; + FT_Error error = FT_ERR( Invalid_Argument ); *anadvance = 0; @@ -84,7 +84,7 @@ if ( gindex < phys->num_chars ) { *anadvance = phys->chars[gindex].advance; - error = PFR_Err_Ok; + error = FT_Err_Ok; } } @@ -130,11 +130,11 @@ if ( ametrics_y_scale ) *ametrics_y_scale = y_scale; - return PFR_Err_Ok; + return FT_Err_Ok; } - FT_CALLBACK_TABLE_DEF + static const FT_Service_PfrMetricsRec pfr_metrics_service_rec = { pfr_get_metrics, @@ -197,10 +197,6 @@ pfr_slot_init, pfr_slot_done, -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif pfr_slot_load, pfr_get_kerning, diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c index 6f65b01..2ce0937 100644 --- a/src/pfr/pfrgload.c +++ b/src/pfr/pfrgload.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR glyph loader (body). */ /* */ -/* Copyright 2002, 2003, 2005, 2007, 2010 by */ +/* Copyright 2002, 2003, 2005, 2007, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -135,7 +135,7 @@ /* check that we have begun a new path */ if ( !glyph->path_begun ) { - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_glyph_line_to: invalid glyph data\n" )); goto Exit; } @@ -171,7 +171,7 @@ /* check that we have begun a new path */ if ( !glyph->path_begun ) { - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_glyph_line_to: invalid glyph data\n" )); goto Exit; } @@ -248,7 +248,7 @@ FT_Byte* p, FT_Byte* limit ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = glyph->loader->memory; FT_UInt flags, x_count, y_count, i, count, mask; FT_Int x; @@ -546,7 +546,7 @@ Failure: Too_Short: - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_glyph_load_simple: invalid glyph data\n" )); goto Exit; } @@ -558,7 +558,7 @@ FT_Byte* p, FT_Byte* limit ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_GlyphLoader loader = glyph->loader; FT_Memory memory = loader->memory; PFR_SubGlyph subglyph; @@ -602,7 +602,7 @@ /* to avoid endless recursion */ if ( new_max > 64 ) { - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_glyph_load_compound:" " too many compound glyphs components\n" )); goto Exit; @@ -709,7 +709,7 @@ Failure: Too_Short: - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_glyph_load_compound: invalid glyph data\n" )); goto Exit; } @@ -763,7 +763,7 @@ PFR_SubGlyph subglyph; - FT_TRACE4(( "subglyph %d:\n", n )); + FT_TRACE4(( " subglyph %d:\n", n )); subglyph = glyph->subs + old_count + n; old_points = base->n_points; diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c index 325322e..f68d016 100644 --- a/src/pfr/pfrload.c +++ b/src/pfr/pfrload.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR loader (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010 by */ +/* Copyright 2002-2005, 2007, 2009, 2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -49,7 +49,7 @@ PFR_ExtraItem item_list, FT_Pointer item_data ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* p = *pp; FT_UInt num_items, item_type, item_size; @@ -91,7 +91,7 @@ Too_Short: FT_ERROR(( "pfr_extra_items_parse: invalid extra items table\n" )); - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -179,7 +179,7 @@ if ( header->signature != 0x50465230L || /* "PFR0" */ header->version > 4 || header->header_size < 58 || - header->signature2 != 0x0d0a ) /* CR/LF */ + header->signature2 != 0x0D0A ) /* CR/LF */ { result = 0; } @@ -236,7 +236,7 @@ goto Exit; if ( idx >= num_log_fonts ) - return PFR_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( FT_STREAM_SKIP( idx * 5 ) || FT_READ_USHORT( size ) || @@ -329,7 +329,7 @@ Too_Short: FT_ERROR(( "pfr_log_font_load: invalid logical font table\n" )); - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Fail; } @@ -353,7 +353,7 @@ PFR_Strike strike; FT_UInt flags0; FT_UInt n, count, size1; - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; PFR_CHECK( 5 ); @@ -427,7 +427,7 @@ return error; Too_Short: - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_extra_item_load_bitmap_info:" " invalid bitmap info table\n" )); goto Exit; @@ -449,7 +449,7 @@ FT_Byte* limit, PFR_PhyFont phy_font ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = phy_font->memory; FT_PtrDist len = limit - p; @@ -477,7 +477,7 @@ { FT_UInt count, num_vert, num_horz; FT_Int* snaps = NULL; - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = phy_font->memory; @@ -506,7 +506,7 @@ return error; Too_Short: - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_exta_item_load_stem_snaps:" " invalid stem snaps table\n" )); goto Exit; @@ -521,7 +521,7 @@ PFR_PhyFont phy_font ) { PFR_KernItem item = NULL; - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = phy_font->memory; @@ -604,7 +604,7 @@ Too_Short: FT_FREE( item ); - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_extra_item_load_kerning_pairs:" " invalid kerning pairs table\n" )); goto Exit; @@ -631,7 +631,7 @@ FT_Memory memory, FT_String* *astring ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_String* result = NULL; FT_UInt n, ok; @@ -813,7 +813,6 @@ phy_font->ascent = PFR_NEXT_SHORT( q ); phy_font->descent = PFR_NEXT_SHORT( q ); phy_font->leading = PFR_NEXT_SHORT( q ); - q += 16; break; case 3: @@ -932,7 +931,7 @@ return error; Too_Short: - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_phy_font_load: invalid physical font table\n" )); goto Fail; } diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c index c65cf29..0c89242 100644 --- a/src/pfr/pfrobjs.c +++ b/src/pfr/pfrobjs.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR object methods (body). */ /* */ -/* Copyright 2002-2008, 2010-2011 by */ +/* Copyright 2002-2008, 2010-2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,6 +23,7 @@ #include "pfrsbit.h" #include FT_OUTLINE_H #include FT_INTERNAL_DEBUG_H +#include FT_INTERNAL_CALC_H #include FT_TRUETYPE_IDS_H #include "pfrerror.h" @@ -87,7 +88,7 @@ if ( !pfr_header_check( &face->header ) ) { FT_TRACE2(( " not a PFR font\n" )); - error = PFR_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -111,7 +112,7 @@ if ( face_index >= pfrface->num_faces ) { FT_ERROR(( "pfr_face_init: invalid face index\n" )); - error = PFR_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -137,7 +138,8 @@ pfrface->face_index = face_index; pfrface->num_glyphs = phy_font->num_chars + 1; - pfrface->face_flags = FT_FACE_FLAG_SCALABLE; + + pfrface->face_flags |= FT_FACE_FLAG_SCALABLE; /* if all characters point to the same gps_offset 0, we */ /* assume that the font only contains bitmaps */ @@ -156,7 +158,7 @@ else { FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" )); - error = PFR_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } } @@ -324,12 +326,14 @@ FT_ULong gps_offset; + FT_TRACE1(( "pfr_slot_load: glyph index %d\n", gindex )); + if ( gindex > 0 ) gindex--; if ( !face || gindex >= face->phy_font.num_chars ) { - error = PFR_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -343,7 +347,7 @@ if ( load_flags & FT_LOAD_SBITS_ONLY ) { - error = PFR_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -468,7 +472,7 @@ FT_Vector* kerning ) { PFR_Face face = (PFR_Face)pfrface; - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; PFR_PhyFont phy_font = &face->phy_font; FT_UInt32 code1, code2, pair; @@ -512,7 +516,7 @@ { FT_UInt count = item->pair_count; FT_UInt size = item->pair_size; - FT_UInt power = (FT_UInt)ft_highpow2( (FT_UInt32)count ); + FT_UInt power = 1 << FT_MSB( count ); FT_UInt probe = power * size; FT_UInt extra = count - power; FT_Byte* base = stream->cursor; diff --git a/src/pfr/pfrsbit.c b/src/pfr/pfrsbit.c index 52bc2c8..979bf78 100644 --- a/src/pfr/pfrsbit.c +++ b/src/pfr/pfrsbit.c @@ -4,7 +4,7 @@ /* */ /* FreeType PFR bitmap loader (body). */ /* */ -/* Copyright 2002, 2003, 2006, 2009, 2010 by */ +/* Copyright 2002, 2003, 2006, 2009, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -59,7 +59,7 @@ if ( !decreasing ) { - writer->line += writer->pitch * ( target->rows-1 ); + writer->line += writer->pitch * ( target->rows - 1 ); writer->pitch = -writer->pitch; } } @@ -353,7 +353,7 @@ FT_Long *aadvance, FT_UInt *aformat ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte flags; FT_Char b; FT_Byte* p = *pdata; @@ -471,7 +471,7 @@ return error; Too_Short: - error = PFR_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); FT_ERROR(( "pfr_load_bitmap_metrics: invalid glyph data\n" )); goto Exit; } @@ -484,7 +484,7 @@ FT_Bool decreasing, FT_Bitmap* target ) { - FT_Error error = PFR_Err_Ok; + FT_Error error = FT_Err_Ok; PFR_BitWriterRec writer; @@ -508,7 +508,7 @@ default: FT_ERROR(( "pfr_read_bitmap_data: invalid image type\n" )); - error = PFR_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); } } @@ -560,7 +560,7 @@ } /* couldn't find it */ - return PFR_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } Found_Strike: @@ -593,7 +593,7 @@ if ( gps_size == 0 ) { /* Could not find a bitmap program string for this glyph */ - error = PFR_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } } @@ -636,12 +636,14 @@ * which causes a size truncation, because truncated * size properties makes bitmap glyph broken. */ - if ( xpos > FT_INT_MAX || ( ypos + ysize ) > FT_INT_MAX ) + if ( xpos > FT_INT_MAX || xpos < FT_INT_MIN || + ysize > FT_INT_MAX || ypos + ysize > FT_INT_MAX || + ypos + (FT_Long)ysize < FT_INT_MIN ) { FT_TRACE1(( "pfr_slot_load_bitmap:" )); FT_TRACE1(( "huge bitmap glyph %dx%d over FT_GlyphSlot\n", xpos, ypos )); - error = PFR_Err_Invalid_Pixel_Size; + error = FT_THROW( Invalid_Pixel_Size ); } if ( !error ) diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c index 5f3f9e6..6a40e11 100644 --- a/src/psaux/afmparse.c +++ b/src/psaux/afmparse.c @@ -4,7 +4,7 @@ /* */ /* AFM parser (body). */ /* */ -/* Copyright 2006-2010, 2012 by */ +/* Copyright 2006-2010, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> #include FT_FREETYPE_H +#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_POSTSCRIPT_AUX_H #include "afmparse.h" @@ -119,7 +120,6 @@ afm_stream_read_one( AFM_Stream stream ) { char* str; - int ch; afm_stream_skip_spaces( stream ); @@ -130,7 +130,9 @@ while ( 1 ) { - ch = AFM_GETC(); + int ch = AFM_GETC(); + + if ( AFM_IS_SPACE( ch ) ) break; else if ( AFM_IS_NEWLINE( ch ) ) @@ -159,7 +161,6 @@ afm_stream_read_string( AFM_Stream stream ) { char* str; - int ch; afm_stream_skip_spaces( stream ); @@ -171,7 +172,9 @@ /* scan to eol */ while ( 1 ) { - ch = AFM_GETC(); + int ch = AFM_GETC(); + + if ( AFM_IS_NEWLINE( ch ) ) { stream->status = AFM_STREAM_STATUS_EOL; @@ -545,7 +548,7 @@ parser->FontInfo = NULL; parser->get_index = NULL; - return PSaux_Err_Ok; + return FT_Err_Ok; } @@ -572,10 +575,10 @@ { *aint = val.u.i; - return PSaux_Err_Ok; + return FT_Err_Ok; } else - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } @@ -637,7 +640,7 @@ case AFM_TOKEN_ENDKERNDATA: case AFM_TOKEN_ENDFONTMETRICS: fi->NumTrackKern = n + 1; - return PSaux_Err_Ok; + return FT_Err_Ok; case AFM_TOKEN_UNKNOWN: break; @@ -648,7 +651,7 @@ } Fail: - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } @@ -753,7 +756,7 @@ ft_qsort( fi->KernPairs, fi->NumKernPair, sizeof ( AFM_KernPairRec ), afm_compare_kern_pairs ); - return PSaux_Err_Ok; + return FT_Err_Ok; case AFM_TOKEN_UNKNOWN: break; @@ -764,7 +767,7 @@ } Fail: - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } @@ -795,7 +798,7 @@ case AFM_TOKEN_ENDKERNDATA: case AFM_TOKEN_ENDFONTMETRICS: - return PSaux_Err_Ok; + return FT_Err_Ok; case AFM_TOKEN_UNKNOWN: break; @@ -806,7 +809,7 @@ } Fail: - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } @@ -832,11 +835,11 @@ if ( token == end_section || token == AFM_TOKEN_ENDFONTMETRICS ) - return PSaux_Err_Ok; + return FT_Err_Ok; } Fail: - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } @@ -845,19 +848,19 @@ { FT_Memory memory = parser->memory; AFM_FontInfo fi = parser->FontInfo; - FT_Error error = PSaux_Err_Syntax_Error; + FT_Error error = FT_ERR( Syntax_Error ); char* key; FT_Offset len; FT_Int metrics_sets = 0; if ( !fi ) - return PSaux_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); key = afm_parser_next_key( parser, 1, &len ); if ( !key || len != 16 || ft_strncmp( key, "StartFontMetrics", 16 ) != 0 ) - return PSaux_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 ) { @@ -872,7 +875,7 @@ if ( metrics_sets != 0 && metrics_sets != 2 ) { - error = PSaux_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); goto Fail; } @@ -938,7 +941,7 @@ /* fall through since we only support kern data */ case AFM_TOKEN_ENDFONTMETRICS: - return PSaux_Err_Ok; + return FT_Err_Ok; default: break; diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c index 9ea7fb9..22e8cf2 100644 --- a/src/psaux/psconv.c +++ b/src/psaux/psconv.c @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (body). */ /* */ -/* Copyright 2006, 2008, 2009, 2012 by */ +/* Copyright 2006, 2008, 2009, 2012-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,11 +18,22 @@ #include <ft2build.h> #include FT_INTERNAL_POSTSCRIPT_AUX_H +#include FT_INTERNAL_DEBUG_H #include "psconv.h" #include "psauxerr.h" + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_psconv + + /* The following array is used by various functions to quickly convert */ /* digits (both decimal and non-decimal) into numbers. */ @@ -69,18 +80,29 @@ #endif /* 'A' == 193 */ - FT_LOCAL_DEF( FT_Int ) + FT_LOCAL_DEF( FT_Long ) PS_Conv_Strtol( FT_Byte** cursor, FT_Byte* limit, - FT_Int base ) + FT_Long base ) { FT_Byte* p = *cursor; - FT_Int num = 0; - FT_Bool sign = 0; + FT_Long num = 0; + FT_Bool sign = 0; + FT_Bool have_overflow = 0; + + FT_Long num_limit; + FT_Char c_limit; + + + if ( p >= limit ) + goto Bad; - if ( p >= limit || base < 2 || base > 36 ) + if ( base < 2 || base > 36 ) + { + FT_TRACE4(( "!!!INVALID BASE:!!!" )); return 0; + } if ( *p == '-' || *p == '+' ) { @@ -88,9 +110,12 @@ p++; if ( p == limit ) - return 0; + goto Bad; } + num_limit = 0x7FFFFFFFL / base; + c_limit = (FT_Char)( 0x7FFFFFFFL % base ); + for ( ; p < limit; p++ ) { FT_Char c; @@ -99,59 +124,89 @@ if ( IS_PS_SPACE( *p ) || *p OP 0x80 ) break; - c = ft_char_table[*p & 0x7f]; + c = ft_char_table[*p & 0x7F]; if ( c < 0 || c >= base ) break; - num = num * base + c; + if ( num > num_limit || ( num == num_limit && c > c_limit ) ) + have_overflow = 1; + else + num = num * base + c; + } + + *cursor = p; + + if ( have_overflow ) + { + num = 0x7FFFFFFFL; + FT_TRACE4(( "!!!OVERFLOW:!!!" )); } if ( sign ) num = -num; - *cursor = p; - return num; + + Bad: + FT_TRACE4(( "!!!END OF DATA:!!!" )); + return 0; } - FT_LOCAL_DEF( FT_Int ) + FT_LOCAL_DEF( FT_Long ) PS_Conv_ToInt( FT_Byte** cursor, FT_Byte* limit ) { - FT_Byte* p; - FT_Int num; + FT_Byte* p = *cursor; + FT_Byte* curp; + + FT_Long num; - num = PS_Conv_Strtol( cursor, limit, 10 ); - p = *cursor; + curp = p; + num = PS_Conv_Strtol( &p, limit, 10 ); + + if ( p == curp ) + return 0; if ( p < limit && *p == '#' ) { - *cursor = p + 1; + p++; + + curp = p; + num = PS_Conv_Strtol( &p, limit, num ); - return PS_Conv_Strtol( cursor, limit, num ); + if ( p == curp ) + return 0; } - else - return num; + + *cursor = p; + + return num; } FT_LOCAL_DEF( FT_Fixed ) PS_Conv_ToFixed( FT_Byte** cursor, FT_Byte* limit, - FT_Int power_ten ) + FT_Long power_ten ) { FT_Byte* p = *cursor; - FT_Fixed integral; - FT_Long decimal = 0, divider = 1; - FT_Bool sign = 0; + FT_Byte* curp; + + FT_Fixed integral = 0; + FT_Long decimal = 0; + FT_Long divider = 1; + + FT_Bool sign = 0; + FT_Bool have_overflow = 0; + FT_Bool have_underflow = 0; if ( p >= limit ) - return 0; + goto Bad; if ( *p == '-' || *p == '+' ) { @@ -159,13 +214,23 @@ p++; if ( p == limit ) - return 0; + goto Bad; } + /* read the integer part */ if ( *p != '.' ) - integral = PS_Conv_ToInt( &p, limit ) << 16; - else - integral = 0; + { + curp = p; + integral = PS_Conv_ToInt( &p, limit ); + + if ( p == curp ) + return 0; + + if ( integral > 0x7FFF ) + have_overflow = 1; + else + integral = (FT_Fixed)( (FT_UInt32)integral << 16 ); + } /* read the decimal part */ if ( p < limit && *p == '.' ) @@ -180,23 +245,20 @@ if ( IS_PS_SPACE( *p ) || *p OP 0x80 ) break; - c = ft_char_table[*p & 0x7f]; + c = ft_char_table[*p & 0x7F]; if ( c < 0 || c >= 10 ) break; - if ( !integral && power_ten > 0 ) + /* only add digit if we don't overflow */ + if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL ) { - power_ten--; decimal = decimal * 10 + c; - } - else - { - if ( divider < 10000000L ) - { - decimal = decimal * 10 + c; + + if ( !integral && power_ten > 0 ) + power_ten--; + else divider *= 10; - } } } } @@ -204,33 +266,94 @@ /* read exponent, if any */ if ( p + 1 < limit && ( *p == 'e' || *p == 'E' ) ) { + FT_Long exponent; + + p++; - power_ten += PS_Conv_ToInt( &p, limit ); + + curp = p; + exponent = PS_Conv_ToInt( &p, limit ); + + if ( curp == p ) + return 0; + + /* arbitrarily limit exponent */ + if ( exponent > 1000 ) + have_overflow = 1; + else if ( exponent < -1000 ) + have_underflow = 1; + else + power_ten += exponent; } + *cursor = p; + + if ( !integral && !decimal ) + return 0; + + if ( have_overflow ) + goto Overflow; + if ( have_underflow ) + goto Underflow; + while ( power_ten > 0 ) { + if ( integral >= 0xCCCCCCCL ) + goto Overflow; integral *= 10; - decimal *= 10; + + if ( decimal >= 0xCCCCCCCL ) + { + if ( divider == 1 ) + goto Overflow; + divider /= 10; + } + else + decimal *= 10; + power_ten--; } while ( power_ten < 0 ) { integral /= 10; - divider *= 10; + if ( divider < 0xCCCCCCCL ) + divider *= 10; + else + decimal /= 10; + + if ( !integral && !decimal ) + goto Underflow; + power_ten++; } if ( decimal ) - integral += FT_DivFix( decimal, divider ); + { + decimal = FT_DivFix( decimal, divider ); + /* it's not necessary to check this addition for overflow */ + /* due to the structure of the real number representation */ + integral += decimal; + } + Exit: if ( sign ) integral = -integral; - *cursor = p; - return integral; + + Bad: + FT_TRACE4(( "!!!END OF DATA:!!!" )); + return 0; + + Overflow: + integral = 0x7FFFFFFFL; + FT_TRACE4(( "!!!OVERFLOW:!!!" )); + goto Exit; + + Underflow: + FT_TRACE4(( "!!!UNDERFLOW:!!!" )); + return 0; } @@ -398,7 +521,7 @@ if ( *p OP 0x80 ) break; - c = ft_char_table[*p & 0x7f]; + c = ft_char_table[*p & 0x7F]; if ( (unsigned)c >= 16 ) break; diff --git a/src/psaux/psconv.h b/src/psaux/psconv.h index 84854ba..d91c762 100644 --- a/src/psaux/psconv.h +++ b/src/psaux/psconv.h @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (specification). */ /* */ -/* Copyright 2006 by */ +/* Copyright 2006, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -26,20 +26,20 @@ FT_BEGIN_HEADER - FT_LOCAL( FT_Int ) + FT_LOCAL( FT_Long ) PS_Conv_Strtol( FT_Byte** cursor, FT_Byte* limit, - FT_Int base ); + FT_Long base ); - FT_LOCAL( FT_Int ) + FT_LOCAL( FT_Long ) PS_Conv_ToInt( FT_Byte** cursor, FT_Byte* limit ); FT_LOCAL( FT_Fixed ) PS_Conv_ToFixed( FT_Byte** cursor, FT_Byte* limit, - FT_Int power_ten ); + FT_Long power_ten ); #if 0 FT_LOCAL( FT_UInt ) diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index 06df6e6..7ec3b4c 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -4,7 +4,7 @@ /* */ /* Auxiliary functions for PostScript fonts (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -113,8 +113,8 @@ static FT_Error - reallocate_t1_table( PS_Table table, - FT_Long new_size ) + reallocate_t1_table( PS_Table table, + FT_Offset new_size ) { FT_Memory memory = table->memory; FT_Byte* old_base = table->block; @@ -138,7 +138,7 @@ table->capacity = new_size; - return PSaux_Err_Ok; + return FT_Err_Ok; } @@ -173,13 +173,13 @@ if ( idx < 0 || idx >= table->max_elems ) { FT_ERROR(( "ps_table_add: invalid index\n" )); - return PSaux_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } if ( length < 0 ) { FT_ERROR(( "ps_table_add: invalid length\n" )); - return PSaux_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } /* grow the base block if needed */ @@ -216,7 +216,7 @@ FT_MEM_COPY( table->block + table->cursor, object, length ); table->cursor += length; - return PSaux_Err_Ok; + return FT_Err_Ok; } @@ -341,7 +341,7 @@ { FT_Byte* cur = *acur; FT_Int embed = 0; - FT_Error error = PSaux_Err_Invalid_File_Format; + FT_Error error = FT_ERR( Invalid_File_Format ); unsigned int i; @@ -397,7 +397,7 @@ embed--; if ( embed == 0 ) { - error = PSaux_Err_Ok; + error = FT_Err_Ok; break; } } @@ -416,7 +416,7 @@ FT_Byte* limit ) { FT_Byte* cur = *acur; - FT_Error err = PSaux_Err_Ok; + FT_Error err = FT_Err_Ok; while ( ++cur < limit ) @@ -433,7 +433,7 @@ if ( cur < limit && *cur != '>' ) { FT_ERROR(( "skip_string: missing closing delimiter `>'\n" )); - err = PSaux_Err_Invalid_File_Format; + err = FT_THROW( Invalid_File_Format ); } else cur++; @@ -456,12 +456,12 @@ { FT_Byte* cur; FT_Int embed = 0; - FT_Error error = PSaux_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ASSERT( **acur == '{' ); - for ( cur = *acur; cur < limit && error == PSaux_Err_Ok; ++cur ) + for ( cur = *acur; cur < limit && error == FT_Err_Ok; ++cur ) { switch ( *cur ) { @@ -494,7 +494,7 @@ end: if ( embed != 0 ) - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); *acur = cur; @@ -519,7 +519,7 @@ FT_Byte* cur = parser->cursor; FT_Byte* limit = parser->limit; - FT_Error error = PSaux_Err_Ok; + FT_Error error = FT_Err_Ok; skip_spaces( &cur, limit ); /* this also skips comments */ @@ -567,7 +567,7 @@ { FT_ERROR(( "ps_parser_skip_PS_token:" " unexpected closing delimiter `>'\n" )); - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } cur++; @@ -597,7 +597,7 @@ " but invalid at this point\n", *cur )); - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); } parser->error = error; @@ -644,7 +644,7 @@ token->type = T1_TOKEN_TYPE_STRING; token->start = cur; - if ( skip_literal_string( &cur, limit ) == PSaux_Err_Ok ) + if ( skip_literal_string( &cur, limit ) == FT_Err_Ok ) token->limit = cur; break; @@ -653,7 +653,7 @@ token->type = T1_TOKEN_TYPE_ARRAY; token->start = cur; - if ( skip_procedure( &cur, limit ) == PSaux_Err_Ok ) + if ( skip_procedure( &cur, limit ) == FT_Err_Ok ) token->limit = cur; break; @@ -847,6 +847,8 @@ /* first character must be a delimiter or a part of a number */ /* NB: `values' can be NULL if we just want to skip the */ /* array; in this case we ignore `max_values' */ + /* */ + /* return number of successfully parsed values */ static FT_Int ps_tofixedarray( FT_Byte* *acur, @@ -1027,12 +1029,13 @@ FT_UInt max_objects, FT_ULong* pflags ) { - T1_TokenRec token; - FT_Byte* cur; - FT_Byte* limit; - FT_UInt count; - FT_UInt idx; - FT_Error error; + T1_TokenRec token; + FT_Byte* cur; + FT_Byte* limit; + FT_UInt count; + FT_UInt idx; + FT_Error error; + T1_FieldType type; /* this also skips leading whitespace */ @@ -1045,8 +1048,10 @@ cur = token.start; limit = token.limit; + type = field->type; + /* we must detect arrays in /FontBBox */ - if ( field->type == T1_FIELD_TYPE_BBOX ) + if ( type == T1_FIELD_TYPE_BBOX ) { T1_TokenRec token2; FT_Byte* old_cur = parser->cursor; @@ -1062,17 +1067,21 @@ parser->limit = old_limit; if ( token2.type == T1_TOKEN_TYPE_ARRAY ) + { + type = T1_FIELD_TYPE_MM_BBOX; goto FieldArray; + } } else if ( token.type == T1_TOKEN_TYPE_ARRAY ) { + count = max_objects; + FieldArray: /* if this is an array and we have no blend, an error occurs */ if ( max_objects == 0 ) goto Fail; - count = max_objects; - idx = 1; + idx = 1; /* don't include delimiters */ cur++; @@ -1088,7 +1097,7 @@ skip_spaces( &cur, limit ); - switch ( field->type ) + switch ( type ) { case T1_FIELD_TYPE_BOOL: val = ps_tobool( &cur, limit ); @@ -1160,7 +1169,7 @@ " " " but found token of type %d instead\n", token.type )); - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1193,11 +1202,11 @@ result = ps_tofixedarray( &cur, limit, 4, temp, 0 ); - if ( result < 0 ) + if ( result < 4 ) { FT_ERROR(( "ps_parser_load_field:" " expected four integers in bounding box\n" )); - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1208,6 +1217,54 @@ } break; + case T1_FIELD_TYPE_MM_BBOX: + { + FT_Memory memory = parser->memory; + FT_Fixed* temp; + FT_Int result; + FT_UInt i; + + + if ( FT_NEW_ARRAY( temp, max_objects * 4 ) ) + goto Exit; + + for ( i = 0; i < 4; i++ ) + { + result = ps_tofixedarray( &cur, limit, max_objects, + temp + i * max_objects, 0 ); + if ( result < 0 || (FT_UInt)result < max_objects ) + { + FT_ERROR(( "ps_parser_load_field:" + " expected %d integers in the %s subarray\n" + " " + " of /FontBBox in the /Blend dictionary\n", + max_objects, + i == 0 ? "first" + : ( i == 1 ? "second" + : ( i == 2 ? "third" + : "fourth" ) ) )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } + + skip_spaces( &cur, limit ); + } + + for ( i = 0; i < max_objects; i++ ) + { + FT_BBox* bbox = (FT_BBox*)objects[i]; + + + bbox->xMin = FT_RoundFix( temp[i ] ); + bbox->yMin = FT_RoundFix( temp[i + max_objects] ); + bbox->xMax = FT_RoundFix( temp[i + 2 * max_objects] ); + bbox->yMax = FT_RoundFix( temp[i + 3 * max_objects] ); + } + + FT_FREE( temp ); + } + break; + default: /* an error occurred */ goto Fail; @@ -1221,13 +1278,13 @@ FT_UNUSED( pflags ); #endif - error = PSaux_Err_Ok; + error = FT_Err_Ok; Exit: return error; Fail: - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1245,7 +1302,7 @@ T1_TokenRec elements[T1_MAX_TABLE_ELEMENTS]; T1_Token token; FT_Int num_elements; - FT_Error error = PSaux_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* old_cursor; FT_Byte* old_limit; T1_FieldRec fieldrec = *(T1_Field)field; @@ -1260,7 +1317,7 @@ T1_MAX_TABLE_ELEMENTS, &num_elements ); if ( num_elements < 0 ) { - error = PSaux_Err_Ignore; + error = FT_ERR( Ignore ); goto Exit; } if ( (FT_UInt)num_elements > field->array_max ) @@ -1281,7 +1338,15 @@ { parser->cursor = token->start; parser->limit = token->limit; - ps_parser_load_field( parser, &fieldrec, objects, max_objects, 0 ); + + error = ps_parser_load_field( parser, + &fieldrec, + objects, + max_objects, + 0 ); + if ( error ) + break; + fieldrec.offset += fieldrec.size; } @@ -1317,7 +1382,7 @@ FT_Long* pnum_bytes, FT_Bool delimiters ) { - FT_Error error = PSaux_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* cur; @@ -1332,7 +1397,7 @@ if ( *cur != '<' ) { FT_ERROR(( "ps_parser_to_bytes: Missing starting delimiter `<'\n" )); - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1349,7 +1414,7 @@ if ( cur < parser->limit && *cur != '>' ) { FT_ERROR(( "ps_parser_to_bytes: Missing closing delimiter `>'\n" )); - error = PSaux_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1419,7 +1484,7 @@ FT_Byte* limit, FT_Memory memory ) { - parser->error = PSaux_Err_Ok; + parser->error = FT_Err_Ok; parser->base = base; parser->limit = limit; parser->cursor = base; @@ -1592,13 +1657,13 @@ if ( !outline ) { FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" )); - return PSaux_Err_Invalid_File_Format; + return FT_THROW( Invalid_File_Format ); } if ( !builder->load_points ) { outline->n_contours++; - return PSaux_Err_Ok; + return FT_Err_Ok; } error = FT_GLYPHLOADER_CHECK_POINTS( builder->loader, 0, 1 ); @@ -1621,13 +1686,13 @@ FT_Pos x, FT_Pos y ) { - FT_Error error = PSaux_Err_Invalid_File_Format; + FT_Error error = FT_ERR( Invalid_File_Format ); /* test whether we are building a new contour */ if ( builder->parse_state == T1_Parse_Have_Path ) - error = PSaux_Err_Ok; + error = FT_Err_Ok; else { builder->parse_state = T1_Parse_Have_Path; diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c index 9e5bd34..fb1353a 100644 --- a/src/psaux/t1cmap.c +++ b/src/psaux/t1cmap.c @@ -120,8 +120,12 @@ FT_CALLBACK_DEF( FT_Error ) - t1_cmap_standard_init( T1_CMapStd cmap ) + t1_cmap_standard_init( T1_CMapStd cmap, + FT_Pointer pointer ) { + FT_UNUSED( pointer ); + + t1_cmap_std_init( cmap, 0 ); return 0; } @@ -142,8 +146,12 @@ FT_CALLBACK_DEF( FT_Error ) - t1_cmap_expert_init( T1_CMapStd cmap ) + t1_cmap_expert_init( T1_CMapStd cmap, + FT_Pointer pointer ) { + FT_UNUSED( pointer ); + + t1_cmap_std_init( cmap, 1 ); return 0; } @@ -172,11 +180,14 @@ FT_CALLBACK_DEF( FT_Error ) - t1_cmap_custom_init( T1_CMapCustom cmap ) + t1_cmap_custom_init( T1_CMapCustom cmap, + FT_Pointer pointer ) { T1_Face face = (T1_Face)FT_CMAP_FACE( cmap ); T1_Encoding encoding = &face->type1.encoding; + FT_UNUSED( pointer ); + cmap->first = encoding->code_first; cmap->count = (FT_UInt)( encoding->code_last - cmap->first ); @@ -272,12 +283,15 @@ FT_CALLBACK_DEF( FT_Error ) - t1_cmap_unicode_init( PS_Unicodes unicodes ) + t1_cmap_unicode_init( PS_Unicodes unicodes, + FT_Pointer pointer ) { T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes ); FT_Memory memory = FT_FACE_MEMORY( face ); FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames; + FT_UNUSED( pointer ); + return psnames->unicodes_init( memory, unicodes, diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index ea67841..d67a05e 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -4,7 +4,7 @@ /* */ /* PostScript Type 1 decoding routines (body). */ /* */ -/* Copyright 2000-2011 by */ +/* Copyright 2000-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -205,7 +205,13 @@ if ( decoder->seac ) { FT_ERROR(( "t1operator_seac: invalid nested seac\n" )); - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); + } + + if ( decoder->builder.metrics_only ) + { + FT_ERROR(( "t1operator_seac: unexpected seac\n" )); + return FT_THROW( Syntax_Error ); } /* seac weirdness */ @@ -222,7 +228,7 @@ { FT_ERROR(( "t1operator_seac:" " glyph names table not available in this font\n" )); - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } #ifdef FT_CONFIG_OPTION_INCREMENTAL @@ -243,7 +249,7 @@ { FT_ERROR(( "t1operator_seac:" " invalid seac character code arguments\n" )); - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); } /* if we are trying to load a composite glyph, do not load the */ @@ -409,7 +415,7 @@ limit = zone->limit = charstring_base + charstring_len; ip = zone->cursor = zone->base; - error = PSaux_Err_Ok; + error = FT_Err_Ok; x = orig_x = builder->pos_x; y = orig_y = builder->pos_y; @@ -559,10 +565,10 @@ goto Syntax_Error; } - value = (FT_Int32)( ( (FT_Long)ip[0] << 24 ) | - ( (FT_Long)ip[1] << 16 ) | - ( (FT_Long)ip[2] << 8 ) | - ip[3] ); + value = (FT_Int32)( ( (FT_UInt32)ip[0] << 24 ) | + ( (FT_UInt32)ip[1] << 16 ) | + ( (FT_UInt32)ip[2] << 8 ) | + (FT_UInt32)ip[3] ); ip += 4; /* According to the specification, values > 32000 or < -32000 must */ @@ -585,7 +591,7 @@ else { if ( !large_int ) - value <<= 16; + value = (FT_Int32)( (FT_UInt32)value << 16 ); } break; @@ -605,13 +611,13 @@ } if ( ip[-2] < 251 ) - value = ( ( (FT_Int32)ip[-2] - 247 ) << 8 ) + ip[-1] + 108; + value = ( ( ip[-2] - 247 ) * 256 ) + ip[-1] + 108; else - value = -( ( ( (FT_Int32)ip[-2] - 251 ) << 8 ) + ip[-1] + 108 ); + value = -( ( ( ip[-2] - 251 ) * 256 ) + ip[-1] + 108 ); } if ( !large_int ) - value <<= 16; + value = (FT_Int32)( (FT_UInt32)value << 16 ); } else { @@ -750,9 +756,9 @@ decoder->flex_state = 1; decoder->num_flex_vectors = 0; if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok || + != FT_Err_Ok || ( error = t1_builder_check_points( builder, 6 ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; break; @@ -1092,10 +1098,12 @@ goto Syntax_Error; /* apply hints to the loaded glyph outline now */ - hinter->apply( hinter->hints, - builder->current, - (PSH_Globals)builder->hints_globals, - decoder->hint_mode ); + error = hinter->apply( hinter->hints, + builder->current, + (PSH_Globals)builder->hints_globals, + decoder->hint_mode ); + if ( error ) + goto Fail; } /* add current outline to the glyph slot */ @@ -1123,7 +1131,7 @@ FT_TRACE4(( "\n" )); /* return now! */ - return PSaux_Err_Ok; + return FT_Err_Ok; case op_hsbw: FT_TRACE4(( " hsbw" )); @@ -1143,7 +1151,7 @@ /* the glyph's metrics (lsb + advance width), not load the */ /* rest of it; so exit immediately */ if ( builder->metrics_only ) - return PSaux_Err_Ok; + return FT_Err_Ok; break; @@ -1172,7 +1180,7 @@ /* the glyph's metrics (lsb + advance width), not load the */ /* rest of it; so exit immediately */ if ( builder->metrics_only ) - return PSaux_Err_Ok; + return FT_Err_Ok; break; @@ -1191,7 +1199,7 @@ FT_TRACE4(( " hlineto" )); if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; x += top[0]; @@ -1213,9 +1221,9 @@ FT_TRACE4(( " hvcurveto" )); if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok || + != FT_Err_Ok || ( error = t1_builder_check_points( builder, 3 ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; x += top[0]; @@ -1231,7 +1239,7 @@ FT_TRACE4(( " rlineto" )); if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; x += top[0]; @@ -1239,7 +1247,7 @@ Add_Line: if ( ( error = t1_builder_add_point1( builder, x, y ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; break; @@ -1260,9 +1268,9 @@ FT_TRACE4(( " rrcurveto" )); if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok || + != FT_Err_Ok || ( error = t1_builder_check_points( builder, 3 ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; x += top[0]; @@ -1282,9 +1290,9 @@ FT_TRACE4(( " vhcurveto" )); if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok || + != FT_Err_Ok || ( error = t1_builder_check_points( builder, 3 ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; y += top[0]; @@ -1300,7 +1308,7 @@ FT_TRACE4(( " vlineto" )); if ( ( error = t1_builder_start_point( builder, x, y ) ) - != PSaux_Err_Ok ) + != FT_Err_Ok ) goto Fail; y += top[0]; @@ -1539,10 +1547,10 @@ return error; Syntax_Error: - return PSaux_Err_Syntax_Error; + return FT_THROW( Syntax_Error ); Stack_Underflow: - return PSaux_Err_Stack_Underflow; + return FT_THROW( Stack_Underflow ); } @@ -1579,7 +1587,7 @@ { FT_ERROR(( "t1_decoder_init:" " the `psnames' module is not available\n" )); - return PSaux_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); } decoder->psnames = psnames; @@ -1599,7 +1607,7 @@ decoder->funcs = t1_decoder_funcs; - return PSaux_Err_Ok; + return FT_Err_Ok; } diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index d798978..644c76d 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -4,8 +4,7 @@ /* */ /* PostScript hinting algorithm (body). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 */ -/* by */ +/* Copyright 2001-2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ @@ -402,13 +401,13 @@ FT_Fixed delta, FT_Int dimension ) { - PSH_Hint hint; - FT_UInt count; + FT_UInt count; for ( count = 0; count < table->max_hints; count++ ) { - hint = table->hints + count; + PSH_Hint hint = table->hints + count; + hint->cur_pos = FT_MulFix( hint->org_pos, scale ) + delta; hint->cur_len = FT_MulFix( hint->org_len, scale ); @@ -563,7 +562,7 @@ else if ( len > 0 ) { /* This is a very small stem; we simply align it to the - * pixel grid, trying to find the minimal displacement. + * pixel grid, trying to find the minimum displacement. * * left = pos * right = pos + len @@ -1162,8 +1161,8 @@ int result = PSH_DIR_NONE; - ax = ( dx >= 0 ) ? dx : -dx; - ay = ( dy >= 0 ) ? dy : -dy; + ax = FT_ABS( dx ); + ay = FT_ABS( dy ); if ( ay * 12 < ax ) { @@ -1407,7 +1406,6 @@ point = first; before = point; - after = point; do { @@ -2080,8 +2078,6 @@ start = first; do { - point = first; - /* skip consecutive fitted points */ for (;;) { @@ -2194,7 +2190,7 @@ /* something to do? */ if ( outline->n_points == 0 || outline->n_contours == 0 ) - return PSH_Err_Ok; + return FT_Err_Ok; #ifdef DEBUG_HINTER diff --git a/src/pshinter/pshalgo.h b/src/pshinter/pshalgo.h index 1a248a7..c70f31e 100644 --- a/src/pshinter/pshalgo.h +++ b/src/pshinter/pshalgo.h @@ -4,7 +4,7 @@ /* */ /* PostScript hinting algorithm (specification). */ /* */ -/* Copyright 2001, 2002, 2003, 2008 by */ +/* Copyright 2001-2003, 2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,7 +22,6 @@ #include "pshrec.h" #include "pshglob.h" -#include FT_TRIGONOMETRY_H FT_BEGIN_HEADER @@ -168,8 +167,6 @@ FT_BEGIN_HEADER FT_UInt flags2; FT_Char dir_in; FT_Char dir_out; - FT_Angle angle_in; - FT_Angle angle_out; PSH_Hint hint; FT_Pos org_u; FT_Pos org_v; @@ -186,12 +183,6 @@ FT_BEGIN_HEADER } PSH_PointRec; -#define PSH_POINT_EQUAL_ORG( a, b ) ( (a)->org_u == (b)->org_u && \ - (a)->org_v == (b)->org_v ) - -#define PSH_POINT_ANGLE( a, b ) FT_Atan2( (b)->org_u - (a)->org_u, \ - (b)->org_v - (a)->org_v ) - typedef struct PSH_ContourRec_ { PSH_Point start; diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c index 31231ad..1bcc481 100644 --- a/src/pshinter/pshglob.c +++ b/src/pshinter/pshglob.c @@ -5,7 +5,7 @@ /* PostScript hinter global hinting management (body). */ /* Inspired by the new auto-hinter module. */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2006, 2010 by */ +/* Copyright 2001-2004, 2006, 2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ @@ -522,6 +522,28 @@ } + /* calculate the maximum height of given blue zones */ + static FT_Short + psh_calc_max_height( FT_UInt num, + const FT_Short* values, + FT_Short cur_max ) + { + FT_UInt count; + + + for ( count = 0; count < num; count += 2 ) + { + FT_Short cur_height = values[count + 1] - values[count]; + + + if ( cur_height > cur_max ) + cur_max = cur_height; + } + + return cur_max; + } + + FT_LOCAL_DEF( void ) psh_blues_snap_stem( PSH_Blues blues, FT_Int stem_top, @@ -684,7 +706,32 @@ priv->family_blues, priv->num_family_other_blues, priv->family_other_blues, priv->blue_fuzz, 1 ); - globals->blues.blue_scale = priv->blue_scale; + /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */ + { + FT_Fixed max_scale; + FT_Short max_height = 1; + + + max_height = psh_calc_max_height( priv->num_blue_values, + priv->blue_values, + max_height ); + max_height = psh_calc_max_height( priv->num_other_blues, + priv->other_blues, + max_height ); + max_height = psh_calc_max_height( priv->num_family_blues, + priv->family_blues, + max_height ); + max_height = psh_calc_max_height( priv->num_family_other_blues, + priv->family_other_blues, + max_height ); + + /* BlueScale is scaled 1000 times */ + max_scale = FT_DivFix( 1000, max_height ); + globals->blues.blue_scale = priv->blue_scale < max_scale + ? priv->blue_scale + : max_scale; + } + globals->blues.blue_shift = priv->blue_shift; globals->blues.blue_fuzz = priv->blue_fuzz; @@ -703,14 +750,14 @@ } - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) psh_globals_set_scale( PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta ) { - PSH_Dimension dim = &globals->dimension[0]; + PSH_Dimension dim; dim = &globals->dimension[0]; @@ -733,8 +780,6 @@ psh_globals_scale_widths( globals, 1 ); psh_blues_scale_zones( &globals->blues, y_scale, y_delta ); } - - return 0; } diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h index c511626..94d972a 100644 --- a/src/pshinter/pshglob.h +++ b/src/pshinter/pshglob.h @@ -4,7 +4,7 @@ /* */ /* PostScript hinter global hinting management. */ /* */ -/* Copyright 2001, 2002, 2003 by */ +/* Copyright 2001, 2002, 2003, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -167,7 +167,7 @@ FT_BEGIN_HEADER FT_Int org_width ); #endif - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) psh_globals_set_scale( PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, diff --git a/src/pshinter/pshmod.c b/src/pshinter/pshmod.c index 91da5d7..cdeaca1 100644 --- a/src/pshinter/pshmod.c +++ b/src/pshinter/pshmod.c @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript hinter module implementation (body). */ /* */ -/* Copyright 2001, 2002, 2007 by */ +/* Copyright 2001, 2002, 2007, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -93,14 +93,15 @@ } - FT_DEFINE_PSHINTER_INTERFACE(pshinter_interface, + FT_DEFINE_PSHINTER_INTERFACE( + pshinter_interface, pshinter_get_globals_funcs, pshinter_get_t1_funcs, - pshinter_get_t2_funcs - ) + pshinter_get_t2_funcs ) - FT_DEFINE_MODULE(pshinter_module_class, + FT_DEFINE_MODULE( + pshinter_module_class, 0, sizeof ( PS_Hinter_ModuleRec ), @@ -108,11 +109,11 @@ 0x10000L, 0x20000L, - &FTPSHINTER_INTERFACE_GET, /* module-specific interface */ + &PSHINTER_INTERFACE_GET, /* module-specific interface */ (FT_Module_Constructor)ps_hinter_init, (FT_Module_Destructor) ps_hinter_done, - (FT_Module_Requester) 0 /* no additional interface for now */ - ) + (FT_Module_Requester) NULL ) /* no additional interface for now */ + /* END */ diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c index 1e0f9a9..568f4ac 100644 --- a/src/pshinter/pshpic.c +++ b/src/pshinter/pshpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for pshinter module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,6 +22,7 @@ #include "pshpic.h" #include "pshnterr.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from pshmod.c */ @@ -33,7 +34,7 @@ pshinter_module_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->pshinter ) @@ -48,13 +49,13 @@ pshinter_module_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = PSH_Err_Ok; - PSHinterPIC* container; + FT_Error error = FT_Err_Ok; + PSHinterPIC* container = NULL; FT_Memory memory = library->memory; /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->pshinter = container; @@ -63,13 +64,13 @@ FT_Init_Class_pshinter_interface( library, &container->pshinter_interface ); -/*Exit:*/ - if( error ) + if ( error ) pshinter_module_class_pic_free( library ); + return error; } - #endif /* FT_CONFIG_OPTION_PIC */ + /* END */ diff --git a/src/pshinter/pshpic.h b/src/pshinter/pshpic.h index c10bdd9..b46f853 100644 --- a/src/pshinter/pshpic.h +++ b/src/pshinter/pshpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for pshinter module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,21 +24,25 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H + #ifndef FT_CONFIG_OPTION_PIC -#define FTPSHINTER_INTERFACE_GET pshinter_interface +#define PSHINTER_INTERFACE_GET pshinter_interface #else /* FT_CONFIG_OPTION_PIC */ #include FT_INTERNAL_POSTSCRIPT_HINTS_H - typedef struct PSHinterPIC_ + typedef struct PSHinterPIC_ { - PSHinter_Interface pshinter_interface; + PSHinter_Interface pshinter_interface; + } PSHinterPIC; -#define GET_PIC(lib) ((PSHinterPIC*)((lib)->pic_container.autofit)) -#define FTPSHINTER_INTERFACE_GET (GET_PIC(library)->pshinter_interface) + +#define GET_PIC( lib ) ( (PSHinterPIC*)( (lib)->pic_container.pshinter ) ) + +#define PSHINTER_INTERFACE_GET ( GET_PIC( library )->pshinter_interface ) /* see pshpic.c for the implementation */ void diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 0910cc5..73a18ff 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -4,7 +4,7 @@ /* */ /* FreeType PostScript hints recorder (body). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2007, 2009 by */ +/* Copyright 2001-2004, 2007, 2009, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -64,7 +64,7 @@ { FT_UInt old_max = table->max_hints; FT_UInt new_max = count; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( new_max > old_max ) @@ -83,7 +83,7 @@ FT_Memory memory, PS_Hint *ahint ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count; PS_Hint hint = 0; @@ -139,7 +139,7 @@ { FT_UInt old_max = ( mask->max_bits + 7 ) >> 3; FT_UInt new_max = ( count + 7 ) >> 3; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( new_max > old_max ) @@ -186,7 +186,7 @@ FT_Int idx, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* p; @@ -236,7 +236,7 @@ { FT_UInt old_max = table->max_masks; FT_UInt new_max = count; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( new_max > old_max ) @@ -256,7 +256,7 @@ PS_Mask *amask ) { FT_UInt count; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; PS_Mask mask = 0; @@ -287,7 +287,7 @@ FT_Memory memory, PS_Mask *amask ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count; PS_Mask mask; @@ -316,7 +316,7 @@ FT_UInt bit_count, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error; PS_Mask mask; @@ -384,7 +384,7 @@ FT_UInt count; - count = ( count1 <= count2 ) ? count1 : count2; + count = FT_MIN( count1, count2 ); for ( ; count >= 8; count -= 8 ) { if ( p1[0] & p2[0] ) @@ -409,7 +409,7 @@ FT_Memory memory ) { FT_UInt temp; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; /* swap index1 and index2 so that index1 < index2 */ @@ -499,7 +499,7 @@ FT_Memory memory ) { FT_Int index1, index2; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; for ( index1 = table->num_masks - 1; index1 > 0; index1-- ) @@ -561,7 +561,7 @@ FT_Memory memory ) { PS_Mask mask; - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; /* get last hint mask */ @@ -583,12 +583,13 @@ FT_UInt end_point ) { FT_UInt count = dim->masks.num_masks; - PS_Mask mask; if ( count > 0 ) { - mask = dim->masks.masks + count - 1; + PS_Mask mask = dim->masks.masks + count - 1; + + mask->end_point = end_point; } } @@ -621,7 +622,7 @@ FT_UInt end_point, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error; /* reset current mask, if any */ @@ -646,7 +647,7 @@ FT_Memory memory, FT_Int *aindex ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt flags = 0; @@ -717,7 +718,7 @@ FT_Int hint3, FT_Memory memory ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UInt count = dim->counters.num_masks; PS_Mask counter = dim->counters.masks; @@ -791,18 +792,17 @@ ps_dimension_done( &hints->dimension[0], memory ); ps_dimension_done( &hints->dimension[1], memory ); - hints->error = PSH_Err_Ok; + hints->error = FT_Err_Ok; hints->memory = 0; } - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) ps_hints_init( PS_Hints hints, FT_Memory memory ) { FT_MEM_ZERO( hints, sizeof ( *hints ) ); hints->memory = memory; - return PSH_Err_Ok; } @@ -815,7 +815,7 @@ { case PS_HINT_TYPE_1: case PS_HINT_TYPE_2: - hints->error = PSH_Err_Ok; + hints->error = FT_Err_Ok; hints->hint_type = hint_type; ps_dimension_init( &hints->dimension[0] ); @@ -823,7 +823,7 @@ break; default: - hints->error = PSH_Err_Invalid_Argument; + hints->error = FT_THROW( Invalid_Argument ); hints->hint_type = hint_type; FT_TRACE0(( "ps_hints_open: invalid charstring type\n" )); @@ -894,7 +894,7 @@ FT_Int dimension, FT_Fixed* stems ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( !hints->error ) @@ -938,7 +938,7 @@ else { FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type\n" )); - error = PSH_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } } @@ -956,7 +956,7 @@ ps_hints_t1reset( PS_Hints hints, FT_UInt end_point ) { - FT_Error error = PSH_Err_Ok; + FT_Error error = FT_Err_Ok; if ( !hints->error ) @@ -979,7 +979,7 @@ else { /* invalid hint type */ - error = PSH_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Fail; } } diff --git a/src/pshinter/pshrec.h b/src/pshinter/pshrec.h index dcb3197..a88fe6e 100644 --- a/src/pshinter/pshrec.h +++ b/src/pshinter/pshrec.h @@ -4,7 +4,7 @@ /* */ /* Postscript (Type1/Type2) hints recorder (specification). */ /* */ -/* Copyright 2001, 2002, 2003, 2006, 2008 by */ +/* Copyright 2001, 2002, 2003, 2006, 2008, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -141,7 +141,7 @@ FT_BEGIN_HEADER /* */ /* initialize hints recorder */ - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) ps_hints_init( PS_Hints hints, FT_Memory memory ); diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c index 3619174..42c9aff 100644 --- a/src/psnames/psmodule.c +++ b/src/psnames/psmodule.c @@ -4,7 +4,7 @@ /* */ /* PSNames module implementation (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2003, 2005-2008, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_POSTSCRIPT_CMAPS_H @@ -369,7 +370,7 @@ /* No unicode chars here! */ FT_FREE( table->maps ); if ( !error ) - error = PSnames_Err_No_Unicode_Glyph_Name; + error = FT_THROW( No_Unicode_Glyph_Name ); } else { @@ -377,7 +378,7 @@ if ( count < num_glyphs / 2 ) { (void)FT_RENEW_ARRAY( table->maps, num_glyphs, count ); - error = PSnames_Err_Ok; + error = FT_Err_Ok; } /* Sort the table in increasing order of unicode values, */ @@ -521,7 +522,9 @@ #ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST - FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface, + + FT_DEFINE_SERVICE_PSCMAPSREC( + pscmaps_interface, (PS_Unicode_ValueFunc) ps_unicode_value, (PS_Unicodes_InitFunc) ps_unicodes_init, (PS_Unicodes_CharIndexFunc)ps_unicodes_char_index, @@ -531,39 +534,36 @@ (PS_Adobe_Std_StringsFunc) ps_get_standard_strings, t1_standard_encoding, - t1_expert_encoding - ) + t1_expert_encoding ) #else - FT_DEFINE_SERVICE_PSCMAPSREC(pscmaps_interface, - 0, - 0, - 0, - 0, + FT_DEFINE_SERVICE_PSCMAPSREC( + pscmaps_interface, + NULL, + NULL, + NULL, + NULL, (PS_Macintosh_NameFunc) ps_get_macintosh_name, (PS_Adobe_Std_StringsFunc) ps_get_standard_strings, t1_standard_encoding, - t1_expert_encoding - ) + t1_expert_encoding ) #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */ - FT_DEFINE_SERVICEDESCREC1(pscmaps_services, - FT_SERVICE_ID_POSTSCRIPT_CMAPS, &FT_PSCMAPS_INTERFACE_GET - ) - - + FT_DEFINE_SERVICEDESCREC1( + pscmaps_services, + FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET ) static FT_Pointer psnames_get_service( FT_Module module, const char* service_id ) { - /* FT_PSCMAPS_SERVICES_GET derefers `library' in PIC mode */ + /* PSCMAPS_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC FT_Library library; @@ -577,19 +577,20 @@ FT_UNUSED( module ); #endif - return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id ); + return ft_service_list_lookup( PSCMAPS_SERVICES_GET, service_id ); } #endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */ #ifndef FT_CONFIG_OPTION_POSTSCRIPT_NAMES -#define PUT_PS_NAMES_SERVICE(a) 0 +#define PUT_PS_NAMES_SERVICE( a ) NULL #else -#define PUT_PS_NAMES_SERVICE(a) a +#define PUT_PS_NAMES_SERVICE( a ) a #endif - FT_DEFINE_MODULE(psnames_module_class, + FT_DEFINE_MODULE( + psnames_module_class, 0, /* this is not a font driver, nor a renderer */ sizeof ( FT_ModuleRec ), @@ -598,12 +599,11 @@ 0x10000L, /* driver version */ 0x20000L, /* driver requires FreeType 2 or above */ - PUT_PS_NAMES_SERVICE((void*)&FT_PSCMAPS_INTERFACE_GET), /* module specific interface */ - (FT_Module_Constructor)0, - (FT_Module_Destructor) 0, - (FT_Module_Requester) PUT_PS_NAMES_SERVICE(psnames_get_service) - ) - + PUT_PS_NAMES_SERVICE( + (void*)&PSCMAPS_INTERFACE_GET ), /* module specific interface */ + (FT_Module_Constructor)NULL, + (FT_Module_Destructor) NULL, + (FT_Module_Requester) PUT_PS_NAMES_SERVICE( psnames_get_service ) ) /* END */ diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c index 467ab73..3820f65 100644 --- a/src/psnames/pspic.c +++ b/src/psnames/pspic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for psnames module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,6 +22,7 @@ #include "pspic.h" #include "psnamerr.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from psmodule.c */ @@ -36,11 +37,12 @@ FT_Init_Class_pscmaps_interface( FT_Library library, FT_Service_PsCMapsRec* clazz ); + void psnames_module_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->psnames ) @@ -48,7 +50,7 @@ PSModulePIC* container = (PSModulePIC*)pic_container->psnames; - if(container->pscmaps_services) + if ( container->pscmaps_services ) FT_Destroy_Class_pscmaps_services( library, container->pscmaps_services ); container->pscmaps_services = NULL; @@ -62,18 +64,19 @@ psnames_module_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = PSnames_Err_Ok; - PSModulePIC* container; + FT_Error error = FT_Err_Ok; + PSModulePIC* container = NULL; FT_Memory memory = library->memory; /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->psnames = container; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ error = FT_Create_Class_pscmaps_services( library, &container->pscmaps_services ); if ( error ) @@ -81,7 +84,7 @@ FT_Init_Class_pscmaps_interface( library, &container->pscmaps_interface ); -Exit: + Exit: if ( error ) psnames_module_class_pic_free( library ); return error; diff --git a/src/psnames/pspic.h b/src/psnames/pspic.h index 1169b89..6ff002c 100644 --- a/src/psnames/pspic.h +++ b/src/psnames/pspic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for psnames module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,22 +25,27 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H #ifndef FT_CONFIG_OPTION_PIC -#define FT_PSCMAPS_SERVICES_GET pscmaps_services -#define FT_PSCMAPS_INTERFACE_GET pscmaps_interface + +#define PSCMAPS_SERVICES_GET pscmaps_services +#define PSCMAPS_INTERFACE_GET pscmaps_interface #else /* FT_CONFIG_OPTION_PIC */ #include FT_SERVICE_POSTSCRIPT_CMAPS_H - typedef struct PSModulePIC_ + typedef struct PSModulePIC_ { - FT_ServiceDescRec* pscmaps_services; - FT_Service_PsCMapsRec pscmaps_interface; + FT_ServiceDescRec* pscmaps_services; + FT_Service_PsCMapsRec pscmaps_interface; + } PSModulePIC; -#define GET_PIC(lib) ((PSModulePIC*)((lib)->pic_container.psnames)) -#define FT_PSCMAPS_SERVICES_GET (GET_PIC(library)->pscmaps_services) -#define FT_PSCMAPS_INTERFACE_GET (GET_PIC(library)->pscmaps_interface) + +#define GET_PIC( lib ) \ + ( (PSModulePIC*)((lib)->pic_container.psnames) ) +#define PSCMAPS_SERVICES_GET ( GET_PIC( library )->pscmaps_services ) +#define PSCMAPS_INTERFACE_GET ( GET_PIC( library )->pscmaps_interface ) + /* see pspic.c for the implementation */ void diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk index 4cd39a8..f321de2 100644 --- a/src/psnames/rules.mk +++ b/src/psnames/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2003, 2011 by +# Copyright 1996-2001, 2003, 2011, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -46,7 +46,7 @@ PSNAMES_DRV_OBJ_S := $(OBJ_DIR)/psnames.$O # PSNames driver source file for single build # -PSNAMES_DRV_SRC_S := $(PSNAMES_DIR)/psmodule.c +PSNAMES_DRV_SRC_S := $(PSNAMES_DIR)/psnames.c # PSNames driver - single object diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h index 7773924..703155a 100644 --- a/src/raster/ftmisc.h +++ b/src/raster/ftmisc.h @@ -115,6 +115,27 @@ return ( s > 0 ) ? d : -d; } + + static FT_Long + FT_MulDiv_No_Round( FT_Long a, + FT_Long b, + FT_Long c ) + { + FT_Int s; + FT_Long d; + + + s = 1; + if ( a < 0 ) { a = -a; s = -1; } + if ( b < 0 ) { b = -b; s = -s; } + if ( c < 0 ) { c = -c; s = -s; } + + d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c + : 0x7FFFFFFFL ); + + return ( s > 0 ) ? d : -d; + } + #endif /* __FTMISC_H__ */ diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index f85845e..b06ac33 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer (body). */ /* */ -/* Copyright 1996-2003, 2005, 2007-2012 by */ +/* Copyright 1996-2003, 2005, 2007-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,8 +24,8 @@ /* */ /* - copy `src/raster/ftraster.c' (this file) to your current directory */ /* */ - /* - copy `include/freetype/ftimage.h' and `src/raster/ftmisc.h' */ - /* to your current directory */ + /* - copy `include/ftimage.h' and `src/raster/ftmisc.h' to your current */ + /* directory */ /* */ /* - compile `ftraster' with the _STANDALONE_ macro defined, as in */ /* */ @@ -60,7 +60,7 @@ #include <ft2build.h> #include "ftraster.h" -#include FT_INTERNAL_CALC_H /* for FT_MulDiv only */ +#include FT_INTERNAL_CALC_H /* for FT_MulDiv and FT_MulDiv_No_Round */ #include "rastpic.h" @@ -179,6 +179,9 @@ #ifdef _STANDALONE_ + /* Auxiliary macros for token concatenation. */ +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) /* This macro is used to indicate that a function parameter is unused. */ /* Its purpose is simply to reduce compiler warnings. Note also that */ @@ -187,7 +190,7 @@ #define FT_UNUSED( x ) (x) = (x) /* Disable the tracing mechanism for simplicity -- developers can */ - /* activate it easily by redefining these two macros. */ + /* activate it easily by redefining these macros. */ #ifndef FT_ERROR #define FT_ERROR( x ) do { } while ( 0 ) /* nothing */ #endif @@ -198,6 +201,10 @@ #define FT_TRACE6( x ) do { } while ( 0 ) /* nothing */ #endif +#ifndef FT_THROW +#define FT_THROW( e ) FT_ERR_CAT( Raster_Err_, e ) +#endif + #define Raster_Err_None 0 #define Raster_Err_Not_Ini -1 #define Raster_Err_Overflow -2 @@ -224,11 +231,11 @@ #include FT_INTERNAL_OBJECTS_H -#include FT_INTERNAL_DEBUG_H /* for FT_TRACE() and FT_ERROR() */ +#include FT_INTERNAL_DEBUG_H /* for FT_TRACE, FT_ERROR, and FT_THROW */ #include "rasterrs.h" -#define Raster_Err_None Raster_Err_Ok +#define Raster_Err_None FT_Err_Ok #define Raster_Err_Not_Ini Raster_Err_Raster_Uninitialized #define Raster_Err_Overflow Raster_Err_Raster_Overflow #define Raster_Err_Neg_Height Raster_Err_Raster_Negative_Height @@ -255,7 +262,8 @@ /* On the other hand, SMulDiv means `Slow MulDiv', and is used typically */ /* for clipping computations. It simply uses the FT_MulDiv() function */ /* defined in `ftcalc.h'. */ -#define SMulDiv FT_MulDiv +#define SMulDiv FT_MulDiv +#define SMulDiv_No_Round FT_MulDiv_No_Round /* The rasterizer is a very general purpose component; please leave */ /* the following redefinitions there (you never know your target */ @@ -302,6 +310,7 @@ typedef short Short; typedef unsigned short UShort, *PUShort; typedef long Long, *PLong; + typedef unsigned long ULong; typedef unsigned char Byte, *PByte; typedef char Bool; @@ -440,12 +449,14 @@ #define FLOOR( x ) ( (x) & -ras.precision ) #define CEILING( x ) ( ( (x) + ras.precision - 1 ) & -ras.precision ) -#define TRUNC( x ) ( (signed long)(x) >> ras.precision_bits ) +#define TRUNC( x ) ( (Long)(x) >> ras.precision_bits ) #define FRAC( x ) ( (x) & ( ras.precision - 1 ) ) -#define SCALED( x ) ( ( (x) << ras.scale_shift ) - ras.precision_half ) +#define SCALED( x ) ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half ) -#define IS_BOTTOM_OVERSHOOT( x ) ( CEILING( x ) - x >= ras.precision_half ) -#define IS_TOP_OVERSHOOT( x ) ( x - FLOOR( x ) >= ras.precision_half ) +#define IS_BOTTOM_OVERSHOOT( x ) \ + (Bool)( CEILING( x ) - x >= ras.precision_half ) +#define IS_TOP_OVERSHOOT( x ) \ + (Bool)( x - FLOOR( x ) >= ras.precision_half ) /* The most used variables are positioned at the top of the structure. */ /* Thus, their offset can be coded with less opcodes, resulting in a */ @@ -654,7 +665,7 @@ /* Set precision variables according to param flag. */ /* */ /* <Input> */ - /* High :: Set to True for high precision (typically for ppem < 18), */ + /* High :: Set to True for high precision (typically for ppem < 24), */ /* false otherwise. */ /* */ static void @@ -734,7 +745,7 @@ if ( ras.top >= ras.maxBuff ) { - ras.error = Raster_Err_Overflow; + ras.error = FT_THROW( Overflow ); return FAILURE; } @@ -764,7 +775,7 @@ default: FT_ERROR(( "New_Profile: invalid profile direction\n" )); - ras.error = Raster_Err_Invalid; + ras.error = FT_THROW( Invalid ); return FAILURE; } @@ -797,8 +808,7 @@ static Bool End_Profile( RAS_ARGS Bool overshoot ) { - Long h; - PProfile oldProfile; + Long h; h = (Long)( ras.top - ras.cProfile->offset ); @@ -806,12 +816,15 @@ if ( h < 0 ) { FT_ERROR(( "End_Profile: negative height encountered\n" )); - ras.error = Raster_Err_Neg_Height; + ras.error = FT_THROW( Neg_Height ); return FAILURE; } if ( h > 0 ) { + PProfile oldProfile; + + FT_TRACE6(( "Ending profile %p, start = %ld, height = %ld\n", ras.cProfile, ras.cProfile->start, h )); @@ -839,7 +852,7 @@ if ( ras.top >= ras.maxBuff ) { FT_TRACE1(( "overflow in End_Profile\n" )); - ras.error = Raster_Err_Overflow; + ras.error = FT_THROW( Overflow ); return FAILURE; } @@ -868,7 +881,7 @@ Insert_Y_Turn( RAS_ARGS Int y ) { PLong y_turns; - Int y2, n; + Int n; n = ras.numTurns - 1; @@ -882,7 +895,9 @@ if ( n >= 0 && y > y_turns[n] ) while ( n >= 0 ) { - y2 = (Int)y_turns[n]; + Int y2 = (Int)y_turns[n]; + + y_turns[n] = y; y = y2; n--; @@ -893,7 +908,7 @@ ras.maxBuff--; if ( ras.maxBuff <= ras.top ) { - ras.error = Raster_Err_Overflow; + ras.error = FT_THROW( Overflow ); return FAILURE; } ras.numTurns++; @@ -918,7 +933,6 @@ static Bool Finalize_Profile_Table( RAS_ARG ) { - Int bottom, top; UShort n; PProfile p; @@ -930,6 +944,9 @@ { while ( n > 0 ) { + Int bottom, top; + + if ( n > 1 ) p->link = (PProfile)( p->offset + p->height ); else @@ -1144,20 +1161,20 @@ size = e2 - e1 + 1; if ( ras.top + size >= ras.maxBuff ) { - ras.error = Raster_Err_Overflow; + ras.error = FT_THROW( Overflow ); return FAILURE; } if ( Dx > 0 ) { - Ix = SMulDiv( ras.precision, Dx, Dy); + Ix = SMulDiv_No_Round( ras.precision, Dx, Dy ); Rx = ( ras.precision * Dx ) % Dy; Dx = 1; } else { - Ix = SMulDiv( ras.precision, -Dx, Dy) * -1; - Rx = ( ras.precision * -Dx ) % Dy; + Ix = -SMulDiv_No_Round( ras.precision, -Dx, Dy ); + Rx = ( ras.precision * -Dx ) % Dy; Dx = -1; } @@ -1319,7 +1336,7 @@ if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { ras.top = top; - ras.error = Raster_Err_Overflow; + ras.error = FT_THROW( Overflow ); return FAILURE; } @@ -1857,7 +1874,7 @@ v_start.x = ( v_start.x + v_last.x ) / 2; v_start.y = ( v_start.y + v_last.y ) / 2; - v_last = v_start; + /* v_last = v_start; */ } point--; tags--; @@ -1994,7 +2011,7 @@ return SUCCESS; Invalid_Outline: - ras.error = Raster_Err_Invalid; + ras.error = FT_THROW( Invalid ); Fail: return FAILURE; @@ -2023,8 +2040,6 @@ int i; unsigned start; - PProfile lastProfile; - ras.fProfile = NULL; ras.joint = FALSE; @@ -2042,7 +2057,8 @@ for ( i = 0; i < ras.outline.n_contours; i++ ) { - Bool o; + PProfile lastProfile; + Bool o; ras.state = Unknown_State; @@ -2266,10 +2282,10 @@ PProfile right ) { Long e1, e2; - int c1, c2; - Byte f1, f2; Byte* target; + Int dropOutControl = left->flags & 7; + FT_UNUSED( y ); FT_UNUSED( left ); FT_UNUSED( right ); @@ -2279,13 +2295,18 @@ e1 = TRUNC( CEILING( x1 ) ); - if ( x2 - x1 - ras.precision <= ras.precision_jitter ) + if ( dropOutControl != 2 && + x2 - x1 - ras.precision <= ras.precision_jitter ) e2 = e1; else e2 = TRUNC( FLOOR( x2 ) ); if ( e2 >= 0 && e1 < ras.bWidth ) { + int c1, c2; + Byte f1, f2; + + if ( e1 < 0 ) e1 = 0; if ( e2 >= ras.bWidth ) @@ -2509,27 +2530,30 @@ PProfile left, PProfile right ) { - Long e1, e2; - PByte bits; - Byte f1; - FT_UNUSED( left ); FT_UNUSED( right ); if ( x2 - x1 < ras.precision ) { + Long e1, e2; + + e1 = CEILING( x1 ); e2 = FLOOR ( x2 ); if ( e1 == e2 ) { + Byte f1; + PByte bits; + + bits = ras.bTarget + ( y >> 3 ); f1 = (Byte)( 0x80 >> ( y & 7 ) ); e1 = TRUNC( e1 ); - if ( e1 >= 0 && e1 < ras.target.rows ) + if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { PByte p; @@ -2623,7 +2647,7 @@ /* bounding box instead */ if ( pxl < 0 ) pxl = e1; - else if ( TRUNC( pxl ) >= ras.target.rows ) + else if ( (ULong)( TRUNC( pxl ) ) >= ras.target.rows ) pxl = e2; /* check that the other pixel isn't set */ @@ -2638,9 +2662,9 @@ if ( ras.target.pitch > 0 ) bits += ( ras.target.rows - 1 ) * ras.target.pitch; - if ( e1 >= 0 && - e1 < ras.target.rows && - *bits & f1 ) + if ( e1 >= 0 && + (ULong)e1 < ras.target.rows && + *bits & f1 ) return; } else @@ -2652,7 +2676,7 @@ e1 = TRUNC( pxl ); - if ( e1 >= 0 && e1 < ras.target.rows ) + if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { bits -= e1 * ras.target.pitch; if ( ras.target.pitch > 0 ) @@ -2720,8 +2744,6 @@ static void Vertical_Gray_Sweep_Step( RAS_ARG ) { - Int c1, c2; - PByte pix, bit, bit2; short* count = (short*)count_table; Byte* grays; @@ -2730,6 +2752,9 @@ if ( ras.traceOfs > ras.gray_width ) { + PByte pix; + + pix = ras.gTarget + ras.traceG + ras.gray_min_x * 4; grays = ras.grays; @@ -2740,6 +2765,9 @@ Int last_bit = last_pixel & 3; Bool over = 0; + Int c1, c2; + PByte bit, bit2; + if ( ras.gray_max_x >= last_cell && last_bit != 3 ) { @@ -2832,7 +2860,6 @@ { Long e1, e2; PByte pixel; - Byte color; /* During the horizontal sweep, we only take care of drop-outs */ @@ -2886,6 +2913,9 @@ if ( e1 >= 0 ) { + Byte color; + + if ( x2 - x1 >= ras.precision_half ) color = ras.grays[2]; else @@ -2963,7 +2993,7 @@ /* check the Y-turns */ if ( ras.numTurns == 0 ) { - ras.error = Raster_Err_Invalid; + ras.error = FT_THROW( Invalid ); return FAILURE; } @@ -3204,7 +3234,7 @@ if ( ras.band_top >= 7 || k < i ) { ras.band_top = 0; - ras.error = Raster_Err_Invalid; + ras.error = FT_THROW( Invalid ); return ras.error; } @@ -3393,7 +3423,7 @@ { FT_UNUSED_RASTER; - return Raster_Err_Unsupported; + return FT_THROW( Unsupported ); } #endif /* !FT_RASTER_OPTION_ANTI_ALIASING */ @@ -3498,7 +3528,8 @@ raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 ); - raster->buffer_size = pool_base + pool_size - (char*)raster->buffer; + raster->buffer_size = (long)( pool_base + pool_size - + (char*)raster->buffer ); raster->worker = worker; } else @@ -3511,7 +3542,7 @@ } - static void + static int ft_black_set_mode( black_PRaster raster, unsigned long mode, const char* palette ) @@ -3535,6 +3566,8 @@ FT_UNUSED( palette ); #endif + + return 0; } @@ -3548,37 +3581,37 @@ if ( !raster || !raster->buffer || !raster->buffer_size ) - return Raster_Err_Not_Ini; + return FT_THROW( Not_Ini ); if ( !outline ) - return Raster_Err_Invalid; + return FT_THROW( Invalid ); /* return immediately if the outline is empty */ if ( outline->n_points == 0 || outline->n_contours <= 0 ) return Raster_Err_None; if ( !outline->contours || !outline->points ) - return Raster_Err_Invalid; + return FT_THROW( Invalid ); if ( outline->n_points != outline->contours[outline->n_contours - 1] + 1 ) - return Raster_Err_Invalid; + return FT_THROW( Invalid ); worker = raster->worker; /* this version of the raster does not support direct rendering, sorry */ if ( params->flags & FT_RASTER_FLAG_DIRECT ) - return Raster_Err_Unsupported; + return FT_THROW( Unsupported ); if ( !target_map ) - return Raster_Err_Invalid; + return FT_THROW( Invalid ); /* nothing to do */ if ( !target_map->width || !target_map->rows ) return Raster_Err_None; if ( !target_map->buffer ) - return Raster_Err_Invalid; + return FT_THROW( Invalid ); ras.outline = *outline; ras.target = *target_map; diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c index 859cb7d..aa7f6d5 100644 --- a/src/raster/ftrend1.c +++ b/src/raster/ftrend1.c @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer interface (body). */ /* */ -/* Copyright 1996-2003, 2005, 2006, 2011 by */ +/* Copyright 1996-2003, 2005, 2006, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,7 @@ #include <ft2build.h> +#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_OBJECTS_H #include FT_OUTLINE_H #include "ftrend1.h" @@ -37,7 +38,7 @@ library->raster_pool, library->raster_pool_size ); - return Raster_Err_Ok; + return FT_Err_Ok; } @@ -61,12 +62,12 @@ const FT_Matrix* matrix, const FT_Vector* delta ) { - FT_Error error = Raster_Err_Ok; + FT_Error error = FT_Err_Ok; if ( slot->format != render->glyph_format ) { - error = Raster_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -114,7 +115,7 @@ /* check glyph image format */ if ( slot->format != render->glyph_format ) { - error = Raster_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -124,13 +125,13 @@ { /* raster1 is only capable of producing monochrome bitmaps */ if ( render->clazz == &ft_raster1_renderer_class ) - return Raster_Err_Cannot_Render_Glyph; + return FT_THROW( Cannot_Render_Glyph ); } else { /* raster5 is only capable of producing 5-gray-levels bitmaps */ if ( render->clazz == &ft_raster5_renderer_class ) - return Raster_Err_Cannot_Render_Glyph; + return FT_THROW( Cannot_Render_Glyph ); } #else /* FT_CONFIG_OPTION_PIC */ /* When PIC is enabled, we cannot get to the class object */ @@ -142,13 +143,13 @@ { /* raster1 is only capable of producing monochrome bitmaps */ if ( render->clazz->root.module_name[6] == '1' ) - return Raster_Err_Cannot_Render_Glyph; + return FT_THROW( Cannot_Render_Glyph ); } else { /* raster5 is only capable of producing 5-gray-levels bitmaps */ if ( render->clazz->root.module_name[6] == '5' ) - return Raster_Err_Cannot_Render_Glyph; + return FT_THROW( Cannot_Render_Glyph ); } #endif /* FT_CONFIG_OPTION_PIC */ @@ -179,7 +180,7 @@ if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX ) { - error = Raster_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } diff --git a/src/raster/rastpic.c b/src/raster/rastpic.c index 2883e3f..5e9f7cc 100644 --- a/src/raster/rastpic.c +++ b/src/raster/rastpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for raster module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,22 +22,26 @@ #include "rastpic.h" #include "rasterrs.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from ftraster.c */ void FT_Init_Class_ft_standard_raster( FT_Raster_Funcs* funcs ); + void ft_raster1_renderer_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->raster ) { - RasterPIC* container = (RasterPIC*)pic_container->raster; + RasterPIC* container = (RasterPIC*)pic_container->raster; + + if ( --container->ref_count ) return; FT_FREE( container ); @@ -49,14 +53,14 @@ FT_Error ft_raster1_renderer_class_pic_init( FT_Library library ) { - FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = Raster_Err_Ok; - RasterPIC* container; - FT_Memory memory = library->memory; + FT_PIC_Container* pic_container = &library->pic_container; + FT_Error error = FT_Err_Ok; + RasterPIC* container = NULL; + FT_Memory memory = library->memory; - /* since this function also serve raster5 renderer, - it implements reference counting */ + /* since this function also serves raster5 renderer, */ + /* it implements reference counting */ if ( pic_container->raster ) { ((RasterPIC*)pic_container->raster)->ref_count++; @@ -68,16 +72,17 @@ return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->raster = container; + container->ref_count = 1; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ FT_Init_Class_ft_standard_raster( &container->ft_standard_raster ); -/*Exit:*/ - if( error ) - ft_raster1_renderer_class_pic_free( library ); + return error; } + /* re-route these init and free functions to the above functions */ FT_Error ft_raster5_renderer_class_pic_init( FT_Library library ) @@ -85,6 +90,7 @@ return ft_raster1_renderer_class_pic_init( library ); } + void ft_raster5_renderer_class_pic_free( FT_Library library ) { diff --git a/src/raster/rastpic.h b/src/raster/rastpic.h index 7822a24..e0ddba6 100644 --- a/src/raster/rastpic.h +++ b/src/raster/rastpic.h @@ -24,19 +24,25 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H + #ifndef FT_CONFIG_OPTION_PIC -#define FT_STANDARD_RASTER_GET ft_standard_raster + +#define FT_STANDARD_RASTER_GET ft_standard_raster #else /* FT_CONFIG_OPTION_PIC */ - typedef struct RasterPIC_ + typedef struct RasterPIC_ { - int ref_count; - FT_Raster_Funcs ft_standard_raster; + int ref_count; + FT_Raster_Funcs ft_standard_raster; + } RasterPIC; -#define GET_PIC(lib) ((RasterPIC*)((lib)->pic_container.raster)) -#define FT_STANDARD_RASTER_GET (GET_PIC(library)->ft_standard_raster) + +#define GET_PIC( lib ) \ + ( (RasterPIC*)( (lib)->pic_container.raster ) ) +#define FT_STANDARD_RASTER_GET ( GET_PIC( library )->ft_standard_raster ) + /* see rastpic.c for the implementation */ void diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c new file mode 100644 index 0000000..9bfcc2a --- /dev/null +++ b/src/sfnt/pngshim.c @@ -0,0 +1,377 @@ +/***************************************************************************/ +/* */ +/* pngshim.c */ +/* */ +/* PNG Bitmap glyph support. */ +/* */ +/* Copyright 2013, 2014 by Google, Inc. */ +/* Written by Stuart Gill and Behdad Esfahbod. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#include <ft2build.h> +#include FT_INTERNAL_DEBUG_H +#include FT_INTERNAL_STREAM_H +#include FT_TRUETYPE_TAGS_H +#include FT_CONFIG_STANDARD_LIBRARY_H + + +#ifdef FT_CONFIG_OPTION_USE_PNG + + /* We always include <stjmp.h>, so make libpng shut up! */ +#define PNG_SKIP_SETJMP_CHECK 1 +#include <png.h> +#include "pngshim.h" + +#include "sferrors.h" + + + /* This code is freely based on cairo-png.c. There's so many ways */ + /* to call libpng, and the way cairo does it is defacto standard. */ + + static int + multiply_alpha( int alpha, + int color ) + { + int temp = ( alpha * color ) + 0x80; + + + return ( temp + ( temp >> 8 ) ) >> 8; + } + + + /* Premultiplies data and converts RGBA bytes => native endian. */ + static void + premultiply_data( png_structp png, + png_row_infop row_info, + png_bytep data ) + { + unsigned int i; + + FT_UNUSED( png ); + + + for ( i = 0; i < row_info->rowbytes; i += 4 ) + { + unsigned char* base = &data[i]; + unsigned int alpha = base[3]; + + + if ( alpha == 0 ) + base[0] = base[1] = base[2] = base[3] = 0; + + else + { + unsigned int red = base[0]; + unsigned int green = base[1]; + unsigned int blue = base[2]; + + + if ( alpha != 0xFF ) + { + red = multiply_alpha( alpha, red ); + green = multiply_alpha( alpha, green ); + blue = multiply_alpha( alpha, blue ); + } + + base[0] = blue; + base[1] = green; + base[2] = red; + base[3] = alpha; + } + } + } + + + /* Converts RGBx bytes to BGRA. */ + static void + convert_bytes_to_data( png_structp png, + png_row_infop row_info, + png_bytep data ) + { + unsigned int i; + + FT_UNUSED( png ); + + + for ( i = 0; i < row_info->rowbytes; i += 4 ) + { + unsigned char* base = &data[i]; + unsigned int red = base[0]; + unsigned int green = base[1]; + unsigned int blue = base[2]; + + + base[0] = blue; + base[1] = green; + base[2] = red; + base[3] = 0xFF; + } + } + + + /* Use error callback to avoid png writing to stderr. */ + static void + error_callback( png_structp png, + png_const_charp error_msg ) + { + FT_Error* error = (FT_Error*)png_get_error_ptr( png ); + + FT_UNUSED( error_msg ); + + + *error = FT_THROW( Out_Of_Memory ); +#ifdef PNG_SETJMP_SUPPORTED + ft_longjmp( png_jmpbuf( png ), 1 ); +#endif + /* if we get here, then we have no choice but to abort ... */ + } + + + /* Use warning callback to avoid png writing to stderr. */ + static void + warning_callback( png_structp png, + png_const_charp error_msg ) + { + FT_UNUSED( png ); + FT_UNUSED( error_msg ); + + /* Just ignore warnings. */ + } + + + static void + read_data_from_FT_Stream( png_structp png, + png_bytep data, + png_size_t length ) + { + FT_Error error; + png_voidp p = png_get_io_ptr( png ); + FT_Stream stream = (FT_Stream)p; + + + if ( FT_FRAME_ENTER( length ) ) + { + FT_Error* e = (FT_Error*)png_get_error_ptr( png ); + + + *e = FT_THROW( Invalid_Stream_Read ); + png_error( png, NULL ); + + return; + } + + memcpy( data, stream->cursor, length ); + + FT_FRAME_EXIT(); + } + + + FT_LOCAL_DEF( FT_Error ) + Load_SBit_Png( FT_GlyphSlot slot, + FT_Int x_offset, + FT_Int y_offset, + FT_Int pix_bits, + TT_SBit_Metrics metrics, + FT_Memory memory, + FT_Byte* data, + FT_UInt png_len, + FT_Bool populate_map_and_metrics ) + { + FT_Bitmap *map = &slot->bitmap; + FT_Error error = FT_Err_Ok; + FT_StreamRec stream; + + png_structp png; + png_infop info; + png_uint_32 imgWidth, imgHeight; + + int bitdepth, color_type, interlace; + FT_Int i; + png_byte* *rows = NULL; /* pacify compiler */ + + + if ( x_offset < 0 || + y_offset < 0 ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + if ( !populate_map_and_metrics && + ( (FT_UInt)x_offset + metrics->width > map->width || + (FT_UInt)y_offset + metrics->height > map->rows || + pix_bits != 32 || + map->pixel_mode != FT_PIXEL_MODE_BGRA ) ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + FT_Stream_OpenMemory( &stream, data, png_len ); + + png = png_create_read_struct( PNG_LIBPNG_VER_STRING, + &error, + error_callback, + warning_callback ); + if ( !png ) + { + error = FT_THROW( Out_Of_Memory ); + goto Exit; + } + + info = png_create_info_struct( png ); + if ( !info ) + { + error = FT_THROW( Out_Of_Memory ); + png_destroy_read_struct( &png, NULL, NULL ); + goto Exit; + } + + if ( ft_setjmp( png_jmpbuf( png ) ) ) + { + error = FT_THROW( Invalid_File_Format ); + goto DestroyExit; + } + + png_set_read_fn( png, &stream, read_data_from_FT_Stream ); + + png_read_info( png, info ); + png_get_IHDR( png, info, + &imgWidth, &imgHeight, + &bitdepth, &color_type, &interlace, + NULL, NULL ); + + if ( error || + ( !populate_map_and_metrics && + ( (FT_Int)imgWidth != metrics->width || + (FT_Int)imgHeight != metrics->height ) ) ) + goto DestroyExit; + + if ( populate_map_and_metrics ) + { + FT_Long size; + + + metrics->width = (FT_Int)imgWidth; + metrics->height = (FT_Int)imgHeight; + + map->width = metrics->width; + map->rows = metrics->height; + map->pixel_mode = FT_PIXEL_MODE_BGRA; + map->pitch = map->width * 4; + map->num_grays = 256; + + /* reject too large bitmaps similarly to the rasterizer */ + if ( map->rows > 0x7FFF || map->width > 0x7FFF ) + { + error = FT_THROW( Array_Too_Large ); + goto DestroyExit; + } + + /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */ + size = map->rows * map->pitch; + + error = ft_glyphslot_alloc_bitmap( slot, size ); + if ( error ) + goto DestroyExit; + } + + /* convert palette/gray image to rgb */ + if ( color_type == PNG_COLOR_TYPE_PALETTE ) + png_set_palette_to_rgb( png ); + + /* expand gray bit depth if needed */ + if ( color_type == PNG_COLOR_TYPE_GRAY ) + { +#if PNG_LIBPNG_VER >= 10209 + png_set_expand_gray_1_2_4_to_8( png ); +#else + png_set_gray_1_2_4_to_8( png ); +#endif + } + + /* transform transparency to alpha */ + if ( png_get_valid(png, info, PNG_INFO_tRNS ) ) + png_set_tRNS_to_alpha( png ); + + if ( bitdepth == 16 ) + png_set_strip_16( png ); + + if ( bitdepth < 8 ) + png_set_packing( png ); + + /* convert grayscale to RGB */ + if ( color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA ) + png_set_gray_to_rgb( png ); + + if ( interlace != PNG_INTERLACE_NONE ) + png_set_interlace_handling( png ); + + png_set_filler( png, 0xFF, PNG_FILLER_AFTER ); + + /* recheck header after setting EXPAND options */ + png_read_update_info(png, info ); + png_get_IHDR( png, info, + &imgWidth, &imgHeight, + &bitdepth, &color_type, &interlace, + NULL, NULL ); + + if ( bitdepth != 8 || + !( color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA ) ) + { + error = FT_THROW( Invalid_File_Format ); + goto DestroyExit; + } + + switch ( color_type ) + { + default: + /* Shouldn't happen, but fall through. */ + + case PNG_COLOR_TYPE_RGB_ALPHA: + png_set_read_user_transform_fn( png, premultiply_data ); + break; + + case PNG_COLOR_TYPE_RGB: + /* Humm, this smells. Carry on though. */ + png_set_read_user_transform_fn( png, convert_bytes_to_data ); + break; + } + + if ( FT_NEW_ARRAY( rows, imgHeight ) ) + { + error = FT_THROW( Out_Of_Memory ); + goto DestroyExit; + } + + for ( i = 0; i < (FT_Int)imgHeight; i++ ) + rows[i] = map->buffer + ( y_offset + i ) * map->pitch + x_offset * 4; + + png_read_image( png, rows ); + + FT_FREE( rows ); + + png_read_end( png, info ); + + DestroyExit: + png_destroy_read_struct( &png, &info, NULL ); + FT_Stream_Close( &stream ); + + Exit: + return error; + } + +#endif /* FT_CONFIG_OPTION_USE_PNG */ + + +/* END */ diff --git a/src/sfnt/pngshim.h b/src/sfnt/pngshim.h new file mode 100644 index 0000000..dc9ecaf --- /dev/null +++ b/src/sfnt/pngshim.h @@ -0,0 +1,49 @@ +/***************************************************************************/ +/* */ +/* pngshim.h */ +/* */ +/* PNG Bitmap glyph support. */ +/* */ +/* Copyright 2013 by Google, Inc. */ +/* Written by Stuart Gill and Behdad Esfahbod. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __PNGSHIM_H__ +#define __PNGSHIM_H__ + + +#include <ft2build.h> +#include "ttload.h" + + +FT_BEGIN_HEADER + +#ifdef FT_CONFIG_OPTION_USE_PNG + + FT_LOCAL( FT_Error ) + Load_SBit_Png( FT_GlyphSlot slot, + FT_Int x_offset, + FT_Int y_offset, + FT_Int pix_bits, + TT_SBit_Metrics metrics, + FT_Memory memory, + FT_Byte* data, + FT_UInt png_len, + FT_Bool populate_map_and_metrics ); + +#endif + +FT_END_HEADER + +#endif /* __PNGSHIM_H__ */ + + +/* END */ diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk index 02cee58..a6c956a 100644 --- a/src/sfnt/rules.mk +++ b/src/sfnt/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2011 by +# Copyright 1996-2000, 2002-2007, 2009, 2011, 2013 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -34,15 +34,13 @@ SFNT_DRV_SRC := $(SFNT_DIR)/ttload.c \ $(SFNT_DIR)/ttbdf.c \ $(SFNT_DIR)/sfobjs.c \ $(SFNT_DIR)/sfdriver.c \ - $(SFNT_DIR)/sfntpic.c + $(SFNT_DIR)/sfntpic.c \ + $(SFNT_DIR)/pngshim.c # SFNT driver headers # -# Note that ttsbit0.c gets #included by ttsbit.c. -# SFNT_DRV_H := $(SFNT_DRV_SRC:%c=%h) \ - $(SFNT_DIR)/sferrors.h \ - $(SFNT_DIR)/ttsbit0.c + $(SFNT_DIR)/sferrors.h # SFNT driver object(s) diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index 847d83d..badb159 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -4,7 +4,7 @@ /* */ /* High-level SFNT driver interface (body). */ /* */ -/* Copyright 1996-2007, 2009-2011 by */ +/* Copyright 1996-2007, 2009-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -50,6 +50,7 @@ #include FT_SERVICE_SFNT_H #include FT_SERVICE_TT_CMAP_H + /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ @@ -60,10 +61,10 @@ #define FT_COMPONENT trace_sfdriver - /* - * SFNT TABLE SERVICE - * - */ + /* + * SFNT TABLE SERVICE + * + */ static void* get_sfnt_table( TT_Face face, @@ -74,36 +75,36 @@ switch ( tag ) { - case ft_sfnt_head: + case FT_SFNT_HEAD: table = &face->header; break; - case ft_sfnt_hhea: + case FT_SFNT_HHEA: table = &face->horizontal; break; - case ft_sfnt_vhea: - table = face->vertical_info ? &face->vertical : 0; + case FT_SFNT_VHEA: + table = face->vertical_info ? &face->vertical : NULL; break; - case ft_sfnt_os2: - table = face->os2.version == 0xFFFFU ? 0 : &face->os2; + case FT_SFNT_OS2: + table = face->os2.version == 0xFFFFU ? NULL : &face->os2; break; - case ft_sfnt_post: + case FT_SFNT_POST: table = &face->postscript; break; - case ft_sfnt_maxp: + case FT_SFNT_MAXP: table = &face->max_profile; break; - case ft_sfnt_pclt: - table = face->pclt.Version ? &face->pclt : 0; + case FT_SFNT_PCLT: + table = face->pclt.Version ? &face->pclt : NULL; break; default: - table = 0; + table = NULL; } return table; @@ -118,37 +119,37 @@ FT_ULong *length ) { if ( !offset || !length ) - return SFNT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( !tag ) *length = face->num_tables; else { if ( idx >= face->num_tables ) - return SFNT_Err_Table_Missing; + return FT_THROW( Table_Missing ); *tag = face->dir_tables[idx].Tag; *offset = face->dir_tables[idx].Offset; *length = face->dir_tables[idx].Length; } - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_SERVICE_SFNT_TABLEREC(sfnt_service_sfnt_table, + FT_DEFINE_SERVICE_SFNT_TABLEREC( + sfnt_service_sfnt_table, (FT_SFNT_TableLoadFunc)tt_face_load_any, (FT_SFNT_TableGetFunc) get_sfnt_table, - (FT_SFNT_TableInfoFunc)sfnt_table_info - ) + (FT_SFNT_TableInfoFunc)sfnt_table_info ) #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES - /* - * GLYPH DICT SERVICE - * - */ + /* + * GLYPH DICT SERVICE + * + */ static FT_Error sfnt_get_glyph_name( TT_Face face, @@ -172,17 +173,18 @@ sfnt_get_name_index( TT_Face face, FT_String* glyph_name ) { - FT_Face root = &face->root; - FT_UInt i, max_gid = FT_UINT_MAX; + FT_Face root = &face->root; + + FT_UInt i, max_gid = FT_UINT_MAX; if ( root->num_glyphs < 0 ) return 0; - else if ( ( FT_ULong ) root->num_glyphs < FT_UINT_MAX ) - max_gid = ( FT_UInt ) root->num_glyphs; + else if ( (FT_ULong)root->num_glyphs < FT_UINT_MAX ) + max_gid = (FT_UInt)root->num_glyphs; else FT_TRACE0(( "Ignore glyph names for invalid GID 0x%08x - 0x%08x\n", - FT_UINT_MAX, root->num_glyphs )); + FT_UINT_MAX, root->num_glyphs )); for ( i = 0; i < max_gid; i++ ) { @@ -201,18 +203,19 @@ } - FT_DEFINE_SERVICE_GLYPHDICTREC(sfnt_service_glyph_dict, + FT_DEFINE_SERVICE_GLYPHDICTREC( + sfnt_service_glyph_dict, (FT_GlyphDict_GetNameFunc) sfnt_get_glyph_name, - (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index - ) + (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index ) + #endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ - /* - * POSTSCRIPT NAME SERVICE - * - */ + /* + * POSTSCRIPT NAME SERVICE + * + */ static const char* sfnt_get_ps_name( TT_Face face ) @@ -254,7 +257,7 @@ FT_Memory memory = face->root.memory; TT_NameEntryRec* name = face->name_table.names + found_win; FT_UInt len = name->stringLength / 2; - FT_Error error = SFNT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( error ); @@ -263,7 +266,7 @@ { FT_Stream stream = face->name_table.stream; FT_String* r = (FT_String*)result; - FT_Byte* p = (FT_Byte*)name->string; + FT_Byte* p; if ( FT_STREAM_SEEK( name->stringOffset ) || @@ -296,7 +299,7 @@ FT_Memory memory = face->root.memory; TT_NameEntryRec* name = face->name_table.names + found_apple; FT_UInt len = name->stringLength; - FT_Error error = SFNT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( error ); @@ -324,17 +327,18 @@ return result; } - FT_DEFINE_SERVICE_PSFONTNAMEREC(sfnt_service_ps_name, - (FT_PsName_GetFunc)sfnt_get_ps_name - ) + + FT_DEFINE_SERVICE_PSFONTNAMEREC( + sfnt_service_ps_name, + (FT_PsName_GetFunc)sfnt_get_ps_name ) /* * TT CMAP INFO */ - FT_DEFINE_SERVICE_TTCMAPSREC(tt_service_get_cmap_info, - (TT_CMap_Info_GetFunc)tt_get_cmap_info - ) + FT_DEFINE_SERVICE_TTCMAPSREC( + tt_service_get_cmap_info, + (TT_CMap_Info_GetFunc)tt_get_cmap_info ) #ifdef TT_CONFIG_OPTION_BDF @@ -367,7 +371,7 @@ *acharset_registry = registry.u.atom; } else - error = SFNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); } } @@ -375,10 +379,11 @@ } - FT_DEFINE_SERVICE_BDFRec(sfnt_service_bdf, - (FT_BDF_GetCharsetIdFunc) sfnt_get_charset_id, - (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop - ) + FT_DEFINE_SERVICE_BDFRec( + sfnt_service_bdf, + (FT_BDF_GetCharsetIdFunc)sfnt_get_charset_id, + (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop ) + #endif /* TT_CONFIG_OPTION_BDF */ @@ -388,33 +393,33 @@ */ #if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF - FT_DEFINE_SERVICEDESCREC5(sfnt_services, - FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_GLYPH_DICT, &FT_SFNT_SERVICE_GLYPH_DICT_GET, - FT_SERVICE_ID_BDF, &FT_SFNT_SERVICE_BDF_GET, - FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET - ) + FT_DEFINE_SERVICEDESCREC5( + sfnt_services, + FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, + FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, + FT_SERVICE_ID_GLYPH_DICT, &SFNT_SERVICE_GLYPH_DICT_GET, + FT_SERVICE_ID_BDF, &SFNT_SERVICE_BDF_GET, + FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) #elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES - FT_DEFINE_SERVICEDESCREC4(sfnt_services, - FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_GLYPH_DICT, &FT_SFNT_SERVICE_GLYPH_DICT_GET, - FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET - ) + FT_DEFINE_SERVICEDESCREC4( + sfnt_services, + FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, + FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, + FT_SERVICE_ID_GLYPH_DICT, &SFNT_SERVICE_GLYPH_DICT_GET, + FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) #elif defined TT_CONFIG_OPTION_BDF - FT_DEFINE_SERVICEDESCREC4(sfnt_services, - FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_BDF, &FT_SFNT_SERVICE_BDF_GET, - FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET - ) + FT_DEFINE_SERVICEDESCREC4( + sfnt_services, + FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, + FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, + FT_SERVICE_ID_BDF, &SFNT_SERVICE_BDF_GET, + FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) #else - FT_DEFINE_SERVICEDESCREC3(sfnt_services, - FT_SERVICE_ID_SFNT_TABLE, &FT_SFNT_SERVICE_SFNT_TABLE_GET, - FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_SFNT_SERVICE_PS_NAME_GET, - FT_SERVICE_ID_TT_CMAP, &FT_TT_SERVICE_GET_CMAP_INFO_GET - ) + FT_DEFINE_SERVICEDESCREC3( + sfnt_services, + FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, + FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, + FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET ) #endif @@ -422,7 +427,7 @@ sfnt_get_interface( FT_Module module, const char* module_interface ) { - /* FT_SFNT_SERVICES_GET derefers `library' in PIC mode */ + /* SFNT_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC FT_Library library; @@ -435,149 +440,25 @@ #else FT_UNUSED( module ); #endif - return ft_service_list_lookup( FT_SFNT_SERVICES_GET, module_interface ); - } - - -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_CALLBACK_DEF( FT_Error ) - tt_face_load_sfnt_header_stub( TT_Face face, - FT_Stream stream, - FT_Long face_index, - SFNT_Header header ) - { - FT_UNUSED( face ); - FT_UNUSED( stream ); - FT_UNUSED( face_index ); - FT_UNUSED( header ); - - return SFNT_Err_Unimplemented_Feature; - } - - - FT_CALLBACK_DEF( FT_Error ) - tt_face_load_directory_stub( TT_Face face, - FT_Stream stream, - SFNT_Header header ) - { - FT_UNUSED( face ); - FT_UNUSED( stream ); - FT_UNUSED( header ); - - return SFNT_Err_Unimplemented_Feature; - } - - - FT_CALLBACK_DEF( FT_Error ) - tt_face_load_hdmx_stub( TT_Face face, - FT_Stream stream ) - { - FT_UNUSED( face ); - FT_UNUSED( stream ); - - return SFNT_Err_Unimplemented_Feature; - } - - - FT_CALLBACK_DEF( void ) - tt_face_free_hdmx_stub( TT_Face face ) - { - FT_UNUSED( face ); - } - - - FT_CALLBACK_DEF( FT_Error ) - tt_face_set_sbit_strike_stub( TT_Face face, - FT_UInt x_ppem, - FT_UInt y_ppem, - FT_ULong* astrike_index ) - { - /* - * We simply forge a FT_Size_Request and call the real function - * that does all the work. - * - * This stub might be called by libXfont in the X.Org Xserver, - * compiled against version 2.1.8 or newer. - */ - - FT_Size_RequestRec req; - - - req.type = FT_SIZE_REQUEST_TYPE_NOMINAL; - req.width = (FT_F26Dot6)x_ppem; - req.height = (FT_F26Dot6)y_ppem; - req.horiResolution = 0; - req.vertResolution = 0; - - *astrike_index = 0x7FFFFFFFUL; - return tt_face_set_sbit_strike( face, &req, astrike_index ); + return ft_service_list_lookup( SFNT_SERVICES_GET, module_interface ); } - FT_CALLBACK_DEF( FT_Error ) - tt_face_load_sbit_stub( TT_Face face, - FT_Stream stream ) - { - FT_UNUSED( face ); - FT_UNUSED( stream ); - - /* - * This function was originally implemented to load the sbit table. - * However, it has been replaced by `tt_face_load_eblc', and this stub - * is only there for some rogue clients which would want to call it - * directly (which doesn't make much sense). - */ - return SFNT_Err_Unimplemented_Feature; - } - - - FT_CALLBACK_DEF( void ) - tt_face_free_sbit_stub( TT_Face face ) - { - /* nothing to do in this stub */ - FT_UNUSED( face ); - } - - - FT_CALLBACK_DEF( FT_Error ) - tt_face_load_charmap_stub( TT_Face face, - void* cmap, - FT_Stream input ) - { - FT_UNUSED( face ); - FT_UNUSED( cmap ); - FT_UNUSED( input ); - - return SFNT_Err_Unimplemented_Feature; - } - - - FT_CALLBACK_DEF( FT_Error ) - tt_face_free_charmap_stub( TT_Face face, - void* cmap ) - { - FT_UNUSED( face ); - FT_UNUSED( cmap ); - - return SFNT_Err_Ok; - } - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS -#define PUT_EMBEDDED_BITMAPS(a) a +#define PUT_EMBEDDED_BITMAPS( a ) a #else -#define PUT_EMBEDDED_BITMAPS(a) 0 +#define PUT_EMBEDDED_BITMAPS( a ) NULL #endif + #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES -#define PUT_PS_NAMES(a) a +#define PUT_PS_NAMES( a ) a #else -#define PUT_PS_NAMES(a) 0 +#define PUT_PS_NAMES( a ) NULL #endif - FT_DEFINE_SFNT_INTERFACE(sfnt_interface, + FT_DEFINE_SFNT_INTERFACE( + sfnt_interface, tt_face_goto_table, sfnt_init_face, @@ -587,9 +468,6 @@ tt_face_load_any, - tt_face_load_sfnt_header_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_face_load_directory_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_face_load_head, tt_face_load_hhea, tt_face_load_cmap, @@ -600,54 +478,39 @@ tt_face_load_name, tt_face_free_name, - tt_face_load_hdmx_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_face_free_hdmx_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_face_load_kern, tt_face_load_gasp, tt_face_load_pclt, /* see `ttload.h' */ - PUT_EMBEDDED_BITMAPS(tt_face_load_bhed), - - tt_face_set_sbit_strike_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_face_load_sbit_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - tt_find_sbit_image, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_load_sbit_metrics, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - - PUT_EMBEDDED_BITMAPS(tt_face_load_sbit_image), + PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ), - tt_face_free_sbit_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ + PUT_EMBEDDED_BITMAPS( tt_face_load_sbit_image ), /* see `ttpost.h' */ - PUT_PS_NAMES(tt_face_get_ps_name), - PUT_PS_NAMES(tt_face_free_ps_names), - - tt_face_load_charmap_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_face_free_charmap_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */ + PUT_PS_NAMES( tt_face_get_ps_name ), + PUT_PS_NAMES( tt_face_free_ps_names ), /* since version 2.1.8 */ - tt_face_get_kerning, /* since version 2.2 */ - tt_face_load_font_dir, tt_face_load_hmtx, /* see `ttsbit.h' and `sfnt.h' */ - PUT_EMBEDDED_BITMAPS(tt_face_load_eblc), - PUT_EMBEDDED_BITMAPS(tt_face_free_eblc), + PUT_EMBEDDED_BITMAPS( tt_face_load_sbit ), + PUT_EMBEDDED_BITMAPS( tt_face_free_sbit ), - PUT_EMBEDDED_BITMAPS(tt_face_set_sbit_strike), - PUT_EMBEDDED_BITMAPS(tt_face_load_strike_metrics), + PUT_EMBEDDED_BITMAPS( tt_face_set_sbit_strike ), + PUT_EMBEDDED_BITMAPS( tt_face_load_strike_metrics ), tt_face_get_metrics ) - FT_DEFINE_MODULE(sfnt_module_class, + FT_DEFINE_MODULE( + sfnt_module_class, 0, /* not a font driver or renderer */ sizeof ( FT_ModuleRec ), @@ -656,12 +519,11 @@ 0x10000L, /* driver version 1.0 */ 0x20000L, /* driver requires FreeType 2.0 or higher */ - (const void*)&FT_SFNT_INTERFACE_GET, /* module specific interface */ + (const void*)&SFNT_INTERFACE_GET, /* module specific interface */ (FT_Module_Constructor)0, (FT_Module_Destructor) 0, - (FT_Module_Requester) sfnt_get_interface - ) + (FT_Module_Requester) sfnt_get_interface ) /* END */ diff --git a/src/sfnt/sferrors.h b/src/sfnt/sferrors.h index 564a3fe..e981e1d 100644 --- a/src/sfnt/sferrors.h +++ b/src/sfnt/sferrors.h @@ -4,7 +4,7 @@ /* */ /* SFNT error codes (specification only). */ /* */ -/* Copyright 2001, 2004, 2012 by */ +/* Copyright 2001, 2004, 2012, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -33,8 +33,6 @@ #define FT_ERR_PREFIX SFNT_Err_ #define FT_ERR_BASE FT_Mod_Err_SFNT -#define FT_KEEP_ERR_PREFIX - #include FT_ERRORS_H #endif /* __SFERRORS_H__ */ diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c index fc507b4..d62ed4e 100644 --- a/src/sfnt/sfnt.c +++ b/src/sfnt/sfnt.c @@ -4,7 +4,7 @@ /* */ /* Single object library component. */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2006, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -28,6 +28,7 @@ #include "sfdriver.c" #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS +#include "pngshim.c" #include "ttsbit.c" #endif diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c index 1372376..b3fb24b 100644 --- a/src/sfnt/sfntpic.c +++ b/src/sfnt/sfntpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for sfnt module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,57 +22,52 @@ #include "sfntpic.h" #include "sferrors.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from sfdriver.c */ FT_Error FT_Create_Class_sfnt_services( FT_Library library, - FT_ServiceDescRec** ouput_class ); - + FT_ServiceDescRec** output_class ); void FT_Destroy_Class_sfnt_services( FT_Library library, FT_ServiceDescRec* clazz ); - void FT_Init_Class_sfnt_service_bdf( FT_Service_BDFRec* clazz ); - void FT_Init_Class_sfnt_interface( FT_Library library, SFNT_Interface* clazz ); - void FT_Init_Class_sfnt_service_glyph_dict( FT_Library library, FT_Service_GlyphDictRec* clazz ); - void FT_Init_Class_sfnt_service_ps_name( FT_Library library, FT_Service_PsFontNameRec* clazz ); - void FT_Init_Class_tt_service_get_cmap_info( FT_Library library, FT_Service_TTCMapsRec* clazz ); - void FT_Init_Class_sfnt_service_sfnt_table( FT_Service_SFNT_TableRec* clazz ); + /* forward declaration of PIC init functions from ttcmap.c */ FT_Error FT_Create_Class_tt_cmap_classes( FT_Library library, TT_CMap_Class** output_class ); - void FT_Destroy_Class_tt_cmap_classes( FT_Library library, TT_CMap_Class* clazz ); + void sfnt_module_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->sfnt ) @@ -84,10 +79,12 @@ FT_Destroy_Class_sfnt_services( library, container->sfnt_services ); container->sfnt_services = NULL; + if ( container->tt_cmap_classes ) FT_Destroy_Class_tt_cmap_classes( library, container->tt_cmap_classes ); container->tt_cmap_classes = NULL; + FT_FREE( container ); pic_container->sfnt = NULL; } @@ -95,25 +92,27 @@ FT_Error - sfnt_module_class_pic_init( FT_Library library ) + sfnt_module_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = SFNT_Err_Ok; - sfntModulePIC* container; - FT_Memory memory = library->memory; + FT_Error error = FT_Err_Ok; + sfntModulePIC* container = NULL; + FT_Memory memory = library->memory; /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->sfnt = container; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ error = FT_Create_Class_sfnt_services( library, &container->sfnt_services ); if ( error ) goto Exit; + error = FT_Create_Class_tt_cmap_classes( library, &container->tt_cmap_classes ); if ( error ) @@ -132,14 +131,12 @@ #endif FT_Init_Class_sfnt_interface( library, &container->sfnt_interface ); -Exit: + Exit: if ( error ) sfnt_module_class_pic_free( library ); return error; } - - #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/src/sfnt/sfntpic.h b/src/sfnt/sfntpic.h index f7993d1..b09a914 100644 --- a/src/sfnt/sfntpic.h +++ b/src/sfnt/sfntpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for sfnt module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,57 +24,76 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H - #ifndef FT_CONFIG_OPTION_PIC -#define FT_SFNT_SERVICES_GET sfnt_services -#define FT_SFNT_SERVICE_GLYPH_DICT_GET sfnt_service_glyph_dict -#define FT_SFNT_SERVICE_PS_NAME_GET sfnt_service_ps_name -#define FT_TT_SERVICE_GET_CMAP_INFO_GET tt_service_get_cmap_info -#define FT_SFNT_SERVICES_GET sfnt_services -#define FT_TT_CMAP_CLASSES_GET tt_cmap_classes -#define FT_SFNT_SERVICE_SFNT_TABLE_GET sfnt_service_sfnt_table -#define FT_SFNT_SERVICE_BDF_GET sfnt_service_bdf -#define FT_SFNT_INTERFACE_GET sfnt_interface + +#ifndef FT_CONFIG_OPTION_PIC + +#define SFNT_SERVICES_GET sfnt_services +#define SFNT_SERVICE_GLYPH_DICT_GET sfnt_service_glyph_dict +#define SFNT_SERVICE_PS_NAME_GET sfnt_service_ps_name +#define TT_SERVICE_CMAP_INFO_GET tt_service_get_cmap_info +#define SFNT_SERVICES_GET sfnt_services +#define TT_CMAP_CLASSES_GET tt_cmap_classes +#define SFNT_SERVICE_SFNT_TABLE_GET sfnt_service_sfnt_table +#define SFNT_SERVICE_BDF_GET sfnt_service_bdf +#define SFNT_INTERFACE_GET sfnt_interface #else /* FT_CONFIG_OPTION_PIC */ -/* some include files required for members of sfntModulePIC */ + /* some include files required for members of sfntModulePIC */ #include FT_SERVICE_GLYPH_DICT_H #include FT_SERVICE_POSTSCRIPT_NAME_H #include FT_SERVICE_SFNT_H #include FT_SERVICE_TT_CMAP_H + #ifdef TT_CONFIG_OPTION_BDF #include "ttbdf.h" #include FT_SERVICE_BDF_H #endif + #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H #include "ttcmap.h" -typedef struct sfntModulePIC_ + + typedef struct sfntModulePIC_ { - FT_ServiceDescRec* sfnt_services; - FT_Service_GlyphDictRec sfnt_service_glyph_dict; + FT_ServiceDescRec* sfnt_services; + FT_Service_GlyphDictRec sfnt_service_glyph_dict; FT_Service_PsFontNameRec sfnt_service_ps_name; - FT_Service_TTCMapsRec tt_service_get_cmap_info; - TT_CMap_Class* tt_cmap_classes; - FT_Service_SFNT_TableRec sfnt_service_sfnt_table; + FT_Service_TTCMapsRec tt_service_get_cmap_info; + TT_CMap_Class* tt_cmap_classes; + FT_Service_SFNT_TableRec sfnt_service_sfnt_table; #ifdef TT_CONFIG_OPTION_BDF - FT_Service_BDFRec sfnt_service_bdf; + FT_Service_BDFRec sfnt_service_bdf; #endif - SFNT_Interface sfnt_interface; + SFNT_Interface sfnt_interface; + } sfntModulePIC; -#define GET_PIC(lib) ((sfntModulePIC*)((lib)->pic_container.sfnt)) -#define FT_SFNT_SERVICES_GET (GET_PIC(library)->sfnt_services) -#define FT_SFNT_SERVICE_GLYPH_DICT_GET (GET_PIC(library)->sfnt_service_glyph_dict) -#define FT_SFNT_SERVICE_PS_NAME_GET (GET_PIC(library)->sfnt_service_ps_name) -#define FT_TT_SERVICE_GET_CMAP_INFO_GET (GET_PIC(library)->tt_service_get_cmap_info) -#define FT_SFNT_SERVICES_GET (GET_PIC(library)->sfnt_services) -#define FT_TT_CMAP_CLASSES_GET (GET_PIC(library)->tt_cmap_classes) -#define FT_SFNT_SERVICE_SFNT_TABLE_GET (GET_PIC(library)->sfnt_service_sfnt_table) -#define FT_SFNT_SERVICE_BDF_GET (GET_PIC(library)->sfnt_service_bdf) -#define FT_SFNT_INTERFACE_GET (GET_PIC(library)->sfnt_interface) + +#define GET_PIC( lib ) \ + ( (sfntModulePIC*)( (lib)->pic_container.sfnt ) ) + +#define SFNT_SERVICES_GET \ + ( GET_PIC( library )->sfnt_services ) +#define SFNT_SERVICE_GLYPH_DICT_GET \ + ( GET_PIC( library )->sfnt_service_glyph_dict ) +#define SFNT_SERVICE_PS_NAME_GET \ + ( GET_PIC( library )->sfnt_service_ps_name ) +#define TT_SERVICE_CMAP_INFO_GET \ + ( GET_PIC( library )->tt_service_get_cmap_info ) +#define SFNT_SERVICES_GET \ + ( GET_PIC( library )->sfnt_services ) +#define TT_CMAP_CLASSES_GET \ + ( GET_PIC( library )->tt_cmap_classes ) +#define SFNT_SERVICE_SFNT_TABLE_GET \ + ( GET_PIC( library )->sfnt_service_sfnt_table ) +#define SFNT_SERVICE_BDF_GET \ + ( GET_PIC( library )->sfnt_service_bdf ) +#define SFNT_INTERFACE_GET \ + ( GET_PIC( library )->sfnt_interface ) + /* see sfntpic.c for the implementation */ void @@ -85,7 +104,7 @@ typedef struct sfntModulePIC_ #endif /* FT_CONFIG_OPTION_PIC */ -/* */ + /* */ FT_END_HEADER diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index d7be631..70b988d 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ /* */ /* SFNT object management (base). */ /* */ -/* Copyright 1996-2008, 2010-2011 by */ +/* Copyright 1996-2008, 2010-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,6 +27,7 @@ #include FT_TRUETYPE_TAGS_H #include FT_SERVICE_POSTSCRIPT_CMAPS_H #include FT_SFNT_NAMES_H +#include FT_GZIP_H #include "sferrors.h" #ifdef TT_CONFIG_OPTION_BDF @@ -64,13 +65,17 @@ for ( n = 0; n < len; n++ ) { code = FT_NEXT_USHORT( read ); + + if ( code == 0 ) + break; + if ( code < 32 || code > 127 ) code = '?'; string[n] = (char)code; } - string[len] = 0; + string[n] = 0; return string; } @@ -95,13 +100,17 @@ for ( n = 0; n < len; n++ ) { code = *read++; + + if ( code == 0 ) + break; + if ( code < 32 || code > 127 ) code = '?'; string[n] = (char)code; } - string[len] = 0; + string[n] = 0; return string; } @@ -137,7 +146,7 @@ FT_String** name ) { FT_Memory memory = face->root.memory; - FT_Error error = SFNT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_String* result = NULL; FT_UShort n; TT_NameEntryRec* rec; @@ -339,6 +348,383 @@ } +#define WRITE_USHORT( p, v ) \ + do \ + { \ + *(p)++ = (FT_Byte)( (v) >> 8 ); \ + *(p)++ = (FT_Byte)( (v) >> 0 ); \ + \ + } while ( 0 ) + +#define WRITE_ULONG( p, v ) \ + do \ + { \ + *(p)++ = (FT_Byte)( (v) >> 24 ); \ + *(p)++ = (FT_Byte)( (v) >> 16 ); \ + *(p)++ = (FT_Byte)( (v) >> 8 ); \ + *(p)++ = (FT_Byte)( (v) >> 0 ); \ + \ + } while ( 0 ) + + + static void + sfnt_stream_close( FT_Stream stream ) + { + FT_Memory memory = stream->memory; + + + FT_FREE( stream->base ); + + stream->size = 0; + stream->base = 0; + stream->close = 0; + } + + + FT_CALLBACK_DEF( int ) + compare_offsets( const void* a, + const void* b ) + { + WOFF_Table table1 = *(WOFF_Table*)a; + WOFF_Table table2 = *(WOFF_Table*)b; + + FT_ULong offset1 = table1->Offset; + FT_ULong offset2 = table2->Offset; + + + if ( offset1 > offset2 ) + return 1; + else if ( offset1 < offset2 ) + return -1; + else + return 0; + } + + + /* Replace `face->root.stream' with a stream containing the extracted */ + /* SFNT of a WOFF font. */ + + static FT_Error + woff_open_font( FT_Stream stream, + TT_Face face ) + { + FT_Memory memory = stream->memory; + FT_Error error = FT_Err_Ok; + + WOFF_HeaderRec woff; + WOFF_Table tables = NULL; + WOFF_Table* indices = NULL; + + FT_ULong woff_offset; + + FT_Byte* sfnt = NULL; + FT_Stream sfnt_stream = NULL; + + FT_Byte* sfnt_header; + FT_ULong sfnt_offset; + + FT_Int nn; + FT_ULong old_tag = 0; + + static const FT_Frame_Field woff_header_fields[] = + { +#undef FT_STRUCTURE +#define FT_STRUCTURE WOFF_HeaderRec + + FT_FRAME_START( 44 ), + FT_FRAME_ULONG ( signature ), + FT_FRAME_ULONG ( flavor ), + FT_FRAME_ULONG ( length ), + FT_FRAME_USHORT( num_tables ), + FT_FRAME_USHORT( reserved ), + FT_FRAME_ULONG ( totalSfntSize ), + FT_FRAME_USHORT( majorVersion ), + FT_FRAME_USHORT( minorVersion ), + FT_FRAME_ULONG ( metaOffset ), + FT_FRAME_ULONG ( metaLength ), + FT_FRAME_ULONG ( metaOrigLength ), + FT_FRAME_ULONG ( privOffset ), + FT_FRAME_ULONG ( privLength ), + FT_FRAME_END + }; + + + FT_ASSERT( stream == face->root.stream ); + FT_ASSERT( FT_STREAM_POS() == 0 ); + + if ( FT_STREAM_READ_FIELDS( woff_header_fields, &woff ) ) + return error; + + /* Make sure we don't recurse back here or hit TTC code. */ + if ( woff.flavor == TTAG_wOFF || woff.flavor == TTAG_ttcf ) + return FT_THROW( Invalid_Table ); + + /* Miscellaneous checks. */ + if ( woff.length != stream->size || + woff.num_tables == 0 || + 44 + woff.num_tables * 20UL >= woff.length || + 12 + woff.num_tables * 16UL >= woff.totalSfntSize || + ( woff.totalSfntSize & 3 ) != 0 || + ( woff.metaOffset == 0 && ( woff.metaLength != 0 || + woff.metaOrigLength != 0 ) ) || + ( woff.metaLength != 0 && woff.metaOrigLength == 0 ) || + ( woff.privOffset == 0 && woff.privLength != 0 ) ) + return FT_THROW( Invalid_Table ); + + if ( FT_ALLOC( sfnt, woff.totalSfntSize ) || + FT_NEW( sfnt_stream ) ) + goto Exit; + + sfnt_header = sfnt; + + /* Write sfnt header. */ + { + FT_UInt searchRange, entrySelector, rangeShift, x; + + + x = woff.num_tables; + entrySelector = 0; + while ( x ) + { + x >>= 1; + entrySelector += 1; + } + entrySelector--; + + searchRange = ( 1 << entrySelector ) * 16; + rangeShift = woff.num_tables * 16 - searchRange; + + WRITE_ULONG ( sfnt_header, woff.flavor ); + WRITE_USHORT( sfnt_header, woff.num_tables ); + WRITE_USHORT( sfnt_header, searchRange ); + WRITE_USHORT( sfnt_header, entrySelector ); + WRITE_USHORT( sfnt_header, rangeShift ); + } + + /* While the entries in the sfnt header must be sorted by the */ + /* tag value, the tables themselves are not. We thus have to */ + /* sort them by offset and check that they don't overlap. */ + + if ( FT_NEW_ARRAY( tables, woff.num_tables ) || + FT_NEW_ARRAY( indices, woff.num_tables ) ) + goto Exit; + + FT_TRACE2(( "\n" + " tag offset compLen origLen checksum\n" + " -------------------------------------------\n" )); + + if ( FT_FRAME_ENTER( 20L * woff.num_tables ) ) + goto Exit; + + for ( nn = 0; nn < woff.num_tables; nn++ ) + { + WOFF_Table table = tables + nn; + + table->Tag = FT_GET_TAG4(); + table->Offset = FT_GET_ULONG(); + table->CompLength = FT_GET_ULONG(); + table->OrigLength = FT_GET_ULONG(); + table->CheckSum = FT_GET_ULONG(); + + FT_TRACE2(( " %c%c%c%c %08lx %08lx %08lx %08lx\n", + (FT_Char)( table->Tag >> 24 ), + (FT_Char)( table->Tag >> 16 ), + (FT_Char)( table->Tag >> 8 ), + (FT_Char)( table->Tag ), + table->Offset, + table->CompLength, + table->OrigLength, + table->CheckSum )); + + if ( table->Tag <= old_tag ) + { + FT_FRAME_EXIT(); + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + old_tag = table->Tag; + indices[nn] = table; + } + + FT_FRAME_EXIT(); + + /* Sort by offset. */ + + ft_qsort( indices, + woff.num_tables, + sizeof ( WOFF_Table ), + compare_offsets ); + + /* Check offsets and lengths. */ + + woff_offset = 44 + woff.num_tables * 20L; + sfnt_offset = 12 + woff.num_tables * 16L; + + for ( nn = 0; nn < woff.num_tables; nn++ ) + { + WOFF_Table table = indices[nn]; + + + if ( table->Offset != woff_offset || + table->CompLength > woff.length || + table->Offset > woff.length - table->CompLength || + table->OrigLength > woff.totalSfntSize || + sfnt_offset > woff.totalSfntSize - table->OrigLength || + table->CompLength > table->OrigLength ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + table->OrigOffset = sfnt_offset; + + /* The offsets must be multiples of 4. */ + woff_offset += ( table->CompLength + 3 ) & ~3; + sfnt_offset += ( table->OrigLength + 3 ) & ~3; + } + + /* + * Final checks! + * + * We don't decode and check the metadata block. + * We don't check table checksums either. + * But other than those, I think we implement all + * `MUST' checks from the spec. + */ + + if ( woff.metaOffset ) + { + if ( woff.metaOffset != woff_offset || + woff.metaOffset + woff.metaLength > woff.length ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + /* We have padding only ... */ + woff_offset += woff.metaLength; + } + + if ( woff.privOffset ) + { + /* ... if it isn't the last block. */ + woff_offset = ( woff_offset + 3 ) & ~3; + + if ( woff.privOffset != woff_offset || + woff.privOffset + woff.privLength > woff.length ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + /* No padding for the last block. */ + woff_offset += woff.privLength; + } + + if ( sfnt_offset != woff.totalSfntSize || + woff_offset != woff.length ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + + /* Write the tables. */ + + for ( nn = 0; nn < woff.num_tables; nn++ ) + { + WOFF_Table table = tables + nn; + + + /* Write SFNT table entry. */ + WRITE_ULONG( sfnt_header, table->Tag ); + WRITE_ULONG( sfnt_header, table->CheckSum ); + WRITE_ULONG( sfnt_header, table->OrigOffset ); + WRITE_ULONG( sfnt_header, table->OrigLength ); + + /* Write table data. */ + if ( FT_STREAM_SEEK( table->Offset ) || + FT_FRAME_ENTER( table->CompLength ) ) + goto Exit; + + if ( table->CompLength == table->OrigLength ) + { + /* Uncompressed data; just copy. */ + ft_memcpy( sfnt + table->OrigOffset, + stream->cursor, + table->OrigLength ); + } + else + { +#ifdef FT_CONFIG_OPTION_USE_ZLIB + + /* Uncompress with zlib. */ + FT_ULong output_len = table->OrigLength; + + + error = FT_Gzip_Uncompress( memory, + sfnt + table->OrigOffset, &output_len, + stream->cursor, table->CompLength ); + if ( error ) + goto Exit; + if ( output_len != table->OrigLength ) + { + error = FT_THROW( Invalid_Table ); + goto Exit; + } + +#else /* !FT_CONFIG_OPTION_USE_ZLIB */ + + error = FT_THROW( Unimplemented_Feature ); + goto Exit; + +#endif /* !FT_CONFIG_OPTION_USE_ZLIB */ + } + + FT_FRAME_EXIT(); + + /* We don't check whether the padding bytes in the WOFF file are */ + /* actually '\0'. For the output, however, we do set them properly. */ + sfnt_offset = table->OrigOffset + table->OrigLength; + while ( sfnt_offset & 3 ) + { + sfnt[sfnt_offset] = '\0'; + sfnt_offset++; + } + } + + /* Ok! Finally ready. Swap out stream and return. */ + FT_Stream_OpenMemory( sfnt_stream, sfnt, woff.totalSfntSize ); + sfnt_stream->memory = stream->memory; + sfnt_stream->close = sfnt_stream_close; + + FT_Stream_Free( + face->root.stream, + ( face->root.face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 ); + + face->root.stream = sfnt_stream; + + face->root.face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM; + + Exit: + FT_FREE( tables ); + FT_FREE( indices ); + + if ( error ) + { + FT_FREE( sfnt ); + FT_Stream_Close( sfnt_stream ); + FT_FREE( sfnt_stream ); + } + + return error; + } + + +#undef WRITE_USHORT +#undef WRITE_ULONG + + /* Fill in face->ttc_header. If the font is not a TTC, it is */ /* synthesized into a TTC with one offset table. */ static FT_Error @@ -365,11 +751,28 @@ face->ttc_header.version = 0; face->ttc_header.count = 0; + retry: offset = FT_STREAM_POS(); if ( FT_READ_ULONG( tag ) ) return error; + if ( tag == TTAG_wOFF ) + { + FT_TRACE2(( "sfnt_open_font: file is a WOFF; synthesizing SFNT\n" )); + + if ( FT_STREAM_SEEK( offset ) ) + return error; + + error = woff_open_font( stream, face ); + if ( error ) + return error; + + /* Swap out stream and retry! */ + stream = face->root.stream; + goto retry; + } + if ( tag != 0x00010000UL && tag != TTAG_ttcf && tag != TTAG_OTTO && @@ -378,7 +781,7 @@ tag != 0x00020000UL ) { FT_TRACE2(( " not a font using the SFNT container format\n" )); - return SFNT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); } face->ttc_header.tag = TTAG_ttcf; @@ -394,7 +797,7 @@ return error; if ( face->ttc_header.count == 0 ) - return SFNT_Err_Invalid_Table; + return FT_THROW( Invalid_Table ); /* a rough size estimate: let's conservatively assume that there */ /* is just a single table info in each subfont header (12 + 16*1 = */ @@ -402,7 +805,7 @@ /* size of the TTC header plus `28*count' bytes for all subfont */ /* headers */ if ( (FT_ULong)face->ttc_header.count > stream->size / ( 28 + 4 ) ) - return SFNT_Err_Array_Too_Large; + return FT_THROW( Array_Too_Large ); /* now read the offsets of each font in the file */ if ( FT_NEW_ARRAY( face->ttc_header.offsets, face->ttc_header.count ) ) @@ -457,7 +860,7 @@ if ( !sfnt ) { FT_ERROR(( "sfnt_init_face: cannot access `sfnt' module\n" )); - return SFNT_Err_Missing_Module; + return FT_THROW( Missing_Module ); } face->sfnt = sfnt; @@ -472,13 +875,16 @@ if ( error ) return error; + /* Stream may have changed in sfnt_open_font. */ + stream = face->root.stream; + FT_TRACE2(( "sfnt_init_face: %08p, %ld\n", face, face_index )); if ( face_index < 0 ) face_index = 0; if ( face_index >= face->ttc_header.count ) - return SFNT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( FT_STREAM_SEEK( face->ttc_header.offsets[face_index] ) ) return error; @@ -495,42 +901,45 @@ } -#define LOAD_( x ) \ - do { \ - FT_TRACE2(( "`" #x "' " )); \ - FT_TRACE3(( "-->\n" )); \ - \ - error = sfnt->load_##x( face, stream ); \ - \ - FT_TRACE2(( "%s\n", ( !error ) \ - ? "loaded" \ - : ( error == SFNT_Err_Table_Missing ) \ - ? "missing" \ - : "failed to load" )); \ - FT_TRACE3(( "\n" )); \ +#define LOAD_( x ) \ + do \ + { \ + FT_TRACE2(( "`" #x "' " )); \ + FT_TRACE3(( "-->\n" )); \ + \ + error = sfnt->load_ ## x( face, stream ); \ + \ + FT_TRACE2(( "%s\n", ( !error ) \ + ? "loaded" \ + : FT_ERR_EQ( error, Table_Missing ) \ + ? "missing" \ + : "failed to load" )); \ + FT_TRACE3(( "\n" )); \ } while ( 0 ) -#define LOADM_( x, vertical ) \ - do { \ - FT_TRACE2(( "`%s" #x "' ", \ - vertical ? "vertical " : "" )); \ - FT_TRACE3(( "-->\n" )); \ - \ - error = sfnt->load_##x( face, stream, vertical ); \ - \ - FT_TRACE2(( "%s\n", ( !error ) \ - ? "loaded" \ - : ( error == SFNT_Err_Table_Missing ) \ - ? "missing" \ - : "failed to load" )); \ - FT_TRACE3(( "\n" )); \ +#define LOADM_( x, vertical ) \ + do \ + { \ + FT_TRACE2(( "`%s" #x "' ", \ + vertical ? "vertical " : "" )); \ + FT_TRACE3(( "-->\n" )); \ + \ + error = sfnt->load_ ## x( face, stream, vertical ); \ + \ + FT_TRACE2(( "%s\n", ( !error ) \ + ? "loaded" \ + : FT_ERR_EQ( error, Table_Missing ) \ + ? "missing" \ + : "failed to load" )); \ + FT_TRACE3(( "\n" )); \ } while ( 0 ) -#define GET_NAME( id, field ) \ - do { \ - error = tt_face_get_name( face, TT_NAME_ID_##id, field ); \ - if ( error ) \ - goto Exit; \ +#define GET_NAME( id, field ) \ + do \ + { \ + error = tt_face_get_name( face, TT_NAME_ID_ ## id, field ); \ + if ( error ) \ + goto Exit; \ } while ( 0 ) @@ -547,13 +956,15 @@ #endif FT_Bool has_outline; FT_Bool is_apple_sbit; - FT_Bool ignore_preferred_family = FALSE; + FT_Bool is_apple_sbix; + FT_Bool ignore_preferred_family = FALSE; FT_Bool ignore_preferred_subfamily = FALSE; SFNT_Service sfnt = (SFNT_Service)face->sfnt; FT_UNUSED( face_index ); + /* Check parameters */ { @@ -599,6 +1010,13 @@ #endif is_apple_sbit = 0; + is_apple_sbix = !face->goto_table( face, TTAG_sbix, stream, 0 ); + + /* Apple 'sbix' color bitmaps are rendered scaled and then the 'glyf' + * outline rendered on top. We don't support that yet, so just ignore + * the 'glyf' outline and advertise it as a bitmap-only font. */ + if ( is_apple_sbix ) + has_outline = FALSE; /* if this font doesn't contain outlines, we try to load */ /* a `bhed' table */ @@ -610,7 +1028,7 @@ /* load the font header (`head' table) if this isn't an Apple */ /* sbit font file */ - if ( !is_apple_sbit ) + if ( !is_apple_sbit || is_apple_sbix ) { LOAD_( head ); if ( error ) @@ -619,7 +1037,7 @@ if ( face->header.Units_Per_EM == 0 ) { - error = SFNT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -647,9 +1065,9 @@ if ( !error ) { LOADM_( hmtx, 0 ); - if ( error == SFNT_Err_Table_Missing ) + if ( FT_ERR_EQ( error, Table_Missing ) ) { - error = SFNT_Err_Hmtx_Table_Missing; + error = FT_THROW( Hmtx_Table_Missing ); #ifdef FT_CONFIG_OPTION_INCREMENTAL /* If this is an incrementally loaded font and there are */ @@ -659,12 +1077,12 @@ get_glyph_metrics ) { face->horizontal.number_Of_HMetrics = 0; - error = SFNT_Err_Ok; + error = FT_Err_Ok; } #endif } } - else if ( error == SFNT_Err_Table_Missing ) + else if ( FT_ERR_EQ( error, Table_Missing ) ) { /* No `hhea' table necessary for SFNT Mac fonts. */ if ( face->format_tag == TTAG_true ) @@ -672,11 +1090,11 @@ FT_TRACE2(( "This is an SFNT Mac font.\n" )); has_outline = 0; - error = SFNT_Err_Ok; + error = FT_Err_Ok; } else { - error = SFNT_Err_Horiz_Header_Missing; + error = FT_THROW( Horiz_Header_Missing ); #ifdef FT_CONFIG_OPTION_INCREMENTAL /* If this is an incrementally loaded font and there are */ @@ -686,7 +1104,7 @@ get_glyph_metrics ) { face->horizontal.number_Of_HMetrics = 0; - error = SFNT_Err_Ok; + error = FT_Err_Ok; } #endif @@ -705,7 +1123,7 @@ face->vertical_info = 1; } - if ( error && error != SFNT_Err_Table_Missing ) + if ( error && FT_ERR_NEQ( error, Table_Missing ) ) goto Exit; LOAD_( os2 ); @@ -727,8 +1145,8 @@ /* a font which contains neither bitmaps nor outlines is */ /* still valid (although rather useless in most cases); */ /* however, you can find such stripped fonts in PDFs */ - if ( error == SFNT_Err_Table_Missing ) - error = SFNT_Err_Ok; + if ( FT_ERR_EQ( error, Table_Missing ) ) + error = FT_Err_Ok; else goto Exit; } @@ -737,7 +1155,7 @@ LOAD_( pclt ); if ( error ) { - if ( error != SFNT_Err_Table_Missing ) + if ( FT_ERR_NEQ( error, Table_Missing ) ) goto Exit; face->pclt.Version = 0; @@ -794,6 +1212,10 @@ /* */ /* Compute face flags. */ /* */ + if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC || + face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX ) + flags |= FT_FACE_FLAG_COLOR; /* color glyphs */ + if ( has_outline == TRUE ) flags |= FT_FACE_FLAG_SCALABLE; /* scalable outlines */ @@ -803,7 +1225,7 @@ FT_FACE_FLAG_HORIZONTAL; /* horizontal data */ #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES - if ( psnames_error == SFNT_Err_Ok && + if ( !psnames_error && face->postscript.FormatType != 0x00030000L ) flags |= FT_FACE_FLAG_GLYPH_NAMES; #endif @@ -910,11 +1332,7 @@ FT_UInt i, count; -#ifndef FT_CONFIG_OPTION_OLD_INTERNALS count = face->sbit_num_strikes; -#else - count = (FT_UInt)face->num_sbit_strikes; -#endif if ( count > 0 ) { @@ -926,7 +1344,7 @@ if ( em_size == 0 || face->os2.version == 0xFFFFU ) { - avgwidth = 0; + avgwidth = 1; em_size = 1; } @@ -1115,7 +1533,6 @@ } /* freeing the horizontal metrics */ -#ifndef FT_CONFIG_OPTION_OLD_INTERNALS { FT_Stream stream = FT_FACE_STREAM( face ); @@ -1125,10 +1542,6 @@ face->horz_metrics_size = 0; face->vert_metrics_size = 0; } -#else - FT_FREE( face->horizontal.long_metrics ); - FT_FREE( face->horizontal.short_metrics ); -#endif /* freeing the vertical ones, if any */ if ( face->vertical_info ) diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c index 18845c3..9401dae 100644 --- a/src/sfnt/ttbdf.c +++ b/src/sfnt/ttbdf.c @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded BDF properties (body). */ /* */ -/* Copyright 2005, 2006, 2010 by */ +/* Copyright 2005, 2006, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -74,7 +74,7 @@ length < 8 || FT_FRAME_EXTRACT( length, bdf->table ) ) { - error = SFNT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -131,7 +131,7 @@ BadTable: FT_FRAME_RELEASE( bdf->table ); FT_ZERO( bdf ); - error = SFNT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -143,7 +143,7 @@ { TT_BDF bdf = &face->bdf; FT_Size size = FT_FACE(face)->size; - FT_Error error = SFNT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* p; FT_UInt count; FT_Byte* strike; @@ -163,7 +163,7 @@ p = bdf->table + 8; strike = p + 4 * count; - error = SFNT_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( size == NULL || property_name == NULL ) goto Exit; @@ -215,7 +215,7 @@ { aprop->type = BDF_PROPERTY_TYPE_ATOM; aprop->u.atom = (const char*)bdf->strings + value; - error = SFNT_Err_Ok; + error = FT_Err_Ok; goto Exit; } break; @@ -223,13 +223,13 @@ case 0x02: aprop->type = BDF_PROPERTY_TYPE_INTEGER; aprop->u.integer = (FT_Int32)value; - error = SFNT_Err_Ok; + error = FT_Err_Ok; goto Exit; case 0x03: aprop->type = BDF_PROPERTY_TYPE_CARDINAL; aprop->u.cardinal = value; - error = SFNT_Err_Ok; + error = FT_Err_Ok; goto Exit; default: diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c index 1dfd987..f54de70 100644 --- a/src/sfnt/ttcmap.c +++ b/src/sfnt/ttcmap.c @@ -4,7 +4,7 @@ /* */ /* TrueType character mapping table (cmap) support (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 2002-2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -56,7 +56,7 @@ FT_Byte* table ) { cmap->data = table; - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -88,9 +88,15 @@ tt_cmap0_validate( FT_Byte* table, FT_Validator valid ) { - FT_Byte* p = table + 2; - FT_UInt length = TT_NEXT_USHORT( p ); + FT_Byte* p; + FT_UInt length; + + + if ( table + 2 + 2 > valid->limit ) + FT_INVALID_TOO_SHORT; + p = table + 2; /* skip format */ + length = TT_NEXT_USHORT( p ); if ( table + length > valid->limit || length < 262 ) FT_INVALID_TOO_SHORT; @@ -110,7 +116,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -161,24 +167,28 @@ cmap_info->format = 0; cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap0_class_rec, - sizeof ( TT_CMapRec ), + FT_DEFINE_TT_CMAP( + tt_cmap0_class_rec, + sizeof ( TT_CMapRec ), + + (FT_CMap_InitFunc) tt_cmap_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap0_char_index, + (FT_CMap_CharNextFunc) tt_cmap0_char_next, - (FT_CMap_InitFunc) tt_cmap_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap0_char_index, - (FT_CMap_CharNextFunc) tt_cmap0_char_next, + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 0, - (TT_CMap_ValidateFunc) tt_cmap0_validate, - (TT_CMap_Info_GetFunc) tt_cmap0_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap0_validate, + (TT_CMap_Info_GetFunc)tt_cmap0_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_0 */ @@ -275,13 +285,20 @@ tt_cmap2_validate( FT_Byte* table, FT_Validator valid ) { - FT_Byte* p = table + 2; /* skip format */ - FT_UInt length = TT_PEEK_USHORT( p ); + FT_Byte* p; + FT_UInt length; + FT_UInt n, max_subs; - FT_Byte* keys; /* keys table */ - FT_Byte* subs; /* sub-headers */ - FT_Byte* glyph_ids; /* glyph ID array */ + FT_Byte* keys; /* keys table */ + FT_Byte* subs; /* sub-headers */ + FT_Byte* glyph_ids; /* glyph ID array */ + + + if ( table + 2 + 2 > valid->limit ) + FT_INVALID_TOO_SHORT; + p = table + 2; /* skip format */ + length = TT_NEXT_USHORT( p ); if ( table + length > valid->limit || length < 6 + 512 ) FT_INVALID_TOO_SHORT; @@ -316,9 +333,8 @@ /* parse sub-headers */ for ( n = 0; n <= max_subs; n++ ) { - FT_UInt first_code, code_count, offset; - FT_Int delta; - FT_Byte* ids; + FT_UInt first_code, code_count, offset; + FT_Int delta; first_code = TT_NEXT_USHORT( p ); @@ -340,6 +356,9 @@ /* check offset */ if ( offset != 0 ) { + FT_Byte* ids; + + ids = p - 2 + offset; if ( ids < glyph_ids || ids + code_count*2 > table + length ) FT_INVALID_OFFSET; @@ -365,7 +384,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -537,24 +556,28 @@ cmap_info->format = 2; cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap2_class_rec, - sizeof ( TT_CMapRec ), + FT_DEFINE_TT_CMAP( + tt_cmap2_class_rec, + sizeof ( TT_CMapRec ), + + (FT_CMap_InitFunc) tt_cmap_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap2_char_index, + (FT_CMap_CharNextFunc) tt_cmap2_char_next, - (FT_CMap_InitFunc) tt_cmap_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap2_char_index, - (FT_CMap_CharNextFunc) tt_cmap2_char_next, + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 2, - (TT_CMap_ValidateFunc) tt_cmap2_validate, - (TT_CMap_Info_GetFunc) tt_cmap2_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap2_validate, + (TT_CMap_Info_GetFunc)tt_cmap2_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_2 */ @@ -662,7 +685,7 @@ cmap->cur_charcode = (FT_UInt32)0xFFFFFFFFUL; cmap->cur_gindex = 0; - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -808,16 +831,20 @@ tt_cmap4_validate( FT_Byte* table, FT_Validator valid ) { - FT_Byte* p = table + 2; /* skip format */ - FT_UInt length = TT_NEXT_USHORT( p ); + FT_Byte* p; + FT_UInt length; + FT_Byte *ends, *starts, *offsets, *deltas, *glyph_ids; FT_UInt num_segs; - FT_Error error = SFNT_Err_Ok; + FT_Error error = FT_Err_Ok; - if ( length < 16 ) + if ( table + 2 + 2 > valid->limit ) FT_INVALID_TOO_SHORT; + p = table + 2; /* skip format */ + length = TT_NEXT_USHORT( p ); + /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + length > valid->limit ) @@ -828,6 +855,9 @@ length = (FT_UInt)( valid->limit - table ); } + if ( length < 16 ) + FT_INVALID_TOO_SHORT; + p = table + 6; num_segs = TT_NEXT_USHORT( p ); /* read segCountX2 */ @@ -1373,23 +1403,27 @@ cmap_info->format = 4; cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap4_class_rec, - sizeof ( TT_CMap4Rec ), - (FT_CMap_InitFunc) tt_cmap4_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap4_char_index, - (FT_CMap_CharNextFunc) tt_cmap4_char_next, + FT_DEFINE_TT_CMAP( + tt_cmap4_class_rec, + sizeof ( TT_CMap4Rec ), + (FT_CMap_InitFunc) tt_cmap4_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap4_char_index, + (FT_CMap_CharNextFunc) tt_cmap4_char_next, + + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 4, - (TT_CMap_ValidateFunc) tt_cmap4_validate, - (TT_CMap_Info_GetFunc) tt_cmap4_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap4_validate, + (TT_CMap_Info_GetFunc)tt_cmap4_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_4 */ @@ -1456,7 +1490,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -1532,24 +1566,28 @@ cmap_info->format = 6; cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap6_class_rec, - sizeof ( TT_CMapRec ), + FT_DEFINE_TT_CMAP( + tt_cmap6_class_rec, + sizeof ( TT_CMapRec ), + + (FT_CMap_InitFunc) tt_cmap_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap6_char_index, + (FT_CMap_CharNextFunc) tt_cmap6_char_next, - (FT_CMap_InitFunc) tt_cmap_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap6_char_index, - (FT_CMap_CharNextFunc) tt_cmap6_char_next, + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 6, - (TT_CMap_ValidateFunc) tt_cmap6_validate, - (TT_CMap_Info_GetFunc) tt_cmap6_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap6_validate, + (TT_CMap_Info_GetFunc)tt_cmap6_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_6 */ @@ -1631,7 +1669,8 @@ p = is32 + 8192; /* skip `is32' array */ num_groups = TT_NEXT_ULONG( p ); - if ( p + num_groups * 12 > valid->limit ) + /* p + num_groups * 12 > valid->limit ? */ + if ( num_groups > (FT_UInt32)( valid->limit - p ) / 12 ) FT_INVALID_TOO_SHORT; /* check groups, they must be in increasing order */ @@ -1656,7 +1695,12 @@ if ( valid->level >= FT_VALIDATE_TIGHT ) { - if ( start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ) + FT_UInt32 d = end - start; + + + /* start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ? */ + if ( d > TT_VALID_GLYPH_COUNT( valid ) || + start_id >= TT_VALID_GLYPH_COUNT( valid ) - d ) FT_INVALID_GLYPH_ID; count = (FT_UInt32)( end - start + 1 ); @@ -1700,7 +1744,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -1785,24 +1829,28 @@ cmap_info->format = 8; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap8_class_rec, - sizeof ( TT_CMapRec ), + FT_DEFINE_TT_CMAP( + tt_cmap8_class_rec, + sizeof ( TT_CMapRec ), - (FT_CMap_InitFunc) tt_cmap_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap8_char_index, - (FT_CMap_CharNextFunc) tt_cmap8_char_next, + (FT_CMap_InitFunc) tt_cmap_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap8_char_index, + (FT_CMap_CharNextFunc) tt_cmap8_char_next, + + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 8, - (TT_CMap_ValidateFunc) tt_cmap8_validate, - (TT_CMap_Info_GetFunc) tt_cmap8_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap8_validate, + (TT_CMap_Info_GetFunc)tt_cmap8_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_8 */ @@ -1850,7 +1898,9 @@ count = TT_NEXT_ULONG( p ); if ( length > (FT_ULong)( valid->limit - table ) || - length < 20 + count * 2 ) + /* length < 20 + count * 2 ? */ + length < 20 || + ( length - 20 ) / 2 < count ) FT_INVALID_TOO_SHORT; /* check glyph indices */ @@ -1867,7 +1917,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -1934,24 +1984,28 @@ cmap_info->format = 10; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap10_class_rec, - sizeof ( TT_CMapRec ), + FT_DEFINE_TT_CMAP( + tt_cmap10_class_rec, + sizeof ( TT_CMapRec ), - (FT_CMap_InitFunc) tt_cmap_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap10_char_index, - (FT_CMap_CharNextFunc) tt_cmap10_char_next, + (FT_CMap_InitFunc) tt_cmap_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap10_char_index, + (FT_CMap_CharNextFunc) tt_cmap10_char_next, + + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 10, - (TT_CMap_ValidateFunc) tt_cmap10_validate, - (TT_CMap_Info_GetFunc) tt_cmap10_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap10_validate, + (TT_CMap_Info_GetFunc)tt_cmap10_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_10 */ @@ -2010,7 +2064,7 @@ cmap->valid = 0; - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2018,9 +2072,9 @@ tt_cmap12_validate( FT_Byte* table, FT_Validator valid ) { - FT_Byte* p; - FT_ULong length; - FT_ULong num_groups; + FT_Byte* p; + FT_ULong length; + FT_ULong num_groups; if ( table + 16 > valid->limit ) @@ -2033,7 +2087,9 @@ num_groups = TT_NEXT_ULONG( p ); if ( length > (FT_ULong)( valid->limit - table ) || - length < 16 + 12 * num_groups ) + /* length < 16 + 12 * num_groups ? */ + length < 16 || + ( length - 16 ) / 12 < num_groups ) FT_INVALID_TOO_SHORT; /* check groups, they must be in increasing order */ @@ -2055,7 +2111,12 @@ if ( valid->level >= FT_VALIDATE_TIGHT ) { - if ( start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ) + FT_UInt32 d = end - start; + + + /* start_id + end - start >= TT_VALID_GLYPH_COUNT( valid ) ? */ + if ( d > TT_VALID_GLYPH_COUNT( valid ) || + start_id >= TT_VALID_GLYPH_COUNT( valid ) - d ) FT_INVALID_GLYPH_ID; } @@ -2063,7 +2124,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2084,8 +2145,6 @@ char_code = cmap->cur_charcode + 1; - n = cmap->cur_group; - for ( n = cmap->cur_group; n < cmap->num_groups; n++ ) { p = cmap->cmap.data + 16 + 12 * n; @@ -2254,24 +2313,28 @@ cmap_info->format = 12; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap12_class_rec, - sizeof ( TT_CMap12Rec ), + FT_DEFINE_TT_CMAP( + tt_cmap12_class_rec, + sizeof ( TT_CMap12Rec ), + + (FT_CMap_InitFunc) tt_cmap12_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap12_char_index, + (FT_CMap_CharNextFunc) tt_cmap12_char_next, - (FT_CMap_InitFunc) tt_cmap12_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap12_char_index, - (FT_CMap_CharNextFunc) tt_cmap12_char_next, + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 12, - (TT_CMap_ValidateFunc) tt_cmap12_validate, - (TT_CMap_Info_GetFunc) tt_cmap12_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap12_validate, + (TT_CMap_Info_GetFunc)tt_cmap12_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_12 */ @@ -2330,7 +2393,7 @@ cmap->valid = 0; - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2338,9 +2401,9 @@ tt_cmap13_validate( FT_Byte* table, FT_Validator valid ) { - FT_Byte* p; - FT_ULong length; - FT_ULong num_groups; + FT_Byte* p; + FT_ULong length; + FT_ULong num_groups; if ( table + 16 > valid->limit ) @@ -2353,7 +2416,9 @@ num_groups = TT_NEXT_ULONG( p ); if ( length > (FT_ULong)( valid->limit - table ) || - length < 16 + 12 * num_groups ) + /* length < 16 + 12 * num_groups ? */ + length < 16 || + ( length - 16 ) / 12 < num_groups ) FT_INVALID_TOO_SHORT; /* check groups, they must be in increasing order */ @@ -2383,7 +2448,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2404,8 +2469,6 @@ char_code = cmap->cur_charcode + 1; - n = cmap->cur_group; - for ( n = cmap->cur_group; n < cmap->num_groups; n++ ) { p = cmap->cmap.data + 16 + 12 * n; @@ -2490,7 +2553,6 @@ /* if `char_code' is not in any group, then `mid' is */ /* the group nearest to `char_code' */ - /* */ if ( char_code > end ) { @@ -2570,24 +2632,28 @@ cmap_info->format = 13; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); - return SFNT_Err_Ok; + return FT_Err_Ok; } - FT_DEFINE_TT_CMAP(tt_cmap13_class_rec, - sizeof ( TT_CMap13Rec ), + FT_DEFINE_TT_CMAP( + tt_cmap13_class_rec, + sizeof ( TT_CMap13Rec ), - (FT_CMap_InitFunc) tt_cmap13_init, - (FT_CMap_DoneFunc) NULL, - (FT_CMap_CharIndexFunc)tt_cmap13_char_index, - (FT_CMap_CharNextFunc) tt_cmap13_char_next, + (FT_CMap_InitFunc) tt_cmap13_init, + (FT_CMap_DoneFunc) NULL, + (FT_CMap_CharIndexFunc)tt_cmap13_char_index, + (FT_CMap_CharNextFunc) tt_cmap13_char_next, + + NULL, + NULL, + NULL, + NULL, + NULL, - NULL, NULL, NULL, NULL, NULL - , 13, - (TT_CMap_ValidateFunc) tt_cmap13_validate, - (TT_CMap_Info_GetFunc) tt_cmap13_get_info - ) + (TT_CMap_ValidateFunc)tt_cmap13_validate, + (TT_CMap_Info_GetFunc)tt_cmap13_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_13 */ @@ -2688,8 +2754,8 @@ FT_UInt32 num_results, FT_Memory memory ) { - FT_UInt32 old_max = cmap->max_results; - FT_Error error = SFNT_Err_Ok; + FT_UInt32 old_max = cmap->max_results; + FT_Error error = FT_Err_Ok; if ( num_results > cmap->max_results ) @@ -2713,11 +2779,11 @@ cmap->cmap.data = table; table += 6; - cmap->num_selectors = FT_PEEK_ULONG( table ); - cmap->max_results = 0; - cmap->results = NULL; + cmap->num_selectors = FT_PEEK_ULONG( table ); + cmap->max_results = 0; + cmap->results = NULL; - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2725,13 +2791,22 @@ tt_cmap14_validate( FT_Byte* table, FT_Validator valid ) { - FT_Byte* p = table + 2; - FT_ULong length = TT_NEXT_ULONG( p ); - FT_ULong num_selectors = TT_NEXT_ULONG( p ); + FT_Byte* p; + FT_ULong length; + FT_ULong num_selectors; + + if ( table + 2 + 4 + 4 > valid->limit ) + FT_INVALID_TOO_SHORT; + + p = table + 2; + length = TT_NEXT_ULONG( p ); + num_selectors = TT_NEXT_ULONG( p ); if ( length > (FT_ULong)( valid->limit - table ) || - length < 10 + 11 * num_selectors ) + /* length < 10 + 11 * num_selectors ? */ + length < 10 || + ( length - 10 ) / 11 < num_selectors ) FT_INVALID_TOO_SHORT; /* check selectors, they must be in increasing order */ @@ -2767,7 +2842,8 @@ FT_ULong lastBase = 0; - if ( defp + numRanges * 4 > valid->limit ) + /* defp + numRanges * 4 > valid->limit ? */ + if ( numRanges > (FT_ULong)( valid->limit - defp ) / 4 ) FT_INVALID_TOO_SHORT; for ( i = 0; i < numRanges; ++i ) @@ -2791,10 +2867,11 @@ { FT_Byte* ndp = table + nondefOff; FT_ULong numMappings = TT_NEXT_ULONG( ndp ); - FT_ULong i, lastUni = 0; + FT_ULong i, lastUni = 0; - if ( numMappings * 4 > (FT_ULong)( valid->limit - ndp ) ) + /* numMappings * 4 > (FT_ULong)( valid->limit - ndp ) ? */ + if ( numMappings > ( (FT_ULong)( valid->limit - ndp ) ) / 4 ) FT_INVALID_TOO_SHORT; for ( i = 0; i < numMappings; ++i ) @@ -2819,7 +2896,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2857,7 +2934,7 @@ /* subtable 14 does not define a language field */ cmap_info->language = 0xFFFFFFFFUL; - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -2965,7 +3042,7 @@ tt_cmap14_char_var_index( TT_CMap cmap, TT_CMap ucmap, FT_UInt32 charcode, - FT_UInt32 variantSelector) + FT_UInt32 variantSelector ) { FT_Byte* p = tt_cmap14_find_variant( cmap->data + 6, variantSelector ); FT_ULong defOff; @@ -3106,9 +3183,9 @@ static FT_UInt32* - tt_cmap14_get_def_chars( TT_CMap cmap, - FT_Byte* p, - FT_Memory memory ) + tt_cmap14_get_def_chars( TT_CMap cmap, + FT_Byte* p, + FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 numRanges; @@ -3124,7 +3201,7 @@ for ( q = cmap14->results; numRanges > 0; --numRanges ) { - FT_UInt32 uni = (FT_UInt32)TT_NEXT_UINT24( p ); + FT_UInt32 uni = (FT_UInt32)TT_NEXT_UINT24( p ); cnt = FT_NEXT_BYTE( p ) + 1; @@ -3133,6 +3210,7 @@ q[0] = uni; uni += 1; q += 1; + } while ( --cnt != 0 ); } q[0] = 0; @@ -3176,7 +3254,6 @@ { FT_Byte *p = tt_cmap14_find_variant( cmap->data + 6, variantSelector ); - FT_UInt32 *ret; FT_Int i; FT_ULong defOff; FT_ULong nondefOff; @@ -3210,6 +3287,8 @@ FT_Byte* dp; FT_UInt di, ni, k; + FT_UInt32 *ret; + p = cmap->data + nondefOff; dp = cmap->data + defOff; @@ -3306,25 +3385,25 @@ } - FT_DEFINE_TT_CMAP(tt_cmap14_class_rec, - sizeof ( TT_CMap14Rec ), + FT_DEFINE_TT_CMAP( + tt_cmap14_class_rec, + sizeof ( TT_CMap14Rec ), + + (FT_CMap_InitFunc) tt_cmap14_init, + (FT_CMap_DoneFunc) tt_cmap14_done, + (FT_CMap_CharIndexFunc)tt_cmap14_char_index, + (FT_CMap_CharNextFunc) tt_cmap14_char_next, - (FT_CMap_InitFunc) tt_cmap14_init, - (FT_CMap_DoneFunc) tt_cmap14_done, - (FT_CMap_CharIndexFunc)tt_cmap14_char_index, - (FT_CMap_CharNextFunc) tt_cmap14_char_next, + /* Format 14 extension functions */ + (FT_CMap_CharVarIndexFunc) tt_cmap14_char_var_index, + (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault, + (FT_CMap_VariantListFunc) tt_cmap14_variants, + (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants, + (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars, - /* Format 14 extension functions */ - (FT_CMap_CharVarIndexFunc) tt_cmap14_char_var_index, - (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault, - (FT_CMap_VariantListFunc) tt_cmap14_variants, - (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants, - (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars - , 14, (TT_CMap_ValidateFunc)tt_cmap14_validate, - (TT_CMap_Info_GetFunc)tt_cmap14_get_info - ) + (TT_CMap_Info_GetFunc)tt_cmap14_get_info ) #endif /* TT_CONFIG_CMAP_FORMAT_14 */ @@ -3333,50 +3412,62 @@ static const TT_CMap_Class tt_cmap_classes[] = { -#define TTCMAPCITEM(a) &a, +#define TTCMAPCITEM( a ) &a, #include "ttcmapc.h" NULL, }; #else /*FT_CONFIG_OPTION_PIC*/ - void FT_Destroy_Class_tt_cmap_classes(FT_Library library, TT_CMap_Class* clazz) + void + FT_Destroy_Class_tt_cmap_classes( FT_Library library, + TT_CMap_Class* clazz ) { - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; + + if ( clazz ) FT_FREE( clazz ); } - FT_Error FT_Create_Class_tt_cmap_classes(FT_Library library, TT_CMap_Class** output_class) + + FT_Error + FT_Create_Class_tt_cmap_classes( FT_Library library, + TT_CMap_Class** output_class ) { - TT_CMap_Class* clazz; - TT_CMap_ClassRec* recs; - FT_Error error; - FT_Memory memory = library->memory; - int i = 0; + TT_CMap_Class* clazz = NULL; + TT_CMap_ClassRec* recs; + FT_Error error; + FT_Memory memory = library->memory; + + int i = 0; + -#define TTCMAPCITEM(a) i++; +#define TTCMAPCITEM( a ) i++; #include "ttcmapc.h" - /* allocate enough space for both the pointers +terminator and the class instances */ - if ( FT_ALLOC( clazz, sizeof(*clazz)*(i+1)+sizeof(TT_CMap_ClassRec)*i ) ) + /* allocate enough space for both the pointers */ + /* plus terminator and the class instances */ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * ( i + 1 ) + + sizeof ( TT_CMap_ClassRec ) * i ) ) return error; /* the location of the class instances follows the array of pointers */ - recs = (TT_CMap_ClassRec*) (((char*)clazz)+(sizeof(*clazz)*(i+1))); - i=0; + recs = (TT_CMap_ClassRec*)( (char*)clazz + + sizeof ( *clazz ) * ( i + 1 ) ); + i = 0; #undef TTCMAPCITEM -#define TTCMAPCITEM(a) \ - FT_Init_Class_##a(&recs[i]); \ - clazz[i] = &recs[i]; \ +#define TTCMAPCITEM( a ) \ + FT_Init_Class_ ## a( &recs[i] ); \ + clazz[i] = &recs[i]; \ i++; #include "ttcmapc.h" clazz[i] = NULL; *output_class = clazz; - return SFNT_Err_Ok; + return FT_Err_Ok; } #endif /*FT_CONFIG_OPTION_PIC*/ @@ -3398,25 +3489,18 @@ if ( !p || p + 4 > limit ) - return SFNT_Err_Invalid_Table; + return FT_THROW( Invalid_Table ); /* only recognize format 0 */ if ( TT_NEXT_USHORT( p ) != 0 ) { - p -= 2; FT_ERROR(( "tt_face_build_cmaps:" " unsupported `cmap' table format = %d\n", - TT_PEEK_USHORT( p ) )); - return SFNT_Err_Invalid_Table; + TT_PEEK_USHORT( p - 2 ) )); + return FT_THROW( Invalid_Table ); } num_cmaps = TT_NEXT_USHORT( p ); -#ifdef FT_MAX_CHARMAP_CACHEABLE - if ( num_cmaps > FT_MAX_CHARMAP_CACHEABLE ) - FT_ERROR(( "tt_face_build_cmaps: too many cmap subtables(%d) " - "subtable#%d and later are loaded but cannot be searched\n", - num_cmaps, FT_MAX_CHARMAP_CACHEABLE + 1 )); -#endif for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- ) { @@ -3434,7 +3518,7 @@ { FT_Byte* volatile cmap = table + offset; volatile FT_UInt format = TT_PEEK_USHORT( cmap ); - const TT_CMap_Class* volatile pclazz = FT_TT_CMAP_CLASSES_GET; + const TT_CMap_Class* volatile pclazz = TT_CMAP_CLASSES_GET; TT_CMap_Class volatile clazz; @@ -3444,7 +3528,7 @@ if ( clazz->format == format ) { volatile TT_ValidatorRec valid; - volatile FT_Error error = SFNT_Err_Ok; + volatile FT_Error error = FT_Err_Ok; ft_validator_init( FT_VALIDATOR( &valid ), cmap, limit, @@ -3452,8 +3536,7 @@ valid.num_glyphs = (FT_UInt)face->max_profile.numGlyphs; - if ( ft_setjmp( - *((ft_jmp_buf*)&FT_VALIDATOR( &valid )->jump_buffer) ) == 0 ) + if ( ft_setjmp( FT_VALIDATOR( &valid )->jump_buffer) == 0 ) { /* validate this cmap sub-table */ error = clazz->validate( cmap, FT_VALIDATOR( &valid ) ); @@ -3464,9 +3547,9 @@ FT_CMap ttcmap; - /* It might make sense to store the single variation selector */ - /* cmap somewhere special. But it would have to be in the */ - /* public FT_FaceRec, and we can't change that. */ + /* It might make sense to store the single variation */ + /* selector cmap somewhere special. But it would have to be */ + /* in the public FT_FaceRec, and we can't change that. */ if ( !FT_CMap_New( (FT_CMap_Class)clazz, cmap, &charmap, &ttcmap ) ) @@ -3493,7 +3576,7 @@ } } - return SFNT_Err_Ok; + return FT_Err_Ok; } diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h index 94f7978..0fde167 100644 --- a/src/sfnt/ttcmap.h +++ b/src/sfnt/ttcmap.h @@ -4,7 +4,7 @@ /* */ /* TrueType character mapping table (cmap) support (specification). */ /* */ -/* Copyright 2002, 2003, 2004, 2005 by */ +/* Copyright 2002-2005, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -55,47 +55,80 @@ FT_BEGIN_HEADER } TT_CMap_ClassRec; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_TT_CMAP(class_, size_, init_, done_, char_index_, \ - char_next_, char_var_index_, char_var_default_, variant_list_, \ - charvariant_list_,variantchar_list_, \ - format_, validate_, get_cmap_info_) \ - FT_CALLBACK_TABLE_DEF \ - const TT_CMap_ClassRec class_ = \ - { \ - {size_, init_, done_, char_index_, \ - char_next_, char_var_index_, char_var_default_, variant_list_, \ - charvariant_list_, variantchar_list_}, \ - format_, validate_, get_cmap_info_ \ +#define FT_DEFINE_TT_CMAP( class_, \ + size_, \ + init_, \ + done_, \ + char_index_, \ + char_next_, \ + char_var_index_, \ + char_var_default_, \ + variant_list_, \ + charvariant_list_, \ + variantchar_list_, \ + format_, \ + validate_, \ + get_cmap_info_ ) \ + FT_CALLBACK_TABLE_DEF \ + const TT_CMap_ClassRec class_ = \ + { \ + { size_, \ + init_, \ + done_, \ + char_index_, \ + char_next_, \ + char_var_index_, \ + char_var_default_, \ + variant_list_, \ + charvariant_list_, \ + variantchar_list_ \ + }, \ + \ + format_, \ + validate_, \ + get_cmap_info_ \ }; #else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_TT_CMAP(class_, size_, init_, done_, char_index_, \ - char_next_, char_var_index_, char_var_default_, variant_list_, \ - charvariant_list_,variantchar_list_, \ - format_, validate_, get_cmap_info_) \ - void \ - FT_Init_Class_##class_( TT_CMap_ClassRec* clazz ) \ - { \ - clazz->clazz.size = size_; \ - clazz->clazz.init = init_; \ - clazz->clazz.done = done_; \ - clazz->clazz.char_index = char_index_; \ - clazz->clazz.char_next = char_next_; \ - clazz->clazz.char_var_index = char_var_index_; \ - clazz->clazz.char_var_default = char_var_default_; \ - clazz->clazz.variant_list = variant_list_; \ - clazz->clazz.charvariant_list = charvariant_list_; \ - clazz->clazz.variantchar_list = variantchar_list_; \ - clazz->format = format_; \ - clazz->validate = validate_; \ - clazz->get_cmap_info = get_cmap_info_; \ +#define FT_DEFINE_TT_CMAP( class_, \ + size_, \ + init_, \ + done_, \ + char_index_, \ + char_next_, \ + char_var_index_, \ + char_var_default_, \ + variant_list_, \ + charvariant_list_, \ + variantchar_list_, \ + format_, \ + validate_, \ + get_cmap_info_ ) \ + void \ + FT_Init_Class_ ## class_( TT_CMap_ClassRec* clazz ) \ + { \ + clazz->clazz.size = size_; \ + clazz->clazz.init = init_; \ + clazz->clazz.done = done_; \ + clazz->clazz.char_index = char_index_; \ + clazz->clazz.char_next = char_next_; \ + clazz->clazz.char_var_index = char_var_index_; \ + clazz->clazz.char_var_default = char_var_default_; \ + clazz->clazz.variant_list = variant_list_; \ + clazz->clazz.charvariant_list = charvariant_list_; \ + clazz->clazz.variantchar_list = variantchar_list_; \ + clazz->format = format_; \ + clazz->validate = validate_; \ + clazz->get_cmap_info = get_cmap_info_; \ } #endif /* FT_CONFIG_OPTION_PIC */ + typedef struct TT_ValidatorRec_ { FT_ValidatorRec validator; @@ -104,7 +137,7 @@ FT_BEGIN_HEADER } TT_ValidatorRec, *TT_Validator; -#define TT_VALIDATOR( x ) ((TT_Validator)( x )) +#define TT_VALIDATOR( x ) ( (TT_Validator)( x ) ) #define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs diff --git a/src/sfnt/ttcmapc.h b/src/sfnt/ttcmapc.h index 4c9c6a5..2ea2043 100644 --- a/src/sfnt/ttcmapc.h +++ b/src/sfnt/ttcmapc.h @@ -17,39 +17,40 @@ #ifdef TT_CONFIG_CMAP_FORMAT_0 - TTCMAPCITEM(tt_cmap0_class_rec) + TTCMAPCITEM( tt_cmap0_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_2 - TTCMAPCITEM(tt_cmap2_class_rec) + TTCMAPCITEM( tt_cmap2_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_4 - TTCMAPCITEM(tt_cmap4_class_rec) + TTCMAPCITEM( tt_cmap4_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_6 - TTCMAPCITEM(tt_cmap6_class_rec) + TTCMAPCITEM( tt_cmap6_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_8 - TTCMAPCITEM(tt_cmap8_class_rec) + TTCMAPCITEM( tt_cmap8_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_10 - TTCMAPCITEM(tt_cmap10_class_rec) + TTCMAPCITEM( tt_cmap10_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_12 - TTCMAPCITEM(tt_cmap12_class_rec) + TTCMAPCITEM( tt_cmap12_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_13 - TTCMAPCITEM(tt_cmap13_class_rec) + TTCMAPCITEM( tt_cmap13_class_rec ) #endif #ifdef TT_CONFIG_CMAP_FORMAT_14 - TTCMAPCITEM(tt_cmap14_class_rec) + TTCMAPCITEM( tt_cmap14_class_rec ) #endif + /* END */ diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c index 4688898..455e7b5 100644 --- a/src/sfnt/ttkern.c +++ b/src/sfnt/ttkern.c @@ -5,7 +5,7 @@ /* Load the basic TrueType kerning table. This doesn't handle */ /* kerning data within the GPOS table at the moment. */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */ +/* Copyright 1996-2007, 2009, 2010, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,7 +61,7 @@ { FT_ERROR(( "tt_face_load_kern:" " kerning table is too small - ignored\n" )); - error = SFNT_Err_Table_Missing; + error = FT_THROW( Table_Missing ); goto Exit; } @@ -99,7 +99,7 @@ length = FT_NEXT_USHORT( p ); coverage = FT_NEXT_USHORT( p ); - if ( length <= 6 ) + if ( length <= 6 + 8 ) break; p_next += length; @@ -183,7 +183,7 @@ FT_UInt right_glyph ) { FT_Int result = 0; - FT_UInt count, mask = 1; + FT_UInt count, mask; FT_Byte* p = face->kern_table; FT_Byte* p_limit = p + face->kern_table_size; @@ -196,7 +196,7 @@ count--, mask <<= 1 ) { FT_Byte* base = p; - FT_Byte* next = base; + FT_Byte* next; FT_UInt version = FT_NEXT_USHORT( p ); FT_UInt length = FT_NEXT_USHORT( p ); FT_UInt coverage = FT_NEXT_USHORT( p ); diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index 5fb9aea..8338150 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -5,8 +5,7 @@ /* Load the basic TrueType tables, i.e., tables that can be either in */ /* TTF or OTF fonts (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ -/* 2010 by */ +/* Copyright 1996-2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -143,7 +142,7 @@ goto Exit; } else - error = SFNT_Err_Table_Missing; + error = FT_THROW( Table_Missing ); Exit: return error; @@ -208,7 +207,10 @@ } /* we ignore invalid tables */ - if ( table.Offset + table.Length > stream->size ) + + /* table.Offset + table.Length > stream->size ? */ + if ( table.Length > stream->size || + table.Offset > stream->size - table.Length ) { FT_TRACE2(( "check_table_dir: table entry %d invalid\n", nn )); continue; @@ -237,8 +239,9 @@ */ if ( table.Length < 0x36 ) { - FT_TRACE2(( "check_table_dir: `head' table too small\n" )); - error = SFNT_Err_Table_Missing; + FT_TRACE2(( "check_table_dir:" + " `head' or `bhed' table too small\n" )); + error = FT_THROW( Table_Missing ); goto Exit; } @@ -247,12 +250,8 @@ goto Exit; if ( magic != 0x5F0F3CF5UL ) - { FT_TRACE2(( "check_table_dir:" - " no magic number found in `head' table\n")); - error = SFNT_Err_Table_Missing; - goto Exit; - } + " invalid magic number in `head' or `bhed' table\n")); if ( FT_STREAM_SEEK( offset + ( nn + 1 ) * 16 ) ) goto Exit; @@ -268,14 +267,14 @@ if ( sfnt->num_tables == 0 ) { FT_TRACE2(( "check_table_dir: no tables found\n" )); - error = SFNT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } /* if `sing' and `meta' tables are present, there is no `head' table */ if ( has_head || ( has_sing && has_meta ) ) { - error = SFNT_Err_Ok; + error = FT_Err_Ok; goto Exit; } else @@ -286,7 +285,7 @@ #else FT_TRACE2(( " neither `head' nor `sing' table found\n" )); #endif - error = SFNT_Err_Table_Missing; + error = FT_THROW( Table_Missing ); } Exit: @@ -354,7 +353,7 @@ #if 0 if ( sfnt.search_range != 1 << ( sfnt.entry_selector + 4 ) || sfnt.search_range + sfnt.range_shift != sfnt.num_tables << 4 ) - return SFNT_Err_Unknown_File_Format; + return FT_THROW( Unknown_File_Format ); #endif /* load the table directory */ @@ -362,14 +361,17 @@ FT_TRACE2(( "-- Number of tables: %10u\n", sfnt.num_tables )); FT_TRACE2(( "-- Format version: 0x%08lx\n", sfnt.format_tag )); - /* check first */ - error = check_table_dir( &sfnt, stream ); - if ( error ) + if ( sfnt.format_tag != TTAG_OTTO ) { - FT_TRACE2(( "tt_face_load_font_dir:" - " invalid table directory for TrueType\n" )); + /* check first */ + error = check_table_dir( &sfnt, stream ); + if ( error ) + { + FT_TRACE2(( "tt_face_load_font_dir:" + " invalid table directory for TrueType\n" )); - goto Exit; + goto Exit; + } } face->num_tables = sfnt.num_tables; @@ -392,11 +394,14 @@ { entry->Tag = FT_GET_TAG4(); entry->CheckSum = FT_GET_ULONG(); - entry->Offset = FT_GET_LONG(); - entry->Length = FT_GET_LONG(); + entry->Offset = FT_GET_ULONG(); + entry->Length = FT_GET_ULONG(); /* ignore invalid tables */ - if ( entry->Offset + entry->Length > stream->size ) + + /* entry->Offset + entry->Length > stream->size ? */ + if ( entry->Length > stream->size || + entry->Offset > stream->size - entry->Length ) continue; else { @@ -480,7 +485,7 @@ table = tt_face_lookup_table( face, tag ); if ( !table ) { - error = SFNT_Err_Table_Missing; + error = FT_THROW( Table_Missing ); goto Exit; } @@ -495,7 +500,7 @@ { *length = size; - return SFNT_Err_Ok; + return FT_Err_Ok; } if ( length ) @@ -624,7 +629,7 @@ FT_Error error; TT_MaxProfile* maxProfile = &face->max_profile; - const FT_Frame_Field maxp_fields[] = + static const FT_Frame_Field maxp_fields[] = { #undef FT_STRUCTURE #define FT_STRUCTURE TT_MaxProfile @@ -635,7 +640,7 @@ FT_FRAME_END }; - const FT_Frame_Field maxp_fields_extra[] = + static const FT_Frame_Field maxp_fields_extra[] = { FT_FRAME_START( 26 ), FT_FRAME_USHORT( maxPoints ), @@ -721,7 +726,7 @@ /*************************************************************************/ /* */ /* <Function> */ - /* tt_face_load_names */ + /* tt_face_load_name */ /* */ /* <Description> */ /* Loads the name records. */ @@ -799,7 +804,7 @@ if ( storage_start > storage_limit ) { FT_ERROR(( "tt_face_load_name: invalid `name' table\n" )); - error = SFNT_Err_Name_Table_Missing; + error = FT_THROW( Name_Table_Missing ); goto Exit; } @@ -952,7 +957,7 @@ FT_Error error; TT_OS2* os2; - const FT_Frame_Field os2_fields[] = + static const FT_Frame_Field os2_fields[] = { #undef FT_STRUCTURE #define FT_STRUCTURE TT_OS2 @@ -1004,7 +1009,8 @@ FT_FRAME_END }; - const FT_Frame_Field os2_fields_extra[] = + /* `OS/2' version 1 and newer */ + static const FT_Frame_Field os2_fields_extra1[] = { FT_FRAME_START( 8 ), FT_FRAME_ULONG( ulCodePageRange1 ), @@ -1012,7 +1018,8 @@ FT_FRAME_END }; - const FT_Frame_Field os2_fields_extra2[] = + /* `OS/2' version 2 and newer */ + static const FT_Frame_Field os2_fields_extra2[] = { FT_FRAME_START( 10 ), FT_FRAME_SHORT ( sxHeight ), @@ -1023,6 +1030,15 @@ FT_FRAME_END }; + /* `OS/2' version 5 and newer */ + static const FT_Frame_Field os2_fields_extra5[] = + { + FT_FRAME_START( 4 ), + FT_FRAME_USHORT( usLowerOpticalPointSize ), + FT_FRAME_USHORT( usUpperOpticalPointSize ), + FT_FRAME_END + }; + /* We now support old Mac fonts where the OS/2 table doesn't */ /* exist. Simply put, we set the `version' field to 0xFFFF */ @@ -1036,18 +1052,20 @@ if ( FT_STREAM_READ_FIELDS( os2_fields, os2 ) ) goto Exit; - os2->ulCodePageRange1 = 0; - os2->ulCodePageRange2 = 0; - os2->sxHeight = 0; - os2->sCapHeight = 0; - os2->usDefaultChar = 0; - os2->usBreakChar = 0; - os2->usMaxContext = 0; + os2->ulCodePageRange1 = 0; + os2->ulCodePageRange2 = 0; + os2->sxHeight = 0; + os2->sCapHeight = 0; + os2->usDefaultChar = 0; + os2->usBreakChar = 0; + os2->usMaxContext = 0; + os2->usLowerOpticalPointSize = 0; + os2->usUpperOpticalPointSize = 0xFFFF; if ( os2->version >= 0x0001 ) { /* only version 1 tables */ - if ( FT_STREAM_READ_FIELDS( os2_fields_extra, os2 ) ) + if ( FT_STREAM_READ_FIELDS( os2_fields_extra1, os2 ) ) goto Exit; if ( os2->version >= 0x0002 ) @@ -1055,6 +1073,13 @@ /* only version 2 tables */ if ( FT_STREAM_READ_FIELDS( os2_fields_extra2, os2 ) ) goto Exit; + + if ( os2->version >= 0x0005 ) + { + /* only version 5 tables */ + if ( FT_STREAM_READ_FIELDS( os2_fields_extra5, os2 ) ) + goto Exit; + } } } @@ -1125,7 +1150,7 @@ FT_TRACE3(( "isFixedPitch: %s\n", post->isFixedPitch ? " yes" : " no" )); - return SFNT_Err_Ok; + return FT_Err_Ok; } @@ -1162,6 +1187,7 @@ FT_FRAME_USHORT( Style ), FT_FRAME_USHORT( TypeFamily ), FT_FRAME_USHORT( CapHeight ), + FT_FRAME_USHORT( SymbolSet ), FT_FRAME_BYTES ( TypeFace, 16 ), FT_FRAME_BYTES ( CharacterComplement, 8 ), FT_FRAME_BYTES ( FileName, 6 ), @@ -1233,18 +1259,18 @@ if ( face->gasp.version >= 2 ) { face->gasp.numRanges = 0; - error = SFNT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } num_ranges = face->gasp.numRanges; FT_TRACE3(( "numRanges: %u\n", num_ranges )); - if ( FT_QNEW_ARRAY( gaspranges, num_ranges ) || - FT_FRAME_ENTER( num_ranges * 4L ) ) + if ( FT_QNEW_ARRAY( face->gasp.gaspRanges, num_ranges ) || + FT_FRAME_ENTER( num_ranges * 4L ) ) goto Exit; - face->gasp.gaspRanges = gaspranges; + gaspranges = face->gasp.gaspRanges; for ( j = 0; j < num_ranges; j++ ) { diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c index 73ac8b2..bb31957 100644 --- a/src/sfnt/ttmtx.c +++ b/src/sfnt/ttmtx.c @@ -4,7 +4,7 @@ /* */ /* Load the metrics tables common to TTF and OTF fonts (body). */ /* */ -/* Copyright 2006-2009, 2011 by */ +/* Copyright 2006-2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -35,13 +35,6 @@ #define FT_COMPONENT trace_ttmtx - /* - * Unfortunately, we can't enable our memory optimizations if - * FT_CONFIG_OPTION_OLD_INTERNALS is defined. This is because at least - * one rogue client (libXfont in the X.Org XServer) is directly accessing - * the metrics. - */ - /*************************************************************************/ /* */ /* <Function> */ @@ -60,8 +53,6 @@ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ -#ifndef FT_CONFIG_OPTION_OLD_INTERNALS - FT_LOCAL_DEF( FT_Error ) tt_face_load_hmtx( TT_Face face, FT_Stream stream, @@ -97,142 +88,6 @@ return error; } -#else /* !FT_CONFIG_OPTION_OLD_INTERNALS */ - - FT_LOCAL_DEF( FT_Error ) - tt_face_load_hmtx( TT_Face face, - FT_Stream stream, - FT_Bool vertical ) - { - FT_Error error; - FT_Memory memory = stream->memory; - - FT_ULong table_len; - FT_Long num_shorts, num_longs, num_shorts_checked; - - TT_LongMetrics* longs; - TT_ShortMetrics** shorts; - FT_Byte* p; - - - if ( vertical ) - { - void* lm = &face->vertical.long_metrics; - void** sm = &face->vertical.short_metrics; - - - error = face->goto_table( face, TTAG_vmtx, stream, &table_len ); - if ( error ) - goto Fail; - - num_longs = face->vertical.number_Of_VMetrics; - if ( (FT_ULong)num_longs > table_len / 4 ) - num_longs = (FT_Long)( table_len / 4 ); - - face->vertical.number_Of_VMetrics = 0; - - longs = (TT_LongMetrics*)lm; - shorts = (TT_ShortMetrics**)sm; - } - else - { - void* lm = &face->horizontal.long_metrics; - void** sm = &face->horizontal.short_metrics; - - - error = face->goto_table( face, TTAG_hmtx, stream, &table_len ); - if ( error ) - goto Fail; - - num_longs = face->horizontal.number_Of_HMetrics; - if ( (FT_ULong)num_longs > table_len / 4 ) - num_longs = (FT_Long)( table_len / 4 ); - - face->horizontal.number_Of_HMetrics = 0; - - longs = (TT_LongMetrics*)lm; - shorts = (TT_ShortMetrics**)sm; - } - - /* never trust derived values */ - - num_shorts = face->max_profile.numGlyphs - num_longs; - num_shorts_checked = ( table_len - num_longs * 4L ) / 2; - - if ( num_shorts < 0 ) - { - FT_TRACE0(( "tt_face_load_hmtx:" - " %cmtx has more metrics than glyphs.\n", - vertical ? 'v' : 'h' )); - - /* Adobe simply ignores this problem. So we shall do the same. */ -#if 0 - error = vertical ? SFNT_Err_Invalid_Vert_Metrics - : SFNT_Err_Invalid_Horiz_Metrics; - goto Exit; -#else - num_shorts = 0; -#endif - } - - if ( FT_QNEW_ARRAY( *longs, num_longs ) || - FT_QNEW_ARRAY( *shorts, num_shorts ) ) - goto Fail; - - if ( FT_FRAME_ENTER( table_len ) ) - goto Fail; - - p = stream->cursor; - - { - TT_LongMetrics cur = *longs; - TT_LongMetrics limit = cur + num_longs; - - - for ( ; cur < limit; cur++ ) - { - cur->advance = FT_NEXT_USHORT( p ); - cur->bearing = FT_NEXT_SHORT( p ); - } - } - - /* do we have an inconsistent number of metric values? */ - { - TT_ShortMetrics* cur = *shorts; - TT_ShortMetrics* limit = cur + - FT_MIN( num_shorts, num_shorts_checked ); - - - for ( ; cur < limit; cur++ ) - *cur = FT_NEXT_SHORT( p ); - - /* We fill up the missing left side bearings with the */ - /* last valid value. Since this will occur for buggy CJK */ - /* fonts usually only, nothing serious will happen. */ - if ( num_shorts > num_shorts_checked && num_shorts_checked > 0 ) - { - FT_Short val = (*shorts)[num_shorts_checked - 1]; - - - limit = *shorts + num_shorts; - for ( ; cur < limit; cur++ ) - *cur = val; - } - } - - FT_FRAME_EXIT(); - - if ( vertical ) - face->vertical.number_Of_VMetrics = (FT_UShort)num_longs; - else - face->horizontal.number_Of_HMetrics = (FT_UShort)num_longs; - - Fail: - return error; - } - -#endif /* !FT_CONFIG_OPTION_OLD_INTERNALS */ - /*************************************************************************/ /* */ @@ -260,7 +115,7 @@ FT_Error error; TT_HoriHeader* header; - const FT_Frame_Field metrics_header_fields[] = + static const FT_Frame_Field metrics_header_fields[] = { #undef FT_STRUCTURE #define FT_STRUCTURE TT_HoriHeader @@ -328,24 +183,25 @@ /* tt_face_get_metrics */ /* */ /* <Description> */ - /* Returns the horizontal or vertical metrics in font units for a */ - /* given glyph. The metrics are the left side bearing (resp. top */ - /* side bearing) and advance width (resp. advance height). */ + /* Return the horizontal or vertical metrics in font units for a */ + /* given glyph. The values are the left side bearing (top side */ + /* bearing for vertical metrics) and advance width (advance height */ + /* for vertical metrics). */ /* */ /* <Input> */ - /* header :: A pointer to either the horizontal or vertical metrics */ - /* structure. */ + /* face :: A pointer to the TrueType face structure. */ + /* */ + /* vertical :: If set to TRUE, get vertical metrics. */ /* */ - /* idx :: The glyph index. */ + /* gindex :: The glyph index. */ /* */ /* <Output> */ - /* bearing :: The bearing, either left side or top side. */ + /* abearing :: The bearing, either left side or top side. */ /* */ - /* advance :: The advance width resp. advance height. */ + /* aadvance :: The advance width or advance height, depending on */ + /* the `vertical' flag. */ /* */ -#ifndef FT_CONFIG_OPTION_OLD_INTERNALS - - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) tt_face_get_metrics( TT_Face face, FT_Bool vertical, FT_UInt gindex, @@ -418,51 +274,7 @@ *abearing = 0; *aadvance = 0; } - - return SFNT_Err_Ok; } -#else /* !FT_CONFIG_OPTION_OLD_INTERNALS */ - - FT_LOCAL_DEF( FT_Error ) - tt_face_get_metrics( TT_Face face, - FT_Bool vertical, - FT_UInt gindex, - FT_Short* abearing, - FT_UShort* aadvance ) - { - void* v = &face->vertical; - void* h = &face->horizontal; - TT_HoriHeader* header = vertical ? (TT_HoriHeader*)v - : (TT_HoriHeader*)h; - TT_LongMetrics longs_m; - FT_UShort k = header->number_Of_HMetrics; - - - if ( k == 0 || - !header->long_metrics || - gindex >= (FT_UInt)face->max_profile.numGlyphs ) - { - *abearing = *aadvance = 0; - return SFNT_Err_Ok; - } - - if ( gindex < (FT_UInt)k ) - { - longs_m = (TT_LongMetrics)header->long_metrics + gindex; - *abearing = longs_m->bearing; - *aadvance = longs_m->advance; - } - else - { - *abearing = ((TT_ShortMetrics*)header->short_metrics)[gindex - k]; - *aadvance = ((TT_LongMetrics)header->long_metrics)[k - 1].advance; - } - - return SFNT_Err_Ok; - } - -#endif /* !FT_CONFIG_OPTION_OLD_INTERNALS */ - /* END */ diff --git a/src/sfnt/ttmtx.h b/src/sfnt/ttmtx.h index 8b91a11..fb04039 100644 --- a/src/sfnt/ttmtx.h +++ b/src/sfnt/ttmtx.h @@ -4,7 +4,7 @@ /* */ /* Load the metrics tables common to TTF and OTF fonts (specification). */ /* */ -/* Copyright 2006 by */ +/* Copyright 2006, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -40,7 +40,7 @@ FT_BEGIN_HEADER FT_Bool vertical ); - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) tt_face_get_metrics( TT_Face face, FT_Bool vertical, FT_UInt gindex, diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index 6f4bb1d..99d8005 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ /* Postcript name table processing for TrueType and OpenType fonts */ /* (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 1996-2003, 2006-2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -64,12 +64,12 @@ #define MAC_NAME( x ) ( (FT_String*)tt_post_default_names[x] ) - /* the 258 default Mac PS glyph names */ + /* the 258 default Mac PS glyph names; see file `tools/glnames.py' */ static const FT_String* const tt_post_default_names[258] = { /* 0 */ - ".notdef", ".null", "CR", "space", "exclam", + ".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", /* 10 */ "quotesingle", "parenleft", "parenright", "asterisk", "plus", @@ -120,7 +120,7 @@ "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", /* 170 */ - "guillemotright", "ellipsis", "nbspace", "Agrave", "Atilde", + "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", /* 180 */ "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", @@ -144,8 +144,8 @@ "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve", /* 250 */ - "Idot", "Scedilla", "scedilla", "Cacute", "cacute", - "Ccaron", "ccaron", "dmacron", + "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", + "Ccaron", "ccaron", "dcroat", }; @@ -178,7 +178,7 @@ if ( num_glyphs > face->max_profile.numGlyphs ) { - error = SFNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -284,7 +284,7 @@ table->glyph_indices = glyph_indices; table->glyph_names = name_strings; } - return SFNT_Err_Ok; + return FT_Err_Ok; Fail1: { @@ -325,7 +325,7 @@ /* check the number of glyphs */ if ( num_glyphs > face->max_profile.numGlyphs || num_glyphs > 258 ) { - error = SFNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -345,7 +345,7 @@ if ( idx < 0 || idx > num_glyphs ) { - error = SFNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } } @@ -360,7 +360,7 @@ table->offsets = offset_table; } - return SFNT_Err_Ok; + return FT_Err_Ok; Fail: FT_FREE( offset_table ); @@ -402,7 +402,7 @@ else if ( format == 0x00028000L ) error = load_format_25( face, stream, post_limit ); else - error = SFNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); face->postscript_names.loaded = 1; @@ -488,15 +488,15 @@ if ( !face ) - return SFNT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( idx >= (FT_UInt)face->max_profile.numGlyphs ) - return SFNT_Err_Invalid_Glyph_Index; + return FT_THROW( Invalid_Glyph_Index ); #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES psnames = (FT_Service_PsCMaps)face->psnames; if ( !psnames ) - return SFNT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); #endif names = &face->postscript_names; @@ -556,7 +556,7 @@ /* nothing to do for format == 0x00030000L */ End: - return SFNT_Err_Ok; + return FT_Err_Ok; } diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index 283ba7e..c2db96c 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -4,10 +4,12 @@ /* */ /* TrueType and OpenType embedded bitmap support (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ -/* 2010 by */ +/* Copyright 2005-2009, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ +/* Copyright 2013 by Google, Inc. */ +/* Google Author(s): Behdad Esfahbod. */ +/* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ @@ -16,29 +18,19 @@ /* */ /***************************************************************************/ -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_STREAM_H -#include FT_TRUETYPE_TAGS_H - - /* - * Alas, the memory-optimized sbit loader can't be used when implementing - * the `old internals' hack - */ -#ifndef FT_CONFIG_OPTION_OLD_INTERNALS - -#include "ttsbit0.c" - -#else /* FT_CONFIG_OPTION_OLD_INTERNALS */ #include <ft2build.h> #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_TRUETYPE_TAGS_H +#include FT_BITMAP_H #include "ttsbit.h" #include "sferrors.h" +#include "ttmtx.h" +#include "pngshim.h" + /*************************************************************************/ /* */ @@ -50,1398 +42,1352 @@ #define FT_COMPONENT trace_ttsbit - /*************************************************************************/ - /* */ - /* <Function> */ - /* blit_sbit */ - /* */ - /* <Description> */ - /* Blits a bitmap from an input stream into a given target. Supports */ - /* x and y offsets as well as byte padded lines. */ - /* */ - /* <Input> */ - /* target :: The target bitmap/pixmap. */ - /* */ - /* source :: The input packed bitmap data. */ - /* */ - /* line_bits :: The number of bits per line. */ - /* */ - /* byte_padded :: A flag which is true if lines are byte-padded. */ - /* */ - /* x_offset :: The horizontal offset. */ - /* */ - /* y_offset :: The vertical offset. */ - /* */ - /* <Note> */ - /* IMPORTANT: The x and y offsets are relative to the top corner of */ - /* the target bitmap (unlike the normal TrueType */ - /* convention). A positive y offset indicates a downwards */ - /* direction! */ - /* */ - static void - blit_sbit( FT_Bitmap* target, - FT_Byte* source, - FT_Int line_bits, - FT_Bool byte_padded, - FT_Int x_offset, - FT_Int y_offset, - FT_Int source_height ) + FT_LOCAL_DEF( FT_Error ) + tt_face_load_sbit( TT_Face face, + FT_Stream stream ) { - FT_Byte* line_buff; - FT_Int line_incr; - FT_Int height; + FT_Error error; + FT_ULong table_size; - FT_UShort acc; - FT_UInt loaded; + face->sbit_table = NULL; + face->sbit_table_size = 0; + face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE; + face->sbit_num_strikes = 0; - /* first of all, compute starting write position */ - line_incr = target->pitch; - line_buff = target->buffer; + error = face->goto_table( face, TTAG_CBLC, stream, &table_size ); + if ( !error ) + face->sbit_table_type = TT_SBIT_TABLE_TYPE_CBLC; + else + { + error = face->goto_table( face, TTAG_EBLC, stream, &table_size ); + if ( error ) + error = face->goto_table( face, TTAG_bloc, stream, &table_size ); + if ( !error ) + face->sbit_table_type = TT_SBIT_TABLE_TYPE_EBLC; + } + + if ( error ) + { + error = face->goto_table( face, TTAG_sbix, stream, &table_size ); + if ( !error ) + face->sbit_table_type = TT_SBIT_TABLE_TYPE_SBIX; + } + if ( error ) + goto Exit; - if ( line_incr < 0 ) - line_buff -= line_incr * ( target->rows - 1 ); + if ( table_size < 8 ) + { + FT_ERROR(( "tt_face_load_sbit_strikes: table too short\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } - line_buff += ( x_offset >> 3 ) + y_offset * line_incr; + switch ( (FT_UInt)face->sbit_table_type ) + { + case TT_SBIT_TABLE_TYPE_EBLC: + case TT_SBIT_TABLE_TYPE_CBLC: + { + FT_Byte* p; + FT_Fixed version; + FT_ULong num_strikes; + FT_UInt count; - /***********************************************************************/ - /* */ - /* We use the extra-classic `accumulator' trick to extract the bits */ - /* from the source byte stream. */ - /* */ - /* Namely, the variable `acc' is a 16-bit accumulator containing the */ - /* last `loaded' bits from the input stream. The bits are shifted to */ - /* the upmost position in `acc'. */ - /* */ - /***********************************************************************/ - acc = 0; /* clear accumulator */ - loaded = 0; /* no bits were loaded */ + if ( FT_FRAME_EXTRACT( table_size, face->sbit_table ) ) + goto Exit; - for ( height = source_height; height > 0; height-- ) - { - FT_Byte* cur = line_buff; /* current write cursor */ - FT_Int count = line_bits; /* # of bits to extract per line */ - FT_Byte shift = (FT_Byte)( x_offset & 7 ); /* current write shift */ - FT_Byte space = (FT_Byte)( 8 - shift ); + face->sbit_table_size = table_size; + p = face->sbit_table; - /* first of all, read individual source bytes */ - if ( count >= 8 ) - { - count -= 8; + version = FT_NEXT_ULONG( p ); + num_strikes = FT_NEXT_ULONG( p ); + + if ( ( version & 0xFFFF0000UL ) != 0x00020000UL ) { - do - { - FT_Byte val; - - - /* ensure that there are at least 8 bits in the accumulator */ - if ( loaded < 8 ) - { - acc |= (FT_UShort)((FT_UShort)*source++ << ( 8 - loaded )); - loaded += 8; - } - - /* now write one byte */ - val = (FT_Byte)( acc >> 8 ); - if ( shift ) - { - cur[0] |= (FT_Byte)( val >> shift ); - cur[1] |= (FT_Byte)( val << space ); - } - else - cur[0] |= val; - - cur++; - acc <<= 8; /* remove bits from accumulator */ - loaded -= 8; - count -= 8; - - } while ( count >= 0 ); + error = FT_THROW( Unknown_File_Format ); + goto Exit; + } + + if ( num_strikes >= 0x10000UL ) + { + error = FT_THROW( Invalid_File_Format ); + goto Exit; } - /* restore `count' to correct value */ - count += 8; + /* + * Count the number of strikes available in the table. We are a bit + * paranoid there and don't trust the data. + */ + count = (FT_UInt)num_strikes; + if ( 8 + 48UL * count > table_size ) + count = (FT_UInt)( ( table_size - 8 ) / 48 ); + + face->sbit_num_strikes = count; } + break; - /* now write remaining bits (count < 8) */ - if ( count > 0 ) + case TT_SBIT_TABLE_TYPE_SBIX: { - FT_Byte val; + FT_UShort version; + FT_UShort flags; + FT_ULong num_strikes; + FT_UInt count; + + + if ( FT_FRAME_ENTER( 8 ) ) + goto Exit; + version = FT_GET_USHORT(); + flags = FT_GET_USHORT(); + num_strikes = FT_GET_ULONG(); - /* ensure that there are at least `count' bits in the accumulator */ - if ( (FT_Int)loaded < count ) + FT_FRAME_EXIT(); + + if ( version < 1 ) { - acc |= (FT_UShort)((FT_UShort)*source++ << ( 8 - loaded )); - loaded += 8; + error = FT_THROW( Unknown_File_Format ); + goto Exit; } - /* now write remaining bits */ - val = (FT_Byte)( ( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ) ); - cur[0] |= (FT_Byte)( val >> shift ); + /* Bit 0 must always be `1'. */ + /* Bit 1 controls the overlay of bitmaps with outlines. */ + /* All other bits should be zero. */ + if ( !( flags == 1 || flags == 3 ) || + num_strikes >= 0x10000UL ) + { + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } - if ( count > space ) - cur[1] |= (FT_Byte)( val << space ); + /* we currently don't support bit 1; however, it is better to */ + /* draw at least something... */ + if ( flags == 3 ) + FT_TRACE1(( "tt_face_load_sbit_strikes:" + " sbix overlay not supported yet\n" + " " + " expect bad rendering results\n" )); + + /* + * Count the number of strikes available in the table. We are a bit + * paranoid there and don't trust the data. + */ + count = (FT_UInt)num_strikes; + if ( 8 + 4UL * count > table_size ) + count = (FT_UInt)( ( table_size - 8 ) / 4 ); + + if ( FT_STREAM_SEEK( FT_STREAM_POS() - 8 ) ) + goto Exit; - acc <<= count; - loaded -= count; - } + face->sbit_table_size = 8 + count * 4; + if ( FT_FRAME_EXTRACT( face->sbit_table_size, face->sbit_table ) ) + goto Exit; - /* now, skip to next line */ - if ( byte_padded ) - { - acc = 0; - loaded = 0; /* clear accumulator on byte-padded lines */ + face->sbit_num_strikes = count; } + break; - line_buff += line_incr; + default: + error = FT_THROW( Unknown_File_Format ); + break; } + + if ( !error ) + FT_TRACE3(( "sbit_num_strikes: %u\n", face->sbit_num_strikes )); + + return FT_Err_Ok; + + Exit: + if ( error ) + { + if ( face->sbit_table ) + FT_FRAME_RELEASE( face->sbit_table ); + face->sbit_table_size = 0; + face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE; + } + + return error; } - static const FT_Frame_Field sbit_metrics_fields[] = + FT_LOCAL_DEF( void ) + tt_face_free_sbit( TT_Face face ) { -#undef FT_STRUCTURE -#define FT_STRUCTURE TT_SBit_MetricsRec + FT_Stream stream = face->root.stream; - FT_FRAME_START( 8 ), - FT_FRAME_BYTE( height ), - FT_FRAME_BYTE( width ), - FT_FRAME_CHAR( horiBearingX ), - FT_FRAME_CHAR( horiBearingY ), - FT_FRAME_BYTE( horiAdvance ), + FT_FRAME_RELEASE( face->sbit_table ); + face->sbit_table_size = 0; + face->sbit_table_type = TT_SBIT_TABLE_TYPE_NONE; + face->sbit_num_strikes = 0; + } - FT_FRAME_CHAR( vertBearingX ), - FT_FRAME_CHAR( vertBearingY ), - FT_FRAME_BYTE( vertAdvance ), - FT_FRAME_END - }; + FT_LOCAL_DEF( FT_Error ) + tt_face_set_sbit_strike( TT_Face face, + FT_Size_Request req, + FT_ULong* astrike_index ) + { + return FT_Match_Size( (FT_Face)face, req, 0, astrike_index ); + } - /*************************************************************************/ - /* */ - /* <Function> */ - /* Load_SBit_Const_Metrics */ - /* */ - /* <Description> */ - /* Loads the metrics for `EBLC' index tables format 2 and 5. */ - /* */ - /* <Input> */ - /* range :: The target range. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - static FT_Error - Load_SBit_Const_Metrics( TT_SBit_Range range, - FT_Stream stream ) + + FT_LOCAL_DEF( FT_Error ) + tt_face_load_strike_metrics( TT_Face face, + FT_ULong strike_index, + FT_Size_Metrics* metrics ) { - FT_Error error; + if ( strike_index >= (FT_ULong)face->sbit_num_strikes ) + return FT_THROW( Invalid_Argument ); + switch ( (FT_UInt)face->sbit_table_type ) + { + case TT_SBIT_TABLE_TYPE_EBLC: + case TT_SBIT_TABLE_TYPE_CBLC: + { + FT_Byte* strike; - if ( FT_READ_ULONG( range->image_size ) ) - return error; - return FT_STREAM_READ_FIELDS( sbit_metrics_fields, &range->metrics ); + strike = face->sbit_table + 8 + strike_index * 48; + + metrics->x_ppem = (FT_UShort)strike[44]; + metrics->y_ppem = (FT_UShort)strike[45]; + + metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */ + metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */ + metrics->height = metrics->ascender - metrics->descender; + + /* Is this correct? */ + metrics->max_advance = ( (FT_Char)strike[22] + /* min_origin_SB */ + strike[18] + /* max_width */ + (FT_Char)strike[23] /* min_advance_SB */ + ) << 6; + return FT_Err_Ok; + } + + case TT_SBIT_TABLE_TYPE_SBIX: + { + FT_Stream stream = face->root.stream; + FT_UInt offset, upem; + FT_UShort ppem, resolution; + TT_HoriHeader *hori; + FT_ULong table_size; + + FT_Error error; + FT_Byte* p; + + + p = face->sbit_table + 8 + 4 * strike_index; + offset = FT_NEXT_ULONG( p ); + + error = face->goto_table( face, TTAG_sbix, stream, &table_size ); + if ( error ) + return error; + + if ( offset + 4 > table_size ) + return FT_THROW( Invalid_File_Format ); + + if ( FT_STREAM_SEEK( FT_STREAM_POS() + offset ) || + FT_FRAME_ENTER( 4 ) ) + return error; + + ppem = FT_GET_USHORT(); + resolution = FT_GET_USHORT(); + + FT_UNUSED( resolution ); /* What to do with this? */ + + FT_FRAME_EXIT(); + + upem = face->header.Units_Per_EM; + hori = &face->horizontal; + + metrics->x_ppem = ppem; + metrics->y_ppem = ppem; + + metrics->ascender = ppem * hori->Ascender * 64 / upem; + metrics->descender = ppem * hori->Descender * 64 / upem; + metrics->height = ppem * ( hori->Ascender - + hori->Descender + + hori->Line_Gap ) * 64 / upem; + metrics->max_advance = ppem * hori->advance_Width_Max * 64 / upem; + + return error; + } + + default: + return FT_THROW( Unknown_File_Format ); + } } - /*************************************************************************/ - /* */ - /* <Function> */ - /* Load_SBit_Range_Codes */ - /* */ - /* <Description> */ - /* Loads the range codes for `EBLC' index tables format 4 and 5. */ - /* */ - /* <Input> */ - /* range :: The target range. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* load_offsets :: A flag whether to load the glyph offset table. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ + typedef struct TT_SBitDecoderRec_ + { + TT_Face face; + FT_Stream stream; + FT_Bitmap* bitmap; + TT_SBit_Metrics metrics; + FT_Bool metrics_loaded; + FT_Bool bitmap_allocated; + FT_Byte bit_depth; + + FT_ULong ebdt_start; + FT_ULong ebdt_size; + + FT_ULong strike_index_array; + FT_ULong strike_index_count; + FT_Byte* eblc_base; + FT_Byte* eblc_limit; + + } TT_SBitDecoderRec, *TT_SBitDecoder; + + static FT_Error - Load_SBit_Range_Codes( TT_SBit_Range range, - FT_Stream stream, - FT_Bool load_offsets ) + tt_sbit_decoder_init( TT_SBitDecoder decoder, + TT_Face face, + FT_ULong strike_index, + TT_SBit_MetricsRec* metrics ) { FT_Error error; - FT_ULong count, n, size; - FT_Memory memory = stream->memory; + FT_Stream stream = face->root.stream; + FT_ULong ebdt_size; - if ( FT_READ_ULONG( count ) ) + error = face->goto_table( face, TTAG_CBDT, stream, &ebdt_size ); + if ( error ) + error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size ); + if ( error ) + error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size ); + if ( error ) goto Exit; - range->num_glyphs = count; + decoder->face = face; + decoder->stream = stream; + decoder->bitmap = &face->root.glyph->bitmap; + decoder->metrics = metrics; - /* Allocate glyph offsets table if needed */ - if ( load_offsets ) - { - if ( FT_NEW_ARRAY( range->glyph_offsets, count ) ) - goto Exit; + decoder->metrics_loaded = 0; + decoder->bitmap_allocated = 0; - size = count * 4L; - } - else - size = count * 2L; + decoder->ebdt_start = FT_STREAM_POS(); + decoder->ebdt_size = ebdt_size; - /* Allocate glyph codes table and access frame */ - if ( FT_NEW_ARRAY ( range->glyph_codes, count ) || - FT_FRAME_ENTER( size ) ) - goto Exit; + decoder->eblc_base = face->sbit_table; + decoder->eblc_limit = face->sbit_table + face->sbit_table_size; - for ( n = 0; n < count; n++ ) + /* now find the strike corresponding to the index */ { - range->glyph_codes[n] = FT_GET_USHORT(); + FT_Byte* p; - if ( load_offsets ) - range->glyph_offsets[n] = (FT_ULong)range->image_offset + - FT_GET_USHORT(); - } - FT_FRAME_EXIT(); + if ( 8 + 48 * strike_index + 3 * 4 + 34 + 1 > face->sbit_table_size ) + { + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } + + p = decoder->eblc_base + 8 + 48 * strike_index; + + decoder->strike_index_array = FT_NEXT_ULONG( p ); + p += 4; + decoder->strike_index_count = FT_NEXT_ULONG( p ); + p += 34; + decoder->bit_depth = *p; + + /* decoder->strike_index_array + */ + /* 8 * decoder->strike_index_count > face->sbit_table_size ? */ + if ( decoder->strike_index_array > face->sbit_table_size || + decoder->strike_index_count > + ( face->sbit_table_size - decoder->strike_index_array ) / 8 ) + error = FT_THROW( Invalid_File_Format ); + } Exit: return error; } - /*************************************************************************/ - /* */ - /* <Function> */ - /* Load_SBit_Range */ - /* */ - /* <Description> */ - /* Loads a given `EBLC' index/range table. */ - /* */ - /* <Input> */ - /* range :: The target range. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - static FT_Error - Load_SBit_Range( TT_SBit_Range range, - FT_Stream stream ) + static void + tt_sbit_decoder_done( TT_SBitDecoder decoder ) { - FT_Error error; - FT_Memory memory = stream->memory; - - - switch( range->index_format ) - { - case 1: /* variable metrics with 4-byte offsets */ - case 3: /* variable metrics with 2-byte offsets */ - { - FT_ULong num_glyphs, n; - FT_Int size_elem; - FT_Bool large = FT_BOOL( range->index_format == 1 ); + FT_UNUSED( decoder ); + } + static FT_Error + tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder decoder ) + { + FT_Error error = FT_Err_Ok; + FT_UInt width, height; + FT_Bitmap* map = decoder->bitmap; + FT_Long size; - if ( range->last_glyph < range->first_glyph ) - { - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - num_glyphs = range->last_glyph - range->first_glyph + 1L; - range->num_glyphs = num_glyphs; - num_glyphs++; /* XXX: BEWARE - see spec */ + if ( !decoder->metrics_loaded ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } - size_elem = large ? 4 : 2; + width = decoder->metrics->width; + height = decoder->metrics->height; - if ( FT_NEW_ARRAY( range->glyph_offsets, num_glyphs ) || - FT_FRAME_ENTER( num_glyphs * size_elem ) ) - goto Exit; + map->width = (int)width; + map->rows = (int)height; - for ( n = 0; n < num_glyphs; n++ ) - range->glyph_offsets[n] = (FT_ULong)( range->image_offset + - ( large ? FT_GET_ULONG() - : FT_GET_USHORT() ) ); - FT_FRAME_EXIT(); - } + switch ( decoder->bit_depth ) + { + case 1: + map->pixel_mode = FT_PIXEL_MODE_MONO; + map->pitch = ( map->width + 7 ) >> 3; + map->num_grays = 2; break; - case 2: /* all glyphs have identical metrics */ - error = Load_SBit_Const_Metrics( range, stream ); + case 2: + map->pixel_mode = FT_PIXEL_MODE_GRAY2; + map->pitch = ( map->width + 3 ) >> 2; + map->num_grays = 4; break; case 4: - error = Load_SBit_Range_Codes( range, stream, 1 ); + map->pixel_mode = FT_PIXEL_MODE_GRAY4; + map->pitch = ( map->width + 1 ) >> 1; + map->num_grays = 16; break; - case 5: - error = Load_SBit_Const_Metrics( range, stream ); - if ( !error ) - error = Load_SBit_Range_Codes( range, stream, 0 ); + case 8: + map->pixel_mode = FT_PIXEL_MODE_GRAY; + map->pitch = map->width; + map->num_grays = 256; + break; + + case 32: + map->pixel_mode = FT_PIXEL_MODE_BGRA; + map->pitch = map->width * 4; + map->num_grays = 256; break; default: - error = SFNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); + goto Exit; } + size = map->rows * map->pitch; + + /* check that there is no empty image */ + if ( size == 0 ) + goto Exit; /* exit successfully! */ + + error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size ); + if ( error ) + goto Exit; + + decoder->bitmap_allocated = 1; + Exit: return error; } - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_face_load_eblc */ - /* */ - /* <Description> */ - /* Loads the table of embedded bitmap sizes for this face. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - tt_face_load_eblc( TT_Face face, - FT_Stream stream ) + static FT_Error + tt_sbit_decoder_load_metrics( TT_SBitDecoder decoder, + FT_Byte* *pp, + FT_Byte* limit, + FT_Bool big ) { - FT_Error error = SFNT_Err_Ok; - FT_Memory memory = stream->memory; - FT_Fixed version; - FT_ULong num_strikes; - FT_ULong table_base; + FT_Byte* p = *pp; + TT_SBit_Metrics metrics = decoder->metrics; - static const FT_Frame_Field sbit_line_metrics_fields[] = - { -#undef FT_STRUCTURE -#define FT_STRUCTURE TT_SBit_LineMetricsRec - - /* no FT_FRAME_START */ - FT_FRAME_CHAR( ascender ), - FT_FRAME_CHAR( descender ), - FT_FRAME_BYTE( max_width ), - - FT_FRAME_CHAR( caret_slope_numerator ), - FT_FRAME_CHAR( caret_slope_denominator ), - FT_FRAME_CHAR( caret_offset ), - - FT_FRAME_CHAR( min_origin_SB ), - FT_FRAME_CHAR( min_advance_SB ), - FT_FRAME_CHAR( max_before_BL ), - FT_FRAME_CHAR( min_after_BL ), - FT_FRAME_CHAR( pads[0] ), - FT_FRAME_CHAR( pads[1] ), - FT_FRAME_END - }; - - static const FT_Frame_Field strike_start_fields[] = - { -#undef FT_STRUCTURE -#define FT_STRUCTURE TT_SBit_StrikeRec - - /* no FT_FRAME_START */ - FT_FRAME_ULONG( ranges_offset ), - FT_FRAME_SKIP_LONG, - FT_FRAME_ULONG( num_ranges ), - FT_FRAME_ULONG( color_ref ), - FT_FRAME_END - }; - - static const FT_Frame_Field strike_end_fields[] = - { - /* no FT_FRAME_START */ - FT_FRAME_USHORT( start_glyph ), - FT_FRAME_USHORT( end_glyph ), - FT_FRAME_BYTE ( x_ppem ), - FT_FRAME_BYTE ( y_ppem ), - FT_FRAME_BYTE ( bit_depth ), - FT_FRAME_CHAR ( flags ), - FT_FRAME_END - }; + if ( p + 5 > limit ) + goto Fail; - face->num_sbit_strikes = 0; + metrics->height = p[0]; + metrics->width = p[1]; + metrics->horiBearingX = (FT_Char)p[2]; + metrics->horiBearingY = (FT_Char)p[3]; + metrics->horiAdvance = p[4]; - /* this table is optional */ - error = face->goto_table( face, TTAG_EBLC, stream, 0 ); - if ( error ) - error = face->goto_table( face, TTAG_bloc, stream, 0 ); - if ( error ) - goto Exit; + p += 5; + if ( big ) + { + if ( p + 3 > limit ) + goto Fail; - table_base = FT_STREAM_POS(); - if ( FT_FRAME_ENTER( 8L ) ) - goto Exit; + metrics->vertBearingX = (FT_Char)p[0]; + metrics->vertBearingY = (FT_Char)p[1]; + metrics->vertAdvance = p[2]; + + p += 3; + } + else + { + /* avoid uninitialized data in case there is no vertical info -- */ + metrics->vertBearingX = 0; + metrics->vertBearingY = 0; + metrics->vertAdvance = 0; + } - version = FT_GET_LONG(); - num_strikes = FT_GET_ULONG(); + decoder->metrics_loaded = 1; + *pp = p; + return FT_Err_Ok; - FT_FRAME_EXIT(); + Fail: + FT_TRACE1(( "tt_sbit_decoder_load_metrics: broken table\n" )); + return FT_THROW( Invalid_Argument ); + } - /* check version number and strike count */ - if ( version != 0x00020000L || - num_strikes >= 0x10000L ) - { - FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version\n" )); - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } + /* forward declaration */ + static FT_Error + tt_sbit_decoder_load_image( TT_SBitDecoder decoder, + FT_UInt glyph_index, + FT_Int x_pos, + FT_Int y_pos ); - /* allocate the strikes table */ - if ( FT_NEW_ARRAY( face->sbit_strikes, num_strikes ) ) - goto Exit; + typedef FT_Error (*TT_SBitDecoder_LoadFunc)( TT_SBitDecoder decoder, + FT_Byte* p, + FT_Byte* plimit, + FT_Int x_pos, + FT_Int y_pos ); - face->num_sbit_strikes = num_strikes; - /* now read each strike table separately */ - { - TT_SBit_Strike strike = face->sbit_strikes; - FT_ULong count = num_strikes; + static FT_Error + tt_sbit_decoder_load_byte_aligned( TT_SBitDecoder decoder, + FT_Byte* p, + FT_Byte* limit, + FT_Int x_pos, + FT_Int y_pos ) + { + FT_Error error = FT_Err_Ok; + FT_Byte* line; + FT_Int bit_height, bit_width, pitch, width, height, line_bits, h; + FT_Bitmap* bitmap; - if ( FT_FRAME_ENTER( 48L * num_strikes ) ) - goto Exit; + /* check that we can write the glyph into the bitmap */ + bitmap = decoder->bitmap; + bit_width = bitmap->width; + bit_height = bitmap->rows; + pitch = bitmap->pitch; + line = bitmap->buffer; - while ( count > 0 ) - { - if ( FT_STREAM_READ_FIELDS( strike_start_fields, strike ) || - FT_STREAM_READ_FIELDS( sbit_line_metrics_fields, &strike->hori ) || - FT_STREAM_READ_FIELDS( sbit_line_metrics_fields, &strike->vert ) || - FT_STREAM_READ_FIELDS( strike_end_fields, strike ) ) - break; - - count--; - strike++; - } + width = decoder->metrics->width; + height = decoder->metrics->height; - FT_FRAME_EXIT(); + line_bits = width * decoder->bit_depth; + + if ( x_pos < 0 || x_pos + width > bit_width || + y_pos < 0 || y_pos + height > bit_height ) + { + FT_TRACE1(( "tt_sbit_decoder_load_byte_aligned:" + " invalid bitmap dimensions\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; } - /* allocate the index ranges for each strike table */ + if ( p + ( ( line_bits + 7 ) >> 3 ) * height > limit ) { - TT_SBit_Strike strike = face->sbit_strikes; - FT_ULong count = num_strikes; + FT_TRACE1(( "tt_sbit_decoder_load_byte_aligned: broken bitmap\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } + /* now do the blit */ + line += y_pos * pitch + ( x_pos >> 3 ); + x_pos &= 7; - while ( count > 0 ) + if ( x_pos == 0 ) /* the easy one */ + { + for ( h = height; h > 0; h--, line += pitch ) { - TT_SBit_Range range; - FT_ULong count2 = strike->num_ranges; + FT_Byte* pwrite = line; + FT_Int w; - /* read each range */ - if ( FT_STREAM_SEEK( table_base + strike->ranges_offset ) || - FT_FRAME_ENTER( strike->num_ranges * 8L ) ) - goto Exit; - - if ( FT_NEW_ARRAY( strike->sbit_ranges, strike->num_ranges ) ) - goto Exit; - - range = strike->sbit_ranges; - while ( count2 > 0 ) + for ( w = line_bits; w >= 8; w -= 8 ) { - range->first_glyph = FT_GET_USHORT(); - range->last_glyph = FT_GET_USHORT(); - range->table_offset = table_base + strike->ranges_offset + - FT_GET_ULONG(); - count2--; - range++; + pwrite[0] = (FT_Byte)( pwrite[0] | *p++ ); + pwrite += 1; } - FT_FRAME_EXIT(); + if ( w > 0 ) + pwrite[0] = (FT_Byte)( pwrite[0] | ( *p++ & ( 0xFF00U >> w ) ) ); + } + } + else /* x_pos > 0 */ + { + for ( h = height; h > 0; h--, line += pitch ) + { + FT_Byte* pwrite = line; + FT_Int w; + FT_UInt wval = 0; + - /* Now, read each index table */ - count2 = strike->num_ranges; - range = strike->sbit_ranges; - while ( count2 > 0 ) + for ( w = line_bits; w >= 8; w -= 8 ) { - /* Read the header */ - if ( FT_STREAM_SEEK( range->table_offset ) || - FT_FRAME_ENTER( 8L ) ) - goto Exit; + wval = (FT_UInt)( wval | *p++ ); + pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) ); + pwrite += 1; + wval <<= 8; + } - range->index_format = FT_GET_USHORT(); - range->image_format = FT_GET_USHORT(); - range->image_offset = FT_GET_ULONG(); + if ( w > 0 ) + wval = (FT_UInt)( wval | ( *p++ & ( 0xFF00U >> w ) ) ); - FT_FRAME_EXIT(); + /* all bits read and there are `x_pos + w' bits to be written */ - error = Load_SBit_Range( range, stream ); - if ( error ) - goto Exit; + pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) ); - count2--; - range++; + if ( x_pos + w > 8 ) + { + pwrite++; + wval <<= 8; + pwrite[0] = (FT_Byte)( pwrite[0] | ( wval >> x_pos ) ); } - - count--; - strike++; } } Exit: + if ( !error ) + FT_TRACE3(( "tt_sbit_decoder_load_byte_aligned: loaded\n" )); return error; } - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_face_free_eblc */ - /* */ - /* <Description> */ - /* Releases the embedded bitmap tables. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - FT_LOCAL_DEF( void ) - tt_face_free_eblc( TT_Face face ) - { - FT_Memory memory = face->root.memory; - TT_SBit_Strike strike = face->sbit_strikes; - TT_SBit_Strike strike_limit = strike + face->num_sbit_strikes; - - - if ( strike ) - { - for ( ; strike < strike_limit; strike++ ) - { - TT_SBit_Range range = strike->sbit_ranges; - TT_SBit_Range range_limit = range + strike->num_ranges; - - - if ( range ) - { - for ( ; range < range_limit; range++ ) - { - /* release the glyph offsets and codes tables */ - /* where appropriate */ - FT_FREE( range->glyph_offsets ); - FT_FREE( range->glyph_codes ); - } - } - FT_FREE( strike->sbit_ranges ); - strike->num_ranges = 0; - } - FT_FREE( face->sbit_strikes ); - } - face->num_sbit_strikes = 0; - } - + /* + * Load a bit-aligned bitmap (with pointer `p') into a line-aligned bitmap + * (with pointer `pwrite'). In the example below, the width is 3 pixel, + * and `x_pos' is 1 pixel. + * + * p p+1 + * | | | + * | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |... + * | | | + * +-------+ +-------+ +-------+ ... + * . . . + * . . . + * v . . + * +-------+ . . + * | | . + * | 7 6 5 4 3 2 1 0 | . + * | | . + * pwrite . . + * . . + * v . + * +-------+ . + * | | + * | 7 6 5 4 3 2 1 0 | + * | | + * pwrite+1 . + * . + * v + * +-------+ + * | | + * | 7 6 5 4 3 2 1 0 | + * | | + * pwrite+2 + * + */ - FT_LOCAL_DEF( FT_Error ) - tt_face_set_sbit_strike( TT_Face face, - FT_Size_Request req, - FT_ULong* astrike_index ) + static FT_Error + tt_sbit_decoder_load_bit_aligned( TT_SBitDecoder decoder, + FT_Byte* p, + FT_Byte* limit, + FT_Int x_pos, + FT_Int y_pos ) { - return FT_Match_Size( (FT_Face)face, req, 0, astrike_index ); - } + FT_Error error = FT_Err_Ok; + FT_Byte* line; + FT_Int bit_height, bit_width, pitch, width, height, line_bits, h, nbits; + FT_Bitmap* bitmap; + FT_UShort rval; - FT_LOCAL_DEF( FT_Error ) - tt_face_load_strike_metrics( TT_Face face, - FT_ULong strike_index, - FT_Size_Metrics* metrics ) - { - TT_SBit_Strike strike; + /* check that we can write the glyph into the bitmap */ + bitmap = decoder->bitmap; + bit_width = bitmap->width; + bit_height = bitmap->rows; + pitch = bitmap->pitch; + line = bitmap->buffer; + width = decoder->metrics->width; + height = decoder->metrics->height; - if ( strike_index >= face->num_sbit_strikes ) - return SFNT_Err_Invalid_Argument; + line_bits = width * decoder->bit_depth; - strike = face->sbit_strikes + strike_index; + if ( x_pos < 0 || x_pos + width > bit_width || + y_pos < 0 || y_pos + height > bit_height ) + { + FT_TRACE1(( "tt_sbit_decoder_load_bit_aligned:" + " invalid bitmap dimensions\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } - metrics->x_ppem = strike->x_ppem; - metrics->y_ppem = strike->y_ppem; + if ( p + ( ( line_bits * height + 7 ) >> 3 ) > limit ) + { + FT_TRACE1(( "tt_sbit_decoder_load_bit_aligned: broken bitmap\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } - metrics->ascender = strike->hori.ascender << 6; - metrics->descender = strike->hori.descender << 6; + /* now do the blit */ - /* XXX: Is this correct? */ - metrics->max_advance = ( strike->hori.min_origin_SB + - strike->hori.max_width + - strike->hori.min_advance_SB ) << 6; + /* adjust `line' to point to the first byte of the bitmap */ + line += y_pos * pitch + ( x_pos >> 3 ); + x_pos &= 7; - metrics->height = metrics->ascender - metrics->descender; + /* the higher byte of `rval' is used as a buffer */ + rval = 0; + nbits = 0; - return SFNT_Err_Ok; - } + for ( h = height; h > 0; h--, line += pitch ) + { + FT_Byte* pwrite = line; + FT_Int w = line_bits; - /*************************************************************************/ - /* */ - /* <Function> */ - /* find_sbit_range */ - /* */ - /* <Description> */ - /* Scans a given strike's ranges and return, for a given glyph */ - /* index, the corresponding sbit range, and `EBDT' offset. */ - /* */ - /* <Input> */ - /* glyph_index :: The glyph index. */ - /* */ - /* strike :: The source/current sbit strike. */ - /* */ - /* <Output> */ - /* arange :: The sbit range containing the glyph index. */ - /* */ - /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means the glyph index was found. */ - /* */ - static FT_Error - find_sbit_range( FT_UInt glyph_index, - TT_SBit_Strike strike, - TT_SBit_Range *arange, - FT_ULong *aglyph_offset ) - { - TT_SBit_RangeRec *range, *range_limit; + /* handle initial byte (in target bitmap) specially if necessary */ + if ( x_pos ) + { + w = ( line_bits < 8 - x_pos ) ? line_bits : 8 - x_pos; + if ( h == height ) + { + rval = *p++; + nbits = x_pos; + } + else if ( nbits < w ) + { + if ( p < limit ) + rval |= *p++; + nbits += 8 - w; + } + else + { + rval >>= 8; + nbits -= w; + } - /* check whether the glyph index is within this strike's */ - /* glyph range */ - if ( glyph_index < (FT_UInt)strike->start_glyph || - glyph_index > (FT_UInt)strike->end_glyph ) - goto Fail; + *pwrite++ |= ( ( rval >> nbits ) & 0xFF ) & + ( ~( 0xFF << w ) << ( 8 - w - x_pos ) ); + rval <<= 8; - /* scan all ranges in strike */ - range = strike->sbit_ranges; - range_limit = range + strike->num_ranges; - if ( !range ) - goto Fail; + w = line_bits - w; + } - for ( ; range < range_limit; range++ ) - { - if ( glyph_index >= (FT_UInt)range->first_glyph && - glyph_index <= (FT_UInt)range->last_glyph ) + /* handle medial bytes */ + for ( ; w >= 8; w -= 8 ) { - FT_UShort delta = (FT_UShort)( glyph_index - range->first_glyph ); + rval |= *p++; + *pwrite++ |= ( rval >> nbits ) & 0xFF; + rval <<= 8; + } - switch ( range->index_format ) + /* handle final byte if necessary */ + if ( w > 0 ) + { + if ( nbits < w ) { - case 1: - case 3: - *aglyph_offset = range->glyph_offsets[delta]; - break; - - case 2: - *aglyph_offset = range->image_offset + - range->image_size * delta; - break; - - case 4: - case 5: - { - FT_ULong n; - - - for ( n = 0; n < range->num_glyphs; n++ ) - { - if ( (FT_UInt)range->glyph_codes[n] == glyph_index ) - { - if ( range->index_format == 4 ) - *aglyph_offset = range->glyph_offsets[n]; - else - *aglyph_offset = range->image_offset + - n * range->image_size; - goto Found; - } - } - } + if ( p < limit ) + rval |= *p++; + *pwrite |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w ); + nbits += 8 - w; - /* fall-through */ - default: - goto Fail; + rval <<= 8; + } + else + { + *pwrite |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w ); + nbits -= w; } - - Found: - /* return successfully! */ - *arange = range; - return SFNT_Err_Ok; } } - Fail: - *arange = 0; - *aglyph_offset = 0; - - return SFNT_Err_Invalid_Argument; + Exit: + if ( !error ) + FT_TRACE3(( "tt_sbit_decoder_load_bit_aligned: loaded\n" )); + return error; } - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_find_sbit_image */ - /* */ - /* <Description> */ - /* Checks whether an embedded bitmap (an `sbit') exists for a given */ - /* glyph, at a given strike. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* glyph_index :: The glyph index. */ - /* */ - /* strike_index :: The current strike index. */ - /* */ - /* <Output> */ - /* arange :: The SBit range containing the glyph index. */ - /* */ - /* astrike :: The SBit strike containing the glyph index. */ - /* */ - /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns */ - /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */ - /* glyph. */ - /* */ - FT_LOCAL( FT_Error ) - tt_find_sbit_image( TT_Face face, - FT_UInt glyph_index, - FT_ULong strike_index, - TT_SBit_Range *arange, - TT_SBit_Strike *astrike, - FT_ULong *aglyph_offset ) + static FT_Error + tt_sbit_decoder_load_compound( TT_SBitDecoder decoder, + FT_Byte* p, + FT_Byte* limit, + FT_Int x_pos, + FT_Int y_pos ) { - FT_Error error; - TT_SBit_Strike strike; + FT_Error error = FT_Err_Ok; + FT_UInt num_components, nn; + + FT_Char horiBearingX = (FT_Char)decoder->metrics->horiBearingX; + FT_Char horiBearingY = (FT_Char)decoder->metrics->horiBearingY; + FT_Byte horiAdvance = (FT_Byte)decoder->metrics->horiAdvance; + FT_Char vertBearingX = (FT_Char)decoder->metrics->vertBearingX; + FT_Char vertBearingY = (FT_Char)decoder->metrics->vertBearingY; + FT_Byte vertAdvance = (FT_Byte)decoder->metrics->vertAdvance; - if ( !face->sbit_strikes || - ( face->num_sbit_strikes <= strike_index ) ) + if ( p + 2 > limit ) + goto Fail; + + num_components = FT_NEXT_USHORT( p ); + if ( p + 4 * num_components > limit ) + { + FT_TRACE1(( "tt_sbit_decoder_load_compound: broken table\n" )); goto Fail; + } + + FT_TRACE3(( "tt_sbit_decoder_load_compound: loading %d components\n", + num_components )); + + for ( nn = 0; nn < num_components; nn++ ) + { + FT_UInt gindex = FT_NEXT_USHORT( p ); + FT_Byte dx = FT_NEXT_BYTE( p ); + FT_Byte dy = FT_NEXT_BYTE( p ); + - strike = &face->sbit_strikes[strike_index]; + /* NB: a recursive call */ + error = tt_sbit_decoder_load_image( decoder, gindex, + x_pos + dx, y_pos + dy ); + if ( error ) + break; + } - error = find_sbit_range( glyph_index, strike, - arange, aglyph_offset ); - if ( error ) - goto Fail; + FT_TRACE3(( "tt_sbit_decoder_load_compound: done\n" )); - *astrike = strike; + decoder->metrics->horiBearingX = horiBearingX; + decoder->metrics->horiBearingY = horiBearingY; + decoder->metrics->horiAdvance = horiAdvance; + decoder->metrics->vertBearingX = vertBearingX; + decoder->metrics->vertBearingY = vertBearingY; + decoder->metrics->vertAdvance = vertAdvance; + decoder->metrics->width = (FT_Byte)decoder->bitmap->width; + decoder->metrics->height = (FT_Byte)decoder->bitmap->rows; - return SFNT_Err_Ok; + Exit: + return error; Fail: - /* no embedded bitmap for this glyph in face */ - *arange = 0; - *astrike = 0; - *aglyph_offset = 0; - - return SFNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_File_Format ); + goto Exit; } - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_load_sbit_metrics */ - /* */ - /* <Description> */ - /* Gets the big metrics for a given SBit. */ - /* */ - /* <Input> */ - /* stream :: The input stream. */ - /* */ - /* range :: The SBit range containing the glyph. */ - /* */ - /* <Output> */ - /* big_metrics :: A big SBit metrics structure for the glyph. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. */ - /* */ - /* <Note> */ - /* The stream cursor must be positioned at the glyph's offset within */ - /* the `EBDT' table before the call. */ - /* */ - /* If the image format uses variable metrics, the stream cursor is */ - /* positioned just after the metrics header in the `EBDT' table on */ - /* function exit. */ - /* */ - FT_LOCAL( FT_Error ) - tt_load_sbit_metrics( FT_Stream stream, - TT_SBit_Range range, - TT_SBit_Metrics metrics ) +#ifdef FT_CONFIG_OPTION_USE_PNG + + static FT_Error + tt_sbit_decoder_load_png( TT_SBitDecoder decoder, + FT_Byte* p, + FT_Byte* limit, + FT_Int x_pos, + FT_Int y_pos ) { - FT_Error error = SFNT_Err_Ok; + FT_Error error = FT_Err_Ok; + FT_ULong png_len; - switch ( range->image_format ) + if ( limit - p < 4 ) { - case 1: - case 2: - case 8: - /* variable small metrics */ - { - TT_SBit_SmallMetricsRec smetrics; + FT_TRACE1(( "tt_sbit_decoder_load_png: broken bitmap\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } - static const FT_Frame_Field sbit_small_metrics_fields[] = - { -#undef FT_STRUCTURE -#define FT_STRUCTURE TT_SBit_SmallMetricsRec + png_len = FT_NEXT_ULONG( p ); + if ( (FT_ULong)( limit - p ) < png_len ) + { + FT_TRACE1(( "tt_sbit_decoder_load_png: broken bitmap\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } + + error = Load_SBit_Png( decoder->face->root.glyph, + x_pos, + y_pos, + decoder->bit_depth, + decoder->metrics, + decoder->stream->memory, + p, + png_len, + FALSE ); + + Exit: + if ( !error ) + FT_TRACE3(( "tt_sbit_decoder_load_png: loaded\n" )); + return error; + } - FT_FRAME_START( 5 ), - FT_FRAME_BYTE( height ), - FT_FRAME_BYTE( width ), - FT_FRAME_CHAR( bearingX ), - FT_FRAME_CHAR( bearingY ), - FT_FRAME_BYTE( advance ), - FT_FRAME_END - }; +#endif /* FT_CONFIG_OPTION_USE_PNG */ - /* read small metrics */ - if ( FT_STREAM_READ_FIELDS( sbit_small_metrics_fields, &smetrics ) ) - goto Exit; + static FT_Error + tt_sbit_decoder_load_bitmap( TT_SBitDecoder decoder, + FT_UInt glyph_format, + FT_ULong glyph_start, + FT_ULong glyph_size, + FT_Int x_pos, + FT_Int y_pos ) + { + FT_Error error; + FT_Stream stream = decoder->stream; + FT_Byte* p; + FT_Byte* p_limit; + FT_Byte* data; - /* convert it to a big metrics */ - metrics->height = smetrics.height; - metrics->width = smetrics.width; - metrics->horiBearingX = smetrics.bearingX; - metrics->horiBearingY = smetrics.bearingY; - metrics->horiAdvance = smetrics.advance; - - /* these metrics are made up at a higher level when */ - /* needed. */ - metrics->vertBearingX = 0; - metrics->vertBearingY = 0; - metrics->vertAdvance = 0; - } + + /* seek into the EBDT table now */ + if ( glyph_start + glyph_size > decoder->ebdt_size ) + { + error = FT_THROW( Invalid_Argument ); + goto Exit; + } + + if ( FT_STREAM_SEEK( decoder->ebdt_start + glyph_start ) || + FT_FRAME_EXTRACT( glyph_size, data ) ) + goto Exit; + + p = data; + p_limit = p + glyph_size; + + /* read the data, depending on the glyph format */ + switch ( glyph_format ) + { + case 1: + case 2: + case 8: + case 17: + error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 0 ); break; case 6: case 7: case 9: - /* variable big metrics */ - if ( FT_STREAM_READ_FIELDS( sbit_metrics_fields, metrics ) ) - goto Exit; + case 18: + error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ); break; - case 5: - default: /* constant metrics */ - if ( range->index_format == 2 || range->index_format == 5 ) - *metrics = range->metrics; - else - return SFNT_Err_Invalid_File_Format; - } - - Exit: - return error; - } + default: + error = FT_Err_Ok; + } + if ( error ) + goto Fail; - /*************************************************************************/ - /* */ - /* <Function> */ - /* crop_bitmap */ - /* */ - /* <Description> */ - /* Crops a bitmap to its tightest bounding box, and adjusts its */ - /* metrics. */ - /* */ - /* <InOut> */ - /* map :: The bitmap. */ - /* */ - /* metrics :: The corresponding metrics structure. */ - /* */ - static void - crop_bitmap( FT_Bitmap* map, - TT_SBit_Metrics metrics ) - { - /***********************************************************************/ - /* */ - /* In this situation, some bounding boxes of embedded bitmaps are too */ - /* large. We need to crop it to a reasonable size. */ - /* */ - /* --------- */ - /* | | ----- */ - /* | *** | |***| */ - /* | * | | * | */ - /* | * | ------> | * | */ - /* | * | | * | */ - /* | * | | * | */ - /* | *** | |***| */ - /* --------- ----- */ - /* */ - /***********************************************************************/ - - FT_Int rows, count; - FT_Long line_len; - FT_Byte* line; - - - /***********************************************************************/ - /* */ - /* first of all, check the top-most lines of the bitmap, and remove */ - /* them if they're empty. */ - /* */ { - line = (FT_Byte*)map->buffer; - rows = map->rows; - line_len = map->pitch; + TT_SBitDecoder_LoadFunc loader; - for ( count = 0; count < rows; count++ ) + switch ( glyph_format ) { - FT_Byte* cur = line; - FT_Byte* limit = line + line_len; + case 1: + case 6: + loader = tt_sbit_decoder_load_byte_aligned; + break; + case 2: + case 7: + { + /* Don't trust `glyph_format'. For example, Apple's main Korean */ + /* system font, `AppleMyungJo.ttf' (version 7.0d2e6), uses glyph */ + /* format 7, but the data is format 6. We check whether we have */ + /* an excessive number of bytes in the image: If it is equal to */ + /* the value for a byte-aligned glyph, use the other loading */ + /* routine. */ + /* */ + /* Note that for some (width,height) combinations, where the */ + /* width is not a multiple of 8, the sizes for bit- and */ + /* byte-aligned data are equal, for example (7,7) or (15,6). We */ + /* then prefer what `glyph_format' specifies. */ + + FT_UInt width = decoder->metrics->width; + FT_UInt height = decoder->metrics->height; + + FT_UInt bit_size = ( width * height + 7 ) >> 3; + FT_UInt byte_size = height * ( ( width + 7 ) >> 3 ); + + + if ( bit_size < byte_size && + byte_size == (FT_UInt)( p_limit - p ) ) + loader = tt_sbit_decoder_load_byte_aligned; + else + loader = tt_sbit_decoder_load_bit_aligned; + } + break; - for ( ; cur < limit; cur++ ) - if ( cur[0] ) - goto Found_Top; + case 5: + loader = tt_sbit_decoder_load_bit_aligned; + break; - /* the current line was empty - skip to next one */ - line = limit; - } + case 8: + if ( p + 1 > p_limit ) + goto Fail; - Found_Top: - /* check that we have at least one filled line */ - if ( count >= rows ) - goto Empty_Bitmap; + p += 1; /* skip padding */ + /* fall-through */ - /* now, crop the empty upper lines */ - if ( count > 0 ) - { - line = (FT_Byte*)map->buffer; + case 9: + loader = tt_sbit_decoder_load_compound; + break; - FT_MEM_MOVE( line, line + count * line_len, - ( rows - count ) * line_len ); + case 17: /* small metrics, PNG image data */ + case 18: /* big metrics, PNG image data */ + case 19: /* metrics in EBLC, PNG image data */ +#ifdef FT_CONFIG_OPTION_USE_PNG + loader = tt_sbit_decoder_load_png; + break; +#else + error = FT_THROW( Unimplemented_Feature ); + goto Fail; +#endif /* FT_CONFIG_OPTION_USE_PNG */ - metrics->height = (FT_Byte)( metrics->height - count ); - metrics->horiBearingY = (FT_Char)( metrics->horiBearingY - count ); - metrics->vertBearingY = (FT_Char)( metrics->vertBearingY - count ); + default: + error = FT_THROW( Invalid_Table ); + goto Fail; + } - map->rows -= count; - rows -= count; + if ( !decoder->bitmap_allocated ) + { + error = tt_sbit_decoder_alloc_bitmap( decoder ); + if ( error ) + goto Fail; } + + error = loader( decoder, p, p_limit, x_pos, y_pos ); } - /***********************************************************************/ - /* */ - /* second, crop the lower lines */ - /* */ - { - line = (FT_Byte*)map->buffer + ( rows - 1 ) * line_len; + Fail: + FT_FRAME_RELEASE( data ); - for ( count = 0; count < rows; count++ ) - { - FT_Byte* cur = line; - FT_Byte* limit = line + line_len; + Exit: + return error; + } - for ( ; cur < limit; cur++ ) - if ( cur[0] ) - goto Found_Bottom; + static FT_Error + tt_sbit_decoder_load_image( TT_SBitDecoder decoder, + FT_UInt glyph_index, + FT_Int x_pos, + FT_Int y_pos ) + { + /* + * First, we find the correct strike range that applies to this + * glyph index. + */ - /* the current line was empty - skip to previous one */ - line -= line_len; - } + FT_Byte* p = decoder->eblc_base + decoder->strike_index_array; + FT_Byte* p_limit = decoder->eblc_limit; + FT_ULong num_ranges = decoder->strike_index_count; + FT_UInt start, end, index_format, image_format; + FT_ULong image_start = 0, image_end = 0, image_offset; - Found_Bottom: - if ( count > 0 ) - { - metrics->height = (FT_Byte)( metrics->height - count ); - rows -= count; - map->rows -= count; - } - } - /***********************************************************************/ - /* */ - /* third, get rid of the space on the left side of the glyph */ - /* */ - do + for ( ; num_ranges > 0; num_ranges-- ) { - FT_Byte* limit; + start = FT_NEXT_USHORT( p ); + end = FT_NEXT_USHORT( p ); + + if ( glyph_index >= start && glyph_index <= end ) + goto FoundRange; + + p += 4; /* ignore index offset */ + } + goto NoBitmap; + FoundRange: + image_offset = FT_NEXT_ULONG( p ); - line = (FT_Byte*)map->buffer; - limit = line + rows * line_len; + /* overflow check */ + p = decoder->eblc_base + decoder->strike_index_array; + if ( image_offset > (FT_ULong)( p_limit - p ) ) + goto Failure; + + p += image_offset; + if ( p + 8 > p_limit ) + goto NoBitmap; + + /* now find the glyph's location and extend within the ebdt table */ + index_format = FT_NEXT_USHORT( p ); + image_format = FT_NEXT_USHORT( p ); + image_offset = FT_NEXT_ULONG ( p ); + + switch ( index_format ) + { + case 1: /* 4-byte offsets relative to `image_offset' */ + p += 4 * ( glyph_index - start ); + if ( p + 8 > p_limit ) + goto NoBitmap; - for ( ; line < limit; line += line_len ) - if ( line[0] & 0x80 ) - goto Found_Left; + image_start = FT_NEXT_ULONG( p ); + image_end = FT_NEXT_ULONG( p ); - /* shift the whole glyph one pixel to the left */ - line = (FT_Byte*)map->buffer; - limit = line + rows * line_len; + if ( image_start == image_end ) /* missing glyph */ + goto NoBitmap; + break; - for ( ; line < limit; line += line_len ) + case 2: /* big metrics, constant image size */ { - FT_Int n, width = map->width; - FT_Byte old; - FT_Byte* cur = line; + FT_ULong image_size; - old = (FT_Byte)(cur[0] << 1); - for ( n = 8; n < width; n += 8 ) - { - FT_Byte val; + if ( p + 12 > p_limit ) + goto NoBitmap; + image_size = FT_NEXT_ULONG( p ); - val = cur[1]; - cur[0] = (FT_Byte)( old | ( val >> 7 ) ); - old = (FT_Byte)( val << 1 ); - cur++; - } - cur[0] = old; + if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) ) + goto NoBitmap; + + image_start = image_size * ( glyph_index - start ); + image_end = image_start + image_size; } + break; - map->width--; - metrics->horiBearingX++; - metrics->vertBearingX++; - metrics->width--; + case 3: /* 2-byte offsets relative to 'image_offset' */ + p += 2 * ( glyph_index - start ); + if ( p + 4 > p_limit ) + goto NoBitmap; - } while ( map->width > 0 ); + image_start = FT_NEXT_USHORT( p ); + image_end = FT_NEXT_USHORT( p ); - Found_Left: + if ( image_start == image_end ) /* missing glyph */ + goto NoBitmap; + break; - /***********************************************************************/ - /* */ - /* finally, crop the bitmap width to get rid of the space on the right */ - /* side of the glyph. */ - /* */ - do - { - FT_Int right = map->width - 1; - FT_Byte* limit; - FT_Byte mask; + case 4: /* sparse glyph array with (glyph,offset) pairs */ + { + FT_ULong mm, num_glyphs; - line = (FT_Byte*)map->buffer + ( right >> 3 ); - limit = line + rows * line_len; - mask = (FT_Byte)( 0x80 >> ( right & 7 ) ); + if ( p + 4 > p_limit ) + goto NoBitmap; - for ( ; line < limit; line += line_len ) - if ( line[0] & mask ) - goto Found_Right; + num_glyphs = FT_NEXT_ULONG( p ); - /* crop the whole glyph to the right */ - map->width--; - metrics->width--; + /* overflow check for p + ( num_glyphs + 1 ) * 4 */ + if ( p + 4 > p_limit || + num_glyphs > (FT_ULong)( ( ( p_limit - p ) >> 2 ) - 1 ) ) + goto NoBitmap; - } while ( map->width > 0 ); + for ( mm = 0; mm < num_glyphs; mm++ ) + { + FT_UInt gindex = FT_NEXT_USHORT( p ); - Found_Right: - /* all right, the bitmap was cropped */ - return; - Empty_Bitmap: - map->width = 0; - map->rows = 0; - map->pitch = 0; - map->pixel_mode = FT_PIXEL_MODE_MONO; - } + if ( gindex == glyph_index ) + { + image_start = FT_NEXT_USHORT( p ); + p += 2; + image_end = FT_PEEK_USHORT( p ); + break; + } + p += 2; + } + + if ( mm >= num_glyphs ) + goto NoBitmap; + } + break; + case 5: /* constant metrics with sparse glyph codes */ + case 19: + { + FT_ULong image_size, mm, num_glyphs; - static FT_Error - Load_SBit_Single( FT_Bitmap* map, - FT_Int x_offset, - FT_Int y_offset, - FT_Int pix_bits, - FT_UShort image_format, - TT_SBit_Metrics metrics, - FT_Stream stream ) - { - FT_Error error; + if ( p + 16 > p_limit ) + goto NoBitmap; - /* check that the source bitmap fits into the target pixmap */ - if ( x_offset < 0 || x_offset + metrics->width > map->width || - y_offset < 0 || y_offset + metrics->height > map->rows ) - { - error = SFNT_Err_Invalid_Argument; + image_size = FT_NEXT_ULONG( p ); - goto Exit; - } + if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) ) + goto NoBitmap; - { - FT_Int glyph_width = metrics->width; - FT_Int glyph_height = metrics->height; - FT_Int glyph_size; - FT_Int line_bits = pix_bits * glyph_width; - FT_Bool pad_bytes = 0; + num_glyphs = FT_NEXT_ULONG( p ); + /* overflow check for p + 2 * num_glyphs */ + if ( num_glyphs > (FT_ULong)( ( p_limit - p ) >> 1 ) ) + goto NoBitmap; - /* compute size of glyph image */ - switch ( image_format ) - { - case 1: /* byte-padded formats */ - case 6: + for ( mm = 0; mm < num_glyphs; mm++ ) { - FT_Int line_length; + FT_UInt gindex = FT_NEXT_USHORT( p ); - switch ( pix_bits ) - { - case 1: - line_length = ( glyph_width + 7 ) >> 3; + if ( gindex == glyph_index ) break; - case 2: - line_length = ( glyph_width + 3 ) >> 2; - break; - case 4: - line_length = ( glyph_width + 1 ) >> 1; - break; - default: - line_length = glyph_width; - } - - glyph_size = glyph_height * line_length; - pad_bytes = 1; } - break; - case 2: - case 5: - case 7: - line_bits = glyph_width * pix_bits; - glyph_size = ( glyph_height * line_bits + 7 ) >> 3; - break; + if ( mm >= num_glyphs ) + goto NoBitmap; - default: /* invalid format */ - return SFNT_Err_Invalid_File_Format; + image_start = image_size * mm; + image_end = image_start + image_size; } + break; - /* Now read data and draw glyph into target pixmap */ - if ( FT_FRAME_ENTER( glyph_size ) ) - goto Exit; + default: + goto NoBitmap; + } - /* don't forget to multiply `x_offset' by `map->pix_bits' as */ - /* the sbit blitter doesn't make a difference between pixmap */ - /* depths. */ - blit_sbit( map, (FT_Byte*)stream->cursor, line_bits, pad_bytes, - x_offset * pix_bits, y_offset, metrics->height ); + if ( image_start > image_end ) + goto NoBitmap; - FT_FRAME_EXIT(); - } + image_end -= image_start; + image_start = image_offset + image_start; - Exit: - return error; + FT_TRACE3(( "tt_sbit_decoder_load_image:" + " found sbit (format %d) for glyph index %d\n", + image_format, glyph_index )); + + return tt_sbit_decoder_load_bitmap( decoder, + image_format, + image_start, + image_end, + x_pos, + y_pos ); + + Failure: + return FT_THROW( Invalid_Table ); + + NoBitmap: + FT_TRACE4(( "tt_sbit_decoder_load_image:" + " no sbit found for glyph index %d\n", glyph_index )); + + return FT_THROW( Invalid_Argument ); } static FT_Error - Load_SBit_Image( TT_SBit_Strike strike, - TT_SBit_Range range, - FT_ULong ebdt_pos, - FT_ULong glyph_offset, - FT_GlyphSlot slot, - FT_Int x_offset, - FT_Int y_offset, - FT_Stream stream, - TT_SBit_Metrics metrics, - FT_Int depth ) + tt_face_load_sbix_image( TT_Face face, + FT_ULong strike_index, + FT_UInt glyph_index, + FT_Stream stream, + FT_Bitmap *map, + TT_SBit_MetricsRec *metrics ) { - FT_Memory memory = stream->memory; - FT_Bitmap* map = &slot->bitmap; - FT_Error error; + FT_UInt sbix_pos, strike_offset, glyph_start, glyph_end; + FT_ULong table_size; + FT_Int originOffsetX, originOffsetY; + FT_Tag graphicType; + FT_Int recurse_depth = 0; + FT_Error error; + FT_Byte* p; - /* place stream at beginning of glyph data and read metrics */ - if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) ) - goto Exit; + FT_UNUSED( map ); - error = tt_load_sbit_metrics( stream, range, metrics ); - if ( error ) - goto Exit; - /* This function is recursive. At the top-level call, we */ - /* compute the dimensions of the higher-level glyph to */ - /* allocate the final pixmap buffer. */ - if ( depth == 0 ) - { - FT_Long size; + metrics->width = 0; + metrics->height = 0; + p = face->sbit_table + 8 + 4 * strike_index; + strike_offset = FT_NEXT_ULONG( p ); - map->width = metrics->width; - map->rows = metrics->height; + error = face->goto_table( face, TTAG_sbix, stream, &table_size ); + if ( error ) + return error; + sbix_pos = FT_STREAM_POS(); - switch ( strike->bit_depth ) - { - case 1: - map->pixel_mode = FT_PIXEL_MODE_MONO; - map->pitch = ( map->width + 7 ) >> 3; - break; + retry: + if ( glyph_index > (FT_UInt)face->root.num_glyphs ) + return FT_THROW( Invalid_Argument ); - case 2: - map->pixel_mode = FT_PIXEL_MODE_GRAY2; - map->pitch = ( map->width + 3 ) >> 2; - break; + if ( strike_offset >= table_size || + table_size - strike_offset < 4 + glyph_index * 4 + 8 ) + return FT_THROW( Invalid_File_Format ); - case 4: - map->pixel_mode = FT_PIXEL_MODE_GRAY4; - map->pitch = ( map->width + 1 ) >> 1; - break; + if ( FT_STREAM_SEEK( sbix_pos + strike_offset + 4 + glyph_index * 4 ) || + FT_FRAME_ENTER( 8 ) ) + return error; - case 8: - map->pixel_mode = FT_PIXEL_MODE_GRAY; - map->pitch = map->width; - break; + glyph_start = FT_GET_ULONG(); + glyph_end = FT_GET_ULONG(); - default: - return SFNT_Err_Invalid_File_Format; - } + FT_FRAME_EXIT(); - size = map->rows * map->pitch; + if ( glyph_start == glyph_end ) + return FT_THROW( Invalid_Argument ); + if ( glyph_start > glyph_end || + glyph_end - glyph_start < 8 || + table_size - strike_offset < glyph_end ) + return FT_THROW( Invalid_File_Format ); - /* check that there is no empty image */ - if ( size == 0 ) - goto Exit; /* exit successfully! */ + if ( FT_STREAM_SEEK( sbix_pos + strike_offset + glyph_start ) || + FT_FRAME_ENTER( glyph_end - glyph_start ) ) + return error; - error = ft_glyphslot_alloc_bitmap( slot, size ); - if (error) - goto Exit; - } + originOffsetX = FT_GET_SHORT(); + originOffsetY = FT_GET_SHORT(); - switch ( range->image_format ) - { - case 1: /* single sbit image - load it */ - case 2: - case 5: - case 6: - case 7: - return Load_SBit_Single( map, x_offset, y_offset, strike->bit_depth, - range->image_format, metrics, stream ); + graphicType = FT_GET_TAG4(); - case 8: /* compound format */ - if ( FT_STREAM_SKIP( 1L ) ) + switch ( graphicType ) + { + case FT_MAKE_TAG( 'd', 'u', 'p', 'e' ): + if ( recurse_depth < 4 ) { - error = SFNT_Err_Invalid_Stream_Skip; - goto Exit; + glyph_index = FT_GET_USHORT(); + FT_FRAME_EXIT(); + recurse_depth++; + goto retry; } - /* fallthrough */ - - case 9: + error = FT_THROW( Invalid_File_Format ); break; - default: /* invalid image format */ - return SFNT_Err_Invalid_File_Format; - } - - /* All right, we have a compound format. First of all, read */ - /* the array of elements. */ - { - TT_SBit_Component components = NULL; - TT_SBit_Component comp; - FT_UShort num_components, count; - - - if ( FT_READ_USHORT( num_components ) || - FT_NEW_ARRAY( components, num_components ) ) - goto Exit; - - count = num_components; + case FT_MAKE_TAG( 'p', 'n', 'g', ' ' ): +#ifdef FT_CONFIG_OPTION_USE_PNG + error = Load_SBit_Png( face->root.glyph, + 0, + 0, + 32, + metrics, + stream->memory, + stream->cursor, + glyph_end - glyph_start - 8, + TRUE ); +#else + error = FT_THROW( Unimplemented_Feature ); +#endif + break; - if ( FT_FRAME_ENTER( 4L * num_components ) ) - goto Fail_Memory; + case FT_MAKE_TAG( 'j', 'p', 'g', ' ' ): + case FT_MAKE_TAG( 't', 'i', 'f', 'f' ): + case FT_MAKE_TAG( 'r', 'g', 'b', 'l' ): /* used on iOS 7.1 */ + error = FT_THROW( Unknown_File_Format ); + break; - for ( comp = components; count > 0; count--, comp++ ) - { - comp->glyph_code = FT_GET_USHORT(); - comp->x_offset = FT_GET_CHAR(); - comp->y_offset = FT_GET_CHAR(); - } + default: + error = FT_THROW( Unimplemented_Feature ); + break; + } - FT_FRAME_EXIT(); + FT_FRAME_EXIT(); - /* Now recursively load each element glyph */ - count = num_components; - comp = components; - for ( ; count > 0; count--, comp++ ) - { - TT_SBit_Range elem_range; - TT_SBit_MetricsRec elem_metrics; - FT_ULong elem_offset; + if ( !error ) + { + FT_Short abearing; + FT_UShort aadvance; - /* find the range for this element */ - error = find_sbit_range( comp->glyph_code, - strike, - &elem_range, - &elem_offset ); - if ( error ) - goto Fail_Memory; - - /* now load the element, recursively */ - error = Load_SBit_Image( strike, - elem_range, - ebdt_pos, - elem_offset, - slot, - x_offset + comp->x_offset, - y_offset + comp->y_offset, - stream, - &elem_metrics, - depth + 1 ); - if ( error ) - goto Fail_Memory; - } + tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance ); - Fail_Memory: - FT_FREE( components ); + metrics->horiBearingX = (FT_Short)originOffsetX; + metrics->horiBearingY = (FT_Short)( -originOffsetY + metrics->height ); + metrics->horiAdvance = (FT_Short)( aadvance * + face->root.size->metrics.x_ppem / + face->header.Units_Per_EM ); } - Exit: return error; } - - /*************************************************************************/ - /* */ - /* <Function> */ - /* tt_face_load_sbit_image */ - /* */ - /* <Description> */ - /* Loads a given glyph sbit image from the font resource. This also */ - /* returns its metrics. */ - /* */ - /* <Input> */ - /* face :: The target face object. */ - /* */ - /* strike_index :: The current strike index. */ - /* */ - /* glyph_index :: The current glyph index. */ - /* */ - /* load_flags :: The glyph load flags (the code checks for the flag */ - /* FT_LOAD_CROP_BITMAP). */ - /* */ - /* stream :: The input stream. */ - /* */ - /* <Output> */ - /* map :: The target pixmap. */ - /* */ - /* metrics :: A big sbit metrics structure for the glyph image. */ - /* */ - /* <Return> */ - /* FreeType error code. 0 means success. Returns an error if no */ - /* glyph sbit exists for the index. */ - /* */ - /* <Note> */ - /* The `map.buffer' field is always freed before the glyph is loaded. */ - /* */ - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL( FT_Error ) tt_face_load_sbit_image( TT_Face face, FT_ULong strike_index, FT_UInt glyph_index, @@ -1450,59 +1396,71 @@ FT_Bitmap *map, TT_SBit_MetricsRec *metrics ) { - FT_Error error; - FT_ULong ebdt_pos, glyph_offset; + FT_Error error = FT_Err_Ok; - TT_SBit_Strike strike; - TT_SBit_Range range; + switch ( (FT_UInt)face->sbit_table_type ) + { + case TT_SBIT_TABLE_TYPE_EBLC: + case TT_SBIT_TABLE_TYPE_CBLC: + { + TT_SBitDecoderRec decoder[1]; - /* Check whether there is a glyph sbit for the current index */ - error = tt_find_sbit_image( face, glyph_index, strike_index, - &range, &strike, &glyph_offset ); - if ( error ) - goto Exit; - /* now, find the location of the `EBDT' table in */ - /* the font file */ - error = face->goto_table( face, TTAG_EBDT, stream, 0 ); - if ( error ) - error = face->goto_table( face, TTAG_bdat, stream, 0 ); - if ( error ) - goto Exit; + error = tt_sbit_decoder_init( decoder, face, strike_index, metrics ); + if ( !error ) + { + error = tt_sbit_decoder_load_image( decoder, + glyph_index, + 0, + 0 ); + tt_sbit_decoder_done( decoder ); + } + } + break; - ebdt_pos = FT_STREAM_POS(); + case TT_SBIT_TABLE_TYPE_SBIX: + error = tt_face_load_sbix_image( face, + strike_index, + glyph_index, + stream, + map, + metrics ); + break; - error = Load_SBit_Image( strike, range, ebdt_pos, glyph_offset, - face->root.glyph, 0, 0, stream, metrics, 0 ); - if ( error ) - goto Exit; + default: + error = FT_THROW( Unknown_File_Format ); + break; + } - /* setup vertical metrics if needed */ - if ( strike->flags & 1 ) + /* Flatten color bitmaps if color was not requested. */ + if ( !error && + !( load_flags & FT_LOAD_COLOR ) && + map->pixel_mode == FT_PIXEL_MODE_BGRA ) { - /* in case of a horizontal strike only */ - FT_Int advance; + FT_Bitmap new_map; + FT_Library library = face->root.glyph->library; - advance = strike->hori.ascender - strike->hori.descender; + FT_Bitmap_New( &new_map ); - /* some heuristic values */ + /* Convert to 8bit grayscale. */ + error = FT_Bitmap_Convert( library, map, &new_map, 1 ); + if ( error ) + FT_Bitmap_Done( library, &new_map ); + else + { + map->pixel_mode = new_map.pixel_mode; + map->pitch = new_map.pitch; + map->num_grays = new_map.num_grays; - metrics->vertBearingX = (FT_Char)(-metrics->width / 2 ); - metrics->vertBearingY = (FT_Char)( ( advance - metrics->height ) / 2 ); - metrics->vertAdvance = (FT_Char)( advance * 12 / 10 ); + ft_glyphslot_set_bitmap( face->root.glyph, new_map.buffer ); + face->root.glyph->internal->flags |= FT_GLYPH_OWN_BITMAP; + } } - /* Crop the bitmap now, unless specified otherwise */ - if ( load_flags & FT_LOAD_CROP_BITMAP ) - crop_bitmap( map, metrics ); - - Exit: return error; } -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - -/* END */ +/* EOF */ diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h index 7ea2af1..695d0d8 100644 --- a/src/sfnt/ttsbit.h +++ b/src/sfnt/ttsbit.h @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded bitmap support (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2008, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -28,11 +28,11 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Error ) - tt_face_load_eblc( TT_Face face, + tt_face_load_sbit( TT_Face face, FT_Stream stream ); FT_LOCAL( void ) - tt_face_free_eblc( TT_Face face ); + tt_face_free_sbit( TT_Face face ); FT_LOCAL( FT_Error ) @@ -45,22 +45,6 @@ FT_BEGIN_HEADER FT_ULong strike_index, FT_Size_Metrics* metrics ); -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - FT_LOCAL( FT_Error ) - tt_find_sbit_image( TT_Face face, - FT_UInt glyph_index, - FT_ULong strike_index, - TT_SBit_Range *arange, - TT_SBit_Strike *astrike, - FT_ULong *aglyph_offset ); - - FT_LOCAL( FT_Error ) - tt_load_sbit_metrics( FT_Stream stream, - TT_SBit_Range range, - TT_SBit_Metrics metrics ); - -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ - FT_LOCAL( FT_Error ) tt_face_load_sbit_image( TT_Face face, FT_ULong strike_index, diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c deleted file mode 100644 index 38bcf21..0000000 --- a/src/sfnt/ttsbit0.c +++ /dev/null @@ -1,1011 +0,0 @@ -/***************************************************************************/ -/* */ -/* ttsbit0.c */ -/* */ -/* TrueType and OpenType embedded bitmap support (body). */ -/* This is a heap-optimized version. */ -/* */ -/* Copyright 2005, 2006, 2007, 2008, 2009 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - -/* This file is included by ttsbit.c */ - - -#include <ft2build.h> -#include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_STREAM_H -#include FT_TRUETYPE_TAGS_H -#include "ttsbit.h" - -#include "sferrors.h" - - - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ - /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ - /* messages during execution. */ - /* */ -#undef FT_COMPONENT -#define FT_COMPONENT trace_ttsbit - - - FT_LOCAL_DEF( FT_Error ) - tt_face_load_eblc( TT_Face face, - FT_Stream stream ) - { - FT_Error error = SFNT_Err_Ok; - FT_Fixed version; - FT_ULong num_strikes, table_size; - FT_Byte* p; - FT_Byte* p_limit; - FT_UInt count; - - - face->sbit_num_strikes = 0; - - /* this table is optional */ - error = face->goto_table( face, TTAG_EBLC, stream, &table_size ); - if ( error ) - error = face->goto_table( face, TTAG_bloc, stream, &table_size ); - if ( error ) - goto Exit; - - if ( table_size < 8 ) - { - FT_ERROR(( "tt_face_load_sbit_strikes: table too short\n" )); - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - if ( FT_FRAME_EXTRACT( table_size, face->sbit_table ) ) - goto Exit; - - face->sbit_table_size = table_size; - - p = face->sbit_table; - p_limit = p + table_size; - - version = FT_NEXT_ULONG( p ); - num_strikes = FT_NEXT_ULONG( p ); - - if ( version != 0x00020000UL || num_strikes >= 0x10000UL ) - { - FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version\n" )); - error = SFNT_Err_Invalid_File_Format; - goto Fail; - } - - /* - * Count the number of strikes available in the table. We are a bit - * paranoid there and don't trust the data. - */ - count = (FT_UInt)num_strikes; - if ( 8 + 48UL * count > table_size ) - count = (FT_UInt)( ( p_limit - p ) / 48 ); - - face->sbit_num_strikes = count; - - FT_TRACE3(( "sbit_num_strikes: %u\n", count )); - Exit: - return error; - - Fail: - FT_FRAME_RELEASE( face->sbit_table ); - face->sbit_table_size = 0; - goto Exit; - } - - - FT_LOCAL_DEF( void ) - tt_face_free_eblc( TT_Face face ) - { - FT_Stream stream = face->root.stream; - - - FT_FRAME_RELEASE( face->sbit_table ); - face->sbit_table_size = 0; - face->sbit_num_strikes = 0; - } - - - FT_LOCAL_DEF( FT_Error ) - tt_face_set_sbit_strike( TT_Face face, - FT_Size_Request req, - FT_ULong* astrike_index ) - { - return FT_Match_Size( (FT_Face)face, req, 0, astrike_index ); - } - - - FT_LOCAL_DEF( FT_Error ) - tt_face_load_strike_metrics( TT_Face face, - FT_ULong strike_index, - FT_Size_Metrics* metrics ) - { - FT_Byte* strike; - - - if ( strike_index >= (FT_ULong)face->sbit_num_strikes ) - return SFNT_Err_Invalid_Argument; - - strike = face->sbit_table + 8 + strike_index * 48; - - metrics->x_ppem = (FT_UShort)strike[44]; - metrics->y_ppem = (FT_UShort)strike[45]; - - metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */ - metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */ - metrics->height = metrics->ascender - metrics->descender; - - /* XXX: Is this correct? */ - metrics->max_advance = ( (FT_Char)strike[22] + /* min_origin_SB */ - strike[18] + /* max_width */ - (FT_Char)strike[23] /* min_advance_SB */ - ) << 6; - - return SFNT_Err_Ok; - } - - - typedef struct TT_SBitDecoderRec_ - { - TT_Face face; - FT_Stream stream; - FT_Bitmap* bitmap; - TT_SBit_Metrics metrics; - FT_Bool metrics_loaded; - FT_Bool bitmap_allocated; - FT_Byte bit_depth; - - FT_ULong ebdt_start; - FT_ULong ebdt_size; - - FT_ULong strike_index_array; - FT_ULong strike_index_count; - FT_Byte* eblc_base; - FT_Byte* eblc_limit; - - } TT_SBitDecoderRec, *TT_SBitDecoder; - - - static FT_Error - tt_sbit_decoder_init( TT_SBitDecoder decoder, - TT_Face face, - FT_ULong strike_index, - TT_SBit_MetricsRec* metrics ) - { - FT_Error error; - FT_Stream stream = face->root.stream; - FT_ULong ebdt_size; - - - error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size ); - if ( error ) - error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size ); - if ( error ) - goto Exit; - - decoder->face = face; - decoder->stream = stream; - decoder->bitmap = &face->root.glyph->bitmap; - decoder->metrics = metrics; - - decoder->metrics_loaded = 0; - decoder->bitmap_allocated = 0; - - decoder->ebdt_start = FT_STREAM_POS(); - decoder->ebdt_size = ebdt_size; - - decoder->eblc_base = face->sbit_table; - decoder->eblc_limit = face->sbit_table + face->sbit_table_size; - - /* now find the strike corresponding to the index */ - { - FT_Byte* p; - - - if ( 8 + 48 * strike_index + 3 * 4 + 34 + 1 > face->sbit_table_size ) - { - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - p = decoder->eblc_base + 8 + 48 * strike_index; - - decoder->strike_index_array = FT_NEXT_ULONG( p ); - p += 4; - decoder->strike_index_count = FT_NEXT_ULONG( p ); - p += 34; - decoder->bit_depth = *p; - - if ( decoder->strike_index_array > face->sbit_table_size || - decoder->strike_index_array + 8 * decoder->strike_index_count > - face->sbit_table_size ) - error = SFNT_Err_Invalid_File_Format; - } - - Exit: - return error; - } - - - static void - tt_sbit_decoder_done( TT_SBitDecoder decoder ) - { - FT_UNUSED( decoder ); - } - - - static FT_Error - tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder decoder ) - { - FT_Error error = SFNT_Err_Ok; - FT_UInt width, height; - FT_Bitmap* map = decoder->bitmap; - FT_Long size; - - - if ( !decoder->metrics_loaded ) - { - error = SFNT_Err_Invalid_Argument; - goto Exit; - } - - width = decoder->metrics->width; - height = decoder->metrics->height; - - map->width = (int)width; - map->rows = (int)height; - - switch ( decoder->bit_depth ) - { - case 1: - map->pixel_mode = FT_PIXEL_MODE_MONO; - map->pitch = ( map->width + 7 ) >> 3; - break; - - case 2: - map->pixel_mode = FT_PIXEL_MODE_GRAY2; - map->pitch = ( map->width + 3 ) >> 2; - break; - - case 4: - map->pixel_mode = FT_PIXEL_MODE_GRAY4; - map->pitch = ( map->width + 1 ) >> 1; - break; - - case 8: - map->pixel_mode = FT_PIXEL_MODE_GRAY; - map->pitch = map->width; - break; - - default: - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - size = map->rows * map->pitch; - - /* check that there is no empty image */ - if ( size == 0 ) - goto Exit; /* exit successfully! */ - - error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size ); - if ( error ) - goto Exit; - - decoder->bitmap_allocated = 1; - - Exit: - return error; - } - - - static FT_Error - tt_sbit_decoder_load_metrics( TT_SBitDecoder decoder, - FT_Byte* *pp, - FT_Byte* limit, - FT_Bool big ) - { - FT_Byte* p = *pp; - TT_SBit_Metrics metrics = decoder->metrics; - - - if ( p + 5 > limit ) - goto Fail; - - metrics->height = p[0]; - metrics->width = p[1]; - metrics->horiBearingX = (FT_Char)p[2]; - metrics->horiBearingY = (FT_Char)p[3]; - metrics->horiAdvance = p[4]; - - p += 5; - if ( big ) - { - if ( p + 3 > limit ) - goto Fail; - - metrics->vertBearingX = (FT_Char)p[0]; - metrics->vertBearingY = (FT_Char)p[1]; - metrics->vertAdvance = p[2]; - - p += 3; - } - - decoder->metrics_loaded = 1; - *pp = p; - return SFNT_Err_Ok; - - Fail: - return SFNT_Err_Invalid_Argument; - } - - - /* forward declaration */ - static FT_Error - tt_sbit_decoder_load_image( TT_SBitDecoder decoder, - FT_UInt glyph_index, - FT_Int x_pos, - FT_Int y_pos ); - - typedef FT_Error (*TT_SBitDecoder_LoadFunc)( TT_SBitDecoder decoder, - FT_Byte* p, - FT_Byte* plimit, - FT_Int x_pos, - FT_Int y_pos ); - - - static FT_Error - tt_sbit_decoder_load_byte_aligned( TT_SBitDecoder decoder, - FT_Byte* p, - FT_Byte* limit, - FT_Int x_pos, - FT_Int y_pos ) - { - FT_Error error = SFNT_Err_Ok; - FT_Byte* line; - FT_Int bit_height, bit_width, pitch, width, height, h; - FT_Bitmap* bitmap; - - - if ( !decoder->bitmap_allocated ) - { - error = tt_sbit_decoder_alloc_bitmap( decoder ); - if ( error ) - goto Exit; - } - - /* check that we can write the glyph into the bitmap */ - bitmap = decoder->bitmap; - bit_width = bitmap->width; - bit_height = bitmap->rows; - pitch = bitmap->pitch; - line = bitmap->buffer; - - width = decoder->metrics->width; - height = decoder->metrics->height; - - if ( x_pos < 0 || x_pos + width > bit_width || - y_pos < 0 || y_pos + height > bit_height ) - { - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - if ( p + ( ( width + 7 ) >> 3 ) * height > limit ) - { - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - /* now do the blit */ - line += y_pos * pitch + ( x_pos >> 3 ); - x_pos &= 7; - - if ( x_pos == 0 ) /* the easy one */ - { - for ( h = height; h > 0; h--, line += pitch ) - { - FT_Byte* write = line; - FT_Int w; - - - for ( w = width; w >= 8; w -= 8 ) - { - write[0] = (FT_Byte)( write[0] | *p++ ); - write += 1; - } - - if ( w > 0 ) - write[0] = (FT_Byte)( write[0] | ( *p++ & ( 0xFF00U >> w ) ) ); - } - } - else /* x_pos > 0 */ - { - for ( h = height; h > 0; h--, line += pitch ) - { - FT_Byte* write = line; - FT_Int w; - FT_UInt wval = 0; - - - for ( w = width; w >= 8; w -= 8 ) - { - wval = (FT_UInt)( wval | *p++ ); - write[0] = (FT_Byte)( write[0] | ( wval >> x_pos ) ); - write += 1; - wval <<= 8; - } - - if ( w > 0 ) - wval = (FT_UInt)( wval | ( *p++ & ( 0xFF00U >> w ) ) ); - - /* all bits read and there are `x_pos + w' bits to be written */ - - write[0] = (FT_Byte)( write[0] | ( wval >> x_pos ) ); - - if ( x_pos + w > 8 ) - { - write++; - wval <<= 8; - write[0] = (FT_Byte)( write[0] | ( wval >> x_pos ) ); - } - } - } - - Exit: - return error; - } - - - /* - * Load a bit-aligned bitmap (with pointer `p') into a line-aligned bitmap - * (with pointer `write'). In the example below, the width is 3 pixel, - * and `x_pos' is 1 pixel. - * - * p p+1 - * | | | - * | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |... - * | | | - * +-------+ +-------+ +-------+ ... - * . . . - * . . . - * v . . - * +-------+ . . - * | | . - * | 7 6 5 4 3 2 1 0 | . - * | | . - * write . . - * . . - * v . - * +-------+ . - * | | - * | 7 6 5 4 3 2 1 0 | - * | | - * write+1 . - * . - * v - * +-------+ - * | | - * | 7 6 5 4 3 2 1 0 | - * | | - * write+2 - * - */ - - static FT_Error - tt_sbit_decoder_load_bit_aligned( TT_SBitDecoder decoder, - FT_Byte* p, - FT_Byte* limit, - FT_Int x_pos, - FT_Int y_pos ) - { - FT_Error error = SFNT_Err_Ok; - FT_Byte* line; - FT_Int bit_height, bit_width, pitch, width, height, h, nbits; - FT_Bitmap* bitmap; - FT_UShort rval; - - - if ( !decoder->bitmap_allocated ) - { - error = tt_sbit_decoder_alloc_bitmap( decoder ); - if ( error ) - goto Exit; - } - - /* check that we can write the glyph into the bitmap */ - bitmap = decoder->bitmap; - bit_width = bitmap->width; - bit_height = bitmap->rows; - pitch = bitmap->pitch; - line = bitmap->buffer; - - width = decoder->metrics->width; - height = decoder->metrics->height; - - if ( x_pos < 0 || x_pos + width > bit_width || - y_pos < 0 || y_pos + height > bit_height ) - { - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - if ( p + ( ( width * height + 7 ) >> 3 ) > limit ) - { - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - /* now do the blit */ - - /* adjust `line' to point to the first byte of the bitmap */ - line += y_pos * pitch + ( x_pos >> 3 ); - x_pos &= 7; - - /* the higher byte of `rval' is used as a buffer */ - rval = 0; - nbits = 0; - - for ( h = height; h > 0; h--, line += pitch ) - { - FT_Byte* write = line; - FT_Int w = width; - - - /* handle initial byte (in target bitmap) specially if necessary */ - if ( x_pos ) - { - w = ( width < 8 - x_pos ) ? width : 8 - x_pos; - - if ( h == height ) - { - rval = *p++; - nbits = x_pos; - } - else if ( nbits < w ) - { - if ( p < limit ) - rval |= *p++; - nbits += 8 - w; - } - else - { - rval >>= 8; - nbits -= w; - } - - *write++ |= ( ( rval >> nbits ) & 0xFF ) & - ( ~( 0xFF << w ) << ( 8 - w - x_pos ) ); - rval <<= 8; - - w = width - w; - } - - /* handle medial bytes */ - for ( ; w >= 8; w -= 8 ) - { - rval |= *p++; - *write++ |= ( rval >> nbits ) & 0xFF; - - rval <<= 8; - } - - /* handle final byte if necessary */ - if ( w > 0 ) - { - if ( nbits < w ) - { - if ( p < limit ) - rval |= *p++; - *write |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w ); - nbits += 8 - w; - - rval <<= 8; - } - else - { - *write |= ( ( rval >> nbits ) & 0xFF ) & ( 0xFF00U >> w ); - nbits -= w; - } - } - } - - Exit: - return error; - } - - - static FT_Error - tt_sbit_decoder_load_compound( TT_SBitDecoder decoder, - FT_Byte* p, - FT_Byte* limit, - FT_Int x_pos, - FT_Int y_pos ) - { - FT_Error error = SFNT_Err_Ok; - FT_UInt num_components, nn; - - FT_Char horiBearingX = decoder->metrics->horiBearingX; - FT_Char horiBearingY = decoder->metrics->horiBearingY; - FT_Byte horiAdvance = decoder->metrics->horiAdvance; - FT_Char vertBearingX = decoder->metrics->vertBearingX; - FT_Char vertBearingY = decoder->metrics->vertBearingY; - FT_Byte vertAdvance = decoder->metrics->vertAdvance; - - - if ( p + 2 > limit ) - goto Fail; - - num_components = FT_NEXT_USHORT( p ); - if ( p + 4 * num_components > limit ) - goto Fail; - - if ( !decoder->bitmap_allocated ) - { - error = tt_sbit_decoder_alloc_bitmap( decoder ); - if ( error ) - goto Exit; - } - - for ( nn = 0; nn < num_components; nn++ ) - { - FT_UInt gindex = FT_NEXT_USHORT( p ); - FT_Byte dx = FT_NEXT_BYTE( p ); - FT_Byte dy = FT_NEXT_BYTE( p ); - - - /* NB: a recursive call */ - error = tt_sbit_decoder_load_image( decoder, gindex, - x_pos + dx, y_pos + dy ); - if ( error ) - break; - } - - decoder->metrics->horiBearingX = horiBearingX; - decoder->metrics->horiBearingY = horiBearingY; - decoder->metrics->horiAdvance = horiAdvance; - decoder->metrics->vertBearingX = vertBearingX; - decoder->metrics->vertBearingY = vertBearingY; - decoder->metrics->vertAdvance = vertAdvance; - decoder->metrics->width = (FT_UInt)decoder->bitmap->width; - decoder->metrics->height = (FT_UInt)decoder->bitmap->rows; - - Exit: - return error; - - Fail: - error = SFNT_Err_Invalid_File_Format; - goto Exit; - } - - - static FT_Error - tt_sbit_decoder_load_bitmap( TT_SBitDecoder decoder, - FT_UInt glyph_format, - FT_ULong glyph_start, - FT_ULong glyph_size, - FT_Int x_pos, - FT_Int y_pos ) - { - FT_Error error; - FT_Stream stream = decoder->stream; - FT_Byte* p; - FT_Byte* p_limit; - FT_Byte* data; - - - /* seek into the EBDT table now */ - if ( glyph_start + glyph_size > decoder->ebdt_size ) - { - error = SFNT_Err_Invalid_Argument; - goto Exit; - } - - if ( FT_STREAM_SEEK( decoder->ebdt_start + glyph_start ) || - FT_FRAME_EXTRACT( glyph_size, data ) ) - goto Exit; - - p = data; - p_limit = p + glyph_size; - - /* read the data, depending on the glyph format */ - switch ( glyph_format ) - { - case 1: - case 2: - case 8: - error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 0 ); - break; - - case 6: - case 7: - case 9: - error = tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ); - break; - - default: - error = SFNT_Err_Ok; - } - - if ( error ) - goto Fail; - - { - TT_SBitDecoder_LoadFunc loader; - - - switch ( glyph_format ) - { - case 1: - case 6: - loader = tt_sbit_decoder_load_byte_aligned; - break; - - case 2: - case 5: - case 7: - loader = tt_sbit_decoder_load_bit_aligned; - break; - - case 8: - if ( p + 1 > p_limit ) - goto Fail; - - p += 1; /* skip padding */ - /* fall-through */ - - case 9: - loader = tt_sbit_decoder_load_compound; - break; - - default: - goto Fail; - } - - error = loader( decoder, p, p_limit, x_pos, y_pos ); - } - - Fail: - FT_FRAME_RELEASE( data ); - - Exit: - return error; - } - - - static FT_Error - tt_sbit_decoder_load_image( TT_SBitDecoder decoder, - FT_UInt glyph_index, - FT_Int x_pos, - FT_Int y_pos ) - { - /* - * First, we find the correct strike range that applies to this - * glyph index. - */ - - FT_Byte* p = decoder->eblc_base + decoder->strike_index_array; - FT_Byte* p_limit = decoder->eblc_limit; - FT_ULong num_ranges = decoder->strike_index_count; - FT_UInt start, end, index_format, image_format; - FT_ULong image_start = 0, image_end = 0, image_offset; - - - for ( ; num_ranges > 0; num_ranges-- ) - { - start = FT_NEXT_USHORT( p ); - end = FT_NEXT_USHORT( p ); - - if ( glyph_index >= start && glyph_index <= end ) - goto FoundRange; - - p += 4; /* ignore index offset */ - } - goto NoBitmap; - - FoundRange: - image_offset = FT_NEXT_ULONG( p ); - - /* overflow check */ - if ( decoder->eblc_base + decoder->strike_index_array + image_offset < - decoder->eblc_base ) - goto Failure; - - p = decoder->eblc_base + decoder->strike_index_array + image_offset; - if ( p + 8 > p_limit ) - goto NoBitmap; - - /* now find the glyph's location and extend within the ebdt table */ - index_format = FT_NEXT_USHORT( p ); - image_format = FT_NEXT_USHORT( p ); - image_offset = FT_NEXT_ULONG ( p ); - - switch ( index_format ) - { - case 1: /* 4-byte offsets relative to `image_offset' */ - { - p += 4 * ( glyph_index - start ); - if ( p + 8 > p_limit ) - goto NoBitmap; - - image_start = FT_NEXT_ULONG( p ); - image_end = FT_NEXT_ULONG( p ); - - if ( image_start == image_end ) /* missing glyph */ - goto NoBitmap; - } - break; - - case 2: /* big metrics, constant image size */ - { - FT_ULong image_size; - - - if ( p + 12 > p_limit ) - goto NoBitmap; - - image_size = FT_NEXT_ULONG( p ); - - if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) ) - goto NoBitmap; - - image_start = image_size * ( glyph_index - start ); - image_end = image_start + image_size; - } - break; - - case 3: /* 2-byte offsets relative to 'image_offset' */ - { - p += 2 * ( glyph_index - start ); - if ( p + 4 > p_limit ) - goto NoBitmap; - - image_start = FT_NEXT_USHORT( p ); - image_end = FT_NEXT_USHORT( p ); - - if ( image_start == image_end ) /* missing glyph */ - goto NoBitmap; - } - break; - - case 4: /* sparse glyph array with (glyph,offset) pairs */ - { - FT_ULong mm, num_glyphs; - - - if ( p + 4 > p_limit ) - goto NoBitmap; - - num_glyphs = FT_NEXT_ULONG( p ); - - /* overflow check */ - if ( p + ( num_glyphs + 1 ) * 4 < p ) - goto Failure; - - if ( p + ( num_glyphs + 1 ) * 4 > p_limit ) - goto NoBitmap; - - for ( mm = 0; mm < num_glyphs; mm++ ) - { - FT_UInt gindex = FT_NEXT_USHORT( p ); - - - if ( gindex == glyph_index ) - { - image_start = FT_NEXT_USHORT( p ); - p += 2; - image_end = FT_PEEK_USHORT( p ); - break; - } - p += 2; - } - - if ( mm >= num_glyphs ) - goto NoBitmap; - } - break; - - case 5: /* constant metrics with sparse glyph codes */ - { - FT_ULong image_size, mm, num_glyphs; - - - if ( p + 16 > p_limit ) - goto NoBitmap; - - image_size = FT_NEXT_ULONG( p ); - - if ( tt_sbit_decoder_load_metrics( decoder, &p, p_limit, 1 ) ) - goto NoBitmap; - - num_glyphs = FT_NEXT_ULONG( p ); - - /* overflow check */ - if ( p + 2 * num_glyphs < p ) - goto Failure; - - if ( p + 2 * num_glyphs > p_limit ) - goto NoBitmap; - - for ( mm = 0; mm < num_glyphs; mm++ ) - { - FT_UInt gindex = FT_NEXT_USHORT( p ); - - - if ( gindex == glyph_index ) - break; - } - - if ( mm >= num_glyphs ) - goto NoBitmap; - - image_start = image_size * mm; - image_end = image_start + image_size; - } - break; - - default: - goto NoBitmap; - } - - if ( image_start > image_end ) - goto NoBitmap; - - image_end -= image_start; - image_start = image_offset + image_start; - - return tt_sbit_decoder_load_bitmap( decoder, - image_format, - image_start, - image_end, - x_pos, - y_pos ); - - Failure: - return SFNT_Err_Invalid_Table; - - NoBitmap: - return SFNT_Err_Invalid_Argument; - } - - - FT_LOCAL( FT_Error ) - tt_face_load_sbit_image( TT_Face face, - FT_ULong strike_index, - FT_UInt glyph_index, - FT_UInt load_flags, - FT_Stream stream, - FT_Bitmap *map, - TT_SBit_MetricsRec *metrics ) - { - TT_SBitDecoderRec decoder[1]; - FT_Error error; - - FT_UNUSED( load_flags ); - FT_UNUSED( stream ); - FT_UNUSED( map ); - - - error = tt_sbit_decoder_init( decoder, face, strike_index, metrics ); - if ( !error ) - { - error = tt_sbit_decoder_load_image( decoder, glyph_index, 0, 0 ); - tt_sbit_decoder_done( decoder ); - } - - return error; - } - -/* EOF */ diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 4c0eea5..131ad27 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ /* */ /* A new `perfect' anti-aliasing renderer (body). */ /* */ -/* Copyright 2000-2003, 2005-2012 by */ +/* Copyright 2000-2003, 2005-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -24,8 +24,8 @@ /* */ /* - copy `src/smooth/ftgrays.c' (this file) to your current directory */ /* */ - /* - copy `include/freetype/ftimage.h' and `src/smooth/ftgrays.h' to the */ - /* same directory */ + /* - copy `include/ftimage.h' and `src/smooth/ftgrays.h' to the same */ + /* directory */ /* */ /* - compile `ftgrays' with the _STANDALONE_ macro defined, as in */ /* */ @@ -94,6 +94,14 @@ #ifdef _STANDALONE_ + /* Auxiliary macros for token concatenation. */ +#define FT_ERR_XCAT( x, y ) x ## y +#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) + +#define FT_BEGIN_STMNT do { +#define FT_END_STMNT } while ( 0 ) + + /* define this to dump debugging information */ /* #define FT_DEBUG_LEVEL_TRACE */ @@ -154,6 +162,21 @@ typedef ptrdiff_t FT_PtrDist; va_end( ap ); } + + /* empty function useful for setting a breakpoint to catch errors */ + int + FT_Throw( int error, + int line, + const char* file ) + { + FT_UNUSED( error ); + FT_UNUSED( line ); + FT_UNUSED( file ); + + return 0; + } + + /* we don't handle tracing levels in stand-alone mode; */ #ifndef FT_TRACE5 #define FT_TRACE5( varformat ) FT_Message varformat @@ -165,11 +188,19 @@ typedef ptrdiff_t FT_PtrDist; #define FT_ERROR( varformat ) FT_Message varformat #endif +#define FT_THROW( e ) \ + ( FT_Throw( FT_ERR_CAT( ErrRaster, e ), \ + __LINE__, \ + __FILE__ ) | \ + FT_ERR_CAT( ErrRaster, e ) ) + #else /* !FT_DEBUG_LEVEL_TRACE */ #define FT_TRACE5( x ) do { } while ( 0 ) /* nothing */ #define FT_TRACE7( x ) do { } while ( 0 ) /* nothing */ #define FT_ERROR( x ) do { } while ( 0 ) /* nothing */ +#define FT_THROW( e ) FT_ERR_CAT( ErrRaster_, e ) + #endif /* !FT_DEBUG_LEVEL_TRACE */ @@ -202,6 +233,7 @@ typedef ptrdiff_t FT_PtrDist; raster_done_ \ }; + #else /* !_STANDALONE_ */ @@ -215,13 +247,14 @@ typedef ptrdiff_t FT_PtrDist; #include "ftspic.h" -#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph -#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline +#define Smooth_Err_Invalid_Mode Smooth_Err_Cannot_Render_Glyph +#define Smooth_Err_Memory_Overflow Smooth_Err_Out_Of_Memory #define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory -#define ErrRaster_Invalid_Argument Smooth_Err_Invalid_Argument + #endif /* !_STANDALONE_ */ + #ifndef FT_MEM_SET #define FT_MEM_SET( d, s, c ) ft_memset( d, s, c ) #endif @@ -280,6 +313,40 @@ typedef ptrdiff_t FT_PtrDist; #endif + /* Compute `dividend / divisor' and return both its quotient and */ + /* remainder, cast to a specific type. This macro also ensures that */ + /* the remainder is always positive. */ +#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \ + FT_BEGIN_STMNT \ + (quotient) = (type)( (dividend) / (divisor) ); \ + (remainder) = (type)( (dividend) % (divisor) ); \ + if ( (remainder) < 0 ) \ + { \ + (quotient)--; \ + (remainder) += (type)(divisor); \ + } \ + FT_END_STMNT + +#ifdef __arm__ + /* Work around a bug specific to GCC which make the compiler fail to */ + /* optimize a division and modulo operation on the same parameters */ + /* into a single call to `__aeabi_idivmod'. See */ + /* */ + /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43721 */ +#undef FT_DIV_MOD +#define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \ + FT_BEGIN_STMNT \ + (quotient) = (type)( (dividend) / (divisor) ); \ + (remainder) = (type)( (dividend) - (quotient) * (divisor) ); \ + if ( (remainder) < 0 ) \ + { \ + (quotient)--; \ + (remainder) += (type)(divisor); \ + } \ + FT_END_STMNT +#endif /* __arm__ */ + + /*************************************************************************/ /* */ /* TYPE DEFINITIONS */ @@ -312,7 +379,7 @@ typedef ptrdiff_t FT_PtrDist; #endif /* PIXEL_BITS >= 8 */ - /* maximal number of gray spans in a call to the span callback */ + /* maximum number of gray spans in a call to the span callback */ #define FT_MAX_GRAY_SPANS 32 @@ -328,8 +395,18 @@ typedef ptrdiff_t FT_PtrDist; } TCell; +#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ + /* We disable the warning `structure was padded due to */ + /* __declspec(align())' in order to compile cleanly with */ + /* the maximum level of warnings. */ +#pragma warning( push ) +#pragma warning( disable : 4324 ) +#endif /* _MSC_VER */ + typedef struct gray_TWorker_ { + ft_jmp_buf jump_buffer; + TCoord ex, ey; TPos min_ex, max_ex; TPos min_ey, max_ey; @@ -365,8 +442,6 @@ typedef ptrdiff_t FT_PtrDist; int band_size; int band_shoot; - ft_jmp_buf jump_buffer; - void* buffer; long buffer_size; @@ -375,6 +450,10 @@ typedef ptrdiff_t FT_PtrDist; } gray_TWorker, *gray_PWorker; +#if defined( _MSC_VER ) +#pragma warning( pop ) +#endif + #ifndef FT_STATIC_RASTER #define ras (*worker) @@ -506,7 +585,7 @@ typedef ptrdiff_t FT_PtrDist; static void gray_record_cell( RAS_ARG ) { - if ( !ras.invalid && ( ras.area | ras.cover ) ) + if ( ras.area | ras.cover ) { PCell cell = gray_find_cell( RAS_VAR ); @@ -555,10 +634,10 @@ typedef ptrdiff_t FT_PtrDist; ras.area = 0; ras.cover = 0; + ras.ex = ex; + ras.ey = ey; } - ras.ex = ex; - ras.ey = ey; ras.invalid = ( (unsigned)ey >= (unsigned)ras.count_ey || ex >= ras.count_ex ); } @@ -600,7 +679,7 @@ typedef ptrdiff_t FT_PtrDist; TPos x2, TCoord y2 ) { - TCoord ex1, ex2, fx1, fx2, delta, mod, lift, rem; + TCoord ex1, ex2, fx1, fx2, delta, mod; long p, first, dx; int incr; @@ -644,13 +723,7 @@ typedef ptrdiff_t FT_PtrDist; dx = -dx; } - delta = (TCoord)( p / dx ); - mod = (TCoord)( p % dx ); - if ( mod < 0 ) - { - delta--; - mod += (TCoord)dx; - } + FT_DIV_MOD( TCoord, p, dx, delta, mod ); ras.area += (TArea)(( fx1 + first ) * delta); ras.cover += delta; @@ -661,14 +734,11 @@ typedef ptrdiff_t FT_PtrDist; if ( ex1 != ex2 ) { - p = ONE_PIXEL * ( y2 - y1 + delta ); - lift = (TCoord)( p / dx ); - rem = (TCoord)( p % dx ); - if ( rem < 0 ) - { - lift--; - rem += (TCoord)dx; - } + TCoord lift, rem; + + + p = ONE_PIXEL * ( y2 - y1 + delta ); + FT_DIV_MOD( TCoord, p, dx, lift, rem ); mod -= (int)dx; @@ -718,9 +788,6 @@ typedef ptrdiff_t FT_PtrDist; dx = to_x - ras.x; dy = to_y - ras.y; - /* XXX: we should do something about the trivial case where dx == 0, */ - /* as it happens very often! */ - /* perform vertical clipping */ { TCoord min, max; @@ -799,13 +866,7 @@ typedef ptrdiff_t FT_PtrDist; dy = -dy; } - delta = (int)( p / dy ); - mod = (int)( p % dy ); - if ( mod < 0 ) - { - delta--; - mod += (TCoord)dy; - } + FT_DIV_MOD( int, p, dy, delta, mod ); x = ras.x + delta; gray_render_scanline( RAS_VAR_ ey1, ras.x, fy1, x, (TCoord)first ); @@ -816,13 +877,7 @@ typedef ptrdiff_t FT_PtrDist; if ( ey1 != ey2 ) { p = ONE_PIXEL * dx; - lift = (int)( p / dy ); - rem = (int)( p % dy ); - if ( rem < 0 ) - { - lift--; - rem += (int)dy; - } + FT_DIV_MOD( int, p, dy, lift, rem ); mod -= (int)dy; while ( ey1 != ey2 ) @@ -1036,37 +1091,10 @@ typedef ptrdiff_t FT_PtrDist; /* dx and dy are x and y components of the P0-P3 chord vector. */ - dx = arc[3].x - arc[0].x; - dy = arc[3].y - arc[0].y; - - /* L is an (under)estimate of the Euclidean distance P0-P3. */ - /* */ - /* If dx >= dy, then r = sqrt(dx^2 + dy^2) can be overestimated */ - /* with least maximum error by */ - /* */ - /* r_upperbound = dx + (sqrt(2) - 1) * dy , */ - /* */ - /* where sqrt(2) - 1 can be (over)estimated by 107/256, giving an */ - /* error of no more than 8.4%. */ - /* */ - /* Similarly, some elementary calculus shows that r can be */ - /* underestimated with least maximum error by */ - /* */ - /* r_lowerbound = sqrt(2 + sqrt(2)) / 2 * dx */ - /* + sqrt(2 - sqrt(2)) / 2 * dy . */ - /* */ - /* 236/256 and 97/256 are (under)estimates of the two algebraic */ - /* numbers, giving an error of no more than 8.1%. */ - - dx_ = FT_ABS( dx ); - dy_ = FT_ABS( dy ); - - /* This is the same as */ - /* */ - /* L = ( 236 * FT_MAX( dx_, dy_ ) */ - /* + 97 * FT_MIN( dx_, dy_ ) ) >> 8; */ - L = ( dx_ > dy_ ? 236 * dx_ + 97 * dy_ - : 97 * dx_ + 236 * dy_ ) >> 8; + dx = dx_ = arc[3].x - arc[0].x; + dy = dy_ = arc[3].y - arc[0].y; + + L = FT_HYPOT( dx_, dy_ ); /* Avoid possible arithmetic overflow below by splitting. */ if ( L > 32767 ) @@ -1091,11 +1119,11 @@ typedef ptrdiff_t FT_PtrDist; if ( s > s_limit ) goto Split; - /* If P1 or P2 is outside P0-P3, split the curve. */ - if ( dy * dy1 + dx * dx1 < 0 || - dy * dy2 + dx * dx2 < 0 || - dy * (arc[3].y - arc[1].y) + dx * (arc[3].x - arc[1].x) < 0 || - dy * (arc[3].y - arc[2].y) + dx * (arc[3].x - arc[2].x) < 0 ) + /* Split super curvy segments where the off points are so far + from the chord that the angles P0-P1-P3 or P0-P2-P3 become + acute as detected by appropriate dot products. */ + if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 || + dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 ) goto Split; /* No reason to split. */ @@ -1126,7 +1154,8 @@ typedef ptrdiff_t FT_PtrDist; /* record current cell, if any */ - gray_record_cell( RAS_VAR ); + if ( !ras.invalid ) + gray_record_cell( RAS_VAR ); /* start to a new position */ x = UPSCALE( to->x ); @@ -1227,9 +1256,7 @@ typedef ptrdiff_t FT_PtrDist; TPos area, TCoord acount ) { - FT_Span* span; - int count; - int coverage; + int coverage; /* compute the coverage line's coverage, depending on the */ @@ -1271,6 +1298,10 @@ typedef ptrdiff_t FT_PtrDist; if ( coverage ) { + FT_Span* span; + int count; + + /* see whether we can add this span to the current list */ count = ras.num_gray_spans; span = ras.gray_spans + count - 1; @@ -1309,7 +1340,6 @@ typedef ptrdiff_t FT_PtrDist; ras.num_gray_spans = 0; ras.span_y = (int)y; - count = 0; span = ras.gray_spans; } else @@ -1400,7 +1430,26 @@ typedef ptrdiff_t FT_PtrDist; ras.render_span( ras.span_y, ras.num_gray_spans, ras.gray_spans, ras.render_span_data ); +#ifdef FT_DEBUG_LEVEL_TRACE + + if ( ras.num_gray_spans > 0 ) + { + FT_Span* span; + int n; + + + FT_TRACE7(( "y = %3d ", ras.span_y )); + span = ras.gray_spans; + for ( n = 0; n < ras.num_gray_spans; n++, span++ ) + FT_TRACE7(( "[%d..%d]:%02x ", + span->x, span->x + span->len - 1, span->coverage )); + FT_TRACE7(( "\n" )); + } + FT_TRACE7(( "gray_sweep: end\n" )); + +#endif /* FT_DEBUG_LEVEL_TRACE */ + } @@ -1466,8 +1515,11 @@ typedef ptrdiff_t FT_PtrDist; TPos delta; - if ( !outline || !func_interface ) - return ErrRaster_Invalid_Argument; + if ( !outline ) + return FT_THROW( Invalid_Outline ); + + if ( !func_interface ) + return FT_THROW( Invalid_Argument ); shift = func_interface->shift; delta = func_interface->delta; @@ -1680,7 +1732,7 @@ typedef ptrdiff_t FT_PtrDist; return error; Invalid_Outline: - return ErrRaster_Invalid_Outline; + return FT_THROW( Invalid_Outline ); } #endif /* _STANDALONE_ */ @@ -1715,10 +1767,11 @@ typedef ptrdiff_t FT_PtrDist; if ( ft_setjmp( ras.jump_buffer ) == 0 ) { error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras ); - gray_record_cell( RAS_VAR ); + if ( !ras.invalid ) + gray_record_cell( RAS_VAR ); } else - error = ErrRaster_Memory_Overflow; + error = FT_THROW( Memory_Overflow ); return error; } @@ -1871,21 +1924,21 @@ typedef ptrdiff_t FT_PtrDist; if ( !raster || !raster->buffer || !raster->buffer_size ) - return ErrRaster_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( !outline ) - return ErrRaster_Invalid_Outline; + return FT_THROW( Invalid_Outline ); /* return immediately if the outline is empty */ if ( outline->n_points == 0 || outline->n_contours <= 0 ) return 0; if ( !outline->contours || !outline->points ) - return ErrRaster_Invalid_Outline; + return FT_THROW( Invalid_Outline ); if ( outline->n_points != outline->contours[outline->n_contours - 1] + 1 ) - return ErrRaster_Invalid_Outline; + return FT_THROW( Invalid_Outline ); worker = raster->worker; @@ -1893,19 +1946,19 @@ typedef ptrdiff_t FT_PtrDist; if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) ) { if ( !target_map ) - return ErrRaster_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* nothing to do */ if ( !target_map->width || !target_map->rows ) return 0; if ( !target_map->buffer ) - return ErrRaster_Invalid_Argument; + return FT_THROW( Invalid_Argument ); } /* this version does not support monochrome rendering */ if ( !( params->flags & FT_RASTER_FLAG_AA ) ) - return ErrRaster_Invalid_Mode; + return FT_THROW( Invalid_Mode ); /* compute clipping box */ if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) ) @@ -2047,12 +2100,26 @@ typedef ptrdiff_t FT_PtrDist; } + static int + gray_raster_set_mode( FT_Raster raster, + unsigned long mode, + void* args ) + { + FT_UNUSED( raster ); + FT_UNUSED( mode ); + FT_UNUSED( args ); + + + return 0; /* nothing to do */ + } + + FT_DEFINE_RASTER_FUNCS(ft_grays_raster, FT_GLYPH_FORMAT_OUTLINE, (FT_Raster_New_Func) gray_raster_new, (FT_Raster_Reset_Func) gray_raster_reset, - (FT_Raster_Set_Mode_Func)0, + (FT_Raster_Set_Mode_Func)gray_raster_set_mode, (FT_Raster_Render_Func) gray_raster_render, (FT_Raster_Done_Func) gray_raster_done ) diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c index 00499cc..4e2dee5 100644 --- a/src/smooth/ftsmooth.c +++ b/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ /* */ /* Anti-aliasing renderer interface (body). */ /* */ -/* Copyright 2000-2006, 2009-2012 by */ +/* Copyright 2000-2006, 2009-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,12 +61,12 @@ const FT_Matrix* matrix, const FT_Vector* delta ) { - FT_Error error = Smooth_Err_Ok; + FT_Error error = FT_Err_Ok; if ( slot->format != render->glyph_format ) { - error = Smooth_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -103,97 +103,79 @@ FT_Render_Mode required_mode ) { FT_Error error; - FT_Outline* outline = NULL; + FT_Outline* outline = &slot->outline; + FT_Bitmap* bitmap = &slot->bitmap; + FT_Memory memory = render->root.memory; FT_BBox cbox; + FT_Pos x_shift = 0; + FT_Pos y_shift = 0; + FT_Pos x_left, y_top; FT_Pos width, height, pitch; #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_Pos height_org, width_org; #endif - FT_Bitmap* bitmap; - FT_Memory memory; - FT_Int hmul = mode == FT_RENDER_MODE_LCD; - FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; - FT_Pos x_shift, y_shift, x_left, y_top; + FT_Int hmul = mode == FT_RENDER_MODE_LCD; + FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; FT_Raster_Params params; + FT_Bool have_outline_shifted = FALSE; + FT_Bool have_buffer = FALSE; + /* check glyph image format */ if ( slot->format != render->glyph_format ) { - error = Smooth_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } /* check mode */ if ( mode != required_mode ) - return Smooth_Err_Cannot_Render_Glyph; - - outline = &slot->outline; + { + error = FT_THROW( Cannot_Render_Glyph ); + goto Exit; + } - /* translate the outline to the new origin if needed */ if ( origin ) - FT_Outline_Translate( outline, origin->x, origin->y ); + { + x_shift = origin->x; + y_shift = origin->y; + } /* compute the control box, and grid fit it */ + /* taking into account the origin shift */ FT_Outline_Get_CBox( outline, &cbox ); - cbox.xMin = FT_PIX_FLOOR( cbox.xMin ); - cbox.yMin = FT_PIX_FLOOR( cbox.yMin ); - cbox.xMax = FT_PIX_CEIL( cbox.xMax ); - cbox.yMax = FT_PIX_CEIL( cbox.yMax ); + cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift ); + cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift ); + cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift ); + cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift ); - if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin ) - { - FT_ERROR(( "ft_smooth_render_generic: glyph too large:" - " xMin = %d, xMax = %d\n", - cbox.xMin >> 6, cbox.xMax >> 6 )); - return Smooth_Err_Raster_Overflow; - } - else - width = ( cbox.xMax - cbox.xMin ) >> 6; + x_shift -= cbox.xMin; + y_shift -= cbox.yMin; - if ( cbox.yMin < 0 && cbox.yMax > FT_INT_MAX + cbox.yMin ) - { - FT_ERROR(( "ft_smooth_render_generic: glyph too large:" - " yMin = %d, yMax = %d\n", - cbox.yMin >> 6, cbox.yMax >> 6 )); - return Smooth_Err_Raster_Overflow; - } - else - height = ( cbox.yMax - cbox.yMin ) >> 6; + x_left = cbox.xMin >> 6; + y_top = cbox.yMax >> 6; - bitmap = &slot->bitmap; - memory = render->root.memory; + width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6; + height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6; #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING width_org = width; height_org = height; #endif - /* release old bitmap buffer */ - if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) - { - FT_FREE( bitmap->buffer ); - slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; - } - - /* allocate new one */ pitch = width; if ( hmul ) { - width = width * 3; - pitch = FT_PAD_CEIL( width, 4 ); + width *= 3; + pitch = FT_PAD_CEIL( width, 4 ); } if ( vmul ) height *= 3; - x_shift = (FT_Int) cbox.xMin; - y_shift = (FT_Int) cbox.yMin; - x_left = (FT_Int)( cbox.xMin >> 6 ); - y_top = (FT_Int)( cbox.yMax >> 6 ); - #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING if ( slot->library->lcd_filter_func ) @@ -203,34 +185,61 @@ if ( hmul ) { - x_shift -= 64 * ( extra >> 1 ); + x_shift += 64 * ( extra >> 1 ); + x_left -= extra >> 1; width += 3 * extra; pitch = FT_PAD_CEIL( width, 4 ); - x_left -= extra >> 1; } if ( vmul ) { - y_shift -= 64 * ( extra >> 1 ); - height += 3 * extra; + y_shift += 64 * ( extra >> 1 ); y_top += extra >> 1; + height += 3 * extra; } } #endif -#if FT_UINT_MAX > 0xFFFFU + /* + * XXX: on 16bit system, we return an error for huge bitmap + * to prevent an overflow. + */ + if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX || + x_left < FT_INT_MIN || y_top < FT_INT_MIN ) + { + error = FT_THROW( Invalid_Pixel_Size ); + goto Exit; + } - /* Required check is ( pitch * height < FT_ULONG_MAX ), */ - /* but we care realistic cases only. Always pitch <= width. */ + /* Required check is (pitch * height < FT_ULONG_MAX), */ + /* but we care realistic cases only. Always pitch <= width. */ if ( width > 0x7FFF || height > 0x7FFF ) { FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n", width, height )); - return Smooth_Err_Raster_Overflow; + error = FT_THROW( Raster_Overflow ); + goto Exit; } -#endif + /* release old bitmap buffer */ + if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) + { + FT_FREE( bitmap->buffer ); + slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; + } + + /* allocate new one */ + if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) + goto Exit; + else + have_buffer = TRUE; + + slot->internal->flags |= FT_GLYPH_OWN_BITMAP; + + slot->format = FT_GLYPH_FORMAT_BITMAP; + slot->bitmap_left = (FT_Int)x_left; + slot->bitmap_top = (FT_Int)y_top; bitmap->pixel_mode = FT_PIXEL_MODE_GRAY; bitmap->num_grays = 256; @@ -239,12 +248,11 @@ bitmap->pitch = pitch; /* translate outline to render it into the bitmap */ - FT_Outline_Translate( outline, -x_shift, -y_shift ); - - if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) - goto Exit; - - slot->internal->flags |= FT_GLYPH_OWN_BITMAP; + if ( x_shift || y_shift ) + { + FT_Outline_Translate( outline, x_shift, y_shift ); + have_outline_shifted = TRUE; + } /* set up parameters */ params.target = bitmap; @@ -288,6 +296,9 @@ vec->y /= 3; } + if ( error ) + goto Exit; + if ( slot->library->lcd_filter_func ) slot->library->lcd_filter_func( bitmap, mode, slot->library ); @@ -295,6 +306,8 @@ /* render outline into bitmap */ error = render->raster_render( render->raster, ¶ms ); + if ( error ) + goto Exit; /* expand it horizontally */ if ( hmul ) @@ -346,25 +359,19 @@ #endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - FT_Outline_Translate( outline, x_shift, y_shift ); + /* everything is fine; don't deallocate buffer */ + have_buffer = FALSE; - /* - * XXX: on 16bit system, we return an error for huge bitmap - * to prevent an overflow. - */ - if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ) - return Smooth_Err_Invalid_Pixel_Size; - - if ( error ) - goto Exit; - - slot->format = FT_GLYPH_FORMAT_BITMAP; - slot->bitmap_left = (FT_Int)x_left; - slot->bitmap_top = (FT_Int)y_top; + error = FT_Err_Ok; Exit: - if ( outline && origin ) - FT_Outline_Translate( outline, -origin->x, -origin->y ); + if ( have_outline_shifted ) + FT_Outline_Translate( outline, -x_shift, -y_shift ); + if ( have_buffer ) + { + FT_FREE( bitmap->buffer ); + slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; + } return error; } diff --git a/src/smooth/ftspic.c b/src/smooth/ftspic.c index 601bcf9..67a2b83 100644 --- a/src/smooth/ftspic.c +++ b/src/smooth/ftspic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for smooth module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,17 +22,19 @@ #include "ftspic.h" #include "ftsmerrs.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from ftgrays.c */ void FT_Init_Class_ft_grays_raster( FT_Raster_Funcs* funcs ); + void ft_smooth_renderer_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->smooth ) @@ -42,6 +44,7 @@ if ( --container->ref_count ) return; + FT_FREE( container ); pic_container->smooth = NULL; } @@ -52,8 +55,8 @@ ft_smooth_renderer_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = Smooth_Err_Ok; - SmoothPIC* container; + FT_Error error = FT_Err_Ok; + SmoothPIC* container = NULL; FT_Memory memory = library->memory; @@ -66,37 +69,45 @@ } /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->smooth = container; + container->ref_count = 1; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - */ + /* this is how the module usually expects this data */ FT_Init_Class_ft_grays_raster( &container->ft_grays_raster ); -/*Exit:*/ - if ( error ) - ft_smooth_renderer_class_pic_free( library ); + return error; } + /* re-route these init and free functions to the above functions */ - FT_Error ft_smooth_lcd_renderer_class_pic_init( FT_Library library ) + FT_Error + ft_smooth_lcd_renderer_class_pic_init( FT_Library library ) { return ft_smooth_renderer_class_pic_init( library ); } - void ft_smooth_lcd_renderer_class_pic_free( FT_Library library ) + + void + ft_smooth_lcd_renderer_class_pic_free( FT_Library library ) { ft_smooth_renderer_class_pic_free( library ); } - FT_Error ft_smooth_lcdv_renderer_class_pic_init( FT_Library library ) + + FT_Error + ft_smooth_lcdv_renderer_class_pic_init( FT_Library library ) { return ft_smooth_renderer_class_pic_init( library ); } - void ft_smooth_lcdv_renderer_class_pic_free( FT_Library library ) + + void + ft_smooth_lcdv_renderer_class_pic_free( FT_Library library ) { ft_smooth_renderer_class_pic_free( library ); } diff --git a/src/smooth/ftspic.h b/src/smooth/ftspic.h index 4686f5e..334b51c 100644 --- a/src/smooth/ftspic.h +++ b/src/smooth/ftspic.h @@ -25,18 +25,23 @@ FT_BEGIN_HEADER #include FT_INTERNAL_PIC_H #ifndef FT_CONFIG_OPTION_PIC -#define FT_GRAYS_RASTER_GET ft_grays_raster + +#define FT_GRAYS_RASTER_GET ft_grays_raster #else /* FT_CONFIG_OPTION_PIC */ - typedef struct SmoothPIC_ + typedef struct SmoothPIC_ { - int ref_count; - FT_Raster_Funcs ft_grays_raster; + int ref_count; + FT_Raster_Funcs ft_grays_raster; + } SmoothPIC; -#define GET_PIC(lib) ((SmoothPIC*)((lib)->pic_container.smooth)) -#define FT_GRAYS_RASTER_GET (GET_PIC(library)->ft_grays_raster) + +#define GET_PIC( lib ) \ + ( (SmoothPIC*)( (lib)->pic_container.smooth ) ) +#define FT_GRAYS_RASTER_GET ( GET_PIC( library )->ft_grays_raster ) + /* see ftspic.c for the implementation */ void diff --git a/src/tools/afblue.pl b/src/tools/afblue.pl new file mode 100644 index 0000000..60fe696 --- /dev/null +++ b/src/tools/afblue.pl @@ -0,0 +1,548 @@ +#! /usr/bin/perl -w +# -*- Perl -*- +# +# afblue.pl +# +# Process a blue zone character data file. +# +# Copyright 2013, 2014 by +# David Turner, Robert Wilhelm, and Werner Lemberg. +# +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. + +use strict; +use warnings; +use English '-no_match_vars'; +use open ':std', ':encoding(UTF-8)'; + + +my $prog = $PROGRAM_NAME; +$prog =~ s| .* / ||x; # Remove path. + +die "usage: $prog datafile < infile > outfile\n" if $#ARGV != 0; + + +my $datafile = $ARGV[0]; + +my %diversions; # The extracted and massaged data from `datafile'. +my @else_stack; # Booleans to track else-clauses. +my @name_stack; # Stack of integers used for names of aux. variables. + +my $curr_enum; # Name of the current enumeration. +my $curr_array; # Name of the current array. +my $curr_max; # Name of the current maximum value. + +my $curr_enum_element; # Name of the current enumeration element. +my $curr_offset; # The offset relative to current aux. variable. +my $curr_elem_size; # The size of the current string or block. + +my $have_sections = 0; # Boolean; set if start of a section has been seen. +my $have_strings; # Boolean; set if current section contains strings. +my $have_blocks; # Boolean; set if current section contains blocks. + +my $have_enum_element; # Boolean; set if we have an enumeration element. +my $in_string; # Boolean; set if a string has been parsed. + +my $num_sections = 0; # Number of sections seen so far. + +my $last_aux; # Name of last auxiliary variable. + + +# Regular expressions. + +# [<ws>] <enum_name> <ws> <array_name> <ws> <max_name> [<ws>] ':' [<ws>] '\n' +my $section_re = qr/ ^ \s* (\S+) \s+ (\S+) \s+ (\S+) \s* : \s* $ /x; + +# [<ws>] <enum_element_name> [<ws>] '\n' +my $enum_element_re = qr/ ^ \s* ( [A-Za-z0-9_]+ ) \s* $ /x; + +# '#' <preprocessor directive> '\n' +my $preprocessor_re = qr/ ^ \# /x; + +# [<ws>] '/' '/' <comment> '\n' +my $comment_re = qr| ^ \s* // |x; + +# empty line +my $whitespace_only_re = qr/ ^ \s* $ /x; + +# [<ws>] '"' <string> '"' [<ws>] '\n' (<string> doesn't contain newlines) +my $string_re = qr/ ^ \s* + " ( (?> (?: (?> [^"\\]+ ) | \\. )* ) ) " + \s* $ /x; + +# [<ws>] '{' <block> '}' [<ws>] '\n' (<block> can contain newlines) +my $block_start_re = qr/ ^ \s* \{ /x; + +# We need the capturing group for `split' to make it return the separator +# tokens (i.e., the opening and closing brace) also. +my $brace_re = qr/ ( [{}] ) /x; + + +sub Warn +{ + my $message = shift; + warn "$datafile:$INPUT_LINE_NUMBER: warning: $message\n"; +} + + +sub Die +{ + my $message = shift; + die "$datafile:$INPUT_LINE_NUMBER: error: $message\n"; +} + + +my $warned_before = 0; + +sub warn_before +{ + Warn("data before first section gets ignored") unless $warned_before; + $warned_before = 1; +} + + +sub strip_newline +{ + chomp; + s/ \x0D $ //x; +} + + +sub end_curr_string +{ + # Append final null byte to string. + if ($have_strings) + { + push @{$diversions{$curr_array}}, " '\\0',\n" if $in_string; + + $curr_offset++; + $in_string = 0; + } +} + + +sub update_max_elem_size +{ + if ($curr_elem_size) + { + my $max = pop @{$diversions{$curr_max}}; + $max = $curr_elem_size if $curr_elem_size > $max; + push @{$diversions{$curr_max}}, $max; + } +} + + +sub convert_non_ascii_char +{ + # A UTF-8 character outside of the printable ASCII range, with possibly a + # leading backslash character. + my $s = shift; + + # Here we count characters, not bytes. + $curr_elem_size += length $s; + + utf8::encode($s); + $s = uc unpack 'H*', $s; + + $curr_offset += $s =~ s/\G(..)/'\\x$1', /sg; + + return $s; +} + + +sub convert_ascii_chars +{ + # A series of ASCII characters in the printable range. + my $s = shift; + + # We ignore spaces. + $s =~ s/ //g; + + my $count = $s =~ s/\G(.)/'$1', /g; + $curr_offset += $count; + $curr_elem_size += $count; + + return $s; +} + + +sub convert_literal +{ + my $s = shift; + my $orig = $s; + + # ASCII printables and space + my $safe_re = '\x20-\x7E'; + # ASCII printables and space, no backslash + my $safe_no_backslash_re = '\x20-\x5B\x5D-\x7E'; + + $s =~ s{ + (?: \\? ( [^$safe_re] ) + | ( (?: [$safe_no_backslash_re] + | \\ [$safe_re] )+ ) ) + } + { + defined($1) ? convert_non_ascii_char($1) + : convert_ascii_chars($2) + }egx; + + # We assume that `$orig' doesn't contain `*/' + return $s . " /* $orig */"; +} + + +sub aux_name +{ + return "af_blue_" . $num_sections. "_" . join('_', @name_stack); +} + + +sub aux_name_next +{ + $name_stack[$#name_stack]++; + my $name = aux_name(); + $name_stack[$#name_stack]--; + + return $name; +} + + +sub enum_val_string +{ + # Build string that holds code to save the current offset in an + # enumeration element. + my $aux = shift; + + my $add = ($last_aux eq "af_blue_" . $num_sections . "_0" ) + ? "" + : "$last_aux + "; + + return " $aux = $add$curr_offset,\n"; +} + + + +# Process data file. + +open(DATA, $datafile) || die "$prog: can't open \`$datafile': $OS_ERROR\n"; + +while (<DATA>) +{ + strip_newline(); + + next if /$comment_re/; + next if /$whitespace_only_re/; + + if (/$section_re/) + { + Warn("previous section is empty") if ($have_sections + && !$have_strings + && !$have_blocks); + + end_curr_string(); + update_max_elem_size(); + + # Save captured groups from `section_re'. + $curr_enum = $1; + $curr_array = $2; + $curr_max = $3; + + $curr_enum_element = ""; + $curr_offset = 0; + + Warn("overwriting already defined enumeration \`$curr_enum'") + if exists($diversions{$curr_enum}); + Warn("overwriting already defined array \`$curr_array'") + if exists($diversions{$curr_array}); + Warn("overwriting already defined maximum value \`$curr_max'") + if exists($diversions{$curr_max}); + + $diversions{$curr_enum} = []; + $diversions{$curr_array} = []; + $diversions{$curr_max} = []; + + push @{$diversions{$curr_max}}, 0; + + @name_stack = (); + push @name_stack, 0; + + $have_sections = 1; + $have_strings = 0; + $have_blocks = 0; + + $have_enum_element = 0; + $in_string = 0; + + $num_sections++; + $curr_elem_size = 0; + + $last_aux = aux_name(); + + next; + } + + if (/$preprocessor_re/) + { + if ($have_sections) + { + # Having preprocessor conditionals complicates the computation of + # correct offset values. We have to introduce auxiliary enumeration + # elements with the name `af_blue_<s>_<n1>_<n2>_...' that store + # offsets to be used in conditional clauses. `<s>' is the number of + # sections seen so far, `<n1>' is the number of `#if' and `#endif' + # conditionals seen so far in the topmost level, `<n2>' the number of + # `#if' and `#endif' conditionals seen so far one level deeper, etc. + # As a consequence, uneven values are used within a clause, and even + # values after a clause, since the C standard doesn't allow the + # redefinition of an enumeration value. For example, the name + # `af_blue_5_1_6' is used to construct enumeration values in the fifth + # section after the third (second-level) if-clause within the first + # (top-level) if-clause. After the first top-level clause has + # finished, `af_blue_5_2' is used. The current offset is then + # relative to the value stored in the current auxiliary element. + + if (/ ^ \# \s* if /x) + { + push @else_stack, 0; + + $name_stack[$#name_stack]++; + + push @{$diversions{$curr_enum}}, enum_val_string(aux_name()); + $last_aux = aux_name(); + + push @name_stack, 0; + + $curr_offset = 0; + } + elsif (/ ^ \# \s* elif /x) + { + Die("unbalanced #elif") unless @else_stack; + + pop @name_stack; + + push @{$diversions{$curr_enum}}, enum_val_string(aux_name_next()); + $last_aux = aux_name(); + + push @name_stack, 0; + + $curr_offset = 0; + } + elsif (/ ^ \# \s* else /x) + { + my $prev_else = pop @else_stack; + Die("unbalanced #else") unless defined($prev_else); + Die("#else already seen") if $prev_else; + push @else_stack, 1; + + pop @name_stack; + + push @{$diversions{$curr_enum}}, enum_val_string(aux_name_next()); + $last_aux = aux_name(); + + push @name_stack, 0; + + $curr_offset = 0; + } + elsif (/ ^ (\# \s*) endif /x) + { + my $prev_else = pop @else_stack; + Die("unbalanced #endif") unless defined($prev_else); + + pop @name_stack; + + # If there is no else-clause for an if-clause, we add one. This is + # necessary to have correct offsets. + if (!$prev_else) + { + # Use amount of whitespace from `endif'. + push @{$diversions{$curr_enum}}, enum_val_string(aux_name_next()) + . $1 . "else\n"; + $last_aux = aux_name(); + + $curr_offset = 0; + } + + $name_stack[$#name_stack]++; + + push @{$diversions{$curr_enum}}, enum_val_string(aux_name()); + $last_aux = aux_name(); + + $curr_offset = 0; + } + + # Handle (probably continued) preprocessor lines. + CONTINUED_LOOP: + { + do + { + strip_newline(); + + push @{$diversions{$curr_enum}}, $ARG . "\n"; + push @{$diversions{$curr_array}}, $ARG . "\n"; + + last CONTINUED_LOOP unless / \\ $ /x; + + } while (<DATA>); + } + } + else + { + warn_before(); + } + + next; + } + + if (/$enum_element_re/) + { + end_curr_string(); + update_max_elem_size(); + + $curr_enum_element = $1; + $have_enum_element = 1; + $curr_elem_size = 0; + + next; + } + + if (/$string_re/) + { + if ($have_sections) + { + Die("strings and blocks can't be mixed in a section") if $have_blocks; + + # Save captured group from `string_re'. + my $string = $1; + + if ($have_enum_element) + { + push @{$diversions{$curr_enum}}, enum_val_string($curr_enum_element); + $have_enum_element = 0; + } + + $string = convert_literal($string); + + push @{$diversions{$curr_array}}, " $string\n"; + + $have_strings = 1; + $in_string = 1; + } + else + { + warn_before(); + } + + next; + } + + if (/$block_start_re/) + { + if ($have_sections) + { + Die("strings and blocks can't be mixed in a section") if $have_strings; + + my $depth = 0; + my $block = ""; + my $block_end = 0; + + # Count braces while getting the block. + BRACE_LOOP: + { + do + { + strip_newline(); + + foreach my $substring (split(/$brace_re/)) + { + if ($block_end) + { + Die("invalid data after last matching closing brace") + if $substring !~ /$whitespace_only_re/; + } + + $block .= $substring; + + if ($substring eq '{') + { + $depth++; + } + elsif ($substring eq '}') + { + $depth--; + + $block_end = 1 if $depth == 0; + } + } + + # If we are here, we have run out of substrings, so get next line + # or exit. + last BRACE_LOOP if $block_end; + + $block .= "\n"; + + } while (<DATA>); + } + + if ($have_enum_element) + { + push @{$diversions{$curr_enum}}, enum_val_string($curr_enum_element); + $have_enum_element = 0; + } + + push @{$diversions{$curr_array}}, $block . ",\n"; + + $curr_offset++; + $curr_elem_size++; + + $have_blocks = 1; + } + else + { + warn_before(); + } + + next; + } + + # Garbage. We weren't able to parse the data. + Die("syntax error"); +} + +# Finalize data. +end_curr_string(); +update_max_elem_size(); + + +# Filter stdin to stdout, replacing `@...@' templates. + +sub emit_diversion +{ + my $diversion_name = shift; + return (exists($diversions{$1})) ? "@{$diversions{$1}}" + : "@" . $diversion_name . "@"; +} + + +$LIST_SEPARATOR = ''; + +my $s1 = "This file has been generated by the Perl script \`$prog',"; +my $s1len = length $s1; +my $s2 = "using data from file \`$datafile'."; +my $s2len = length $s2; +my $slen = ($s1len > $s2len) ? $s1len : $s2len; + +print "/* " . $s1 . " " x ($slen - $s1len) . " */\n" + . "/* " . $s2 . " " x ($slen - $s2len) . " */\n" + . "\n"; + +while (<STDIN>) +{ + s/ @ ( [A-Za-z0-9_]+? ) @ / emit_diversion($1) /egx; + print; +} + +# EOF diff --git a/src/tools/apinames.c b/src/tools/apinames.c index 3dc6559..c85df72 100644 --- a/src/tools/apinames.c +++ b/src/tools/apinames.c @@ -10,7 +10,7 @@ * accepted if you are using GCC for compilation (and probably by * other compilers too). * - * Author: David Turner, 2005, 2006, 2008-2012 + * Author: David Turner, 2005, 2006, 2008-2013 * * This code is explicitly placed into the public domain. * @@ -22,7 +22,7 @@ #include <ctype.h> #define PROGRAM_NAME "apinames" -#define PROGRAM_VERSION "0.1" +#define PROGRAM_VERSION "0.2" #define LINEBUFF_SIZE 1024 @@ -31,7 +31,8 @@ typedef enum OutputFormat_ OUTPUT_LIST = 0, /* output the list of names, one per line */ OUTPUT_WINDOWS_DEF, /* output a Windows .DEF file for Visual C++ or Mingw */ OUTPUT_BORLAND_DEF, /* output a Windows .DEF file for Borland C++ */ - OUTPUT_WATCOM_LBC /* output a Watcom Linker Command File */ + OUTPUT_WATCOM_LBC, /* output a Watcom Linker Command File */ + OUTPUT_NETWARE_IMP /* output a NetWare ImportFile */ } OutputFormat; @@ -154,8 +155,6 @@ names_dump( FILE* out, case OUTPUT_WATCOM_LBC: { - /* we must omit the .dll suffix from the library name */ - char temp[512]; const char* dot; @@ -166,10 +165,12 @@ names_dump( FILE* out, exit( 4 ); } + /* we must omit the .dll suffix from the library name */ dot = strchr( dll_name, '.' ); if ( dot != NULL ) { - int len = dot - dll_name; + char temp[512]; + int len = dot - dll_name; if ( len > (int)( sizeof ( temp ) - 1 ) ) @@ -187,6 +188,16 @@ names_dump( FILE* out, } break; + case OUTPUT_NETWARE_IMP: + { + if ( dll_name != NULL ) + fprintf( out, " (%s)\n", dll_name ); + for ( nn = 0; nn < num_names - 1; nn++ ) + fprintf( out, " %s,\n", the_names[nn].name ); + fprintf( out, " %s\n", the_names[num_names - 1].name ); + } + break; + default: /* LIST */ for ( nn = 0; nn < num_names; nn++ ) fprintf( out, "%s\n", the_names[nn].name ); @@ -311,6 +322,7 @@ usage( void ) " -w : output .DEF file for Visual C++ and Mingw\n" " -wB : output .DEF file for Borland C++\n" " -wW : output Watcom Linker Response File\n" + " -wN : output NetWare Import File\n" "\n"; fprintf( stderr, @@ -394,6 +406,10 @@ int main( int argc, const char* const* argv ) format = OUTPUT_WATCOM_LBC; break; + case 'N': + format = OUTPUT_NETWARE_IMP; + break; + case 0: break; diff --git a/src/tools/chktrcmp.py b/src/tools/chktrcmp.py index d0f342e..ce6500c 100755 --- a/src/tools/chktrcmp.py +++ b/src/tools/chktrcmp.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Check trace components in FreeType 2 source. -# Author: suzuki toshiya, 2009 +# Author: suzuki toshiya, 2009, 2013 # # This code is explicitly into the public domain. @@ -15,7 +15,7 @@ USED_COMPONENT = {} KNOWN_COMPONENT = {} SRC_FILE_DIRS = [ "src" ] -TRACE_DEF_FILES = [ "include/freetype/internal/fttrace.h" ] +TRACE_DEF_FILES = [ "include/internal/fttrace.h" ] # -------------------------------------------------------------- diff --git a/src/tools/cordic.py b/src/tools/cordic.py index 3f80c5f..6742c90 100644 --- a/src/tools/cordic.py +++ b/src/tools/cordic.py @@ -2,65 +2,20 @@ import sys, math #units = 64*65536.0 # don't change !! -units = 256 +units = 180 * 2**16 scale = units/math.pi shrink = 1.0 comma = "" -def calc_val( x ): - global units, shrink - angle = math.atan(x) - shrink = shrink * math.cos(angle) - return angle/math.pi * units - -def print_val( n, x ): - global comma - - lo = int(x) - hi = lo + 1 - alo = math.atan(lo) - ahi = math.atan(hi) - ax = math.atan(2.0**n) - - errlo = abs( alo - ax ) - errhi = abs( ahi - ax ) - - if ( errlo < errhi ): - hi = lo - - sys.stdout.write( comma + repr( int(hi) ) ) - comma = ", " - - print "" print "table of arctan( 1/2^n ) for PI = " + repr(units/65536.0) + " units" -# compute range of "i" -r = [-1] -r = r + range(32) - -for n in r: - - if n >= 0: - x = 1.0/(2.0**n) # tangent value - else: - x = 2.0**(-n) +for n in range(1,32): - angle = math.atan(x) # arctangent - angle2 = angle*scale # arctangent in FT_Angle units + x = 0.5**n # tangent value - # determine which integer value for angle gives the best tangent - lo = int(angle2) - hi = lo + 1 - tlo = math.tan(lo/scale) - thi = math.tan(hi/scale) - - errlo = abs( tlo - x ) - errhi = abs( thi - x ) - - angle2 = hi - if errlo < errhi: - angle2 = lo + angle = math.atan(x) # arctangent + angle2 = round(angle*scale) # arctangent in FT_Angle units if angle2 <= 0: break @@ -68,12 +23,11 @@ for n in r: sys.stdout.write( comma + repr( int(angle2) ) ) comma = ", " - shrink = shrink * math.cos( angle2/scale) - + shrink /= math.sqrt( 1 + x*x ) print print "shrink factor = " + repr( shrink ) -print "shrink factor 2 = " + repr( shrink * (2.0**32) ) -print "expansion factor = " + repr(1/shrink) +print "shrink factor 2 = " + repr( int( shrink * (2**32) ) ) +print "expansion factor = " + repr( 1/shrink ) print "" diff --git a/src/tools/docmaker/content.py b/src/tools/docmaker/content.py index b398955..adea6f1 100644 --- a/src/tools/docmaker/content.py +++ b/src/tools/docmaker/content.py @@ -1,57 +1,81 @@ -# Content (c) 2002, 2004, 2006, 2007, 2008, 2009 -# David Turner <david@freetype.org> # -# This file contains routines used to parse the content of documentation -# comment blocks and build more structured objects out of them. +# content.py # +# Parse comment blocks to build content blocks (library file). +# +# Copyright 2002, 2004, 2006-2009, 2012-2014 by +# David Turner. +# +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. + +# +# This file contains routines to parse documentation comment blocks, +# building more structured objects out of them. +# + from sources import * -from utils import * +from utils import * + import string, re -# this regular expression is used to detect code sequences. these -# are simply code fragments embedded in '{' and '}' like in: # -# { -# x = y + z; -# if ( zookoo == 2 ) -# { -# foobar(); -# } -# } +# Regular expressions to detect code sequences. `Code sequences' are simply +# code fragments embedded in '{' and '}', as demonstrated in the following +# example. +# +# { +# x = y + z; +# if ( zookoo == 2 ) +# { +# foobar(); +# } +# } # -# note that indentation of the starting and ending accolades must be -# exactly the same. the code sequence can contain accolades at greater -# indentation +# Note that the indentation of the first opening brace and the last closing +# brace must be exactly the same. The code sequence itself should have a +# larger indentation than the surrounding braces. # re_code_start = re.compile( r"(\s*){\s*$" ) re_code_end = re.compile( r"(\s*)}\s*$" ) -# this regular expression is used to isolate identifiers from -# other text # -re_identifier = re.compile( r'(\w*)' ) - - -# we collect macros ending in `_H'; while outputting the object data, we use -# this info together with the object's file location to emit the appropriate -# header file macro and name before the object itself +# A regular expression to isolate identifiers from other text. # -re_header_macro = re.compile( r'^#define\s{1,}(\w{1,}_H)\s{1,}<(.*)>' ) +re_identifier = re.compile( r'((?:\w|-)*)' ) -############################################################################# # -# The DocCode class is used to store source code lines. +# We collect macro names ending in `_H' (group 1), as defined in +# `config/ftheader.h'. While outputting the object data, we use this info +# together with the object's file location (group 2) to emit the appropriate +# header file macro and its associated file name before the object itself. # -# 'self.lines' contains a set of source code lines that will be dumped as -# HTML in a <PRE> tag. +# Example: # -# The object is filled line by line by the parser; it strips the leading -# "margin" space from each input line before storing it in 'self.lines'. +# #define FT_FREETYPE_H <freetype.h> # +re_header_macro = re.compile( r'^#define\s{1,}(\w{1,}_H)\s{1,}<(.*)>' ) + + +################################################################ +## +## DOC CODE CLASS +## +## The `DocCode' class is used to store source code lines. +## +## `self.lines' contains a set of source code lines that will be dumped as +## HTML in a <PRE> tag. +## +## The object is filled line by line by the parser; it strips the leading +## `margin' space from each input line before storing it in `self.lines'. +## class DocCode: def __init__( self, margin, lines ): @@ -77,12 +101,14 @@ class DocCode: -############################################################################# -# -# The DocPara class is used to store "normal" text paragraph. -# -# 'self.words' contains the list of words that make up the paragraph -# +################################################################ +## +## DOC PARA CLASS +## +## `Normal' text paragraphs are stored in the `DocPara' class. +## +## `self.words' contains the list of words that make up the paragraph. +## class DocPara: def __init__( self, lines ): @@ -123,17 +149,18 @@ class DocPara: return result - -############################################################################# -# -# The DocField class is used to store a list containing either DocPara or -# DocCode objects. Each DocField also has an optional "name" which is used -# when the object corresponds to a field or value definition -# +################################################################ +## +## DOC FIELD CLASS +## +## The `DocField' class stores a list containing either `DocPara' or +## `DocCode' objects. Each DocField object also has an optional `name' +## that is used when the object corresponds to a field or value definition. +## class DocField: def __init__( self, name, lines ): - self.name = name # can be None for normal paragraphs/sources + self.name = name # can be `None' for normal paragraphs/sources self.items = [] # list of items mode_none = 0 # start parsing mode @@ -143,14 +170,14 @@ class DocField: margin = -1 # current code sequence indentation cur_lines = [] - # now analyze the markup lines to see if they contain paragraphs, - # code sequences or fields definitions + # analyze the markup lines to check whether they contain paragraphs, + # code sequences, or fields definitions # start = 0 mode = mode_none for l in lines: - # are we parsing a code sequence ? + # are we parsing a code sequence? if mode == mode_code: m = re_code_end.match( l ) if m and len( m.group( 1 ) ) <= margin: @@ -161,10 +188,10 @@ class DocField: cur_lines = [] mode = mode_none else: - # nope, continue the code sequence + # otherwise continue the code sequence cur_lines.append( l[margin:] ) else: - # start of code sequence ? + # start of code sequence? m = re_code_start.match( l ) if m: # save current lines @@ -222,13 +249,29 @@ class DocField: return result - -# this regular expression is used to detect field definitions # -re_field = re.compile( r"\s*(\w*|\w(\w|\.)*\w)\s*::" ) - - - +# A regular expression to detect field definitions. +# +# Examples: +# +# foo :: +# foo.bar :: +# +re_field = re.compile( r""" + \s* + ( + \w* + | + \w (\w | \.)* \w + ) + \s* :: + """, re.VERBOSE ) + + +################################################################ +## +## DOC MARKUP CLASS +## class DocMarkup: def __init__( self, tag, lines ): @@ -242,7 +285,7 @@ class DocMarkup: for l in lines: m = re_field.match( l ) if m: - # we detected the start of a new field definition + # We detected the start of a new field definition. # first, save the current one if cur_lines: @@ -268,15 +311,6 @@ class DocMarkup: except: return None - def get_start( self ): - try: - result = "" - for word in self.fields[0].items[0].words: - result = result + " " + word - return result[1:] - except: - return "ERROR" - def dump( self, margin ): print " " * margin + "<" + self.tag + ">" for f in self.fields: @@ -284,7 +318,10 @@ class DocMarkup: print " " * margin + "</" + self.tag + ">" - +################################################################ +## +## DOC CHAPTER CLASS +## class DocChapter: def __init__( self, block ): @@ -300,7 +337,10 @@ class DocChapter: self.order = [] - +################################################################ +## +## DOC SECTION CLASS +## class DocSection: def __init__( self, name = "Other" ): @@ -329,18 +369,21 @@ class DocSection: self.title = title self.abstract = block.get_markup_words( "abstract" ) self.description = block.get_markup_items( "description" ) - self.order = block.get_markup_words( "order" ) + self.order = block.get_markup_words_all( "order" ) return def reorder( self ): self.block_names = sort_order_list( self.block_names, self.order ) - +################################################################ +## +## CONTENT PROCESSOR CLASS +## class ContentProcessor: def __init__( self ): - """initialize a block content processor""" + """Initialize a block content processor.""" self.reset() self.sections = {} # dictionary of documentation sections @@ -351,8 +394,8 @@ class ContentProcessor: self.headers = {} # dictionary of header macros def set_section( self, section_name ): - """set current section during parsing""" - if not self.sections.has_key( section_name ): + """Set current section during parsing.""" + if not section_name in self.sections: section = DocSection( section_name ) self.sections[section_name] = section self.section = section @@ -363,15 +406,14 @@ class ContentProcessor: chapter = DocChapter( block ) self.chapters.append( chapter ) - def reset( self ): - """reset the content processor for a new block""" + """Reset the content processor for a new block.""" self.markups = [] self.markup = None self.markup_lines = [] def add_markup( self ): - """add a new markup section""" + """Add a new markup section.""" if self.markup and self.markup_lines: # get rid of last line of markup if it's empty @@ -387,8 +429,8 @@ class ContentProcessor: self.markup_lines = [] def process_content( self, content ): - """process a block content and return a list of DocMarkup objects - corresponding to it""" + """Process a block content and return a list of DocMarkup objects + corresponding to it.""" markup = None markup_lines = [] first = 1 @@ -446,7 +488,7 @@ class ContentProcessor: # listed there for chap in self.chapters: for sec in chap.order: - if self.sections.has_key( sec ): + if sec in self.sections: section = self.sections[sec] section.chapter = chap section.reorder() @@ -461,6 +503,7 @@ class ContentProcessor: others = [] for sec in self.sections.values(): if not sec.chapter: + sec.reorder() others.append( sec ) # create a new special chapter for all remaining sections @@ -472,7 +515,10 @@ class ContentProcessor: self.chapters.append( chap ) - +################################################################ +## +## DOC BLOCK CLASS +## class DocBlock: def __init__( self, source, follow, processor ): @@ -549,24 +595,31 @@ class DocBlock: return self.source.location() def get_markup( self, tag_name ): - """return the DocMarkup corresponding to a given tag in a block""" + """Return the DocMarkup corresponding to a given tag in a block.""" for m in self.markups: if m.tag == string.lower( tag_name ): return m return None - def get_markup_name( self, tag_name ): - """return the name of a given primary markup in a block""" + def get_markup_words( self, tag_name ): try: m = self.get_markup( tag_name ) - return m.get_name() + return m.fields[0].items[0].words except: - return None + return [] - def get_markup_words( self, tag_name ): + def get_markup_words_all( self, tag_name ): try: m = self.get_markup( tag_name ) - return m.fields[0].items[0].words + words = [] + for item in m.fields[0].items: + # We honour empty lines in an `<Order>' section element by + # adding the sentinel `/empty/'. The formatter should then + # convert it to an appropriate representation in the + # `section_enter' function. + words += item.words + words.append( "/empty/" ) + return words except: return [] diff --git a/src/tools/docmaker/docmaker.py b/src/tools/docmaker/docmaker.py index 1d9de9f..4fb1abf 100644 --- a/src/tools/docmaker/docmaker.py +++ b/src/tools/docmaker/docmaker.py @@ -1,16 +1,26 @@ #!/usr/bin/env python # -# DocMaker (c) 2002, 2004, 2008 David Turner <david@freetype.org> +# docmaker.py # -# This program is a re-write of the original DocMaker took used -# to generate the API Reference of the FreeType font engine -# by converting in-source comments into structured HTML. +# Convert source code markup to HTML documentation. # -# This new version is capable of outputting XML data, as well -# as accepts more liberal formatting options. +# Copyright 2002, 2004, 2008, 2013, 2014 by +# David Turner. # -# It also uses regular expression matching and substitution -# to speed things significantly. +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. + +# +# This program is a re-write of the original DocMaker tool used to generate +# the API Reference of the FreeType font rendering engine by converting +# in-source comments into structured HTML. +# +# This new version is capable of outputting XML data as well as accepting +# more liberal formatting options. It also uses regular expression matching +# and substitution to speed up operation significantly. # from sources import * @@ -39,13 +49,13 @@ def usage(): def main( argv ): - """main program loop""" + """Main program loop.""" global output_dir try: - opts, args = getopt.getopt( sys.argv[1:], \ - "ht:o:p:", \ + opts, args = getopt.getopt( sys.argv[1:], + "ht:o:p:", ["help", "title=", "output=", "prefix="] ) except getopt.GetoptError: usage() @@ -56,7 +66,6 @@ def main( argv ): sys.exit( 1 ) # process options - # project_title = "Project" project_prefix = None output_dir = None @@ -90,7 +99,9 @@ def main( argv ): # process sections content_processor.finish() - formatter = HtmlFormatter( content_processor, project_title, project_prefix ) + formatter = HtmlFormatter( content_processor, + project_title, + project_prefix ) formatter.toc_dump() formatter.index_dump() @@ -98,9 +109,7 @@ def main( argv ): # if called from the command line -# if __name__ == '__main__': main( sys.argv ) - # eof diff --git a/src/tools/docmaker/formatter.py b/src/tools/docmaker/formatter.py index f62ce67..7152c01 100644 --- a/src/tools/docmaker/formatter.py +++ b/src/tools/docmaker/formatter.py @@ -1,19 +1,37 @@ -# Formatter (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org> # +# formatter.py +# +# Convert parsed content blocks to a structured document (library file). +# +# Copyright 2002, 2004, 2007, 2008, 2014 by +# David Turner. +# +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. + +# +# This is the base Formatter class. Its purpose is to convert a content +# processor's data into specific documents (i.e., table of contents, global +# index, and individual API reference indices). +# +# You need to sub-class it to output anything sensible. For example, the +# file `tohtml.py' contains the definition of the `HtmlFormatter' sub-class +# to output HTML. +# + from sources import * from content import * from utils import * -# This is the base Formatter class. Its purpose is to convert -# a content processor's data into specific documents (i.e., table of -# contents, global index, and individual API reference indices). -# -# You need to sub-class it to output anything sensible. For example, -# the file tohtml.py contains the definition of the HtmlFormatter sub-class -# used to output -- you guessed it -- HTML. -# +################################################################ +## +## FORMATTER CLASS +## class Formatter: def __init__( self, processor ): @@ -36,20 +54,22 @@ class Formatter: self.add_identifier( field.name, block ) self.block_index = self.identifiers.keys() - self.block_index.sort( index_sort ) + self.block_index.sort( key = index_key ) def add_identifier( self, name, block ): - if self.identifiers.has_key( name ): + if name in self.identifiers: # duplicate name! - sys.stderr.write( \ - "WARNING: duplicate definition for '" + name + "' in " + \ - block.location() + ", previous definition in " + \ - self.identifiers[name].location() + "\n" ) + sys.stderr.write( "WARNING: duplicate definition for" + + " '" + name + "' " + + "in " + block.location() + ", " + + "previous definition in " + + self.identifiers[name].location() + + "\n" ) else: self.identifiers[name] = block # - # Formatting the table of contents + # formatting the table of contents # def toc_enter( self ): pass @@ -97,7 +117,7 @@ class Formatter: close_output( output ) # - # Formatting the index + # formatting the index # def index_enter( self ): pass @@ -128,7 +148,7 @@ class Formatter: close_output( output ) # - # Formatting a section + # formatting a section # def section_enter( self, section ): pass @@ -162,7 +182,22 @@ class Formatter: self.section_enter( section ) for name in section.block_names: - block = self.identifiers[name] + skip_entry = 0 + try: + block = self.identifiers[name] + # `block_names' can contain field names also, + # which we filter out + for markup in block.markups: + if markup.tag == 'values': + for field in markup.fields: + if field.name == name: + skip_entry = 1 + except: + skip_entry = 1 # this happens e.g. for `/empty/' entries + + if skip_entry: + continue + self.block_enter( block ) for markup in block.markups[1:]: # always ignore first markup! diff --git a/src/tools/docmaker/sources.py b/src/tools/docmaker/sources.py index 7b68c07..61ecc22 100644 --- a/src/tools/docmaker/sources.py +++ b/src/tools/docmaker/sources.py @@ -1,62 +1,70 @@ -# Sources (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009 -# David Turner <david@freetype.org> # +# sources.py # -# this file contains definitions of classes needed to decompose -# C sources files into a series of multi-line "blocks". There are -# two kinds of blocks: +# Convert source code comments to multi-line blocks (library file). # -# - normal blocks, which contain source code or ordinary comments +# Copyright 2002-2004, 2006-2009, 2012-2014 by +# David Turner. # -# - documentation blocks, which have restricted formatting, and -# whose text always start with a documentation markup tag like -# "<Function>", "<Type>", etc.. +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. + +# +# This library file contains definitions of classes needed to decompose C +# source code files into a series of multi-line `blocks'. There are two +# kinds of blocks. # -# the routines used to process the content of documentation blocks -# are not contained here, but in "content.py" +# - Normal blocks, which contain source code or ordinary comments. # -# the classes and methods found here only deal with text parsing -# and basic documentation block extraction +# - Documentation blocks, which have restricted formatting, and whose text +# always start with a documentation markup tag like `<Function>', +# `<Type>', etc. +# +# The routines to process the content of documentation blocks are contained +# in file `content.py'; the classes and methods found here only deal with +# text parsing and basic documentation block extraction. # -import fileinput, re, sys, os, string +import fileinput, re, sys, os, string ################################################################ ## -## BLOCK FORMAT PATTERN +## SOURCE BLOCK FORMAT CLASS +## +## A simple class containing compiled regular expressions to detect +## potential documentation format block comments within C source code. ## -## A simple class containing compiled regular expressions used -## to detect potential documentation format block comments within -## C source code +## The `column' pattern must contain a group to `unbox' the content of +## documentation comment blocks. ## -## note that the 'column' pattern must contain a group that will -## be used to "unbox" the content of documentation comment blocks +## Later on, paragraphs are converted to long lines, which simplifies the +## regular expressions that act upon the text. ## class SourceBlockFormat: def __init__( self, id, start, column, end ): - """create a block pattern, used to recognize special documentation blocks""" + """Create a block pattern, used to recognize special documentation + blocks.""" self.id = id self.start = re.compile( start, re.VERBOSE ) self.column = re.compile( column, re.VERBOSE ) self.end = re.compile( end, re.VERBOSE ) - # -# format 1 documentation comment blocks look like the following: +# Format 1 documentation comment blocks. # -# /************************************/ +# /************************************/ (at least 2 asterisks) # /* */ # /* */ # /* */ -# /************************************/ +# /************************************/ (at least 2 asterisks) # -# we define a few regular expressions here to detect them -# - start = r''' \s* # any number of whitespace /\*{2,}/ # followed by '/' and at least two asterisks then '/' @@ -75,16 +83,13 @@ re_source_block_format1 = SourceBlockFormat( 1, start, column, start ) # -# format 2 documentation comment blocks look like the following: +# Format 2 documentation comment blocks. # # /************************************ (at least 2 asterisks) # * +# * (1 asterisk) # * -# * -# * -# **/ (1 or more asterisks at the end) -# -# we define a few regular expressions here to detect them +# */ (1 or more asterisks) # start = r''' \s* # any number of whitespace @@ -93,9 +98,9 @@ start = r''' ''' column = r''' - \s* # any number of whitespace - \*{1}(?!/) # followed by precisely one asterisk not followed by `/' - (.*) # then anything (group1) + \s* # any number of whitespace + \*{1}(?![*/]) # followed by precisely one asterisk not followed by `/' + (.*) # then anything (group1) ''' end = r''' @@ -107,51 +112,101 @@ re_source_block_format2 = SourceBlockFormat( 2, start, column, end ) # -# the list of supported documentation block formats, we could add new ones -# relatively easily +# The list of supported documentation block formats. We could add new ones +# quite easily. # re_source_block_formats = [re_source_block_format1, re_source_block_format2] # -# the following regular expressions corresponds to markup tags -# within the documentation comment blocks. they're equivalent -# despite their different syntax +# The following regular expressions correspond to markup tags within the +# documentation comment blocks. They are equivalent despite their different +# syntax. +# +# A markup tag consists of letters or character `-', to be found in group 1. # -# notice how each markup tag _must_ begin a new line +# Notice that a markup tag _must_ begin a new paragraph. # -re_markup_tag1 = re.compile( r'''\s*<(\w*)>''' ) # <xxxx> format -re_markup_tag2 = re.compile( r'''\s*@(\w*):''' ) # @xxxx: format +re_markup_tag1 = re.compile( r'''\s*<((?:\w|-)*)>''' ) # <xxxx> format +re_markup_tag2 = re.compile( r'''\s*@((?:\w|-)*):''' ) # @xxxx: format # -# the list of supported markup tags, we could add new ones relatively -# easily +# The list of supported markup tags. We could add new ones quite easily. # re_markup_tags = [re_markup_tag1, re_markup_tag2] + +# +# A regular expression to detect a cross reference, after markup tags have +# been stripped off. Group 1 is the reference, group 2 the rest of the +# line. # -# used to detect a cross-reference, after markup tags have been stripped +# A cross reference consists of letters, digits, or characters `-' and `_'. # -re_crossref = re.compile( r'@(\w*)(.*)' ) +re_crossref = re.compile( r'@((?:\w|-)*)(.*)' ) # @foo # -# used to detect italic and bold styles in paragraph text +# Two regular expressions to detect italic and bold markup, respectively. +# Group 1 is the markup, group 2 the rest of the line. # -re_italic = re.compile( r"_(\w(\w|')*)_(.*)" ) # _italic_ -re_bold = re.compile( r"\*(\w(\w|')*)\*(.*)" ) # *bold* +# Note that the markup is limited to words consisting of letters, digits, +# the character `_', or an apostrophe (but not as the first character). +# +re_italic = re.compile( r"_(\w(?:\w|')*)_(.*)" ) # _italic_ +re_bold = re.compile( r"\*(\w(?:\w|')*)\*(.*)" ) # *bold* # -# used to detect the end of commented source lines +# This regular expression code to identify an URL has been taken from +# +# http://mail.python.org/pipermail/tutor/2002-September/017228.html # -re_source_sep = re.compile( r'\s*/\*\s*\*/' ) +# (with slight modifications). +# +urls = r'(?:https?|telnet|gopher|file|wais|ftp)' +ltrs = r'\w' +gunk = r'/#~:.?+=&%@!\-' +punc = r'.:?\-' +any = "%(ltrs)s%(gunk)s%(punc)s" % { 'ltrs' : ltrs, + 'gunk' : gunk, + 'punc' : punc } +url = r""" + ( + \b # start at word boundary + %(urls)s : # need resource and a colon + [%(any)s] +? # followed by one or more of any valid + # character, but be conservative and + # take only what you need to... + (?= # [look-ahead non-consumptive assertion] + [%(punc)s]* # either 0 or more punctuation + (?: # [non-grouping parentheses] + [^%(any)s] | $ # followed by a non-url char + # or end of the string + ) + ) + ) + """ % {'urls' : urls, + 'any' : any, + 'punc' : punc } + +re_url = re.compile( url, re.VERBOSE | re.MULTILINE ) # -# used to perform cross-reference within source output +# A regular expression that stops collection of comments for the current +# block. +# +re_source_sep = re.compile( r'\s*/\*\s*\*/' ) # /* */ + +# +# A regular expression to find possible C identifiers while outputting +# source code verbatim, covering things like `*foo' or `(bar'. Group 1 is +# the prefix, group 2 the identifier -- since we scan lines from left to +# right, sequentially splitting the source code into prefix and identifier +# is fully sufficient for our purposes. # re_source_crossref = re.compile( r'(\W*)(\w*)' ) # -# a list of reserved source keywords +# A regular expression that matches a list of reserved C source keywords. # re_source_keywords = re.compile( '''\\b ( typedef | struct | @@ -179,24 +234,16 @@ re_source_keywords = re.compile( '''\\b ( typedef | ## ## SOURCE BLOCK CLASS ## -## A SourceProcessor is in charge of reading a C source file -## and decomposing it into a series of different "SourceBlocks". -## each one of these blocks can be made of the following data: -## -## - A documentation comment block that starts with "/**" and -## whose exact format will be discussed later +## There are two important fields in a `SourceBlock' object. ## -## - normal sources lines, including comments +## self.lines +## A list of text lines for the corresponding block. ## -## the important fields in a text block are the following ones: -## -## self.lines : a list of text lines for the corresponding block -## -## self.content : for documentation comment blocks only, this is the -## block content that has been "unboxed" from its -## decoration. This is None for all other blocks -## (i.e. sources or ordinary comments with no starting -## markup tag) +## self.content +## For documentation comment blocks only, this is the block content +## that has been `unboxed' from its decoration. This is `None' for all +## other blocks (i.e., sources or ordinary comments with no starting +## markup tag) ## class SourceBlock: @@ -233,7 +280,7 @@ class SourceBlock: def location( self ): return "(" + self.filename + ":" + repr( self.lineno ) + ")" - # debugging only - not used in normal operations + # debugging only -- not used in normal operations def dump( self ): if self.content: print "{{{content start---" @@ -250,39 +297,38 @@ class SourceBlock: print line - ################################################################ ## ## SOURCE PROCESSOR CLASS ## -## The SourceProcessor is in charge of reading a C source file -## and decomposing it into a series of different "SourceBlock" -## objects. +## The `SourceProcessor' is in charge of reading a C source file and +## decomposing it into a series of different `SourceBlock' objects. ## -## each one of these blocks can be made of the following data: +## A SourceBlock object consists of the following data. ## -## - A documentation comment block that starts with "/**" and -## whose exact format will be discussed later +## - A documentation comment block using one of the layouts above. Its +## exact format will be discussed later. ## -## - normal sources lines, include comments +## - Normal sources lines, including comments. ## ## class SourceProcessor: def __init__( self ): - """initialize a source processor""" + """Initialize a source processor.""" self.blocks = [] self.filename = None self.format = None self.lines = [] def reset( self ): - """reset a block processor, clean all its blocks""" + """Reset a block processor and clean up all its blocks.""" self.blocks = [] self.format = None def parse_file( self, filename ): - """parse a C source file, and add its blocks to the processor's list""" + """Parse a C source file and add its blocks to the processor's + list.""" self.reset() self.filename = filename @@ -301,16 +347,16 @@ class SourceProcessor: self.process_normal_line( line ) else: if self.format.end.match( line ): - # that's a normal block end, add it to 'lines' and - # create a new block + # A normal block end. Add it to `lines' and create a + # new block self.lines.append( line ) self.add_block_lines() elif self.format.column.match( line ): - # that's a normal column line, add it to 'lines' + # A normal column line. Add it to `lines'. self.lines.append( line ) else: - # humm.. this is an unexpected block end, - # create a new block, but don't process the line + # An unexpected block end. Create a new block, but + # don't process the line. self.add_block_lines() # we need to process the line again @@ -320,7 +366,8 @@ class SourceProcessor: self.add_block_lines() def process_normal_line( self, line ): - """process a normal line and check whether it is the start of a new block""" + """Process a normal line and check whether it is the start of a new + block.""" for f in re_source_block_formats: if f.start.match( line ): self.add_block_lines() @@ -330,9 +377,12 @@ class SourceProcessor: self.lines.append( line ) def add_block_lines( self ): - """add the current accumulated lines and create a new block""" + """Add the current accumulated lines and create a new block.""" if self.lines != []: - block = SourceBlock( self, self.filename, self.lineno, self.lines ) + block = SourceBlock( self, + self.filename, + self.lineno, + self.lines ) self.blocks.append( block ) self.format = None @@ -340,7 +390,7 @@ class SourceProcessor: # debugging only, not used in normal operations def dump( self ): - """print all blocks in a processor""" + """Print all blocks in a processor.""" for b in self.blocks: b.dump() diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py index fffa120..05fc08a 100644 --- a/src/tools/docmaker/tohtml.py +++ b/src/tools/docmaker/tohtml.py @@ -1,5 +1,19 @@ -# ToHTML (c) 2002, 2003, 2005, 2006, 2007, 2008 -# David Turner <david@freetype.org> +# +# tohtml.py +# +# A sub-class container of the `Formatter' class to produce HTML. +# +# Copyright 2002, 2003, 2005-2008, 2013, 2014 by +# David Turner. +# +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. + +# The parent class is contained in file `formatter.py'. + from sources import * from content import * @@ -8,7 +22,7 @@ from formatter import * import time -# The following defines the HTML header used by all generated pages. +# The following strings define the HTML header used by all generated pages. html_header_1 = """\ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> @@ -21,62 +35,125 @@ html_header_1 = """\ html_header_2 = """\ API Reference """ -html_header_3 = """ - - - -
    [
    [
    [
    [Index][Index][TOC]
    -

    \ +html_header_5t = """\ +">TOC]

    Day@%IXT)m52Dw?GxuFBdovdIUBIe>+?H8wZ6JOK|_YmGyU_XsK%varUpfUVwx;l!EH?Dk7zNcx6&>nt{^=vIWmAOU;#SuhueXul9I zMmY5w7WP>%2a)a{;>8%Je*HP!-bS~n0U_Sq?$rNuPP+|<0uKza%gS~u)mYn*1=k$@ci(Mn@5xAp+daVStBh=g7)d%X!rMhE@<+{N2vS_Jebvt@P zexu8aB`DsntRLWK?x#bQ)qMyouSQ}4J$cyec?_@`QMnfI5WED>T8#4jPer2XA!pu>yTHd)o%f=9v}9R+APhEOz$Ah=U`wNUNirsJ6I+&LX*80?l5Aw+cF<#HG`3#M zjBJS-o7m=&lqM#jIoy_7PU5uudbsz{mL?Q@8n>lAoP@UYl#@CMIq^NEIrNsCy2L%D z4ZXSl|F_oKd(T)lh6AMiUBUKxf9qS{`d;g?_aM3DQ;1Zl7tRHoIgGk(OADGzR0d?k z7&U&<=J(w}PspHuh-T3N)|;&4TX;+UisVWYkH*TtQ)sj-5pdQb_s4F_MrqlBJU!lK z8E=*?w_dviEek5ZRtY?xL+-~;ZbjxNmGCJuTk#J3Z=ry9{2ESUKp|PceNGh7_X$^+ z?emHi7Qce@&ybFfNV*y6+bTFMzofWlL_TSFgFxEIbWaM9pJO9g=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utYWSeLDu{aS@gH8 z

    +

    \ """ -html_header_5t = """\ -">Index] - -

    \ +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,95 +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 -# same as 'html_quote', but ignores left and right brackets -def html_quote0( line ): - return string.replace( line, "&", "&" ) - - -def dump_html_code( lines, prefix = "" ): - # clean the last empty lines - l = len( self.lines ) - while l > 0 and string.strip( self.lines[l - 1] ) == "": - l = l - 1 - - # The code footer should be directly appended to the last code - # line to avoid an additional blank line. - print prefix + code_header, - for line in self.lines[0 : l + 1]: - print '\n' + prefix + html_quote( line ), - print prefix + code_footer, - - - +################################################################ +## +## HTML FORMATTER CLASS +## class HtmlFormatter( Formatter ): def __init__( self, processor, project_title, file_prefix ): Formatter.__init__( self, processor ) - global html_header_1, html_header_2, html_header_3 - global html_header_4, html_header_5, html_footer + global html_header_1 + global html_header_2 + global html_header_3l, html_header_3r + global html_header_4 + global html_header_5t, html_header_5i + global html_header_6 + global html_footer if file_prefix: file_prefix = file_prefix + "-" else: file_prefix = "" - self.headers = processor.headers - self.project_title = project_title - self.file_prefix = file_prefix - self.html_header = html_header_1 + project_title + \ - html_header_2 + \ - html_header_3 + file_prefix + "index.html" + \ - html_header_4 + file_prefix + "toc.html" + \ - html_header_5 + project_title + \ - html_header_6 - - self.html_index_header = html_header_1 + project_title + \ - html_header_2 + \ - html_header_3i + file_prefix + "toc.html" + \ - html_header_5 + project_title + \ - html_header_6 - - self.html_toc_header = html_header_1 + project_title + \ - html_header_2 + \ - html_header_3 + file_prefix + "index.html" + \ - html_header_5t + project_title + \ - html_header_6 - - self.html_footer = "
    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_html_words( self, words ): - """ convert a series of simple words into some HTML text """ - line = "" - if words: - line = html_quote( words[0] ) - for w in words[1:]: - line = line + " " + html_quote( w ) - - return line + def make_block_url( self, block, name = None ): + if name == None: + name = block.name + return self.make_section_url( block.section ) + "#" + name def make_html_word( self, word ): - """analyze a simple word to detect cross-references and styling""" - # look for cross-references + """Analyze a simple word to detect cross-references and markup.""" + # handle cross-references m = re_crossref.match( word ) if m: try: @@ -265,35 +324,38 @@ class HtmlFormatter( Formatter ): return '' + 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] ) for word in words[1:]: line = line + " " + self.make_html_word( word ) + # 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, "~", " " ) @@ -301,7 +363,7 @@ class HtmlFormatter( Formatter ): return para_header + line + para_footer def make_html_code( self, lines ): - """ convert a code sequence to HTML """ + """Convert a code sequence to HTML.""" line = code_header + '\n' for l in lines: line = line + html_quote( l ) + '\n' @@ -309,7 +371,7 @@ class HtmlFormatter( Formatter ): return line + code_footer def make_html_items( self, items ): - """ convert a field's content into some valid HTML """ + """Convert a field's content into HTML.""" lines = [] for item in items: if item.lines: @@ -324,7 +386,9 @@ class HtmlFormatter( Formatter ): def print_html_field( self, field ): if field.name: - print "
    " + field.name + "" + print( '
    ' + + field.name + + "" ) print self.make_html_items( field.items ) @@ -345,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] ) @@ -362,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 "
    " @@ -379,10 +451,9 @@ class HtmlFormatter( Formatter ): table_fields = [] for field in markup.fields: if field.name: - # we begin a new series of field or value definitions, we - # will record them in the 'table_fields' list before outputting - # all of them as a single table - # + # We begin a new series of field or value definitions. We + # record them in the `table_fields' list before outputting + # all of them as a single table. table_fields.append( field ) else: if table_fields: @@ -395,7 +466,7 @@ class HtmlFormatter( Formatter ): self.print_html_field_list( table_fields ) # - # Formatting the index + # formatting the index # def index_enter( self ): print self.html_index_header @@ -407,11 +478,11 @@ class HtmlFormatter( Formatter ): self.index_items[name] = url def index_exit( self ): - # block_index already contains the sorted list of index names + # `block_index' already contains the sorted list of index names count = len( self.block_index ) - rows = ( count + self.columns - 1 ) / self.columns + rows = ( count + self.columns - 1 ) // self.columns - print "" + print '
    ' for r in range( rows ): line = "" for c in range( self.columns ): @@ -419,7 +490,8 @@ class HtmlFormatter( Formatter ): if i < count: bname = self.block_index[r + c * rows] url = self.index_items[bname] - line = line + '' + line = ( line + '' ) else: line = line + '' line = line + "" @@ -427,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 @@ -442,21 +514,20 @@ class HtmlFormatter( Formatter ): Formatter.index_dump( self, index_filename ) # - # Formatting the table of content + # formatting the table of contents # def toc_enter( self ): print self.html_toc_header - print "

    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 ): @@ -467,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 @@ -488,14 +559,12 @@ class HtmlFormatter( Formatter ): Formatter.toc_dump( self, toc_filename, index_filename ) # - # Formatting sections + # formatting sections # def section_enter( self, section ): print self.html_header - print section_title_header - print section.title - print section_title_footer + print section_title_header + section.title + section_title_footer maxwidth = 0 for b in section.blocks.values(): @@ -503,32 +572,43 @@ class HtmlFormatter( Formatter ): maxwidth = len( b.name ) width = 70 # XXX magic number - if maxwidth <> 0: + if maxwidth > 0: # print section synopsis print section_synopsis_header - print "" + 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 @@ -540,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: @@ -548,16 +628,17 @@ class HtmlFormatter( Formatter ): for f in self.headers.keys(): if block.source.filename.find( f ) >= 0: header = self.headers[f] + ' (' + f + ')' - break; - + break + # if not header: -# sys.stderr.write( \ -# 'WARNING: No header macro for ' + block.source.filename + '.\n' ) +# sys.stderr.write( +# "WARNING: No header macro for" +# + " '" + block.source.filename + "'.\n" ) if header: - print header_location_header - print 'Defined in ' + header + '.' - print header_location_footer + print ( header_location_header + + 'Defined in ' + header + '.' + + header_location_footer ) print source_header for l in block.code: @@ -579,15 +660,16 @@ class HtmlFormatter( Formatter ): print marker_footer def block_exit( self, block ): - print block_footer_start + self.file_prefix + "index.html" + \ - block_footer_middle + self.file_prefix + "toc.html" + \ - block_footer_end + print( block_footer_start + self.file_prefix + "index.html" + + block_footer_middle + self.file_prefix + "toc.html" + + block_footer_end ) def section_exit( self, section ): print html_footer def section_dump_all( self ): for section in self.sections: - self.section_dump( section, self.file_prefix + section.name + '.html' ) + self.section_dump( section, + self.file_prefix + section.name + '.html' ) # eof diff --git a/src/tools/docmaker/utils.py b/src/tools/docmaker/utils.py index 1d96658..b35823a 100644 --- a/src/tools/docmaker/utils.py +++ b/src/tools/docmaker/utils.py @@ -1,48 +1,42 @@ -# Utils (c) 2002, 2004, 2007, 2008 David Turner # - -import string, sys, os, glob - -# current output directory +# utils.py # -output_dir = None - - -# This function is used to sort the index. It is a simple lexicographical -# sort, except that it places capital letters before lowercase ones. +# Auxiliary functions for the `docmaker' tool (library file). # -def index_sort( s1, s2 ): - if not s1: - return -1 - - if not s2: - return 1 - - l1 = len( s1 ) - l2 = len( s2 ) - m1 = string.lower( s1 ) - m2 = string.lower( s2 ) +# Copyright 2002, 2004, 2007, 2008, 2014 by +# David Turner. +# +# This file is part of the FreeType project, and may only be used, +# modified, and distributed under the terms of the FreeType project +# license, LICENSE.TXT. By continuing to use, modify, or distribute +# this file you indicate that you have read the license and +# understand and accept it fully. - for i in range( l1 ): - if i >= l2 or m1[i] > m2[i]: - return 1 - if m1[i] < m2[i]: - return -1 +import string, sys, os, glob, itertools - if s1[i] < s2[i]: - return -1 - if s1[i] > s2[i]: - return 1 +# current output directory +# +output_dir = None - if l2 > l1: - return -1 - return 0 +# A function that generates a sorting key. We want lexicographical order +# (primary key) except that capital letters are sorted before lowercase +# ones (secondary key). +# +# The primary key is implemented by lowercasing the input. The secondary +# key is simply the original data appended, character by character. For +# example, the sort key for `FT_x' is `fFtT__xx', while the sort key for +# `ft_X' is `fftt__xX'. Since ASCII codes of uppercase letters are +# numerically smaller than the codes of lowercase letters, `fFtT__xx' gets +# sorted before `fftt__xX'. +# +def index_key( s ): + return string.join( itertools.chain( *zip( s.lower(), s ) ) ) -# Sort input_list, placing the elements of order_list in front. +# Sort `input_list', placing the elements of `order_list' in front. # def sort_order_list( input_list, order_list ): new_list = order_list[:] @@ -52,9 +46,9 @@ def sort_order_list( input_list, order_list ): return new_list -# Open the standard output to a given project documentation file. Use -# "output_dir" to determine the filename location if necessary and save the -# old stdout in a tuple that is returned by this function. +# Divert standard output to a given project documentation file. Use +# `output_dir' to determine the filename location if necessary and save the +# old stdout handle in a tuple that is returned by this function. # def open_output( filename ): global output_dir @@ -69,7 +63,7 @@ def open_output( filename ): return ( new_file, old_stdout ) -# Close the output that was returned by "close_output". +# Close the output that was returned by `open_output'. # def close_output( output ): output[0].close() @@ -83,15 +77,16 @@ def check_output(): if output_dir: if output_dir != "": if not os.path.isdir( output_dir ): - sys.stderr.write( "argument" + " '" + output_dir + "' " + \ - "is not a valid directory" ) + sys.stderr.write( "argument" + + " '" + output_dir + "' " + + "is not a valid directory" ) sys.exit( 2 ) else: output_dir = None def file_exists( pathname ): - """checks that a given file exists""" + """Check that a given file exists.""" result = 1 try: file = open( pathname, "r" ) @@ -104,12 +99,12 @@ def file_exists( pathname ): def make_file_list( args = None ): - """builds a list of input files from command-line arguments""" + """Build a list of input files from command-line arguments.""" file_list = [] # sys.stderr.write( repr( sys.argv[1 :] ) + '\n' ) if not args: - args = sys.argv[1 :] + args = sys.argv[1:] for pathname in args: if string.find( pathname, '*' ) >= 0: diff --git a/src/tools/ftrandom/README b/src/tools/ftrandom/README index c093f15..71bf053 100644 --- a/src/tools/ftrandom/README +++ b/src/tools/ftrandom/README @@ -43,6 +43,6 @@ Arguments are: --rasterize Call FT_Render_Glyph as well as loading it. --result This is the directory in which test files are placed. - --test Run a single test on a pre-generated testcase. + --test Run a single test on a pre-generated testcase. Done in the current process so it can be debugged more easily. diff --git a/src/tools/ftrandom/ftrandom.c b/src/tools/ftrandom/ftrandom.c index 4daac0d..9a5b632 100644 --- a/src/tools/ftrandom/ftrandom.c +++ b/src/tools/ftrandom/ftrandom.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2007, 2008 by George Williams */ +/* Copyright (C) 2005, 2007, 2008, 2013 by George Williams */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -184,7 +184,6 @@ { FT_Library context; FT_Face face; - int i, num; if ( FT_Init_FreeType( &context ) ) @@ -203,6 +202,9 @@ TestFace( face ); else { + int i, num; + + num = face->num_faces; FT_Done_Face( face ); @@ -327,12 +329,9 @@ FindFonts( char** fontdirs, char** extensions ) { - DIR* examples; - struct dirent* ent; - - int i, max; - char buffer[1025]; - struct stat statb; + int i, max; + char buffer[1025]; + struct stat statb; max = 0; @@ -340,6 +339,10 @@ for ( i = 0; fontdirs[i] != NULL; ++i ) { + DIR* examples; + struct dirent* ent; + + examples = opendir( fontdirs[i] ); if ( examples == NULL ) { @@ -446,9 +449,9 @@ fseek( new, getRandom( 0, item->len - 1 ), SEEK_SET ); if ( item->isbinary ) - putc( getRandom( 0, 0xff ), new ); + putc( getRandom( 0, 0xFF ), new ); else if ( item->isascii ) - putc( getRandom( 0x20, 0x7e ), new ); + putc( getRandom( 0x20, 0x7E ), new ); else { int hex = getRandom( 0, 15 ); @@ -555,7 +558,6 @@ char** argv ) { char **dirs, **exts; - char *pt, *end; int dcnt = 0, ecnt = 0, rset = false, allexts = false; int i; time_t now; @@ -567,7 +569,10 @@ for ( i = 1; i < argc; ++i ) { - pt = argv[i]; + char* pt = argv[i]; + char* end; + + if ( pt[0] == '-' && pt[1] == '-' ) ++pt; @@ -633,12 +638,21 @@ } if ( allexts ) + { + free( exts ); exts = NULL; + } else if ( ecnt == 0 ) + { + free( exts ); exts = default_ext_list; + } if ( dcnt == 0 ) + { + free( dirs ); dirs = default_dir_list; + } if ( testfile != NULL ) ExecuteTest( testfile ); /* This should never return */ diff --git a/src/tools/test_afm.c b/src/tools/test_afm.c index f5f9936..24cd0c4 100644 --- a/src/tools/test_afm.c +++ b/src/tools/test_afm.c @@ -118,7 +118,7 @@ if ( argc < 2 ) - return FT_Err_Invalid_Argument; + return FT_ERR( Invalid_Argument ); error = FT_Init_FreeType( &library ); if ( error ) diff --git a/src/tools/test_bbox.c b/src/tools/test_bbox.c index e085c5b..64b82c3 100644 --- a/src/tools/test_bbox.c +++ b/src/tools/test_bbox.c @@ -88,6 +88,26 @@ }; + /* dummy outline #3 with bbox of [0 100 128 128] precisely */ + static FT_Vector dummy_vec_3[4] = + { + XVEC( 100.0, 127.0 ), + XVEC( 200.0, 127.0 ), + XVEC( 0.0, 136.0 ), + XVEC( 0.0, 100.0 ) + }; + + static FT_Outline dummy_outline_3 = + { + 1, + 4, + dummy_vec_3, + dummy_tag_1, + dummy_contour_1, + 0 + }; + + static void dump_outline( FT_Outline* outline ) { @@ -125,12 +145,14 @@ FT_Outline_Get_CBox( outline, &bbox ); time0 = get_time() - time0; - printf( "time = %5.2f cbox = [%.2f %.2f %.2f %.2f]\n", + printf( "time = %6.3f cbox = [%8.4f %8.4f %8.4f %8.4f]\n", ((double)time0/10000.0), XVAL( bbox.xMin ), XVAL( bbox.yMin ), XVAL( bbox.xMax ), XVAL( bbox.yMax ) ); + printf( "cbox_hex = [%08X %08X %08X %08X]\n", + bbox.xMin, bbox.yMin, bbox.xMax, bbox.yMax ); time0 = get_time(); @@ -138,15 +160,17 @@ FT_Outline_Get_BBox( outline, &bbox ); time0 = get_time() - time0; - printf( "time = %5.2f bbox = [%.2f %.2f %.2f %.2f]\n", + printf( "time = %6.3f bbox = [%8.4f %8.4f %8.4f %8.4f]\n", ((double)time0/10000.0), XVAL( bbox.xMin ), XVAL( bbox.yMin ), XVAL( bbox.xMax ), XVAL( bbox.yMax ) ); + printf( "bbox_hex = [%08X %08X %08X %08X]\n", + bbox.xMin, bbox.yMin, bbox.xMax, bbox.yMax ); } -#define REPEAT 100000L +#define REPEAT 1000000L int main( int argc, char** argv ) { @@ -155,6 +179,10 @@ printf( "outline #2\n" ); profile_outline( &dummy_outline_2, REPEAT ); + + printf( "outline #3\n" ); + profile_outline( &dummy_outline_3, REPEAT ); + return 0; } diff --git a/src/tools/test_trig.c b/src/tools/test_trig.c index 8c8a544..99ac1cf 100644 --- a/src/tools/test_trig.c +++ b/src/tools/test_trig.c @@ -8,9 +8,8 @@ #define PI 3.14159265358979323846 #define SPI (PI/FT_ANGLE_PI) -/* the precision in 16.16 fixed float points of the checks. Expect */ -/* between 2 and 5 noise LSB bits during operations, due to */ -/* rounding errors.. */ +/* the precision in 16.16 fixed-point checks. Expect between 2 and 5 */ +/* noise LSB bits during operations, due to rounding errors.. */ #define THRESHOLD 64 static error = 0; @@ -18,14 +17,16 @@ static void test_cos( void ) { - FT_Fixed f1, f2; - double d1, d2; - int i; + int i; - for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 ) + + for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L ) { + FT_Fixed f1, f2; + double d2; + + f1 = FT_Cos(i); - d1 = f1/65536.0; d2 = cos( i*SPI ); f2 = (FT_Fixed)(d2*65536.0); @@ -39,18 +40,19 @@ } - static void test_sin( void ) { - FT_Fixed f1, f2; - double d1, d2; - int i; + int i; - for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 ) + + for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L ) { + FT_Fixed f1, f2; + double d2; + + f1 = FT_Sin(i); - d1 = f1/65536.0; d2 = sin( i*SPI ); f2 = (FT_Fixed)(d2*65536.0); @@ -67,14 +69,16 @@ static void test_tan( void ) { - FT_Fixed f1, f2; - double d1, d2; - int i; + int i; - for ( i = 0; i < FT_ANGLE_PI2-0x2000000; i += 0x10000 ) + + for ( i = 0; i < FT_ANGLE_PI2 - 0x2000000L; i += 0x10000L ) { + FT_Fixed f1, f2; + double d2; + + f1 = FT_Tan(i); - d1 = f1/65536.0; d2 = tan( i*SPI ); f2 = (FT_Fixed)(d2*65536.0); @@ -91,12 +95,16 @@ static void test_atan2( void ) { - FT_Fixed c2, s2; - double l, a, c1, s1; - int i, j; + int i; - for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 ) + + for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L ) { + FT_Fixed c2, s2; + double l, a, c1, s1; + int j; + + l = 5.0; a = i*SPI; @@ -118,16 +126,20 @@ } } + static void test_unit( void ) { - FT_Vector v; - double a, c1, s1; - FT_Fixed c2, s2; - int i; + int i; + - for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 ) + for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L ) { + FT_Vector v; + double a, c1, s1; + FT_Fixed c2, s2; + + FT_Vector_Unit( &v, i ); a = ( i*SPI ); c1 = cos(a); @@ -151,12 +163,15 @@ static void test_length( void ) { - FT_Vector v; - FT_Fixed l, l2; - int i; + int i; + - for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 ) + for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L ) { + FT_Vector v; + FT_Fixed l, l2; + + l = (FT_Fixed)(500.0*65536.0); v.x = (FT_Fixed)( l * cos( i*SPI ) ); v.y = (FT_Fixed)( l * sin( i*SPI ) ); @@ -175,19 +190,26 @@ static void test_rotate( void ) { - FT_Fixed c2, s2, c4, s4; - FT_Vector v; - double l, ra, a, c1, s1, cra, sra, c3, s3; - int i, j, rotate; + int rotate; + - for ( rotate = 0; rotate < FT_ANGLE_2PI; rotate += 0x10000 ) + for ( rotate = 0; rotate < FT_ANGLE_2PI; rotate += 0x10000L ) { + double ra, cra, sra; + int i; + + ra = rotate*SPI; cra = cos( ra ); sra = sin( ra ); - for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000 ) + for ( i = 0; i < FT_ANGLE_2PI; i += 0x10000L ) { + FT_Fixed c2, s2, c4, s4; + FT_Vector v; + double l, a, c1, s1, c3, s3; + + l = 500.0; a = i*SPI; diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk index 507ef16..d4b69f5 100644 --- a/src/truetype/rules.mk +++ b/src/truetype/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2003, 2004, 2011 by +# Copyright 1996-2001, 2003-2004, 2011-2012 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -31,7 +31,8 @@ TT_DRV_SRC := $(TT_DIR)/ttdriver.c \ $(TT_DIR)/ttinterp.c \ $(TT_DIR)/ttobjs.c \ $(TT_DIR)/ttpic.c \ - $(TT_DIR)/ttpload.c + $(TT_DIR)/ttpload.c \ + $(TT_DIR)/ttsubpix.c # TrueType driver headers # diff --git a/src/truetype/truetype.c b/src/truetype/truetype.c index 4bd1209..576912b 100644 --- a/src/truetype/truetype.c +++ b/src/truetype/truetype.c @@ -4,7 +4,7 @@ /* */ /* FreeType TrueType driver component (body only). */ /* */ -/* Copyright 1996-2001, 2004, 2006 by */ +/* Copyright 1996-2001, 2004, 2006, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -27,6 +27,7 @@ #ifdef TT_USE_BYTECODE_INTERPRETER #include "ttinterp.c" +#include "ttsubpix.c" #endif #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c index 3669d45..ecf4cdc 100644 --- a/src/truetype/ttdriver.c +++ b/src/truetype/ttdriver.c @@ -4,7 +4,7 @@ /* */ /* TrueType font driver implementation (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,6 +29,8 @@ #include FT_SERVICE_TRUETYPE_ENGINE_H #include FT_SERVICE_TRUETYPE_GLYF_H +#include FT_SERVICE_PROPERTIES_H +#include FT_TRUETYPE_DRIVER_H #include "ttdriver.h" #include "ttgload.h" @@ -52,6 +54,73 @@ #define FT_COMPONENT trace_ttdriver + /* + * PROPERTY SERVICE + * + */ + static FT_Error + tt_property_set( FT_Module module, /* TT_Driver */ + const char* property_name, + const void* value ) + { + FT_Error error = FT_Err_Ok; + TT_Driver driver = (TT_Driver)module; + + + if ( !ft_strcmp( property_name, "interpreter-version" ) ) + { + FT_UInt* interpreter_version = (FT_UInt*)value; + + +#ifndef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( *interpreter_version != TT_INTERPRETER_VERSION_35 ) + error = FT_ERR( Unimplemented_Feature ); + else +#endif + driver->interpreter_version = *interpreter_version; + + return error; + } + + FT_TRACE0(( "tt_property_set: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + static FT_Error + tt_property_get( FT_Module module, /* TT_Driver */ + const char* property_name, + const void* value ) + { + FT_Error error = FT_Err_Ok; + TT_Driver driver = (TT_Driver)module; + + FT_UInt interpreter_version = driver->interpreter_version; + + + if ( !ft_strcmp( property_name, "interpreter-version" ) ) + { + FT_UInt* val = (FT_UInt*)value; + + + *val = interpreter_version; + + return error; + } + + FT_TRACE0(( "tt_property_get: missing property `%s'\n", + property_name )); + return FT_THROW( Missing_Property ); + } + + + FT_DEFINE_SERVICE_PROPERTIESREC( + tt_service_properties, + (FT_Properties_SetFunc)tt_property_set, + (FT_Properties_GetFunc)tt_property_get ) + + /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ @@ -146,7 +215,8 @@ FT_UShort ah; - TT_Get_VMetrics( face, start + nn, &tsb, &ah ); + /* since we don't need `tsb', we use zero for `yMax' parameter */ + TT_Get_VMetrics( face, start + nn, 0, &tsb, &ah ); advances[nn] = ah; } } @@ -163,7 +233,7 @@ } } - return TT_Err_Ok; + return FT_Err_Ok; } /*************************************************************************/ @@ -187,7 +257,7 @@ { TT_Face ttface = (TT_Face)size->face; TT_Size ttsize = (TT_Size)size; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; ttsize->strike_index = strike_index; @@ -197,7 +267,7 @@ /* use the scaled metrics, even when tt_size_reset fails */ FT_Select_Metrics( size->face, strike_index ); - tt_size_reset( ttsize ); + tt_size_reset( ttsize ); /* ignore return value */ } else { @@ -221,7 +291,7 @@ FT_Size_Request req ) { TT_Size ttsize = (TT_Size)size; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS @@ -294,13 +364,13 @@ if ( !slot ) - return TT_Err_Invalid_Slot_Handle; + return FT_THROW( Invalid_Slot_Handle ); if ( !size ) - return TT_Err_Invalid_Size_Handle; + return FT_THROW( Invalid_Size_Handle ); if ( !face ) - return TT_Err_Invalid_Argument; + return FT_THROW( Invalid_Face_Handle ); #ifdef FT_CONFIG_OPTION_INCREMENTAL if ( glyph_index >= (FT_UInt)face->num_glyphs && @@ -308,7 +378,7 @@ #else if ( glyph_index >= (FT_UInt)face->num_glyphs ) #endif - return TT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); if ( load_flags & FT_LOAD_NO_HINTING ) { @@ -353,13 +423,13 @@ /*************************************************************************/ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - FT_DEFINE_SERVICE_MULTIMASTERSREC(tt_service_gx_multi_masters, + FT_DEFINE_SERVICE_MULTIMASTERSREC( + tt_service_gx_multi_masters, (FT_Get_MM_Func) NULL, (FT_Set_MM_Design_Func) NULL, (FT_Set_MM_Blend_Func) TT_Set_MM_Blend, (FT_Get_MM_Var_Func) TT_Get_MM_Var, - (FT_Set_Var_Design_Func)TT_Set_Var_Design - ) + (FT_Set_Var_Design_Func)TT_Set_Var_Design ) #endif static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine = @@ -379,25 +449,28 @@ #endif /* TT_USE_BYTECODE_INTERPRETER */ }; - FT_DEFINE_SERVICE_TTGLYFREC(tt_service_truetype_glyf, - (TT_Glyf_GetLocationFunc)tt_face_get_location - ) + FT_DEFINE_SERVICE_TTGLYFREC( + tt_service_truetype_glyf, + (TT_Glyf_GetLocationFunc)tt_face_get_location ) #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - FT_DEFINE_SERVICEDESCREC4(tt_services, + FT_DEFINE_SERVICEDESCREC5( + tt_services, FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, - FT_SERVICE_ID_MULTI_MASTERS, &FT_TT_SERVICE_GX_MULTI_MASTERS_GET, + FT_SERVICE_ID_MULTI_MASTERS, &TT_SERVICE_GX_MULTI_MASTERS_GET, FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, - FT_SERVICE_ID_TT_GLYF, &FT_TT_SERVICE_TRUETYPE_GLYF_GET - ) + FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET, + FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET ) #else - FT_DEFINE_SERVICEDESCREC3(tt_services, + FT_DEFINE_SERVICEDESCREC4( + tt_services, FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, - FT_SERVICE_ID_TT_GLYF, &FT_TT_SERVICE_TRUETYPE_GLYF_GET - ) + FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET, + FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET ) #endif + FT_CALLBACK_DEF( FT_Module_Interface ) tt_get_interface( FT_Module driver, /* TT_Driver */ const char* tt_interface ) @@ -408,7 +481,7 @@ SFNT_Service sfnt; - /* FT_TT_SERVICES_GET derefers `library' in PIC mode */ + /* TT_SERVICES_GET dereferences `library' in PIC mode */ #ifdef FT_CONFIG_OPTION_PIC if ( !driver ) return NULL; @@ -417,7 +490,7 @@ return NULL; #endif - result = ft_service_list_lookup( FT_TT_SERVICES_GET, tt_interface ); + result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface ); if ( result != NULL ) return result; @@ -445,18 +518,19 @@ /* The FT_DriverInterface structure is defined in ftdriver.h. */ #ifdef TT_USE_BYTECODE_INTERPRETER -#define TT_HINTER_FLAG FT_MODULE_DRIVER_HAS_HINTER +#define TT_HINTER_FLAG FT_MODULE_DRIVER_HAS_HINTER #else -#define TT_HINTER_FLAG 0 +#define TT_HINTER_FLAG 0 #endif #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS -#define TT_SIZE_SELECT tt_size_select +#define TT_SIZE_SELECT tt_size_select #else -#define TT_SIZE_SELECT 0 +#define TT_SIZE_SELECT 0 #endif - FT_DEFINE_DRIVER( tt_driver_class, + FT_DEFINE_DRIVER( + tt_driver_class, FT_MODULE_FONT_DRIVER | FT_MODULE_DRIVER_SCALABLE | @@ -485,9 +559,6 @@ tt_slot_init, 0, /* FT_Slot_DoneFunc */ - ft_stub_set_char_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - ft_stub_set_pixel_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */ - tt_glyph_load, tt_get_kerning, diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index ce8c888..c5841c3 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -4,7 +4,7 @@ /* */ /* TrueType Glyph Loader (body). */ /* */ -/* Copyright 1996-2012 */ +/* Copyright 1996-2014 */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,6 +23,7 @@ #include FT_INTERNAL_SFNT_H #include FT_TRUETYPE_TAGS_H #include FT_OUTLINE_H +#include FT_TRUETYPE_DRIVER_H #include "ttgload.h" #include "ttpload.h" @@ -32,6 +33,7 @@ #endif #include "tterrors.h" +#include "ttsubpix.h" /*************************************************************************/ @@ -83,77 +85,90 @@ /*************************************************************************/ /* */ /* Return the vertical metrics in font units for a given glyph. */ - /* Greg Hitchcock from Microsoft told us that if there were no `vmtx' */ - /* table, typoAscender/Descender from the `OS/2' table would be used */ - /* instead, and if there were no `OS/2' table, use ascender/descender */ - /* from the `hhea' table. But that is not what Microsoft's rasterizer */ - /* apparently does: It uses the ppem value as the advance height, and */ - /* sets the top side bearing to be zero. */ + /* See macro `TT_LOADER_SET_PP' below for explanations. */ /* */ FT_LOCAL_DEF( void ) TT_Get_VMetrics( TT_Face face, FT_UInt idx, + FT_Pos yMax, FT_Short* tsb, FT_UShort* ah ) { if ( face->vertical_info ) ( (SFNT_Service)face->sfnt )->get_metrics( face, 1, idx, tsb, ah ); -#if 1 /* Empirically determined, at variance with what MS said */ - - else - { - *tsb = 0; - *ah = face->root.units_per_EM; - } - -#else /* This is what MS said to do. It isn't what they do, however. */ - else if ( face->os2.version != 0xFFFFU ) { - *tsb = face->os2.sTypoAscender; + *tsb = (FT_Short)( face->os2.sTypoAscender - yMax ); *ah = face->os2.sTypoAscender - face->os2.sTypoDescender; } + else { - *tsb = face->horizontal.Ascender; + *tsb = (FT_Short)( face->horizontal.Ascender - yMax ); *ah = face->horizontal.Ascender - face->horizontal.Descender; } -#endif - FT_TRACE5(( " advance height (font units): %d\n", *ah )); FT_TRACE5(( " top side bearing (font units): %d\n", *tsb )); } - static void + static FT_Error tt_get_metrics( TT_Loader loader, FT_UInt glyph_index ) { - TT_Face face = (TT_Face)loader->face; + TT_Face face = (TT_Face)loader->face; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); +#endif + + FT_Error error; + FT_Stream stream = loader->stream; FT_Short left_bearing = 0, top_bearing = 0; FT_UShort advance_width = 0, advance_height = 0; + /* we must preserve the stream position */ + /* (which gets altered by the metrics functions) */ + FT_ULong pos = FT_STREAM_POS(); + TT_Get_HMetrics( face, glyph_index, &left_bearing, &advance_width ); TT_Get_VMetrics( face, glyph_index, + loader->bbox.yMax, &top_bearing, &advance_height ); + if ( FT_STREAM_SEEK( pos ) ) + return error; + loader->left_bearing = left_bearing; loader->advance = advance_width; loader->top_bearing = top_bearing; loader->vadvance = advance_height; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) + { + if ( loader->exec ) + loader->exec->sph_tweak_flags = 0; + + /* this may not be the right place for this, but it works */ + if ( loader->exec && loader->exec->ignore_x_mode ) + sph_set_tweaks( loader, glyph_index ); + } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + if ( !loader->linear_def ) { loader->linear_def = 1; loader->linear = advance_width; } + + return FT_Err_Ok; } @@ -252,10 +267,6 @@ } -#undef IS_HINTED -#define IS_HINTED( flags ) ( ( flags & FT_LOAD_NO_HINTING ) == 0 ) - - /*************************************************************************/ /* */ /* The following functions are used by default with TrueType fonts. */ @@ -286,7 +297,7 @@ loader->cursor = stream->cursor; loader->limit = stream->limit; - return TT_Err_Ok; + return FT_Err_Ok; } @@ -308,7 +319,7 @@ if ( p + 10 > limit ) - return TT_Err_Invalid_Outline; + return FT_THROW( Invalid_Outline ); loader->n_contours = FT_NEXT_SHORT( p ); @@ -324,7 +335,7 @@ loader->bbox.yMax )); loader->cursor = p; - return TT_Err_Ok; + return FT_Err_Ok; } @@ -337,9 +348,9 @@ FT_GlyphLoader gloader = load->gloader; FT_Int n_contours = load->n_contours; FT_Outline* outline; - TT_Face face = (TT_Face)load->face; FT_UShort n_ins; FT_Int n_points; + FT_ULong tmp; FT_Byte *flag, *flag_limit; FT_Byte c, count; @@ -405,18 +416,11 @@ FT_TRACE5(( " Instructions size: %u\n", n_ins )); - if ( n_ins > face->max_profile.maxSizeOfInstructions ) - { - FT_TRACE0(( "TT_Load_Simple_Glyph: too many instructions (%d)\n", - n_ins )); - error = TT_Err_Too_Many_Hints; - goto Fail; - } - + /* check it */ if ( ( limit - p ) < n_ins ) { FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" )); - error = TT_Err_Too_Many_Hints; + error = FT_THROW( Too_Many_Hints ); goto Fail; } @@ -424,6 +428,20 @@ if ( IS_HINTED( load->load_flags ) ) { + /* we don't trust `maxSizeOfInstructions' in the `maxp' table */ + /* and thus update the bytecode array size by ourselves */ + + tmp = load->exec->glyphSize; + error = Update_Max( load->exec->memory, + &tmp, + sizeof ( FT_Byte ), + (void*)&load->exec->glyphIns, + n_ins ); + + load->exec->glyphSize = (FT_UShort)tmp; + if ( error ) + return error; + load->glyph->control_len = n_ins; load->glyph->control_data = load->exec->glyphIns; @@ -546,7 +564,7 @@ return error; Invalid_Outline: - error = TT_Err_Invalid_Outline; + error = FT_THROW( Invalid_Outline ); goto Fail; } @@ -667,7 +685,7 @@ return error; Invalid_Composite: - error = TT_Err_Invalid_Composite; + error = FT_THROW( Invalid_Composite ); goto Fail; } @@ -714,8 +732,12 @@ TT_Hint_Glyph( TT_Loader loader, FT_Bool is_composite ) { +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + TT_Face face = (TT_Face)loader->face; + TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); +#endif + TT_GlyphZone zone = &loader->zone; - FT_Pos origin; #ifdef TT_USE_BYTECODE_INTERPRETER FT_UInt n_ins; @@ -727,19 +749,12 @@ #ifdef TT_USE_BYTECODE_INTERPRETER if ( loader->glyph->control_len > 0xFFFFL ) { - FT_TRACE1(( "TT_Hint_Glyph: too long instructions " )); - FT_TRACE1(( "(0x%lx byte) is truncated\n", + FT_TRACE1(( "TT_Hint_Glyph: too long instructions" )); + FT_TRACE1(( " (0x%lx byte) is truncated\n", loader->glyph->control_len )); } n_ins = (FT_UInt)( loader->glyph->control_len ); -#endif - - origin = zone->cur[zone->n_points - 4].x; - origin = FT_PIX_ROUND( origin ) - origin; - if ( origin ) - translate_array( zone->n_points, zone->cur, origin, 0 ); -#ifdef TT_USE_BYTECODE_INTERPRETER /* save original point position in org */ if ( n_ins > 0 ) FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points ); @@ -765,9 +780,13 @@ } #endif - /* round pp2 and pp4 */ + /* round phantom points */ + zone->cur[zone->n_points - 4].x = + FT_PIX_ROUND( zone->cur[zone->n_points - 4].x ); zone->cur[zone->n_points - 3].x = FT_PIX_ROUND( zone->cur[zone->n_points - 3].x ); + zone->cur[zone->n_points - 2].y = + FT_PIX_ROUND( zone->cur[zone->n_points - 2].y ); zone->cur[zone->n_points - 1].y = FT_PIX_ROUND( zone->cur[zone->n_points - 1].y ); @@ -782,10 +801,8 @@ FT_Outline current_outline = gloader->current.outline; - error = TT_Set_CodeRange( loader->exec, tt_coderange_glyph, - loader->exec->glyphIns, n_ins ); - if ( error ) - return error; + TT_Set_CodeRange( loader->exec, tt_coderange_glyph, + loader->exec->glyphIns, n_ins ); loader->exec->is_composite = is_composite; loader->exec->pts = *zone; @@ -805,15 +822,23 @@ #endif /* save glyph phantom points */ - if ( !loader->preserve_pps ) + loader->pp1 = zone->cur[zone->n_points - 4]; + loader->pp2 = zone->cur[zone->n_points - 3]; + loader->pp3 = zone->cur[zone->n_points - 2]; + loader->pp4 = zone->cur[zone->n_points - 1]; + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) { - loader->pp1 = zone->cur[zone->n_points - 4]; - loader->pp2 = zone->cur[zone->n_points - 3]; - loader->pp3 = zone->cur[zone->n_points - 2]; - loader->pp4 = zone->cur[zone->n_points - 1]; + if ( loader->exec->sph_tweak_flags & SPH_TWEAK_DEEMBOLDEN ) + FT_Outline_EmboldenXY( &loader->gloader->current.outline, -24, 0 ); + + else if ( loader->exec->sph_tweak_flags & SPH_TWEAK_EMBOLDEN ) + FT_Outline_EmboldenXY( &loader->gloader->current.outline, 24, 0 ); } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - return TT_Err_Ok; + return FT_Err_Ok; } @@ -831,7 +856,7 @@ TT_Process_Simple_Glyph( TT_Loader loader ) { FT_GlyphLoader gloader = loader->gloader; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Outline* outline; FT_Int n_points; @@ -889,25 +914,83 @@ loader->zone.n_points + 4 ); } - /* scale the glyph */ - if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) { - FT_Vector* vec = outline->points; - FT_Vector* limit = outline->points + n_points; - FT_Fixed x_scale = ((TT_Size)loader->size)->metrics.x_scale; - FT_Fixed y_scale = ((TT_Size)loader->size)->metrics.y_scale; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + TT_Face face = (TT_Face)loader->face; + TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); + + FT_String* family = face->root.family_name; + FT_Int ppem = loader->size->metrics.x_ppem; + FT_String* style = face->root.style_name; + FT_Int x_scale_factor = 1000; +#endif + + FT_Vector* vec = outline->points; + FT_Vector* limit = outline->points + n_points; + + FT_Fixed x_scale = 0; /* pacify compiler */ + FT_Fixed y_scale = 0; + FT_Bool do_scale = FALSE; - for ( ; vec < limit; vec++ ) + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) { - vec->x = FT_MulFix( vec->x, x_scale ); - vec->y = FT_MulFix( vec->y, y_scale ); + /* scale, but only if enabled and only if TT hinting is being used */ + if ( IS_HINTED( loader->load_flags ) ) + x_scale_factor = sph_test_tweak_x_scaling( face, + family, + ppem, + style, + loader->glyph_index ); + /* scale the glyph */ + if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 || + x_scale_factor != 1000 ) + { + x_scale = FT_MulDiv( ((TT_Size)loader->size)->metrics.x_scale, + x_scale_factor, 1000 ); + y_scale = ((TT_Size)loader->size)->metrics.y_scale; + + /* compensate for any scaling by de/emboldening; */ + /* the amount was determined via experimentation */ + if ( x_scale_factor != 1000 && ppem > 11 ) + FT_Outline_EmboldenXY( outline, + FT_MulFix( 1280 * ppem, + 1000 - x_scale_factor ), + 0 ); + do_scale = TRUE; + } } + else + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + { + /* scale the glyph */ + if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) + { + x_scale = ((TT_Size)loader->size)->metrics.x_scale; + y_scale = ((TT_Size)loader->size)->metrics.y_scale; - loader->pp1 = outline->points[n_points - 4]; - loader->pp2 = outline->points[n_points - 3]; - loader->pp3 = outline->points[n_points - 2]; - loader->pp4 = outline->points[n_points - 1]; + do_scale = TRUE; + } + } + + if ( do_scale ) + { + for ( ; vec < limit; vec++ ) + { + vec->x = FT_MulFix( vec->x, x_scale ); + vec->y = FT_MulFix( vec->y, y_scale ); + } + + loader->pp1 = outline->points[n_points - 4]; + loader->pp2 = outline->points[n_points - 3]; + loader->pp3 = outline->points[n_points - 2]; + loader->pp4 = outline->points[n_points - 1]; + } } if ( IS_HINTED( loader->load_flags ) ) @@ -974,7 +1057,7 @@ l += num_base_points; if ( k >= num_base_points || l >= num_points ) - return TT_Err_Invalid_Composite; + return FT_THROW( Invalid_Composite ); p1 = gloader->base.outline.points + k; p2 = gloader->base.outline.points + l; @@ -988,11 +1071,11 @@ y = subglyph->arg2; if ( !x && !y ) - return TT_Err_Ok; + return FT_Err_Ok; - /* Use a default value dependent on */ - /* TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED. This is useful for old TT */ - /* fonts which don't set the xxx_COMPONENT_OFFSET bit. */ + /* Use a default value dependent on */ + /* TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED. This is useful for old */ + /* TT fonts which don't set the xxx_COMPONENT_OFFSET bit. */ if ( have_scale && #ifdef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED @@ -1004,10 +1087,10 @@ #if 0 - /*************************************************************************/ - /* */ - /* This algorithm is what Apple documents. But it doesn't work. */ - /* */ + /*******************************************************************/ + /* */ + /* This algorithm is what Apple documents. But it doesn't work. */ + /* */ int a = subglyph->transform.xx > 0 ? subglyph->transform.xx : -subglyph->transform.xx; int b = subglyph->transform.yx > 0 ? subglyph->transform.yx @@ -1027,28 +1110,22 @@ x = FT_MulFix( x, m ); y = FT_MulFix( y, n ); -#else /* 0 */ +#else /* 1 */ - /*************************************************************************/ - /* */ - /* This algorithm is a guess and works much better than the above. */ - /* */ - FT_Fixed mac_xscale = FT_SqrtFixed( - (FT_Int32)FT_MulFix( subglyph->transform.xx, - subglyph->transform.xx ) + - (FT_Int32)FT_MulFix( subglyph->transform.xy, - subglyph->transform.xy ) ); - FT_Fixed mac_yscale = FT_SqrtFixed( - (FT_Int32)FT_MulFix( subglyph->transform.yy, - subglyph->transform.yy ) + - (FT_Int32)FT_MulFix( subglyph->transform.yx, - subglyph->transform.yx ) ); + /*******************************************************************/ + /* */ + /* This algorithm is a guess and works much better than the above. */ + /* */ + FT_Fixed mac_xscale = FT_Hypot( subglyph->transform.xx, + subglyph->transform.xy ); + FT_Fixed mac_yscale = FT_Hypot( subglyph->transform.yy, + subglyph->transform.yx ); x = FT_MulFix( x, mac_xscale ); y = FT_MulFix( y, mac_yscale ); -#endif /* 0 */ +#endif /* 1 */ } @@ -1074,7 +1151,7 @@ base_vec + num_base_points, x, y ); - return TT_Err_Ok; + return FT_Err_Ok; } @@ -1137,27 +1214,29 @@ max_ins = ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions; if ( n_ins > max_ins ) { - /* acroread ignores this field, so we only do a rough safety check */ + /* don't trust `maxSizeOfInstructions'; */ + /* only do a rough safety check */ if ( (FT_Int)n_ins > loader->byte_len ) { - FT_TRACE1(( "TT_Process_Composite_Glyph: " - "too many instructions (%d) for glyph with length %d\n", + FT_TRACE1(( "TT_Process_Composite_Glyph:" + " too many instructions (%d) for glyph with length %d\n", n_ins, loader->byte_len )); - return TT_Err_Too_Many_Hints; + return FT_THROW( Too_Many_Hints ); } - tmp = loader->exec->glyphSize; + tmp = loader->exec->glyphSize; error = Update_Max( loader->exec->memory, &tmp, sizeof ( FT_Byte ), (void*)&loader->exec->glyphIns, n_ins ); + loader->exec->glyphSize = (FT_UShort)tmp; if ( error ) return error; } else if ( n_ins == 0 ) - return TT_Err_Ok; + return FT_Err_Ok; if ( FT_STREAM_READ( loader->exec->glyphIns, n_ins ) ) return error; @@ -1173,7 +1252,7 @@ /* Some points are likely touched during execution of */ /* instructions on components. So let's untouch them. */ - for ( i = start_point; i < loader->zone.n_points; i++ ) + for ( i = 0; i < loader->zone.n_points; i++ ) loader->zone.tags[i] &= ~FT_CURVE_TAG_TOUCH_BOTH; loader->zone.n_points += 4; @@ -1182,21 +1261,131 @@ } - /* Calculate the four phantom points. */ - /* The first two stand for horizontal origin and advance. */ - /* The last two stand for vertical origin and advance. */ + /* + * Calculate the phantom points + * + * Defining the right side bearing (rsb) as + * + * rsb = aw - (lsb + xmax - xmin) + * + * (with `aw' the advance width, `lsb' the left side bearing, and `xmin' + * and `xmax' the glyph's minimum and maximum x value), the OpenType + * specification defines the initial position of horizontal phantom points + * as + * + * pp1 = (round(xmin - lsb), 0) , + * pp2 = (round(pp1 + aw), 0) . + * + * Note that the rounding to the grid (in the device space) is not + * documented currently in the specification. + * + * However, the specification lacks the precise definition of vertical + * phantom points. Greg Hitchcock provided the following explanation. + * + * - a `vmtx' table is present + * + * For any glyph, the minimum and maximum y values (`ymin' and `ymax') + * are given in the `glyf' table, the top side bearing (tsb) and advance + * height (ah) are given in the `vmtx' table. The bottom side bearing + * (bsb) is then calculated as + * + * bsb = ah - (tsb + ymax - ymin) , + * + * and the initial position of vertical phantom points is + * + * pp3 = (x, round(ymax + tsb)) , + * pp4 = (x, round(pp3 - ah)) . + * + * See below for value `x'. + * + * - no `vmtx' table in the font + * + * If there is an `OS/2' table, we set + * + * DefaultAscender = sTypoAscender , + * DefaultDescender = sTypoDescender , + * + * otherwise we use data from the `hhea' table: + * + * DefaultAscender = Ascender , + * DefaultDescender = Descender . + * + * With these two variables we can now set + * + * ah = DefaultAscender - sDefaultDescender , + * tsb = DefaultAscender - yMax , + * + * and proceed as if a `vmtx' table was present. + * + * Usually we have + * + * x = aw / 2 , (1) + * + * but there is one compatibility case where it can be set to + * + * x = -DefaultDescender - + * ((DefaultAscender - DefaultDescender - aw) / 2) . (2) + * + * and another one with + * + * x = 0 . (3) + * + * In Windows, the history of those values is quite complicated, + * depending on the hinting engine (that is, the graphics framework). + * + * framework from to formula + * ---------------------------------------------------------- + * GDI Windows 98 current (1) + * (Windows 2000 for NT) + * GDI+ Windows XP Windows 7 (2) + * GDI+ Windows 8 current (3) + * DWrite Windows 7 current (3) + * + * For simplicity, FreeType uses (1) for grayscale subpixel hinting and + * (3) for everything else. + * + */ +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +#define TT_LOADER_SET_PP( loader ) \ + do \ + { \ + FT_Bool subpixel_ = loader->exec ? loader->exec->subpixel \ + : 0; \ + FT_Bool grayscale_ = loader->exec ? loader->exec->grayscale \ + : 0; \ + FT_Bool use_aw_2_ = (FT_Bool)( subpixel_ && grayscale_ ); \ + \ + \ + (loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \ + (loader)->pp1.y = 0; \ + (loader)->pp2.x = (loader)->pp1.x + (loader)->advance; \ + (loader)->pp2.y = 0; \ + \ + (loader)->pp3.x = use_aw_2_ ? (loader)->advance / 2 : 0; \ + (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing; \ + (loader)->pp4.x = use_aw_2_ ? (loader)->advance / 2 : 0; \ + (loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance; \ + } while ( 0 ) + +#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + #define TT_LOADER_SET_PP( loader ) \ - do { \ + do \ + { \ (loader)->pp1.x = (loader)->bbox.xMin - (loader)->left_bearing; \ (loader)->pp1.y = 0; \ (loader)->pp2.x = (loader)->pp1.x + (loader)->advance; \ (loader)->pp2.y = 0; \ + \ (loader)->pp3.x = 0; \ - (loader)->pp3.y = (loader)->top_bearing + (loader)->bbox.yMax; \ + (loader)->pp3.y = (loader)->bbox.yMax + (loader)->top_bearing; \ (loader)->pp4.x = 0; \ (loader)->pp4.y = (loader)->pp3.y - (loader)->vadvance; \ } while ( 0 ) +#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + /*************************************************************************/ /* */ @@ -1213,7 +1402,7 @@ FT_UInt recurse_count, FT_Bool header_only ) { - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Fixed x_scale, y_scale; FT_ULong offset; TT_Face face = (TT_Face)loader->face; @@ -1236,14 +1425,14 @@ if ( recurse_count > 1 && recurse_count > face->max_profile.maxComponentDepth ) { - error = TT_Err_Invalid_Composite; + error = FT_THROW( Invalid_Composite ); goto Exit; } /* check glyph index */ if ( glyph_index >= (FT_UInt)face->root.num_glyphs ) { - error = TT_Err_Invalid_Glyph_Index; + error = FT_THROW( Invalid_Glyph_Index ); goto Exit; } @@ -1260,8 +1449,6 @@ y_scale = 0x10000L; } - tt_get_metrics( loader, glyph_index ); - /* Set `offset' to the start of the glyph relative to the start of */ /* the `glyf' table, and `byte_len' to the length of the glyph in */ /* bytes. */ @@ -1307,7 +1494,7 @@ #endif /* FT_CONFIG_OPTION_INCREMENTAL */ { FT_TRACE2(( "no `glyf' table but non-zero `loca' entry\n" )); - error = TT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -1321,7 +1508,17 @@ /* read glyph header first */ error = face->read_glyph_header( loader ); - if ( error || header_only ) + if ( error ) + goto Exit; + + /* the metrics must be computed after loading the glyph header */ + /* since we need the glyph's `yMax' value in case the vertical */ + /* metrics must be emulated */ + error = tt_get_metrics( loader, glyph_index ); + if ( error ) + goto Exit; + + if ( header_only ) goto Exit; } @@ -1332,6 +1529,10 @@ loader->bbox.yMin = 0; loader->bbox.yMax = 0; + error = tt_get_metrics( loader, glyph_index ); + if ( error ) + goto Exit; + if ( header_only ) goto Exit; @@ -1356,30 +1557,41 @@ if ( error ) goto Exit; - loader->pp1.x += deltas[0].x; loader->pp1.y += deltas[0].y; - loader->pp2.x += deltas[1].x; loader->pp2.y += deltas[1].y; - loader->pp3.x += deltas[2].x; loader->pp3.y += deltas[2].y; - loader->pp4.x += deltas[3].x; loader->pp4.y += deltas[3].y; + loader->pp1.x += deltas[0].x; + loader->pp1.y += deltas[0].y; + loader->pp2.x += deltas[1].x; + loader->pp2.y += deltas[1].y; + + loader->pp3.x += deltas[2].x; + loader->pp3.y += deltas[2].y; + loader->pp4.x += deltas[3].x; + loader->pp4.y += deltas[3].y; FT_FREE( deltas ); } -#endif +#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ + /* scale phantom points, if necessary; */ + /* they get rounded in `TT_Hint_Glyph' */ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) { loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale ); loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale ); + /* pp1.y and pp2.y are always zero */ + + loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale ); loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale ); + loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale ); loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale ); } - error = TT_Err_Ok; + error = FT_Err_Ok; goto Exit; } - /* must initialize points before (possibly) overriding */ - /* glyph metrics from the incremental interface */ + /* must initialize phantom points before (possibly) overriding */ + /* glyph metrics from the incremental interface */ TT_LOADER_SET_PP( loader ); #ifdef FT_CONFIG_OPTION_INCREMENTAL @@ -1452,7 +1664,7 @@ face, glyph_index, &deltas, - gloader->current.num_subglyphs + 4 )) != 0 ) + gloader->current.num_subglyphs + 4 ) ) != 0 ) goto Exit; subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs; @@ -1470,21 +1682,32 @@ } } - loader->pp1.x += deltas[i + 0].x; loader->pp1.y += deltas[i + 0].y; - loader->pp2.x += deltas[i + 1].x; loader->pp2.y += deltas[i + 1].y; - loader->pp3.x += deltas[i + 2].x; loader->pp3.y += deltas[i + 2].y; - loader->pp4.x += deltas[i + 3].x; loader->pp4.y += deltas[i + 3].y; + loader->pp1.x += deltas[i + 0].x; + loader->pp1.y += deltas[i + 0].y; + loader->pp2.x += deltas[i + 1].x; + loader->pp2.y += deltas[i + 1].y; + + loader->pp3.x += deltas[i + 2].x; + loader->pp3.y += deltas[i + 2].y; + loader->pp4.x += deltas[i + 3].x; + loader->pp4.y += deltas[i + 3].y; FT_FREE( deltas ); } #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */ + /* scale phantom points, if necessary; */ + /* they get rounded in `TT_Hint_Glyph' */ if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ) { loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale ); loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale ); + /* pp1.y and pp2.y are always zero */ + + loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale ); loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale ); + loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale ); loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale ); } @@ -1544,6 +1767,7 @@ /* restore subglyph pointer */ subglyph = gloader->base.subglyphs + num_base_subgs + n; + /* restore phantom points if necessary */ if ( !( subglyph->flags & USE_MY_METRICS ) ) { loader->pp1 = pp[0]; @@ -1563,8 +1787,12 @@ /* (1): exists from the beginning */ /* (2): components that have been loaded so far */ /* (3): the newly loaded component */ - TT_Process_Composite_Component( loader, subglyph, start_point, - num_base_points ); + error = TT_Process_Composite_Component( loader, + subglyph, + start_point, + num_base_points ); + if ( error ) + goto Exit; } loader->stream = old_stream; @@ -1573,22 +1801,23 @@ /* process the glyph */ loader->ins_pos = ins_pos; if ( IS_HINTED( loader->load_flags ) && - #ifdef TT_USE_BYTECODE_INTERPRETER - subglyph->flags & WE_HAVE_INSTR && - #endif - num_points > start_point ) - TT_Process_Composite_Glyph( loader, start_point, start_contour ); - + { + error = TT_Process_Composite_Glyph( loader, + start_point, + start_contour ); + if ( error ) + goto Exit; + } } } else { /* invalid composite count (negative but not -1) */ - error = TT_Err_Invalid_Outline; + error = FT_THROW( Invalid_Outline ); goto Exit; } @@ -1618,11 +1847,15 @@ compute_glyph_metrics( TT_Loader loader, FT_UInt glyph_index ) { + TT_Face face = (TT_Face)loader->face; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); +#endif + FT_BBox bbox; - TT_Face face = (TT_Face)loader->face; FT_Fixed y_scale; TT_GlyphSlot glyph = loader->glyph; - TT_Size size = (TT_Size)loader->size; + TT_Size size = (TT_Size)loader->size; y_scale = 0x10000L; @@ -1653,8 +1886,30 @@ size->root.metrics.x_ppem, glyph_index ); - if ( widthp ) - glyph->metrics.horiAdvance = *widthp << 6; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) + { + FT_Bool ignore_x_mode; + + + ignore_x_mode = FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) != + FT_RENDER_MODE_MONO ); + + if ( widthp && + ( ( ignore_x_mode && loader->exec->compatible_widths ) || + !ignore_x_mode || + SPH_OPTION_BITMAP_WIDTHS ) ) + glyph->metrics.horiAdvance = *widthp << 6; + } + else + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + { + if ( widthp ) + glyph->metrics.horiAdvance = *widthp << 6; + } } /* set glyph dimensions */ @@ -1831,9 +2086,13 @@ FT_Int32 load_flags, FT_Bool glyf_table_only ) { + FT_Error error; + TT_Face face; FT_Stream stream; +#ifdef TT_USE_BYTECODE_INTERPRETER FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC ); +#endif face = (TT_Face)glyph->face; @@ -1849,42 +2108,153 @@ TT_ExecContext exec; FT_Bool grayscale; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( face ); - if ( !size->cvt_ready ) - { - FT_Error error = tt_size_ready_bytecode( size, pedantic ); + FT_Bool subpixel = FALSE; +#if 0 + /* not used yet */ + FT_Bool compatible_widths; + FT_Bool symmetrical_smoothing; + FT_Bool bgr; + FT_Bool subpixel_positioned; +#endif +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + FT_Bool reexecute = FALSE; + + if ( size->bytecode_ready < 0 || size->cvt_ready < 0 ) + { + error = tt_size_ready_bytecode( size, pedantic ); if ( error ) return error; } + else if ( size->bytecode_ready ) + return size->bytecode_ready; + else if ( size->cvt_ready ) + return size->cvt_ready; /* query new execution context */ exec = size->debug ? size->context : ( (TT_Driver)FT_FACE_DRIVER( face ) )->context; if ( !exec ) - return TT_Err_Could_Not_Find_Context; + return FT_THROW( Could_Not_Find_Context ); - grayscale = - FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != FT_RENDER_MODE_MONO ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING - TT_Load_Context( exec, face, size ); + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) + { + subpixel = FT_BOOL( ( FT_LOAD_TARGET_MODE( load_flags ) != + FT_RENDER_MODE_MONO ) && + SPH_OPTION_SET_SUBPIXEL ); + + if ( subpixel ) + grayscale = FALSE; + else if ( SPH_OPTION_SET_GRAYSCALE ) + { + grayscale = TRUE; + subpixel = FALSE; + } + else + grayscale = FALSE; + + if ( FT_IS_TRICKY( glyph->face ) ) + subpixel = FALSE; + + exec->ignore_x_mode = subpixel || grayscale; + exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; + if ( exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 ) + exec->rasterizer_version = TT_INTERPRETER_VERSION_35; + +#if 1 + exec->compatible_widths = SPH_OPTION_SET_COMPATIBLE_WIDTHS; + exec->symmetrical_smoothing = FALSE; + exec->bgr = FALSE; + exec->subpixel_positioned = TRUE; +#else /* 0 */ + exec->compatible_widths = + FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != + TT_LOAD_COMPATIBLE_WIDTHS ); + exec->symmetrical_smoothing = + FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != + TT_LOAD_SYMMETRICAL_SMOOTHING ); + exec->bgr = + FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != + TT_LOAD_BGR ); + exec->subpixel_positioned = + FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != + TT_LOAD_SUBPIXEL_POSITIONED ); +#endif /* 0 */ + + } + else + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - /* a change from mono to grayscale rendering (and vice versa) */ - /* requires a re-execution of the CVT program */ - if ( grayscale != exec->grayscale ) { - FT_UInt i; + grayscale = FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != + FT_RENDER_MODE_MONO ); + } + error = TT_Load_Context( exec, face, size ); + if ( error ) + return error; - FT_TRACE4(( "tt_loader_init: grayscale change," - " re-executing `prep' table\n" )); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 ) + { + /* a change from mono to subpixel rendering (and vice versa) */ + /* requires a re-execution of the CVT program */ + if ( subpixel != exec->subpixel ) + { + FT_TRACE4(( "tt_loader_init: subpixel hinting change," + " re-executing `prep' table\n" )); + + exec->subpixel = subpixel; + reexecute = TRUE; + } + + /* a change from mono to grayscale rendering (and vice versa) */ + /* requires a re-execution of the CVT program */ + if ( grayscale != exec->grayscale ) + { + FT_TRACE4(( "tt_loader_init: grayscale hinting change," + " re-executing `prep' table\n" )); + + exec->grayscale = grayscale; + reexecute = TRUE; + } + } + else + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + { + /* a change from mono to grayscale rendering (and vice versa) */ + /* requires a re-execution of the CVT program */ + if ( grayscale != exec->grayscale ) + { + FT_TRACE4(( "tt_loader_init: grayscale change," + " re-executing `prep' table\n" )); + + exec->grayscale = grayscale; + reexecute = TRUE; + } + } + + if ( reexecute ) + { + FT_UInt i; - exec->grayscale = grayscale; for ( i = 0; i < size->cvt_size; i++ ) size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale ); - tt_size_run_prep( size, pedantic ); + error = tt_size_run_prep( size, pedantic ); + if ( error ) + return error; } /* see whether the cvt program has disabled hinting */ @@ -1915,10 +2285,9 @@ #endif { - FT_Error error = face->goto_table( face, TTAG_glyf, stream, 0 ); - + error = face->goto_table( face, TTAG_glyf, stream, 0 ); - if ( error == TT_Err_Table_Missing ) + if ( FT_ERR_EQ( error, Table_Missing ) ) loader->glyf_offset = 0; else if ( error ) { @@ -1946,7 +2315,7 @@ loader->glyph = (FT_GlyphSlot)glyph; loader->stream = stream; - return TT_Err_Ok; + return FT_Err_Ok; } @@ -1983,13 +2352,11 @@ FT_UInt glyph_index, FT_Int32 load_flags ) { - TT_Face face; FT_Error error; TT_LoaderRec loader; - face = (TT_Face)glyph->face; - error = TT_Err_Ok; + FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index )); #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS @@ -2003,20 +2370,27 @@ error = load_sbit_image( size, glyph, glyph_index, load_flags ); if ( !error ) { - FT_Face root = &face->root; - - - if ( FT_IS_SCALABLE( root ) ) + if ( FT_IS_SCALABLE( glyph->face ) ) { /* for the bbox we need the header only */ (void)tt_loader_init( &loader, size, glyph, load_flags, TRUE ); (void)load_truetype_glyph( &loader, glyph_index, 0, TRUE ); glyph->linearHoriAdvance = loader.linear; - glyph->linearVertAdvance = loader.top_bearing + loader.bbox.yMax - - loader.vadvance; + glyph->linearVertAdvance = loader.vadvance; + + /* sanity checks: if `xxxAdvance' in the sbit metric */ + /* structure isn't set, use `linearXXXAdvance' */ + if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance ) + glyph->metrics.horiAdvance = + FT_MulFix( glyph->linearHoriAdvance, + size->root.metrics.x_scale ); + if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance ) + glyph->metrics.vertAdvance = + FT_MulFix( glyph->linearVertAdvance, + size->root.metrics.y_scale ); } - return TT_Err_Ok; + return FT_Err_Ok; } } @@ -2024,10 +2398,10 @@ /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */ if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid ) - return TT_Err_Invalid_Size_Handle; + return FT_THROW( Invalid_Size_Handle ); if ( load_flags & FT_LOAD_SBITS_ONLY ) - return TT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); error = tt_loader_init( &loader, size, glyph, load_flags, FALSE ); if ( error ) @@ -2093,7 +2467,7 @@ #endif /* TT_USE_BYTECODE_INTERPRETER */ - compute_glyph_metrics( &loader, glyph_index ); + error = compute_glyph_metrics( &loader, glyph_index ); } /* Set the `high precision' bit flag. */ diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h index 05f7588..3f1699e 100644 --- a/src/truetype/ttgload.h +++ b/src/truetype/ttgload.h @@ -43,6 +43,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) TT_Get_VMetrics( TT_Face face, FT_UInt idx, + FT_Pos yMax, FT_Short* tsb, FT_UShort* ah ); diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 69b702f..1b35539 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -4,7 +4,7 @@ /* */ /* TrueType GX Font Variation loader */ /* */ -/* Copyright 2004-2011 by */ +/* Copyright 2004-2014 by */ /* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,9 +61,9 @@ #define FT_Stream_FTell( stream ) \ - ( (stream)->cursor - (stream)->base ) + (FT_ULong)( (stream)->cursor - (stream)->base ) #define FT_Stream_SeekSet( stream, off ) \ - ( (stream)->cursor = (stream)->base+(off) ) + ( (stream)->cursor = (stream)->base + (off) ) /*************************************************************************/ @@ -91,7 +91,9 @@ /* indicates that there is a delta for every point without needing to */ /* enumerate all of them. */ /* */ -#define ALL_POINTS (FT_UShort*)( -1 ) + + /* ensure that value `0' has the same width as a pointer */ +#define ALL_POINTS (FT_UShort*)~(FT_PtrDist)0 #define GX_PT_POINTS_ARE_WORDS 0x80 @@ -130,7 +132,7 @@ FT_Int j; FT_Int first; FT_Memory memory = stream->memory; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( error ); @@ -215,7 +217,7 @@ FT_Offset i; FT_UInt j; FT_Memory memory = stream->memory; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_UNUSED( error ); @@ -283,7 +285,7 @@ FT_Memory memory = stream->memory; GX_Blend blend = face->blend; GX_AVarSegment segment; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ULong version; FT_Long axisCount; FT_Int i, j; @@ -412,7 +414,7 @@ if ( gvar_head.version != (FT_Long)0x00010000L || gvar_head.axisCount != (FT_UShort)blend->mmvar->num_axis ) { - error = TT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -501,11 +503,9 @@ FT_Fixed* im_end_coords ) { FT_UInt i; - FT_Fixed apply; - FT_Fixed temp; + FT_Fixed apply = 0x10000L; - apply = 0x10000L; for ( i = 0; i < blend->num_axis; ++i ) { if ( tuple_coords[i] == 0 ) @@ -525,11 +525,10 @@ else if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) ) /* not an intermediate tuple */ - apply = FT_MulDiv( apply, + apply = FT_MulFix( apply, blend->normalizedcoords[i] > 0 ? blend->normalizedcoords[i] - : -blend->normalizedcoords[i], - 0x10000L ); + : -blend->normalizedcoords[i] ); else if ( blend->normalizedcoords[i] <= im_start_coords[i] || blend->normalizedcoords[i] >= im_end_coords[i] ) @@ -539,20 +538,14 @@ } else if ( blend->normalizedcoords[i] < tuple_coords[i] ) - { - temp = FT_MulDiv( blend->normalizedcoords[i] - im_start_coords[i], - 0x10000L, - tuple_coords[i] - im_start_coords[i]); - apply = FT_MulDiv( apply, temp, 0x10000L ); - } + apply = FT_MulDiv( apply, + blend->normalizedcoords[i] - im_start_coords[i], + tuple_coords[i] - im_start_coords[i] ); else - { - temp = FT_MulDiv( im_end_coords[i] - blend->normalizedcoords[i], - 0x10000L, - im_end_coords[i] - tuple_coords[i] ); - apply = FT_MulDiv( apply, temp, 0x10000L ); - } + apply = FT_MulDiv( apply, + im_end_coords[i] - blend->normalizedcoords[i], + im_end_coords[i] - tuple_coords[i] ); } return apply; @@ -619,7 +612,7 @@ FT_Stream stream = face->root.stream; FT_Memory memory = face->root.memory; FT_ULong table_len; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ULong fvar_start; FT_Int i, j; FT_MM_Var* mmvar = NULL; @@ -690,7 +683,7 @@ fvar_head.offsetToData + fvar_head.axisCount * 20U + fvar_head.instanceCount * fvar_head.instanceSize > table_len ) { - error = TT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } @@ -712,7 +705,7 @@ mmvar->num_axis = fvar_head.axisCount; mmvar->num_designs = - (FT_UInt)-1; /* meaningless in this context; each glyph */ + ~0U; /* meaningless in this context; each glyph */ /* may have a different number of designs */ /* (or tuples, as called by Apple) */ mmvar->num_namedstyles = @@ -856,7 +849,7 @@ FT_UInt num_coords, FT_Fixed* coords ) { - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; GX_Blend blend; FT_MM_Var* mmvar; FT_UInt i; @@ -884,14 +877,14 @@ if ( num_coords != mmvar->num_axis ) { - error = TT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } for ( i = 0; i < num_coords; ++i ) if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L ) { - error = TT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -945,13 +938,13 @@ FT_FREE( face->cvt ); face->cvt = NULL; - tt_face_load_cvt( face, face->root.stream ); + error = tt_face_load_cvt( face, face->root.stream ); break; case mcvt_modify: /* The original cvt table is in memory. All we need to do is */ /* apply the `cvar' table (if any). */ - tt_face_vary_cvt( face, face->root.stream ); + error = tt_face_vary_cvt( face, face->root.stream ); break; case mcvt_retain: @@ -992,7 +985,7 @@ FT_UInt num_coords, FT_Fixed* coords ) { - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Fixed* normalized = NULL; GX_Blend blend; FT_MM_Var* mmvar; @@ -1013,7 +1006,7 @@ if ( num_coords != mmvar->num_axis ) { - error = TT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -1029,24 +1022,16 @@ { if ( coords[i] > a->maximum || coords[i] < a->minimum ) { - error = TT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } if ( coords[i] < a->def ) - { - normalized[i] = -FT_MulDiv( coords[i] - a->def, - 0x10000L, - a->minimum - a->def ); - } + normalized[i] = -FT_DivFix( coords[i] - a->def, a->minimum - a->def ); else if ( a->maximum == a->def ) normalized[i] = 0; else - { - normalized[i] = FT_MulDiv( coords[i] - a->def, - 0x10000L, - a->maximum - a->def ); - } + normalized[i] = FT_DivFix( coords[i] - a->def, a->maximum - a->def ); } if ( !blend->avar_checked ) @@ -1061,15 +1046,11 @@ if ( normalized[i] < av->correspondence[j].fromCoord ) { normalized[i] = - FT_MulDiv( - FT_MulDiv( - normalized[i] - av->correspondence[j - 1].fromCoord, - 0x10000L, - av->correspondence[j].fromCoord - - av->correspondence[j - 1].fromCoord ), - av->correspondence[j].toCoord - - av->correspondence[j - 1].toCoord, - 0x10000L ) + + FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord, + av->correspondence[j].toCoord - + av->correspondence[j - 1].toCoord, + av->correspondence[j].fromCoord - + av->correspondence[j - 1].fromCoord ) + av->correspondence[j - 1].toCoord; break; } @@ -1141,7 +1122,7 @@ { FT_TRACE2(( "tt_face_vary_cvt: no blend specified\n" )); - error = TT_Err_Ok; + error = FT_Err_Ok; goto Exit; } @@ -1149,7 +1130,7 @@ { FT_TRACE2(( "tt_face_vary_cvt: no `cvt ' table\n" )); - error = TT_Err_Ok; + error = FT_Err_Ok; goto Exit; } @@ -1158,13 +1139,13 @@ { FT_TRACE2(( "is missing\n" )); - error = TT_Err_Ok; + error = FT_Err_Ok; goto Exit; } if ( FT_FRAME_ENTER( table_len ) ) { - error = TT_Err_Ok; + error = FT_Err_Ok; goto Exit; } @@ -1173,7 +1154,7 @@ { FT_TRACE2(( "bad table version\n" )); - error = TT_Err_Ok; + error = FT_Err_Ok; goto FExit; } @@ -1344,7 +1325,7 @@ if ( !face->doblend || blend == NULL ) - return TT_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); /* to be freed by the caller */ if ( FT_NEW_ARRAY( delta_xy, n_points ) ) @@ -1354,7 +1335,7 @@ if ( glyph_index >= blend->gv_glyphcnt || blend->glyphoffsets[glyph_index] == blend->glyphoffsets[glyph_index + 1] ) - return TT_Err_Ok; /* no variation data for this glyph */ + return FT_Err_Ok; /* no variation data for this glyph */ if ( FT_STREAM_SEEK( blend->glyphoffsets[glyph_index] ) || FT_FRAME_ENTER( blend->glyphoffsets[glyph_index + 1] - @@ -1404,7 +1385,7 @@ } else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount ) { - error = TT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Fail3; } else diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index 3acb24a..eccd4aa 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (body). */ /* */ -/* Copyright 1996-2012 */ +/* Copyright 1996-2014 */ /* by David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,20 +25,16 @@ #include FT_INTERNAL_CALC_H #include FT_TRIGONOMETRY_H #include FT_SYSTEM_H +#include FT_TRUETYPE_DRIVER_H #include "ttinterp.h" - #include "tterrors.h" +#include "ttsubpix.h" #ifdef TT_USE_BYTECODE_INTERPRETER -#define TT_MULFIX FT_MulFix -#define TT_MULDIV FT_MulDiv -#define TT_MULDIV_NO_ROUND FT_MulDiv_No_Round - - /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ @@ -52,7 +48,7 @@ /* */ /* In order to detect infinite loops in the code, we set up a counter */ /* within the run loop. A single stroke of interpretation is now */ - /* limited to a maximal number of opcodes defined below. */ + /* limited to a maximum number of opcodes defined below. */ /* */ #define MAX_RUNNABLE_OPCODES 1000000L @@ -136,6 +132,11 @@ #define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args ) +#define SUBPIXEL_HINTING \ + ( ((TT_Driver)FT_FACE_DRIVER( CUR.face ))->interpreter_version == \ + TT_INTERPRETER_VERSION_38 ) + + /*************************************************************************/ /* */ /* The following macros hide the use of EXEC_ARG and EXEC_ARG_ to */ @@ -171,6 +172,9 @@ #define CUR_Func_round( d, c ) \ CUR.func_round( EXEC_ARG_ d, c ) +#define CUR_Func_cur_ppem() \ + CUR.func_cur_ppem( EXEC_ARG ) + #define CUR_Func_read_cvt( index ) \ CUR.func_read_cvt( EXEC_ARG_ index ) @@ -183,12 +187,6 @@ #define CURRENT_Ratio() \ Current_Ratio( EXEC_ARG ) -#define CURRENT_Ppem() \ - Current_Ppem( EXEC_ARG ) - -#define CUR_Ppem() \ - Cur_PPEM( EXEC_ARG ) - #define INS_SxVTL( a, b, c, d ) \ Ins_SxVTL( EXEC_ARG_ a, b, c, d ) @@ -232,6 +230,14 @@ #define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) ) #define BOUNDSL( x, n ) ( (FT_ULong)(x) >= (FT_ULong)(n) ) + /*************************************************************************/ + /* */ + /* This macro computes (a*2^14)/b and complements TT_MulFix14. */ + /* */ +#define TT_DivFix14( a, b ) \ + FT_DivFix( a, (b) << 2 ) + + #undef SUCCESS #define SUCCESS 0 @@ -273,10 +279,7 @@ /* */ /* 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 ) @@ -300,8 +303,6 @@ exec->codeSize = coderange->size; exec->IP = IP; exec->curRange = range; - - return TT_Err_Ok; } @@ -323,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, @@ -336,8 +334,6 @@ exec->codeRangeTable[range - 1].base = (FT_Byte*)base; exec->codeRangeTable[range - 1].size = length; - - return TT_Err_Ok; } @@ -355,13 +351,7 @@ /* */ /* 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 ) { @@ -369,8 +359,6 @@ exec->codeRangeTable[range - 1].base = NULL; exec->codeRangeTable[range - 1].size = 0; - - return TT_Err_Ok; } @@ -394,13 +382,10 @@ /* */ /* memory :: A handle to the parent memory object. */ /* */ - /* */ - /* 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; @@ -427,8 +412,6 @@ exec->face = NULL; FT_FREE( exec ); - - return TT_Err_Ok; } @@ -478,7 +461,7 @@ exec->face = NULL; exec->size = NULL; - return TT_Err_Ok; + return FT_Err_Ok; Fail_Memory: FT_ERROR(( "Init_Context: not enough memory for %p\n", exec )); @@ -530,7 +513,7 @@ *size = new_max; } - return TT_Err_Ok; + return FT_Err_Ok; } @@ -637,7 +620,7 @@ exec->instruction_trap = FALSE; - return TT_Err_Ok; + return FT_Err_Ok; } @@ -655,13 +638,10 @@ /* */ /* 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 ) { @@ -679,8 +659,6 @@ for ( i = 0; i < TT_MAX_CODE_RANGES; i++ ) size->codeRangeTable[i] = exec->codeRangeTable[i]; - - return TT_Err_Ok; } @@ -712,12 +690,7 @@ TT_Run_Context( TT_ExecContext exec, FT_Bool debug ) { - FT_Error error; - - - if ( ( error = TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ) ) - != TT_Err_Ok ) - return error; + TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ); exec->zp0 = exec->pts; exec->zp1 = exec->pts; @@ -753,7 +726,7 @@ if ( !debug ) return TT_RunIns( exec ); else - return TT_Err_Ok; + return FT_Err_Ok; #endif } @@ -787,16 +760,18 @@ FT_EXPORT_DEF( TT_ExecContext ) TT_New_Context( TT_Driver driver ) { - TT_ExecContext exec; - FT_Memory memory; + FT_Memory memory; + + if ( !driver ) + goto Fail; memory = driver->root.root.memory; - exec = driver->context; if ( !driver->context ) { - FT_Error error; + FT_Error error; + TT_ExecContext exec; /* allocate object */ @@ -1428,9 +1403,108 @@ #undef PACK -#if 1 + +#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER + +#if defined( __arm__ ) && \ + ( defined( __thumb2__ ) || !defined( __thumb__ ) ) + +#define TT_MulFix14 TT_MulFix14_arm static FT_Int32 + TT_MulFix14_arm( FT_Int32 a, + FT_Int b ) + { + FT_Int32 t, t2; + + +#if defined( __CC_ARM ) || defined( __ARMCC__ ) + + __asm + { + smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ + mov a, t, asr #31 /* a = (hi >> 31) */ + add a, a, #0x2000 /* a += 0x2000 */ + adds t2, t2, a /* t2 += a */ + adc t, t, #0 /* t += carry */ + mov a, t2, lsr #14 /* a = t2 >> 14 */ + orr a, a, t, lsl #18 /* a |= t << 18 */ + } + +#elif defined( __GNUC__ ) + + __asm__ __volatile__ ( + "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ + "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ +#if defined( __clang__ ) && defined( __thumb2__ ) + "add.w %0, %0, #0x2000\n\t" /* %0 += 0x2000 */ +#else + "add %0, %0, #0x2000\n\t" /* %0 += 0x2000 */ +#endif + "adds %1, %1, %0\n\t" /* %1 += %0 */ + "adc %2, %2, #0\n\t" /* %2 += carry */ + "mov %0, %1, lsr #14\n\t" /* %0 = %1 >> 16 */ + "orr %0, %0, %2, lsl #18\n\t" /* %0 |= %2 << 16 */ + : "=r"(a), "=&r"(t2), "=&r"(t) + : "r"(a), "r"(b) + : "cc" ); + +#endif + + return a; + } + +#endif /* __arm__ && ( __thumb2__ || !__thumb__ ) */ + +#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ + + +#if defined( __GNUC__ ) && \ + ( defined( __i386__ ) || defined( __x86_64__ ) ) + +#define TT_MulFix14 TT_MulFix14_long_long + + /* Temporarily disable the warning that C90 doesn't support `long long'. */ +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wlong-long" + + /* This is declared `noinline' because inlining the function results */ + /* in slower code. The `pure' attribute indicates that the result */ + /* only depends on the parameters. */ + static __attribute__(( noinline )) + __attribute__(( pure )) FT_Int32 + TT_MulFix14_long_long( FT_Int32 a, + FT_Int b ) + { + + long long ret = (long long)a * b; + + /* The following line assumes that right shifting of signed values */ + /* will actually preserve the sign bit. The exact behaviour is */ + /* undefined, but this is true on x86 and x86_64. */ + long long tmp = ret >> 63; + + + ret += 0x2000 + tmp; + + return (FT_Int32)( ret >> 14 ); + } + +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 +#pragma GCC diagnostic pop +#endif + +#endif /* __GNUC__ && ( __i386__ || __x86_64__ ) */ + + +#ifndef TT_MulFix14 + + /* Compute (a*b)/2^14 with maximum accuracy and rounding. */ + /* This is optimized to be faster than calling FT_MulFix() */ + /* for platforms where sizeof(int) == 2. */ + static FT_Int32 TT_MulFix14( FT_Int32 a, FT_Int b ) { @@ -1461,39 +1535,52 @@ return sign >= 0 ? (FT_Int32)mid : -(FT_Int32)mid; } -#else +#endif /* !TT_MulFix14 */ - /* compute (a*b)/2^14 with maximal accuracy and rounding */ - static FT_Int32 - TT_MulFix14( FT_Int32 a, - FT_Int b ) - { - FT_Int32 m, s, hi; - FT_UInt32 l, lo; +#if defined( __GNUC__ ) && \ + ( defined( __i386__ ) || \ + defined( __x86_64__ ) || \ + defined( __arm__ ) ) - /* compute ax*bx as 64-bit value */ - l = (FT_UInt32)( ( a & 0xFFFFU ) * b ); - m = ( a >> 16 ) * b; +#define TT_DotFix14 TT_DotFix14_long_long - lo = l + (FT_UInt32)( m << 16 ); - hi = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo < l ); +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Wlong-long" - /* divide the result by 2^14 with rounding */ - s = hi >> 31; - l = lo + (FT_UInt32)s; - hi += s + ( l < lo ); - lo = l; + static __attribute__(( pure )) FT_Int32 + TT_DotFix14_long_long( FT_Int32 ax, + FT_Int32 ay, + FT_Int bx, + FT_Int by ) + { + /* Temporarily disable the warning that C90 doesn't support */ + /* `long long'. */ - l = lo + 0x2000U; - hi += l < lo; + long long temp1 = (long long)ax * bx; + long long temp2 = (long long)ay * by; + + + temp1 += temp2; + temp2 = temp1 >> 63; + temp1 += 0x2000 + temp2; + + return (FT_Int32)( temp1 >> 14 ); - return ( hi << 18 ) | ( l >> 14 ); } + +#if ( __GNUC__ * 100 + __GNUC_MINOR__ ) >= 406 +#pragma GCC diagnostic pop #endif +#endif /* __GNUC__ && (__arm__ || __i386__ || __x86_64__) */ + - /* compute (ax*bx+ay*by)/2^14 with maximal accuracy and rounding */ +#ifndef TT_DotFix14 + + /* compute (ax*bx+ay*by)/2^14 with maximum accuracy and rounding */ static FT_Int32 TT_DotFix14( FT_Int32 ax, FT_Int32 ay, @@ -1508,14 +1595,14 @@ l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx ); m = ( ax >> 16 ) * bx; - lo1 = l + (FT_UInt32)( m << 16 ); + lo1 = l + ( (FT_UInt32)m << 16 ); hi1 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo1 < l ); /* compute ay*by as 64-bit value */ l = (FT_UInt32)( ( ay & 0xFFFFU ) * by ); m = ( ay >> 16 ) * by; - lo2 = l + (FT_UInt32)( m << 16 ); + lo2 = l + ( (FT_UInt32)m << 16 ); hi2 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo2 < l ); /* add them */ @@ -1531,98 +1618,10 @@ l = lo + 0x2000U; hi += ( l < lo ); - return ( hi << 18 ) | ( l >> 14 ); - } - - - /* return length of given vector */ - -#if 0 - - static FT_Int32 - TT_VecLen( FT_Int32 x, - FT_Int32 y ) - { - FT_Int32 m, hi1, hi2, hi; - FT_UInt32 l, lo1, lo2, lo; - - - /* compute x*x as 64-bit value */ - lo = (FT_UInt32)( x & 0xFFFFU ); - hi = x >> 16; - - l = lo * lo; - m = hi * lo; - hi = hi * hi; - - lo1 = l + (FT_UInt32)( m << 17 ); - hi1 = hi + ( m >> 15 ) + ( lo1 < l ); - - /* compute y*y as 64-bit value */ - lo = (FT_UInt32)( y & 0xFFFFU ); - hi = y >> 16; - - l = lo * lo; - m = hi * lo; - hi = hi * hi; - - lo2 = l + (FT_UInt32)( m << 17 ); - hi2 = hi + ( m >> 15 ) + ( lo2 < l ); - - /* add them to get 'x*x+y*y' as 64-bit value */ - lo = lo1 + lo2; - hi = hi1 + hi2 + ( lo < lo1 ); - - /* compute the square root of this value */ - { - FT_UInt32 root, rem, test_div; - FT_Int count; - - - root = 0; - - { - rem = 0; - count = 32; - do - { - rem = ( rem << 2 ) | ( (FT_UInt32)hi >> 30 ); - hi = ( hi << 2 ) | ( lo >> 30 ); - lo <<= 2; - root <<= 1; - test_div = ( root << 1 ) + 1; - - if ( rem >= test_div ) - { - rem -= test_div; - root += 1; - } - } while ( --count ); - } - - return (FT_Int32)root; - } - } - -#else - - /* this version uses FT_Vector_Length which computes the same value */ - /* much, much faster.. */ - /* */ - static FT_F26Dot6 - TT_VecLen( FT_F26Dot6 X, - FT_F26Dot6 Y ) - { - FT_Vector v; - - - v.x = X; - v.y = Y; - - return FT_Vector_Length( &v ); + return (FT_Int32)( ( (FT_UInt32)hi << 18 ) | ( l >> 14 ) ); } -#endif +#endif /* TT_DotFix14 */ /*************************************************************************/ @@ -1661,14 +1660,14 @@ else { - FT_Long x, y; + FT_F26Dot6 x, y; - x = TT_MULDIV( CUR.GS.projVector.x, - CUR.tt_metrics.x_ratio, 0x4000 ); - y = TT_MULDIV( CUR.GS.projVector.y, - CUR.tt_metrics.y_ratio, 0x4000 ); - CUR.tt_metrics.ratio = TT_VecLen( x, y ); + x = TT_MulFix14( CUR.tt_metrics.x_ratio, + CUR.GS.projVector.x ); + y = TT_MulFix14( CUR.tt_metrics.y_ratio, + CUR.GS.projVector.y ); + CUR.tt_metrics.ratio = FT_Hypot( x, y ); } } } @@ -1676,10 +1675,17 @@ } - static FT_Long + FT_CALLBACK_DEF( FT_Long ) Current_Ppem( EXEC_OP ) { - return TT_MULFIX( CUR.tt_metrics.ppem, CURRENT_Ratio() ); + return CUR.tt_metrics.ppem; + } + + + FT_CALLBACK_DEF( FT_Long ) + Current_Ppem_Stretched( EXEC_OP ) + { + return FT_MulFix( CUR.tt_metrics.ppem, CURRENT_Ratio() ); } @@ -1700,7 +1706,7 @@ FT_CALLBACK_DEF( FT_F26Dot6 ) Read_CVT_Stretched( EXEC_OP_ FT_ULong idx ) { - return TT_MULFIX( CUR.cvt[idx], CURRENT_Ratio() ); + return FT_MulFix( CUR.cvt[idx], CURRENT_Ratio() ); } @@ -1786,7 +1792,7 @@ if ( aRange < 1 || aRange > 3 ) { - CUR.error = TT_Err_Bad_Argument; + CUR.error = FT_THROW( Bad_Argument ); return FAILURE; } @@ -1794,7 +1800,7 @@ if ( range->base == NULL ) /* invalid coderange */ { - CUR.error = TT_Err_Invalid_CodeRange; + CUR.error = FT_THROW( Invalid_CodeRange ); return FAILURE; } @@ -1804,7 +1810,7 @@ if ( aIP > range->size ) { - CUR.error = TT_Err_Code_Overflow; + CUR.error = FT_THROW( Code_Overflow ); return FAILURE; } @@ -1850,9 +1856,12 @@ if ( v != 0 ) { - zone->cur[point].x += TT_MULDIV( distance, - v * 0x10000L, - CUR.F_dot_P ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( !SUBPIXEL_HINTING || + ( !CUR.ignore_x_mode || + ( CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_X_DMOVE ) ) ) +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + zone->cur[point].x += FT_MulDiv( distance, v, CUR.F_dot_P ); zone->tags[point] |= FT_CURVE_TAG_TOUCH_X; } @@ -1861,9 +1870,7 @@ if ( v != 0 ) { - zone->cur[point].y += TT_MULDIV( distance, - v * 0x10000L, - CUR.F_dot_P ); + zone->cur[point].y += FT_MulDiv( distance, v, CUR.F_dot_P ); zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y; } @@ -1902,16 +1909,12 @@ v = CUR.GS.freeVector.x; if ( v != 0 ) - zone->org[point].x += TT_MULDIV( distance, - v * 0x10000L, - CUR.F_dot_P ); + zone->org[point].x += FT_MulDiv( distance, v, CUR.F_dot_P ); v = CUR.GS.freeVector.y; if ( v != 0 ) - zone->org[point].y += TT_MULDIV( distance, - v * 0x10000L, - CUR.F_dot_P ); + zone->org[point].y += FT_MulDiv( distance, v, CUR.F_dot_P ); } @@ -1932,7 +1935,12 @@ { FT_UNUSED_EXEC; - zone->cur[point].x += distance; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( !SUBPIXEL_HINTING || + !CUR.ignore_x_mode ) +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + zone->cur[point].x += distance; + zone->tags[point] |= FT_CURVE_TAG_TOUCH_X; } @@ -2015,7 +2023,7 @@ if ( distance >= 0 ) { val = distance + compensation; - if ( distance && val < 0 ) + if ( val < 0 ) val = 0; } else @@ -2055,10 +2063,8 @@ if ( distance >= 0 ) { - val = distance + compensation + 32; - if ( distance && val > 0 ) - val &= ~63; - else + val = FT_PIX_ROUND( distance + compensation ); + if ( val < 0 ) val = 0; } else @@ -2100,14 +2106,14 @@ if ( distance >= 0 ) { val = FT_PIX_FLOOR( distance + compensation ) + 32; - if ( distance && val < 0 ) - val = 0; + if ( val < 0 ) + val = 32; } else { val = -( FT_PIX_FLOOR( compensation - distance ) + 32 ); if ( val > 0 ) - val = 0; + val = -32; } return val; @@ -2141,15 +2147,13 @@ if ( distance >= 0 ) { - val = distance + compensation; - if ( distance && val > 0 ) - val &= ~63; - else + val = FT_PIX_FLOOR( distance + compensation ); + if ( val < 0 ) val = 0; } else { - val = -( ( compensation - distance ) & -64 ); + val = -FT_PIX_FLOOR( compensation - distance ); if ( val > 0 ) val = 0; } @@ -2185,15 +2189,13 @@ if ( distance >= 0 ) { - val = distance + compensation + 63; - if ( distance && val > 0 ) - val &= ~63; - else + val = FT_PIX_CEIL( distance + compensation ); + if ( val < 0 ) val = 0; } else { - val = - FT_PIX_CEIL( compensation - distance ); + val = -FT_PIX_CEIL( compensation - distance ); if ( val > 0 ) val = 0; } @@ -2229,10 +2231,8 @@ if ( distance >= 0 ) { - val = distance + compensation + 16; - if ( distance && val > 0 ) - val &= ~31; - else + val = FT_PAD_ROUND( distance + compensation, 32 ); + if ( val < 0 ) val = 0; } else @@ -2279,17 +2279,17 @@ { val = ( distance - CUR.phase + CUR.threshold + compensation ) & -CUR.period; - if ( distance && val < 0 ) - val = 0; val += CUR.phase; + if ( val < 0 ) + val = CUR.phase; } else { val = -( ( CUR.threshold - CUR.phase - distance + compensation ) & -CUR.period ); - if ( val > 0 ) - val = 0; val -= CUR.phase; + if ( val > 0 ) + val = -CUR.phase; } return val; @@ -2327,17 +2327,17 @@ { val = ( ( distance - CUR.phase + CUR.threshold + compensation ) / CUR.period ) * CUR.period; - if ( distance && val < 0 ) - val = 0; val += CUR.phase; + if ( val < 0 ) + val = CUR.phase; } else { val = -( ( ( CUR.threshold - CUR.phase - distance + compensation ) / CUR.period ) * CUR.period ); - if ( val > 0 ) - val = 0; val -= CUR.phase; + if ( val > 0 ) + val = -CUR.phase; } return val; @@ -2404,8 +2404,9 @@ /* Sets Super Round parameters. */ /* */ /* */ - /* GridPeriod :: Grid period */ - /* selector :: SROUND opcode */ + /* GridPeriod :: The grid period. */ + /* */ + /* selector :: The SROUND opcode. */ /* */ static void SetSuperRound( EXEC_OP_ FT_F26Dot6 GridPeriod, @@ -2617,13 +2618,10 @@ if ( CUR.GS.dualVector.x == 0x4000 ) CUR.func_dualproj = Project_x; + else if ( CUR.GS.dualVector.y == 0x4000 ) + CUR.func_dualproj = Project_y; else - { - if ( CUR.GS.dualVector.y == 0x4000 ) - CUR.func_dualproj = Project_y; - else - CUR.func_dualproj = Dual_Project; - } + CUR.func_dualproj = Dual_Project; /* Force recalculation of cached aspect ratio */ CUR.tt_metrics.ratio = 0; @@ -2633,61 +2631,50 @@ #endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */ if ( CUR.GS.freeVector.x == 0x4000 ) - CUR.F_dot_P = CUR.GS.projVector.x * 0x10000L; + CUR.F_dot_P = CUR.GS.projVector.x; + else if ( CUR.GS.freeVector.y == 0x4000 ) + CUR.F_dot_P = CUR.GS.projVector.y; else - { - if ( CUR.GS.freeVector.y == 0x4000 ) - CUR.F_dot_P = CUR.GS.projVector.y * 0x10000L; - else - CUR.F_dot_P = (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x * 4 + - (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y * 4; - } + CUR.F_dot_P = ( (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x + + (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y ) >> + 14; if ( CUR.GS.projVector.x == 0x4000 ) CUR.func_project = (TT_Project_Func)Project_x; + else if ( CUR.GS.projVector.y == 0x4000 ) + CUR.func_project = (TT_Project_Func)Project_y; else - { - if ( CUR.GS.projVector.y == 0x4000 ) - CUR.func_project = (TT_Project_Func)Project_y; - else - CUR.func_project = (TT_Project_Func)Project; - } + CUR.func_project = (TT_Project_Func)Project; if ( CUR.GS.dualVector.x == 0x4000 ) CUR.func_dualproj = (TT_Project_Func)Project_x; + else if ( CUR.GS.dualVector.y == 0x4000 ) + CUR.func_dualproj = (TT_Project_Func)Project_y; else - { - if ( CUR.GS.dualVector.y == 0x4000 ) - CUR.func_dualproj = (TT_Project_Func)Project_y; - else - CUR.func_dualproj = (TT_Project_Func)Dual_Project; - } + CUR.func_dualproj = (TT_Project_Func)Dual_Project; CUR.func_move = (TT_Move_Func)Direct_Move; CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig; - if ( CUR.F_dot_P == 0x40000000L ) + if ( CUR.F_dot_P == 0x4000L ) { if ( CUR.GS.freeVector.x == 0x4000 ) { CUR.func_move = (TT_Move_Func)Direct_Move_X; CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_X; } - else + else if ( CUR.GS.freeVector.y == 0x4000 ) { - if ( CUR.GS.freeVector.y == 0x4000 ) - { - CUR.func_move = (TT_Move_Func)Direct_Move_Y; - CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y; - } + CUR.func_move = (TT_Move_Func)Direct_Move_Y; + CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y; } } /* at small sizes, F_dot_P can become too small, resulting */ /* in overflows and `spikes' in a number of glyphs like `w'. */ - if ( FT_ABS( CUR.F_dot_P ) < 0x4000000L ) - CUR.F_dot_P = 0x40000000L; + if ( FT_ABS( CUR.F_dot_P ) < 0x400L ) + CUR.F_dot_P = 0x4000L; /* Disable cached aspect ratio */ CUR.tt_metrics.ratio = 0; @@ -2716,98 +2703,33 @@ /* In case Vx and Vy are both zero, Normalize() returns SUCCESS, and */ /* R is undefined. */ /* */ - - static FT_Bool Normalize( EXEC_OP_ FT_F26Dot6 Vx, FT_F26Dot6 Vy, FT_UnitVector* R ) { FT_F26Dot6 W; - FT_Bool S1, S2; FT_UNUSED_EXEC; - if ( FT_ABS( Vx ) < 0x10000L && FT_ABS( Vy ) < 0x10000L ) + if ( FT_ABS( Vx ) < 0x4000L && FT_ABS( Vy ) < 0x4000L ) { - Vx *= 0x100; - Vy *= 0x100; - - W = TT_VecLen( Vx, Vy ); - - if ( W == 0 ) + if ( Vx == 0 && Vy == 0 ) { /* XXX: UNDOCUMENTED! It seems that it is possible to try */ /* to normalize the vector (0,0). Return immediately. */ return SUCCESS; } - R->x = (FT_F2Dot14)FT_MulDiv( Vx, 0x4000L, W ); - R->y = (FT_F2Dot14)FT_MulDiv( Vy, 0x4000L, W ); - - return SUCCESS; + Vx *= 0x4000; + Vy *= 0x4000; } - W = TT_VecLen( Vx, Vy ); - - Vx = FT_MulDiv( Vx, 0x4000L, W ); - Vy = FT_MulDiv( Vy, 0x4000L, W ); - - W = Vx * Vx + Vy * Vy; - - /* Now, we want that Sqrt( W ) = 0x4000 */ - /* Or 0x10000000 <= W < 0x10004000 */ + W = FT_Hypot( Vx, Vy ); - if ( Vx < 0 ) - { - Vx = -Vx; - S1 = TRUE; - } - else - S1 = FALSE; - - if ( Vy < 0 ) - { - Vy = -Vy; - S2 = TRUE; - } - else - S2 = FALSE; - - while ( W < 0x10000000L ) - { - /* We need to increase W by a minimal amount */ - if ( Vx < Vy ) - Vx++; - else - Vy++; - - W = Vx * Vx + Vy * Vy; - } - - while ( W >= 0x10004000L ) - { - /* We need to decrease W by a minimal amount */ - if ( Vx < Vy ) - Vx--; - else - Vy--; - - W = Vx * Vx + Vy * Vy; - } - - /* Note that in various cases, we can only */ - /* compute a Sqrt(W) of 0x3FFF, eg. Vx = Vy */ - - if ( S1 ) - Vx = -Vx; - - if ( S2 ) - Vy = -Vy; - - R->x = (FT_F2Dot14)Vx; /* Type conversion */ - R->y = (FT_F2Dot14)Vy; /* Type conversion */ + R->x = (FT_F2Dot14)TT_DivFix14( Vx, W ); + R->y = (FT_F2Dot14)TT_DivFix14( Vy, W ); return SUCCESS; } @@ -2835,7 +2757,7 @@ BOUNDS( aIdx2, CUR.zp1.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return FAILURE; } @@ -3091,10 +3013,10 @@ CUR.func_round = (TT_Round_Func)Round_Super_45; -#define DO_SLOOP \ - if ( args[0] < 0 ) \ - CUR.error = TT_Err_Bad_Argument; \ - else \ +#define DO_SLOOP \ + if ( args[0] < 0 ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + else \ CUR.GS.loop = args[0]; @@ -3110,14 +3032,9 @@ CUR.GS.single_width_cutin = (FT_F26Dot6)args[0]; - /* XXX: UNDOCUMENTED! or bug in the Windows engine? */ - /* */ - /* It seems that the value that is read here is */ - /* expressed in 16.16 format rather than in font */ - /* units. */ - /* */ -#define DO_SSW \ - CUR.GS.single_width_value = (FT_F26Dot6)( args[0] >> 10 ); +#define DO_SSW \ + CUR.GS.single_width_value = FT_MulFix( args[0], \ + CUR.tt_metrics.scale ); #define DO_FLIPON \ @@ -3128,19 +3045,22 @@ CUR.GS.auto_flip = FALSE; -#define DO_SDB \ - CUR.GS.delta_base = (FT_Short)args[0]; +#define DO_SDB \ + CUR.GS.delta_base = (FT_UShort)args[0]; -#define DO_SDS \ - CUR.GS.delta_shift = (FT_Short)args[0]; +#define DO_SDS \ + if ( (FT_ULong)args[0] > 6UL ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + else \ + CUR.GS.delta_shift = (FT_UShort)args[0]; #define DO_MD /* nothing */ -#define DO_MPPEM \ - args[0] = CURRENT_Ppem(); +#define DO_MPPEM \ + args[0] = CUR_Func_cur_ppem(); /* Note: The pointSize should be irrelevant in a given font program; */ @@ -3152,8 +3072,8 @@ #else -#define DO_MPS \ - args[0] = CURRENT_Ppem(); +#define DO_MPS \ + args[0] = CUR_Func_cur_ppem(); #endif /* 0 */ @@ -3181,60 +3101,60 @@ args[0] = CUR.top; -#define DO_CINDEX \ - { \ - FT_Long L; \ - \ - \ - L = args[0]; \ - \ - if ( L <= 0 || L > CUR.args ) \ - { \ - if ( CUR.pedantic_hinting ) \ - CUR.error = TT_Err_Invalid_Reference; \ - args[0] = 0; \ - } \ - else \ - args[0] = CUR.stack[CUR.args - L]; \ - } - - -#define DO_JROT \ - if ( args[1] != 0 ) \ - { \ - if ( args[0] == 0 && CUR.args == 0 ) \ - CUR.error = TT_Err_Bad_Argument; \ - CUR.IP += args[0]; \ - if ( CUR.IP < 0 || \ - ( CUR.callTop > 0 && \ - CUR.IP > CUR.callStack[CUR.callTop - 1].Cur_End ) ) \ - CUR.error = TT_Err_Bad_Argument; \ - CUR.step_ins = FALSE; \ - } - - -#define DO_JMPR \ - if ( args[0] == 0 && CUR.args == 0 ) \ - CUR.error = TT_Err_Bad_Argument; \ - CUR.IP += args[0]; \ - if ( CUR.IP < 0 || \ - ( CUR.callTop > 0 && \ - CUR.IP > CUR.callStack[CUR.callTop - 1].Cur_End ) ) \ - CUR.error = TT_Err_Bad_Argument; \ +#define DO_CINDEX \ + { \ + FT_Long L; \ + \ + \ + L = args[0]; \ + \ + if ( L <= 0 || L > CUR.args ) \ + { \ + if ( CUR.pedantic_hinting ) \ + CUR.error = FT_THROW( Invalid_Reference ); \ + args[0] = 0; \ + } \ + else \ + args[0] = CUR.stack[CUR.args - L]; \ + } + + +#define DO_JROT \ + if ( args[1] != 0 ) \ + { \ + if ( args[0] == 0 && CUR.args == 0 ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + CUR.IP += args[0]; \ + if ( CUR.IP < 0 || \ + ( CUR.callTop > 0 && \ + CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + CUR.step_ins = FALSE; \ + } + + +#define DO_JMPR \ + if ( args[0] == 0 && CUR.args == 0 ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + CUR.IP += args[0]; \ + if ( CUR.IP < 0 || \ + ( CUR.callTop > 0 && \ + CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \ + CUR.error = FT_THROW( Bad_Argument ); \ CUR.step_ins = FALSE; -#define DO_JROF \ - if ( args[1] == 0 ) \ - { \ - if ( args[0] == 0 && CUR.args == 0 ) \ - CUR.error = TT_Err_Bad_Argument; \ - CUR.IP += args[0]; \ - if ( CUR.IP < 0 || \ - ( CUR.callTop > 0 && \ - CUR.IP > CUR.callStack[CUR.callTop - 1].Cur_End ) ) \ - CUR.error = TT_Err_Bad_Argument; \ - CUR.step_ins = FALSE; \ +#define DO_JROF \ + if ( args[1] == 0 ) \ + { \ + if ( args[0] == 0 && CUR.args == 0 ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + CUR.IP += args[0]; \ + if ( CUR.IP < 0 || \ + ( CUR.callTop > 0 && \ + CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \ + CUR.error = FT_THROW( Bad_Argument ); \ + CUR.step_ins = FALSE; \ } @@ -3292,13 +3212,13 @@ #define DO_DIV \ if ( args[1] == 0 ) \ - CUR.error = TT_Err_Divide_By_Zero; \ + CUR.error = FT_THROW( Divide_By_Zero ); \ else \ - args[0] = TT_MULDIV_NO_ROUND( args[0], 64L, args[1] ); + args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] ); #define DO_MUL \ - args[0] = TT_MULDIV( args[0], args[1], 64L ); + args[0] = FT_MulDiv( args[0], args[1], 64L ); #define DO_ABS \ @@ -3316,6 +3236,45 @@ #define DO_CEILING \ args[0] = FT_PIX_CEIL( args[0] ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +#define DO_RS \ + { \ + FT_ULong I = (FT_ULong)args[0]; \ + \ + \ + if ( BOUNDSL( I, CUR.storeSize ) ) \ + { \ + if ( CUR.pedantic_hinting ) \ + ARRAY_BOUND_ERROR; \ + else \ + args[0] = 0; \ + } \ + else \ + { \ + /* subpixel hinting - avoid Typeman Dstroke and */ \ + /* IStroke and Vacuform rounds */ \ + \ + if ( SUBPIXEL_HINTING && \ + CUR.ignore_x_mode && \ + ( ( I == 24 && \ + ( CUR.face->sph_found_func_flags & \ + ( SPH_FDEF_SPACING_1 | \ + SPH_FDEF_SPACING_2 ) ) ) || \ + ( I == 22 && \ + ( CUR.sph_in_func_flags & \ + SPH_FDEF_TYPEMAN_STROKES ) ) || \ + ( I == 8 && \ + ( CUR.face->sph_found_func_flags & \ + SPH_FDEF_VACUFORM_ROUND_1 ) && \ + CUR.iup_called ) ) ) \ + args[0] = 0; \ + else \ + args[0] = CUR.storage[I]; \ + } \ + } + +#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ #define DO_RS \ { \ @@ -3335,6 +3294,8 @@ args[0] = CUR.storage[I]; \ } +#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + #define DO_WS \ { \ @@ -3402,12 +3363,12 @@ } \ } \ else \ - CUR.cvt[I] = TT_MULFIX( args[1], CUR.tt_metrics.scale ); \ + CUR.cvt[I] = FT_MulFix( args[1], CUR.tt_metrics.scale ); \ } -#define DO_DEBUG \ - CUR.error = TT_Err_Debug_OpCode; +#define DO_DEBUG \ + CUR.error = FT_THROW( Debug_OpCode ); #define DO_ROUND \ @@ -3435,10 +3396,10 @@ #undef ARRAY_BOUND_ERROR -#define ARRAY_BOUND_ERROR \ - { \ - CUR.error = TT_Err_Invalid_Reference; \ - return; \ +#define ARRAY_BOUND_ERROR \ + { \ + CUR.error = FT_THROW( Invalid_Reference ); \ + return; \ } @@ -4417,7 +4378,7 @@ if ( L <= 0 || L > CUR.args ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); } else { @@ -4487,7 +4448,7 @@ } Fail_Overflow: - CUR.error = TT_Err_Code_Overflow; + CUR.error = FT_THROW( Code_Overflow ); return FAILURE; } @@ -4592,6 +4553,106 @@ TT_DefRecord* rec; TT_DefRecord* limit; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* arguments to opcodes are skipped by `SKIP_Code' */ + FT_Byte opcode_pattern[9][12] = { + /* #0 inline delta function 1 */ + { + 0x4B, /* PPEM */ + 0x53, /* GTEQ */ + 0x23, /* SWAP */ + 0x4B, /* PPEM */ + 0x51, /* LTEQ */ + 0x5A, /* AND */ + 0x58, /* IF */ + 0x38, /* SHPIX */ + 0x1B, /* ELSE */ + 0x21, /* POP */ + 0x21, /* POP */ + 0x59 /* EIF */ + }, + /* #1 inline delta function 2 */ + { + 0x4B, /* PPEM */ + 0x54, /* EQ */ + 0x58, /* IF */ + 0x38, /* SHPIX */ + 0x1B, /* ELSE */ + 0x21, /* POP */ + 0x21, /* POP */ + 0x59 /* EIF */ + }, + /* #2 diagonal stroke function */ + { + 0x20, /* DUP */ + 0x20, /* DUP */ + 0xB0, /* PUSHB_1 */ + /* 1 */ + 0x60, /* ADD */ + 0x46, /* GC_cur */ + 0xB0, /* PUSHB_1 */ + /* 64 */ + 0x23, /* SWAP */ + 0x42 /* WS */ + }, + /* #3 VacuFormRound function */ + { + 0x45, /* RCVT */ + 0x23, /* SWAP */ + 0x46, /* GC_cur */ + 0x60, /* ADD */ + 0x20, /* DUP */ + 0xB0 /* PUSHB_1 */ + /* 38 */ + }, + /* #4 TTFautohint bytecode (old) */ + { + 0x20, /* DUP */ + 0x64, /* ABS */ + 0xB0, /* PUSHB_1 */ + /* 32 */ + 0x60, /* ADD */ + 0x66, /* FLOOR */ + 0x23, /* SWAP */ + 0xB0 /* PUSHB_1 */ + }, + /* #5 spacing function 1 */ + { + 0x01, /* SVTCA_x */ + 0xB0, /* PUSHB_1 */ + /* 24 */ + 0x43, /* RS */ + 0x58 /* IF */ + }, + /* #6 spacing function 2 */ + { + 0x01, /* SVTCA_x */ + 0x18, /* RTG */ + 0xB0, /* PUSHB_1 */ + /* 24 */ + 0x43, /* RS */ + 0x58 /* IF */ + }, + /* #7 TypeMan Talk DiagEndCtrl function */ + { + 0x01, /* SVTCA_x */ + 0x20, /* DUP */ + 0xB0, /* PUSHB_1 */ + /* 3 */ + 0x25, /* CINDEX */ + }, + /* #8 TypeMan Talk Align */ + { + 0x06, /* SPVTL */ + 0x7D, /* RDTG */ + }, + }; + FT_UShort opcode_patterns = 9; + FT_UShort opcode_pointer[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + FT_UShort opcode_size[9] = { 12, 8, 8, 6, 7, 4, 5, 4, 2 }; + FT_UShort i; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + /* some font programs are broken enough to redefine functions! */ /* We will then parse the current table. */ @@ -4611,7 +4672,7 @@ /* check that there is enough room for new functions */ if ( CUR.numFDefs >= CUR.maxFDefs ) { - CUR.error = TT_Err_Too_Many_Function_Defs; + CUR.error = FT_THROW( Too_Many_Function_Defs ); return; } CUR.numFDefs++; @@ -4621,28 +4682,149 @@ /* func # must be within unsigned 16-bit integer */ if ( n > 0xFFFFU ) { - CUR.error = TT_Err_Too_Many_Function_Defs; + CUR.error = FT_THROW( Too_Many_Function_Defs ); return; } - rec->range = CUR.curRange; - rec->opc = (FT_UInt16)n; - rec->start = CUR.IP + 1; - rec->active = TRUE; + rec->range = CUR.curRange; + rec->opc = (FT_UInt16)n; + rec->start = CUR.IP + 1; + rec->active = TRUE; + rec->inline_delta = FALSE; + rec->sph_fdef_flags = 0x0000; if ( n > CUR.maxFunc ) CUR.maxFunc = (FT_UInt16)n; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* We don't know for sure these are typeman functions, */ + /* however they are only active when RS 22 is called */ + if ( n >= 64 && n <= 66 ) + rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_STROKES; +#endif + /* Now skip the whole function definition. */ /* We don't allow nested IDEFS & FDEFs. */ while ( SKIP_Code() == SUCCESS ) { + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( SUBPIXEL_HINTING ) + { + for ( i = 0; i < opcode_patterns; i++ ) + { + if ( opcode_pointer[i] < opcode_size[i] && + CUR.opcode == opcode_pattern[i][opcode_pointer[i]] ) + { + opcode_pointer[i] += 1; + + if ( opcode_pointer[i] == opcode_size[i] ) + { + FT_TRACE7(( "sph: Function %d, opcode ptrn: %d, %s %s\n", + i, n, + CUR.face->root.family_name, + CUR.face->root.style_name )); + + switch ( i ) + { + case 0: + rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_1; + CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1; + break; + + case 1: + rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_2; + CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2; + break; + + case 2: + switch ( n ) + { + /* needs to be implemented still */ + case 58: + rec->sph_fdef_flags |= SPH_FDEF_DIAGONAL_STROKE; + CUR.face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE; + } + break; + + case 3: + switch ( n ) + { + case 0: + rec->sph_fdef_flags |= SPH_FDEF_VACUFORM_ROUND_1; + CUR.face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1; + } + break; + + case 4: + /* probably not necessary to detect anymore */ + rec->sph_fdef_flags |= SPH_FDEF_TTFAUTOHINT_1; + CUR.face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1; + break; + + case 5: + switch ( n ) + { + case 0: + case 1: + case 2: + case 4: + case 7: + case 8: + rec->sph_fdef_flags |= SPH_FDEF_SPACING_1; + CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_1; + } + break; + + case 6: + switch ( n ) + { + case 0: + case 1: + case 2: + case 4: + case 7: + case 8: + rec->sph_fdef_flags |= SPH_FDEF_SPACING_2; + CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_2; + } + break; + + case 7: + rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; + CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; + break; + + case 8: +#if 0 + rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; + CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +#endif + break; + } + opcode_pointer[i] = 0; + } + } + + else + opcode_pointer[i] = 0; + } + + /* Set sph_compatibility_mode only when deltas are detected */ + CUR.face->sph_compatibility_mode = + ( ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) | + ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ); + } + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + switch ( CUR.opcode ) { case 0x89: /* IDEF */ case 0x2C: /* FDEF */ - CUR.error = TT_Err_Nested_DEFS; + CUR.error = FT_THROW( Nested_DEFS ); return; case 0x2D: /* ENDF */ @@ -4667,9 +4849,13 @@ FT_UNUSED_ARG; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + CUR.sph_in_func_flags = 0x0000; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + if ( CUR.callTop <= 0 ) /* We encountered an ENDF without a call */ { - CUR.error = TT_Err_ENDF_In_Exec_Stream; + CUR.error = FT_THROW( ENDF_In_Exec_Stream ); return; } @@ -4684,7 +4870,7 @@ if ( pRec->Cur_Count > 0 ) { CUR.callTop++; - CUR.IP = pRec->Cur_Restart; + CUR.IP = pRec->Def->start; } else /* Loop through the current function */ @@ -4751,10 +4937,21 @@ if ( !def->active ) goto Fail; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + ( ( CUR.iup_called && + ( CUR.sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) || + ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) ) + goto Fail; + else + CUR.sph_in_func_flags = def->sph_fdef_flags; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + /* check the call stack */ if ( CUR.callTop >= CUR.callSize ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -4763,8 +4960,7 @@ pCrec->Caller_Range = CUR.curRange; pCrec->Caller_IP = CUR.IP + 1; pCrec->Cur_Count = 1; - pCrec->Cur_Restart = def->start; - pCrec->Cur_End = def->end; + pCrec->Def = def; CUR.callTop++; @@ -4772,10 +4968,11 @@ def->start ); CUR.step_ins = FALSE; + return; Fail: - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); } @@ -4828,10 +5025,19 @@ if ( !def->active ) goto Fail; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) + goto Fail; + else + CUR.sph_in_func_flags = def->sph_fdef_flags; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + /* check stack */ if ( CUR.callTop >= CUR.callSize ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -4842,8 +5048,7 @@ pCrec->Caller_Range = CUR.curRange; pCrec->Caller_IP = CUR.IP + 1; pCrec->Cur_Count = (FT_Int)args[0]; - pCrec->Cur_Restart = def->start; - pCrec->Cur_End = def->end; + pCrec->Def = def; CUR.callTop++; @@ -4851,10 +5056,11 @@ CUR.step_ins = FALSE; } + return; Fail: - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); } @@ -4885,7 +5091,7 @@ /* check that there is enough room for a new instruction */ if ( CUR.numIDefs >= CUR.maxIDefs ) { - CUR.error = TT_Err_Too_Many_Instruction_Defs; + CUR.error = FT_THROW( Too_Many_Instruction_Defs ); return; } CUR.numIDefs++; @@ -4894,7 +5100,7 @@ /* opcode must be unsigned 8-bit integer */ if ( 0 > args[0] || args[0] > 0x00FF ) { - CUR.error = TT_Err_Too_Many_Instruction_Defs; + CUR.error = FT_THROW( Too_Many_Instruction_Defs ); return; } @@ -4915,7 +5121,7 @@ { case 0x89: /* IDEF */ case 0x2C: /* FDEF */ - CUR.error = TT_Err_Nested_DEFS; + CUR.error = FT_THROW( Nested_DEFS ); return; case 0x2D: /* ENDF */ return; @@ -4949,7 +5155,7 @@ if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -4976,7 +5182,7 @@ if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -5006,7 +5212,7 @@ if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -5031,7 +5237,7 @@ if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -5074,7 +5280,7 @@ if ( BOUNDSL( L, CUR.zp2.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); R = 0; } else @@ -5111,7 +5317,7 @@ if ( BOUNDS( L, CUR.zp2.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5155,7 +5361,7 @@ BOUNDS( K, CUR.zp1.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); D = 0; } else @@ -5184,15 +5390,15 @@ { /* this should be faster */ D = CUR_Func_dualproj( vec1, vec2 ); - D = TT_MULFIX( D, CUR.metrics.x_scale ); + D = FT_MulFix( D, CUR.metrics.x_scale ); } else { FT_Vector vec; - vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale ); - vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale ); + vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale ); + vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale ); D = CUR_fast_dualproj( &vec ); } @@ -5200,6 +5406,13 @@ } } +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* Disable Type 2 Vacuform Rounds - e.g. Arial Narrow */ + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && FT_ABS( D ) == 64 ) + D += 1; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + args[0] = D; } @@ -5225,7 +5438,7 @@ BOUNDS( p1, CUR.zp2.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5265,6 +5478,12 @@ A = v1->x - v2->x; B = v1->y - v2->y; + + if ( A == 0 && B == 0 ) + { + A = 0x4000; + aOpc = 0; + } } if ( ( aOpc & 1 ) != 0 ) @@ -5303,7 +5522,7 @@ default: if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5332,7 +5551,7 @@ default: if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5361,7 +5580,7 @@ default: if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5390,7 +5609,7 @@ default: if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5406,7 +5625,7 @@ /*************************************************************************/ /* */ /* INSTCTRL[]: INSTruction ConTRoL */ - /* Opcode range: 0x8e */ + /* Opcode range: 0x8E */ /* Stack: int32 int32 --> */ /* */ static void @@ -5421,7 +5640,7 @@ if ( K < 1 || K > 2 ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5519,7 +5738,7 @@ if ( CUR.top < CUR.GS.loop ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Too_Few_Arguments; + CUR.error = FT_THROW( Too_Few_Arguments ); goto Fail; } @@ -5533,7 +5752,7 @@ { if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } } @@ -5568,7 +5787,7 @@ BOUNDS( L, CUR.pts.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5596,7 +5815,7 @@ BOUNDS( L, CUR.pts.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5630,7 +5849,7 @@ if ( BOUNDS( p, zp.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); *refp = 0; return FAILURE; } @@ -5657,12 +5876,8 @@ else #endif { - *x = TT_MULDIV( d, - (FT_Long)CUR.GS.freeVector.x * 0x10000L, - CUR.F_dot_P ); - *y = TT_MULDIV( d, - (FT_Long)CUR.GS.freeVector.y * 0x10000L, - CUR.F_dot_P ); + *x = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.x, CUR.F_dot_P ); + *y = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.y, CUR.F_dot_P ); } return SUCCESS; @@ -5732,7 +5947,7 @@ if ( CUR.top < CUR.GS.loop ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -5748,11 +5963,18 @@ { if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } } else +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* doesn't follow Cleartype spec but produces better result */ + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode ) + MOVE_Zp2_Point( point, 0, dy, TRUE ); + else +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ MOVE_Zp2_Point( point, dx, dy, TRUE ); CUR.GS.loop--; @@ -5772,7 +5994,7 @@ /* */ /* UNDOCUMENTED: According to Greg Hitchcock, there is one (virtual) */ /* contour in the twilight zone, namely contour number */ - /* zero. */ + /* zero which includes all points of it. */ /* */ static void Ins_SHC( INS_ARG ) @@ -5791,7 +6013,7 @@ if ( BOUNDS( contour, bounds ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5839,7 +6061,7 @@ if ( BOUNDS( args[0], 2 ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5877,12 +6099,15 @@ { FT_F26Dot6 dx, dy; FT_UShort point; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + FT_Int B1, B2; +#endif if ( CUR.top < CUR.GS.loop + 1 ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -5891,13 +6116,13 @@ { if ( CUR.GS.both_x_axis ) { - dx = TT_MulFix14( (FT_UInt32)args[0], 0x4000 ); + dx = (FT_UInt32)args[0]; dy = 0; } else { dx = 0; - dy = TT_MulFix14( (FT_UInt32)args[0], 0x4000 ); + dy = (FT_UInt32)args[0]; } } else @@ -5917,13 +6142,95 @@ { if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } } else +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + { + /* If not using ignore_x_mode rendering, allow ZP2 move. */ + /* If inline deltas aren't allowed, skip ZP2 move. */ + /* If using ignore_x_mode rendering, allow ZP2 point move if: */ + /* - freedom vector is y and sph_compatibility_mode is off */ + /* - the glyph is composite and the move is in the Y direction */ + /* - the glyph is specifically set to allow SHPIX moves */ + /* - the move is on a previously Y-touched point */ + + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode ) + { + /* save point for later comparison */ + if ( CUR.GS.freeVector.y != 0 ) + B1 = CUR.zp2.cur[point].y; + else + B1 = CUR.zp2.cur[point].x; + + if ( !CUR.face->sph_compatibility_mode && + CUR.GS.freeVector.y != 0 ) + { + MOVE_Zp2_Point( point, dx, dy, TRUE ); + + /* save new point */ + if ( CUR.GS.freeVector.y != 0 ) + { + B2 = CUR.zp2.cur[point].y; + + /* reverse any disallowed moves */ + if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && + ( B1 & 63 ) != 0 && + ( B2 & 63 ) != 0 && + B1 != B2 ) + MOVE_Zp2_Point( point, -dx, -dy, TRUE ); + } + } + else if ( CUR.face->sph_compatibility_mode ) + { + if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) + { + dx = FT_PIX_ROUND( B1 + dx ) - B1; + dy = FT_PIX_ROUND( B1 + dy ) - B1; + } + + /* skip post-iup deltas */ + if ( CUR.iup_called && + ( ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_1 ) || + ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) ) + goto Skip; + + if ( !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) && + ( ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) || + ( CUR.zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) || + ( CUR.sph_tweak_flags & SPH_TWEAK_DO_SHPIX ) ) ) + MOVE_Zp2_Point( point, 0, dy, TRUE ); + + /* save new point */ + if ( CUR.GS.freeVector.y != 0 ) + { + B2 = CUR.zp2.cur[point].y; + + /* reverse any disallowed moves */ + if ( ( B1 & 63 ) == 0 && + ( B2 & 63 ) != 0 && + B1 != B2 ) + MOVE_Zp2_Point( point, 0, -dy, TRUE ); + } + } + else if ( CUR.sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL ) + MOVE_Zp2_Point( point, dx, dy, TRUE ); + } + else + MOVE_Zp2_Point( point, dx, dy, TRUE ); + } + + Skip: + +#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + MOVE_Zp2_Point( point, dx, dy, TRUE ); +#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + CUR.GS.loop--; } @@ -5945,6 +6252,21 @@ FT_UShort point; FT_F26Dot6 distance; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + FT_F26Dot6 control_value_cutin = 0; /* pacify compiler */ + + + if ( SUBPIXEL_HINTING ) + { + control_value_cutin = CUR.GS.control_value_cutin; + + if ( CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 && + !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + control_value_cutin = 0; + } + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ point = (FT_UShort)args[0]; @@ -5952,7 +6274,7 @@ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -5968,6 +6290,15 @@ distance = CUR_Func_project( CUR.zp1.cur + point, CUR.zp0.cur + CUR.GS.rp0 ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* subpixel hinting - make MSIRP respect CVT cut-in; */ + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 && + FT_ABS( distance - args[1] ) >= control_value_cutin ) + distance = args[1]; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + CUR_Func_move( &CUR.zp1, point, args[1] - distance ); CUR.GS.rp1 = CUR.GS.rp0; @@ -5988,8 +6319,8 @@ Ins_MDAP( INS_ARG ) { FT_UShort point; - FT_F26Dot6 cur_dist, - distance; + FT_F26Dot6 cur_dist; + FT_F26Dot6 distance; point = (FT_UShort)args[0]; @@ -5997,15 +6328,25 @@ if ( BOUNDS( point, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } if ( ( CUR.opcode & 1 ) != 0 ) { cur_dist = CUR_fast_project( &CUR.zp0.cur[point] ); - distance = CUR_Func_round( cur_dist, - CUR.tt_metrics.compensations[0] ) - cur_dist; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 ) + distance = ROUND_None( + cur_dist, + CUR.tt_metrics.compensations[0] ) - cur_dist; + else +#endif + distance = CUR_Func_round( + cur_dist, + CUR.tt_metrics.compensations[0] ) - cur_dist; } else distance = 0; @@ -6028,18 +6369,29 @@ { FT_ULong cvtEntry; FT_UShort point; - FT_F26Dot6 distance, - org_dist; + FT_F26Dot6 distance; + FT_F26Dot6 org_dist; + FT_F26Dot6 control_value_cutin; + + control_value_cutin = CUR.GS.control_value_cutin; + cvtEntry = (FT_ULong)args[1]; + point = (FT_UShort)args[0]; - cvtEntry = (FT_ULong)args[1]; - point = (FT_UShort)args[0]; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 && + CUR.GS.freeVector.y == 0 && + !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + control_value_cutin = 0; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ if ( BOUNDS( point, CUR.zp0.n_points ) || BOUNDSL( cvtEntry, CUR.cvtSize ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -6067,21 +6419,45 @@ if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */ { - CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, - CUR.GS.freeVector.x ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* Only adjust if not in sph_compatibility_mode or ignore_x_mode. */ + /* Determined via experimentation and may be incorrect... */ + if ( !SUBPIXEL_HINTING || + ( !CUR.ignore_x_mode || + !CUR.face->sph_compatibility_mode ) ) +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, + CUR.GS.freeVector.x ); CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance, CUR.GS.freeVector.y ), CUR.zp0.cur[point] = CUR.zp0.org[point]; } +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + ( CUR.sph_tweak_flags & SPH_TWEAK_MIAP_HACK ) && + distance > 0 && + CUR.GS.freeVector.y != 0 ) + distance = 0; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ org_dist = CUR_fast_project( &CUR.zp0.cur[point] ); - if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cutin flag */ + if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ { - if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin ) + if ( FT_ABS( distance - org_dist ) > control_value_cutin ) distance = org_dist; - distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 ) + distance = ROUND_None( distance, + CUR.tt_metrics.compensations[0] ); + else +#endif + distance = CUR_Func_round( distance, + CUR.tt_metrics.compensations[0] ); } CUR_Func_move( &CUR.zp0, point, distance - org_dist ); @@ -6102,8 +6478,18 @@ Ins_MDRP( INS_ARG ) { FT_UShort point; - FT_F26Dot6 org_dist, distance; + FT_F26Dot6 org_dist, distance, minimum_distance; + + + minimum_distance = CUR.GS.minimum_distance; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 && + !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + minimum_distance = 0; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ point = (FT_UShort)args[0]; @@ -6111,7 +6497,7 @@ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -6138,15 +6524,15 @@ { /* this should be faster */ org_dist = CUR_Func_dualproj( vec1, vec2 ); - org_dist = TT_MULFIX( org_dist, CUR.metrics.x_scale ); + org_dist = FT_MulFix( org_dist, CUR.metrics.x_scale ); } else { FT_Vector vec; - vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale ); - vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale ); + vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale ); + vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale ); org_dist = CUR_fast_dualproj( &vec ); } @@ -6166,9 +6552,20 @@ /* round flag */ if ( ( CUR.opcode & 4 ) != 0 ) + { +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 ) + distance = ROUND_None( + org_dist, + CUR.tt_metrics.compensations[CUR.opcode & 3] ); + else +#endif distance = CUR_Func_round( org_dist, CUR.tt_metrics.compensations[CUR.opcode & 3] ); + } else distance = ROUND_None( org_dist, @@ -6180,13 +6577,13 @@ { if ( org_dist >= 0 ) { - if ( distance < CUR.GS.minimum_distance ) - distance = CUR.GS.minimum_distance; + if ( distance < minimum_distance ) + distance = minimum_distance; } else { - if ( distance > -CUR.GS.minimum_distance ) - distance = -CUR.GS.minimum_distance; + if ( distance > -minimum_distance ) + distance = -minimum_distance; } } @@ -6221,11 +6618,28 @@ FT_F26Dot6 cvt_dist, distance, cur_dist, - org_dist; - - - point = (FT_UShort)args[0]; - cvtEntry = (FT_ULong)( args[1] + 1 ); + org_dist, + control_value_cutin, + minimum_distance; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + FT_Int B1 = 0; /* pacify compiler */ + FT_Int B2 = 0; + FT_Bool reverse_move = FALSE; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + + minimum_distance = CUR.GS.minimum_distance; + control_value_cutin = CUR.GS.control_value_cutin; + point = (FT_UShort)args[0]; + cvtEntry = (FT_ULong)( args[1] + 1 ); + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.x != 0 && + !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + control_value_cutin = minimum_distance = 0; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ @@ -6234,7 +6648,7 @@ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -6280,7 +6694,20 @@ cvt_dist = -cvt_dist; } - /* control value cutin and round */ +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.freeVector.y != 0 && + ( CUR.sph_tweak_flags & SPH_TWEAK_TIMES_NEW_ROMAN_HACK ) ) + { + if ( cur_dist < -64 ) + cvt_dist -= 16; + else if ( cur_dist > 64 && cur_dist < 84 ) + cvt_dist += 32; + } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* control value cut-in and round */ if ( ( CUR.opcode & 4 ) != 0 ) { @@ -6301,7 +6728,7 @@ /* `ttinst2.doc', version 1.66, is thus incorrect since */ /* it implies `>=' instead of `>'. */ - if ( FT_ABS( cvt_dist - org_dist ) > CUR.GS.control_value_cutin ) + if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) cvt_dist = org_dist; } @@ -6310,9 +6737,23 @@ CUR.tt_metrics.compensations[CUR.opcode & 3] ); } else + { + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* do cvt cut-in always in MIRP for sph */ + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.GS.gep0 == CUR.GS.gep1 ) + { + if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) + cvt_dist = org_dist; + } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + distance = ROUND_None( cvt_dist, CUR.tt_metrics.compensations[CUR.opcode & 3] ); + } /* minimum distance test */ @@ -6320,18 +6761,65 @@ { if ( org_dist >= 0 ) { - if ( distance < CUR.GS.minimum_distance ) - distance = CUR.GS.minimum_distance; + if ( distance < minimum_distance ) + distance = minimum_distance; } else { - if ( distance > -CUR.GS.minimum_distance ) - distance = -CUR.GS.minimum_distance; + if ( distance > -minimum_distance ) + distance = -minimum_distance; } } +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING ) + { + B1 = CUR.zp1.cur[point].y; + + /* Round moves if necessary */ + if ( CUR.ignore_x_mode && + CUR.GS.freeVector.y != 0 && + ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) ) + distance = FT_PIX_ROUND( B1 + distance - cur_dist ) - B1 + cur_dist; + + if ( CUR.ignore_x_mode && + CUR.GS.freeVector.y != 0 && + ( CUR.opcode & 16 ) == 0 && + ( CUR.opcode & 8 ) == 0 && + ( CUR.sph_tweak_flags & SPH_TWEAK_COURIER_NEW_2_HACK ) ) + distance += 64; + } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + CUR_Func_move( &CUR.zp1, point, distance - cur_dist ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING ) + { + B2 = CUR.zp1.cur[point].y; + + /* Reverse move if necessary */ + if ( CUR.ignore_x_mode ) + { + if ( CUR.face->sph_compatibility_mode && + CUR.GS.freeVector.y != 0 && + ( B1 & 63 ) == 0 && + ( B2 & 63 ) != 0 ) + reverse_move = TRUE; + + if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && + CUR.GS.freeVector.y != 0 && + ( B2 & 63 ) != 0 && + ( B1 & 63 ) != 0 ) + reverse_move = TRUE; + } + + if ( reverse_move ) + CUR_Func_move( &CUR.zp1, point, -( distance - cur_dist ) ); + } + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + Fail: CUR.GS.rp1 = CUR.GS.rp0; @@ -6357,11 +6845,22 @@ FT_UNUSED_ARG; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.iup_called && + ( CUR.sph_tweak_flags & SPH_TWEAK_NO_ALIGNRP_AFTER_IUP ) ) + { + CUR.error = FT_THROW( Invalid_Reference ); + goto Fail; + } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + if ( CUR.top < CUR.GS.loop || BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -6375,7 +6874,7 @@ { if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } } @@ -6409,7 +6908,7 @@ a0, a1, b0, b1; - FT_F26Dot6 discriminant; + FT_F26Dot6 discriminant, dotproduct; FT_F26Dot6 dx, dy, dax, day, @@ -6434,10 +6933,12 @@ BOUNDS( point, CUR.zp2.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } + /* Cramer's rule */ + dbx = CUR.zp0.cur[b1].x - CUR.zp0.cur[b0].x; dby = CUR.zp0.cur[b1].y - CUR.zp0.cur[b0].y; @@ -6449,15 +6950,25 @@ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH; - discriminant = TT_MULDIV( dax, -dby, 0x40 ) + - TT_MULDIV( day, dbx, 0x40 ); + discriminant = FT_MulDiv( dax, -dby, 0x40 ) + + FT_MulDiv( day, dbx, 0x40 ); + dotproduct = FT_MulDiv( dax, dbx, 0x40 ) + + FT_MulDiv( day, dby, 0x40 ); - if ( FT_ABS( discriminant ) >= 0x40 ) + /* The discriminant above is actually a cross product of vectors */ + /* da and db. Together with the dot product, they can be used as */ + /* surrogates for sine and cosine of the angle between the vectors. */ + /* Indeed, */ + /* dotproduct = |da||db|cos(angle) */ + /* discriminant = |da||db|sin(angle) . */ + /* We use these equations to reject grazing intersections by */ + /* thresholding abs(tan(angle)) at 1/19, corresponding to 3 degrees. */ + if ( 19 * FT_ABS( discriminant ) > FT_ABS( dotproduct ) ) { - val = TT_MULDIV( dx, -dby, 0x40 ) + TT_MULDIV( dy, dbx, 0x40 ); + val = FT_MulDiv( dx, -dby, 0x40 ) + FT_MulDiv( dy, dbx, 0x40 ); - R.x = TT_MULDIV( val, dax, discriminant ); - R.y = TT_MULDIV( val, day, discriminant ); + R.x = FT_MulDiv( val, dax, discriminant ); + R.y = FT_MulDiv( val, day, discriminant ); CUR.zp2.cur[point].x = CUR.zp1.cur[a0].x + R.x; CUR.zp2.cur[point].y = CUR.zp1.cur[a0].y + R.y; @@ -6498,7 +7009,7 @@ BOUNDS( p2, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -6533,7 +7044,7 @@ if ( CUR.top < CUR.GS.loop ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -6547,7 +7058,7 @@ if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto Fail; } @@ -6581,9 +7092,9 @@ FT_Vector vec; - vec.x = TT_MULFIX( CUR.zp1.orus[CUR.GS.rp2].x - orus_base->x, + vec.x = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].x - orus_base->x, CUR.metrics.x_scale ); - vec.y = TT_MULFIX( CUR.zp1.orus[CUR.GS.rp2].y - orus_base->y, + vec.y = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].y - orus_base->y, CUR.metrics.y_scale ); old_range = CUR_fast_dualproj( &vec ); @@ -6603,7 +7114,7 @@ { if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } continue; @@ -6618,20 +7129,41 @@ FT_Vector vec; - vec.x = TT_MULFIX( CUR.zp2.orus[point].x - orus_base->x, + vec.x = FT_MulFix( CUR.zp2.orus[point].x - orus_base->x, CUR.metrics.x_scale ); - vec.y = TT_MULFIX( CUR.zp2.orus[point].y - orus_base->y, + vec.y = FT_MulFix( CUR.zp2.orus[point].y - orus_base->y, CUR.metrics.y_scale ); org_dist = CUR_fast_dualproj( &vec ); } - cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base ); + cur_dist = CUR_Func_project( &CUR.zp2.cur[point], cur_base ); if ( org_dist ) - new_dist = ( old_range != 0 ) - ? TT_MULDIV( org_dist, cur_range, old_range ) - : cur_dist; + { + if ( old_range ) + new_dist = FT_MulDiv( org_dist, cur_range, old_range ); + else + { + /* This is the same as what MS does for the invalid case: */ + /* */ + /* delta = (Original_Pt - Original_RP1) - */ + /* (Current_Pt - Current_RP1) ; */ + /* */ + /* In FreeType speak: */ + /* */ + /* delta = org_dist - cur_dist . */ + /* */ + /* We move `point' by `new_dist - cur_dist' after leaving */ + /* this block, thus we have */ + /* */ + /* new_dist - cur_dist = delta , */ + /* new_dist - cur_dist = org_dist - cur_dist , */ + /* new_dist = org_dist . */ + + new_dist = org_dist; + } + } else new_dist = 0; @@ -6662,7 +7194,7 @@ if ( BOUNDS( point, CUR.zp0.n_points ) ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } @@ -6791,12 +7323,12 @@ if ( !scale_valid ) { scale_valid = 1; - scale = TT_MULDIV( org2 + delta2 - ( org1 + delta1 ), - 0x10000L, orus2 - orus1 ); + scale = FT_DivFix( org2 + delta2 - ( org1 + delta1 ), + orus2 - orus1 ); } x = ( org1 + delta1 ) + - TT_MULFIX( worker->orus[i].x - orus1, scale ); + FT_MulFix( worker->orus[i].x - orus1, scale ); } worker->curs[i].x = x; } @@ -6851,6 +7383,16 @@ contour = 0; point = 0; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode ) + { + CUR.iup_called = TRUE; + if ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_IUP ) + return; + } +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + do { end_point = CUR.pts.contours[contour] - CUR.pts.first_point; @@ -6916,10 +7458,20 @@ static void Ins_DELTAP( INS_ARG ) { - FT_ULong k, nump; + FT_ULong nump, k; FT_UShort A; - FT_ULong C; + FT_ULong C, P; FT_Long B; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + FT_UShort B1, B2; + + + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.iup_called && + ( CUR.sph_tweak_flags & SPH_TWEAK_NO_DELTAP_AFTER_IUP ) ) + goto Fail; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING @@ -6932,7 +7484,7 @@ if ( CUR.args < n ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Too_Few_Arguments; + CUR.error = FT_THROW( Too_Few_Arguments ); n = CUR.args; } @@ -6942,6 +7494,7 @@ } #endif + P = (FT_ULong)CUR_Func_cur_ppem(); nump = (FT_ULong)args[0]; /* some points theoretically may occur more than once, thus UShort isn't enough */ @@ -6950,7 +7503,7 @@ if ( CUR.args < 2 ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Too_Few_Arguments; + CUR.error = FT_THROW( Too_Few_Arguments ); CUR.args = 0; goto Fail; } @@ -6986,19 +7539,80 @@ C += CUR.GS.delta_base; - if ( CURRENT_Ppem() == (FT_Long)C ) + if ( P == C ) { B = ( (FT_ULong)B & 0xF ) - 8; if ( B >= 0 ) B++; - B = B * 64 / ( 1L << CUR.GS.delta_shift ); + B *= 1L << ( 6 - CUR.GS.delta_shift ); + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( SUBPIXEL_HINTING ) + { + /* + * Allow delta move if + * + * - not using ignore_x_mode rendering, + * - glyph is specifically set to allow it, or + * - glyph is composite and freedom vector is not in subpixel + * direction. + */ + if ( !CUR.ignore_x_mode || + ( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP ) || + ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) ) + CUR_Func_move( &CUR.zp0, A, B ); + + /* Otherwise, apply subpixel hinting and compatibility mode */ + /* rules, always skipping deltas in subpixel direction. */ + else if ( CUR.ignore_x_mode && CUR.GS.freeVector.y != 0 ) + { + /* save the y value of the point now; compare after move */ + B1 = (FT_UShort)CUR.zp0.cur[A].y; + + /* Standard subpixel hinting: Allow y move for y-touched */ + /* points. This messes up DejaVu ... */ + if ( !CUR.face->sph_compatibility_mode && + ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) + CUR_Func_move( &CUR.zp0, A, B ); + + /* compatibility mode */ + else if ( CUR.face->sph_compatibility_mode && + !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) ) + { + if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) + B = FT_PIX_ROUND( B1 + B ) - B1; + + /* Allow delta move if using sph_compatibility_mode, */ + /* IUP has not been called, and point is touched on Y. */ + if ( !CUR.iup_called && + ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) + CUR_Func_move( &CUR.zp0, A, B ); + } + + B2 = (FT_UShort)CUR.zp0.cur[A].y; + + /* Reverse this move if it results in a disallowed move */ + if ( CUR.GS.freeVector.y != 0 && + ( ( CUR.face->sph_compatibility_mode && + ( B1 & 63 ) == 0 && + ( B2 & 63 ) != 0 ) || + ( ( CUR.sph_tweak_flags & + SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP ) && + ( B1 & 63 ) != 0 && + ( B2 & 63 ) != 0 ) ) ) + CUR_Func_move( &CUR.zp0, A, -B ); + } + } + else +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - CUR_Func_move( &CUR.zp0, A, B ); + CUR_Func_move( &CUR.zp0, A, B ); } } else if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); } Fail: @@ -7016,7 +7630,7 @@ Ins_DELTAC( INS_ARG ) { FT_ULong nump, k; - FT_ULong A, C; + FT_ULong A, C, P; FT_Long B; @@ -7030,7 +7644,7 @@ if ( CUR.args < n ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Too_Few_Arguments; + CUR.error = FT_THROW( Too_Few_Arguments ); n = CUR.args; } @@ -7040,6 +7654,7 @@ } #endif + P = (FT_ULong)CUR_Func_cur_ppem(); nump = (FT_ULong)args[0]; for ( k = 1; k <= nump; k++ ) @@ -7047,7 +7662,7 @@ if ( CUR.args < 2 ) { if ( CUR.pedantic_hinting ) - CUR.error = TT_Err_Too_Few_Arguments; + CUR.error = FT_THROW( Too_Few_Arguments ); CUR.args = 0; goto Fail; } @@ -7061,7 +7676,7 @@ { if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); return; } } @@ -7085,12 +7700,12 @@ C += CUR.GS.delta_base; - if ( CURRENT_Ppem() == (FT_Long)C ) + if ( P == C ) { B = ( (FT_ULong)B & 0xF ) - 8; if ( B >= 0 ) B++; - B = B * 64 / ( 1L << CUR.GS.delta_shift ); + B *= 1L << ( 6 - CUR.GS.delta_shift ); CUR_Func_move_cvt( A, B ); } @@ -7123,22 +7738,109 @@ K = 0; - /* We return MS rasterizer version 1.7 for the font scaler. */ - if ( ( args[0] & 1 ) != 0 ) - K = 35; - - /* Has the glyph been rotated? */ +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /********************************/ + /* RASTERIZER VERSION */ + /* Selector Bit: 0 */ + /* Return Bit(s): 0-7 */ + /* */ + if ( SUBPIXEL_HINTING && + ( args[0] & 1 ) != 0 && + CUR.ignore_x_mode ) + { + K = CUR.rasterizer_version; + FT_TRACE7(( "Setting rasterizer version %d\n", + CUR.rasterizer_version )); + } + else +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + if ( ( args[0] & 1 ) != 0 ) + K = TT_INTERPRETER_VERSION_35; + + /********************************/ + /* GLYPH ROTATED */ + /* Selector Bit: 1 */ + /* Return Bit(s): 8 */ + /* */ if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated ) K |= 0x80; - /* Has the glyph been stretched? */ + /********************************/ + /* GLYPH STRETCHED */ + /* Selector Bit: 2 */ + /* Return Bit(s): 9 */ + /* */ if ( ( args[0] & 4 ) != 0 && CUR.tt_metrics.stretched ) K |= 1 << 8; - /* Are we hinting for grayscale? */ + /********************************/ + /* HINTING FOR GRAYSCALE */ + /* Selector Bit: 5 */ + /* Return Bit(s): 12 */ + /* */ if ( ( args[0] & 32 ) != 0 && CUR.grayscale ) K |= 1 << 12; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( SUBPIXEL_HINTING && + CUR.ignore_x_mode && + CUR.rasterizer_version >= TT_INTERPRETER_VERSION_35 ) + { + + if ( CUR.rasterizer_version >= 37 ) + { + /********************************/ + /* HINTING FOR SUBPIXEL */ + /* Selector Bit: 6 */ + /* Return Bit(s): 13 */ + /* */ + if ( ( args[0] & 64 ) != 0 && CUR.subpixel ) + K |= 1 << 13; + + /********************************/ + /* COMPATIBLE WIDTHS ENABLED */ + /* Selector Bit: 7 */ + /* Return Bit(s): 14 */ + /* */ + /* Functionality still needs to be added */ + if ( ( args[0] & 128 ) != 0 && CUR.compatible_widths ) + K |= 1 << 14; + + /********************************/ + /* SYMMETRICAL SMOOTHING */ + /* Selector Bit: 8 */ + /* Return Bit(s): 15 */ + /* */ + /* Functionality still needs to be added */ + if ( ( args[0] & 256 ) != 0 && CUR.symmetrical_smoothing ) + K |= 1 << 15; + + /********************************/ + /* HINTING FOR BGR? */ + /* Selector Bit: 9 */ + /* Return Bit(s): 16 */ + /* */ + /* Functionality still needs to be added */ + if ( ( args[0] & 512 ) != 0 && CUR.bgr ) + K |= 1 << 16; + + if ( CUR.rasterizer_version >= 38 ) + { + /********************************/ + /* SUBPIXEL POSITIONED? */ + /* Selector Bit: 10 */ + /* Return Bit(s): 17 */ + /* */ + /* Functionality still needs to be added */ + if ( ( args[0] & 1024 ) != 0 && CUR.subpixel_positioned ) + K |= 1 << 17; + } + } + } + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + args[0] = K; } @@ -7161,7 +7863,7 @@ if ( CUR.callTop >= CUR.callSize ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); return; } @@ -7170,8 +7872,7 @@ call->Caller_Range = CUR.curRange; call->Caller_IP = CUR.IP + 1; call->Cur_Count = 1; - call->Cur_Restart = def->start; - call->Cur_End = def->end; + call->Def = def; INS_Goto_CodeRange( def->range, def->start ); @@ -7180,7 +7881,7 @@ } } - CUR.error = TT_Err_Invalid_Opcode; + CUR.error = FT_THROW( Invalid_Opcode ); } @@ -7507,18 +8208,40 @@ FT_EXPORT_DEF( FT_Error ) TT_RunIns( TT_ExecContext exc ) { - FT_Long ins_counter = 0; /* executed instructions counter */ + FT_Long ins_counter = 0; /* executed instructions counter */ + FT_UShort i; + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + FT_Byte opcode_pattern[1][2] = { + /* #8 TypeMan Talk Align */ + { + 0x06, /* SPVTL */ + 0x7D, /* RDTG */ + }, + }; + FT_UShort opcode_patterns = 1; + FT_UShort opcode_pointer[1] = { 0 }; + FT_UShort opcode_size[1] = { 1 }; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ #ifdef TT_CONFIG_OPTION_STATIC_RASTER + if ( !exc ) + return FT_THROW( Invalid_Argument ); + cur = *exc; #endif - /* set CVT functions */ +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + CUR.iup_called = FALSE; +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* set PPEM and CVT functions */ CUR.tt_metrics.ratio = 0; if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem ) { /* non-square pixels, use the stretched routines */ + CUR.func_cur_ppem = Current_Ppem_Stretched; CUR.func_read_cvt = Read_CVT_Stretched; CUR.func_write_cvt = Write_CVT_Stretched; CUR.func_move_cvt = Move_CVT_Stretched; @@ -7526,6 +8249,7 @@ else { /* square pixels, use normal routines */ + CUR.func_cur_ppem = Current_Ppem; CUR.func_read_cvt = Read_CVT; CUR.func_write_cvt = Write_CVT; CUR.func_move_cvt = Move_CVT; @@ -7560,12 +8284,9 @@ /* One can also interpret it as the index of the last argument. */ if ( CUR.args < 0 ) { - FT_UShort i; - - if ( CUR.pedantic_hinting ) { - CUR.error = TT_Err_Too_Few_Arguments; + CUR.error = FT_THROW( Too_Few_Arguments ); goto LErrorLabel_; } @@ -7582,12 +8303,45 @@ /* statement. */ if ( CUR.new_top > CUR.stackSize ) { - CUR.error = TT_Err_Stack_Overflow; + CUR.error = FT_THROW( Stack_Overflow ); goto LErrorLabel_; } CUR.step_ins = TRUE; - CUR.error = TT_Err_Ok; + CUR.error = FT_Err_Ok; + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + if ( SUBPIXEL_HINTING ) + { + for ( i = 0; i < opcode_patterns; i++ ) + { + if ( opcode_pointer[i] < opcode_size[i] && + CUR.opcode == opcode_pattern[i][opcode_pointer[i]] ) + { + opcode_pointer[i] += 1; + + if ( opcode_pointer[i] == opcode_size[i] ) + { + FT_TRACE7(( "sph: opcode ptrn: %d, %s %s\n", + i, + CUR.face->root.family_name, + CUR.face->root.style_name )); + + switch ( i ) + { + case 0: + break; + } + opcode_pointer[i] = 0; + } + } + else + opcode_pointer[i] = 0; + } + } + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ #ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH @@ -7801,7 +8555,6 @@ Ins_MDAP( EXEC_ARG_ args ); break; - case 0x30: /* IUP */ case 0x31: /* IUP */ Ins_IUP( EXEC_ARG_ args ); @@ -7861,7 +8614,7 @@ break; Set_Invalid_Ref: - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); break; case 0x43: /* RS */ @@ -8151,11 +8904,12 @@ #endif /* TT_CONFIG_OPTION_INTERPRETER_SWITCH */ - if ( CUR.error != TT_Err_Ok ) + if ( CUR.error ) { switch ( CUR.error ) { - case TT_Err_Invalid_Opcode: /* looking for redefined instructions */ + /* looking for redefined instructions */ + case FT_ERR( Invalid_Opcode ): { TT_DefRecord* def = CUR.IDefs; TT_DefRecord* limit = def + CUR.numIDefs; @@ -8170,7 +8924,7 @@ if ( CUR.callTop >= CUR.callSize ) { - CUR.error = TT_Err_Invalid_Reference; + CUR.error = FT_THROW( Invalid_Reference ); goto LErrorLabel_; } @@ -8179,8 +8933,7 @@ callrec->Caller_Range = CUR.curRange; callrec->Caller_IP = CUR.IP + 1; callrec->Cur_Count = 1; - callrec->Cur_Restart = def->start; - callrec->Cur_End = def->end; + callrec->Def = def; if ( INS_Goto_CodeRange( def->range, def->start ) == FAILURE ) goto LErrorLabel_; @@ -8190,7 +8943,7 @@ } } - CUR.error = TT_Err_Invalid_Opcode; + CUR.error = FT_THROW( Invalid_Opcode ); goto LErrorLabel_; #if 0 @@ -8216,14 +8969,14 @@ /* increment instruction counter and check if we didn't */ /* run this program for too long (e.g. infinite loops). */ if ( ++ins_counter > MAX_RUNNABLE_OPCODES ) - return TT_Err_Execution_Too_Long; + return FT_THROW( Execution_Too_Long ); LSuiteLabel_: if ( CUR.IP >= CUR.codeSize ) { if ( CUR.callTop > 0 ) { - CUR.error = TT_Err_Code_Overflow; + CUR.error = FT_THROW( Code_Overflow ); goto LErrorLabel_; } else @@ -8237,10 +8990,10 @@ *exc = cur; #endif - return TT_Err_Ok; + return FT_Err_Ok; LErrorCodeOverflow_: - CUR.error = TT_Err_Code_Overflow; + CUR.error = FT_THROW( Code_Overflow ); LErrorLabel_: @@ -8251,10 +9004,13 @@ /* If any errors have occurred, function tables may be broken. */ /* Force a re-execution of `prep' and `fpgm' tables if no */ /* bytecode debugger is run. */ - if ( CUR.error && !CUR.instruction_trap ) + if ( CUR.error && + !CUR.instruction_trap && + CUR.curRange == tt_coderange_glyph ) { FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error )); - exc->size->cvt_ready = FALSE; + exc->size->bytecode_ready = -1; + exc->size->cvt_ready = -1; } return CUR.error; diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h index 6d0fc03..333decc 100644 --- a/src/truetype/ttinterp.h +++ b/src/truetype/ttinterp.h @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */ +/* Copyright 1996-2007, 2010, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -81,6 +81,10 @@ FT_BEGIN_HEADER (*TT_Project_Func)( EXEC_OP_ FT_Pos dx, FT_Pos dy ); + /* getting current ppem. Take care of non-square pixels if necessary */ + typedef FT_Long + (*TT_Cur_Ppem_Func)( EXEC_OP ); + /* reading a cvt value. Take care of non-square pixels if necessary */ typedef FT_F26Dot6 (*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong idx ); @@ -101,12 +105,54 @@ FT_BEGIN_HEADER FT_Int Caller_Range; FT_Long Caller_IP; FT_Long Cur_Count; - FT_Long Cur_Restart; - FT_Long Cur_End; + + TT_DefRecord *Def; /* either FDEF or IDEF */ } TT_CallRec, *TT_CallStack; +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + /*************************************************************************/ + /* */ + /* These structures define rules used to tweak subpixel hinting for */ + /* various fonts. "", 0, "", NULL value indicates to match any value. */ + /* */ + +#define SPH_MAX_NAME_SIZE 32 +#define SPH_MAX_CLASS_MEMBERS 100 + + typedef struct SPH_TweakRule_ + { + const char family[SPH_MAX_NAME_SIZE]; + const FT_UInt ppem; + const char style[SPH_MAX_NAME_SIZE]; + const FT_ULong glyph; + + } SPH_TweakRule; + + + typedef struct SPH_ScaleRule_ + { + const char family[SPH_MAX_NAME_SIZE]; + const FT_UInt ppem; + const char style[SPH_MAX_NAME_SIZE]; + const FT_ULong glyph; + const FT_ULong scale; + + } SPH_ScaleRule; + + + typedef struct SPH_Font_Class_ + { + const char name[SPH_MAX_NAME_SIZE]; + const char member[SPH_MAX_CLASS_MEMBERS][SPH_MAX_NAME_SIZE]; + + } SPH_Font_Class; + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /*************************************************************************/ /* */ /* The main structure for the interpreter which collects all necessary */ @@ -186,11 +232,6 @@ FT_BEGIN_HEADER FT_F26Dot6 phase; /* `SuperRounding' */ FT_F26Dot6 threshold; -#if 0 - /* this seems to be unused */ - FT_Int cur_ppem; /* ppem along the current proj vector */ -#endif - FT_Bool instruction_trap; /* If `True', the interpreter will */ /* exit after each instruction */ @@ -212,30 +253,61 @@ FT_BEGIN_HEADER TT_Move_Func func_move; /* current point move function */ TT_Move_Func func_move_orig; /* move original position function */ + TT_Cur_Ppem_Func func_cur_ppem; /* get current proj. ppem value */ + TT_Get_CVT_Func func_read_cvt; /* read a cvt entry */ TT_Set_CVT_Func func_write_cvt; /* write a cvt entry (in pixels) */ TT_Set_CVT_Func func_move_cvt; /* incr a cvt entry (in pixels) */ FT_Bool grayscale; /* are we hinting for grayscale? */ +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + TT_Round_Func func_round_sphn; /* subpixel rounding function */ + + FT_Bool subpixel; /* Using subpixel hinting? */ + FT_Bool ignore_x_mode; /* Standard rendering mode for */ + /* subpixel hinting. On if gray */ + /* or subpixel hinting is on. */ + + /* The following 4 aren't fully implemented but here for MS rasterizer */ + /* compatibility. */ + FT_Bool compatible_widths; /* compatible widths? */ + FT_Bool symmetrical_smoothing; /* symmetrical_smoothing? */ + FT_Bool bgr; /* bgr instead of rgb? */ + FT_Bool subpixel_positioned; /* subpixel positioned */ + /* (DirectWrite ClearType)? */ + + FT_Int rasterizer_version; /* MS rasterizer version */ + + FT_Bool iup_called; /* IUP called for glyph? */ + + FT_ULong sph_tweak_flags; /* flags to control */ + /* hint tweaks */ + + FT_ULong sph_in_func_flags; /* flags to indicate if in */ + /* special functions */ + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + } TT_ExecContextRec; extern const TT_GraphicsState tt_default_graphics_state; - FT_LOCAL( FT_Error ) +#ifdef TT_USE_BYTECODE_INTERPRETER + FT_LOCAL( void ) TT_Goto_CodeRange( TT_ExecContext exec, FT_Int range, FT_Long IP ); - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) TT_Set_CodeRange( TT_ExecContext exec, FT_Int range, void* base, FT_Long length ); - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) TT_Clear_CodeRange( TT_ExecContext exec, FT_Int range ); @@ -246,6 +318,7 @@ FT_BEGIN_HEADER FT_Long multiplier, void* _pbuff, FT_ULong new_max ); +#endif /* TT_USE_BYTECODE_INTERPRETER */ /*************************************************************************/ @@ -270,7 +343,9 @@ FT_BEGIN_HEADER FT_EXPORT( TT_ExecContext ) TT_New_Context( TT_Driver driver ); - FT_LOCAL( FT_Error ) + +#ifdef TT_USE_BYTECODE_INTERPRETER + FT_LOCAL( void ) TT_Done_Context( TT_ExecContext exec ); FT_LOCAL( FT_Error ) @@ -278,13 +353,14 @@ FT_BEGIN_HEADER TT_Face face, TT_Size size ); - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) TT_Save_Context( TT_ExecContext exec, TT_Size ins ); FT_LOCAL( FT_Error ) TT_Run_Context( TT_ExecContext exec, FT_Bool debug ); +#endif /* TT_USE_BYTECODE_INTERPRETER */ /*************************************************************************/ diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 814c713..4707dfe 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -4,7 +4,7 @@ /* */ /* Objects manager (body). */ /* */ -/* Copyright 1996-2011 */ +/* Copyright 1996-2013 */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -21,6 +21,7 @@ #include FT_INTERNAL_STREAM_H #include FT_TRUETYPE_TAGS_H #include FT_INTERNAL_SFNT_H +#include FT_TRUETYPE_DRIVER_H #include "ttgload.h" #include "ttpload.h" @@ -149,20 +150,21 @@ tt_check_trickyness_family( FT_String* name ) { -#define TRICK_NAMES_MAX_CHARACTERS 16 -#define TRICK_NAMES_COUNT 8 +#define TRICK_NAMES_MAX_CHARACTERS 19 +#define TRICK_NAMES_COUNT 9 static const char trick_names[TRICK_NAMES_COUNT] [TRICK_NAMES_MAX_CHARACTERS + 1] = { - "DFKaiSho-SB", /* dfkaisb.ttf */ + "DFKaiSho-SB", /* dfkaisb.ttf */ "DFKaiShu", - "DFKai-SB", /* kaiu.ttf */ - "HuaTianKaiTi?", /* htkt2.ttf */ - "HuaTianSongTi?", /* htst3.ttf */ - "MingLiU", /* mingliu.ttf & mingliu.ttc */ - "PMingLiU", /* mingliu.ttc */ - "MingLi43", /* mingli.ttf */ + "DFKai-SB", /* kaiu.ttf */ + "HuaTianKaiTi?", /* htkt2.ttf */ + "HuaTianSongTi?", /* htst3.ttf */ + "Ming(for ISO10646)", /* hkscsiic.ttf & iicore.ttf */ + "MingLiU", /* mingliu.ttf & mingliu.ttc */ + "PMingLiU", /* mingliu.ttc */ + "MingLi43", /* mingli.ttf */ }; int nn; @@ -244,7 +246,7 @@ tt_check_trickyness_sfnt_ids( TT_Face face ) { #define TRICK_SFNT_IDS_PER_FACE 3 -#define TRICK_SFNT_IDS_NUM_FACES 13 +#define TRICK_SFNT_IDS_NUM_FACES 17 static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES] [TRICK_SFNT_IDS_PER_FACE] = { @@ -254,69 +256,89 @@ #define TRICK_SFNT_ID_prep 2 { /* MingLiU 1995 */ - { 0x05bcf058, 0x000002e4 }, /* cvt */ - { 0x28233bf1, 0x000087c4 }, /* fpgm */ - { 0xa344a1ea, 0x000001e1 } /* prep */ + { 0x05BCF058UL, 0x000002E4UL }, /* cvt */ + { 0x28233BF1UL, 0x000087C4UL }, /* fpgm */ + { 0xA344A1EAUL, 0x000001E1UL } /* prep */ }, { /* MingLiU 1996- */ - { 0x05bcf058, 0x000002e4 }, /* cvt */ - { 0x28233bf1, 0x000087c4 }, /* fpgm */ - { 0xa344a1eb, 0x000001e1 } /* prep */ + { 0x05BCF058UL, 0x000002E4UL }, /* cvt */ + { 0x28233BF1UL, 0x000087C4UL }, /* fpgm */ + { 0xA344A1EBUL, 0x000001E1UL } /* prep */ }, { /* DFKaiShu */ - { 0x11e5ead4, 0x00000350 }, /* cvt */ - { 0x5a30ca3b, 0x00009063 }, /* fpgm */ - { 0x13a42602, 0x0000007e } /* prep */ + { 0x11E5EAD4UL, 0x00000350UL }, /* cvt */ + { 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */ + { 0x13A42602UL, 0x0000007EUL } /* prep */ }, { /* HuaTianKaiTi */ - { 0xfffbfffc, 0x00000008 }, /* cvt */ - { 0x9c9e48b8, 0x0000bea2 }, /* fpgm */ - { 0x70020112, 0x00000008 } /* prep */ + { 0xFFFBFFFCUL, 0x00000008UL }, /* cvt */ + { 0x9C9E48B8UL, 0x0000BEA2UL }, /* fpgm */ + { 0x70020112UL, 0x00000008UL } /* prep */ }, { /* HuaTianSongTi */ - { 0xfffbfffc, 0x00000008 }, /* cvt */ - { 0x0a5a0483, 0x00017c39 }, /* fpgm */ - { 0x70020112, 0x00000008 } /* prep */ + { 0xFFFBFFFCUL, 0x00000008UL }, /* cvt */ + { 0x0A5A0483UL, 0x00017C39UL }, /* fpgm */ + { 0x70020112UL, 0x00000008UL } /* prep */ }, { /* NEC fadpop7.ttf */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x40c92555, 0x000000e5 }, /* fpgm */ - { 0xa39b58e3, 0x0000117c } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x40C92555UL, 0x000000E5UL }, /* fpgm */ + { 0xA39B58E3UL, 0x0000117CUL } /* prep */ }, { /* NEC fadrei5.ttf */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x33c41652, 0x000000e5 }, /* fpgm */ - { 0x26d6c52a, 0x00000f6a } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x33C41652UL, 0x000000E5UL }, /* fpgm */ + { 0x26D6C52AUL, 0x00000F6AUL } /* prep */ }, { /* NEC fangot7.ttf */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x6db1651d, 0x0000019d }, /* fpgm */ - { 0x6c6e4b03, 0x00002492 } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x6DB1651DUL, 0x0000019DUL }, /* fpgm */ + { 0x6C6E4B03UL, 0x00002492UL } /* prep */ }, { /* NEC fangyo5.ttf */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x40c92555, 0x000000e5 }, /* fpgm */ - { 0xde51fad0, 0x0000117c } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x40C92555UL, 0x000000E5UL }, /* fpgm */ + { 0xDE51FAD0UL, 0x0000117CUL } /* prep */ }, { /* NEC fankyo5.ttf */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x85e47664, 0x000000e5 }, /* fpgm */ - { 0xa6c62831, 0x00001caa } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x85E47664UL, 0x000000E5UL }, /* fpgm */ + { 0xA6C62831UL, 0x00001CAAUL } /* prep */ }, { /* NEC fanrgo5.ttf */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x2d891cfd, 0x0000019d }, /* fpgm */ - { 0xa0604633, 0x00001de8 } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x2D891CFDUL, 0x0000019DUL }, /* fpgm */ + { 0xA0604633UL, 0x00001DE8UL } /* prep */ }, { /* NEC fangot5.ttc */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x40aa774c, 0x000001cb }, /* fpgm */ - { 0x9b5caa96, 0x00001f9a } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x40AA774CUL, 0x000001CBUL }, /* fpgm */ + { 0x9B5CAA96UL, 0x00001F9AUL } /* prep */ }, { /* NEC fanmin3.ttc */ - { 0x00000000, 0x00000000 }, /* cvt */ - { 0x0d3de9cb, 0x00000141 }, /* fpgm */ - { 0xd4127766, 0x00002280 } /* prep */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x0D3DE9CBUL, 0x00000141UL }, /* fpgm */ + { 0xD4127766UL, 0x00002280UL } /* prep */ + }, + { /* NEC FA-Gothic, 1996 */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x4A692698UL, 0x000001F0UL }, /* fpgm */ + { 0x340D4346UL, 0x00001FCAUL } /* prep */ + }, + { /* NEC FA-Minchou, 1996 */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0xCD34C604UL, 0x00000166UL }, /* fpgm */ + { 0x6CF31046UL, 0x000022B0UL } /* prep */ + }, + { /* NEC FA-RoundGothicB, 1996 */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0x5DA75315UL, 0x0000019DUL }, /* fpgm */ + { 0x40745A5FUL, 0x000022E0UL } /* prep */ + }, + { /* NEC FA-RoundGothicM, 1996 */ + { 0x00000000UL, 0x00000000UL }, /* cvt */ + { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */ + { 0x3900DED3UL, 0x00001E18UL } /* prep */ } }; @@ -501,7 +523,7 @@ if ( !sfnt ) { FT_ERROR(( "tt_face_init: cannot access `sfnt' module\n" )); - error = TT_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -511,6 +533,10 @@ /* check that we have a valid TrueType file */ error = sfnt->init_face( stream, face, face_index, num_params, params ); + + /* Stream may have changed. */ + stream = face->root.stream; + if ( error ) goto Exit; @@ -531,7 +557,7 @@ /* If we are performing a simple font format check, exit immediately. */ if ( face_index < 0 ) - return TT_Err_Ok; + return FT_Err_Ok; /* Load font directory */ error = sfnt->load_face( stream, face, face_index, num_params, params ); @@ -631,7 +657,7 @@ return error; Bad_Format: - error = TT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -732,9 +758,11 @@ exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context; if ( !exec ) - return TT_Err_Could_Not_Find_Context; + return FT_THROW( Could_Not_Find_Context ); - TT_Load_Context( exec, face, size ); + error = TT_Load_Context( exec, face, size ); + if ( error ) + return error; exec->callTop = 0; exec->top = 0; @@ -744,7 +772,7 @@ exec->threshold = 0; exec->instruction_trap = FALSE; - exec->F_dot_P = 0x10000L; + exec->F_dot_P = 0x4000L; exec->pedantic_hinting = pedantic; @@ -775,17 +803,15 @@ if ( face->font_program_size > 0 ) { - error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 ); + TT_Goto_CodeRange( exec, tt_coderange_font, 0 ); - if ( !error ) - { - FT_TRACE4(( "Executing `fpgm' table.\n" )); - - error = face->interpreter( exec ); - } + FT_TRACE4(( "Executing `fpgm' table.\n" )); + error = face->interpreter( exec ); } else - error = TT_Err_Ok; + error = FT_Err_Ok; + + size->bytecode_ready = error; if ( !error ) TT_Save_Context( exec, size ); @@ -826,9 +852,11 @@ exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context; if ( !exec ) - return TT_Err_Could_Not_Find_Context; + return FT_THROW( Could_Not_Find_Context ); - TT_Load_Context( exec, face, size ); + error = TT_Load_Context( exec, face, size ); + if ( error ) + return error; exec->callTop = 0; exec->top = 0; @@ -846,9 +874,9 @@ if ( face->cvt_program_size > 0 ) { - error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 ); + TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 ); - if ( !error && !size->debug ) + if ( !size->debug ) { FT_TRACE4(( "Executing `prep' table.\n" )); @@ -856,7 +884,29 @@ } } else - error = TT_Err_Ok; + error = FT_Err_Ok; + + size->cvt_ready = error; + + /* UNDOCUMENTED! The MS rasterizer doesn't allow the following */ + /* graphics state variables to be modified by the CVT program. */ + + exec->GS.dualVector.x = 0x4000; + exec->GS.dualVector.y = 0; + exec->GS.projVector.x = 0x4000; + exec->GS.projVector.y = 0x0; + exec->GS.freeVector.x = 0x4000; + exec->GS.freeVector.y = 0x0; + + exec->GS.rp0 = 0; + exec->GS.rp1 = 0; + exec->GS.rp2 = 0; + + exec->GS.gep0 = 1; + exec->GS.gep1 = 1; + exec->GS.gep2 = 1; + + exec->GS.loop = 1; /* save as default graphics state */ size->GS = exec->GS; @@ -866,10 +916,6 @@ return error; } -#endif /* TT_USE_BYTECODE_INTERPRETER */ - - -#ifdef TT_USE_BYTECODE_INTERPRETER static void tt_size_done_bytecode( FT_Size ftsize ) @@ -907,8 +953,8 @@ size->max_func = 0; size->max_ins = 0; - size->bytecode_ready = 0; - size->cvt_ready = 0; + size->bytecode_ready = -1; + size->cvt_ready = -1; } @@ -922,14 +968,13 @@ TT_Size size = (TT_Size)ftsize; TT_Face face = (TT_Face)ftsize->face; FT_Memory memory = face->root.memory; - FT_Int i; FT_UShort n_twilight; TT_MaxProfile* maxp = &face->max_profile; - size->bytecode_ready = 1; - size->cvt_ready = 0; + size->bytecode_ready = -1; + size->cvt_ready = -1; size->max_function_defs = maxp->maxFunctionDefs; size->max_instruction_defs = maxp->maxInstructionDefs; @@ -951,9 +996,11 @@ metrics->rotated = FALSE; metrics->stretched = FALSE; - /* set default compensation (all 0) */ - for ( i = 0; i < 4; i++ ) - metrics->compensations[i] = 0; + /* set default engine compensation */ + metrics->compensations[0] = 0; /* gray */ + metrics->compensations[1] = 0; /* black */ + metrics->compensations[2] = 0; /* white */ + metrics->compensations[3] = 0; /* reserved */ } /* allocate function defs, instruction defs, cvt, and storage area */ @@ -1003,18 +1050,17 @@ tt_size_ready_bytecode( TT_Size size, FT_Bool pedantic ) { - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; - if ( !size->bytecode_ready ) - { + if ( size->bytecode_ready < 0 ) error = tt_size_init_bytecode( (FT_Size)size, pedantic ); - if ( error ) - goto Exit; - } + + if ( error || size->bytecode_ready ) + goto Exit; /* rescale CVT when needed */ - if ( !size->cvt_ready ) + if ( size->cvt_ready < 0 ) { FT_UInt i; TT_Face face = (TT_Face)size->root.face; @@ -1041,8 +1087,6 @@ size->GS = tt_default_graphics_state; error = tt_size_run_prep( size, pedantic ); - if ( !error ) - size->cvt_ready = 1; } Exit: @@ -1070,11 +1114,12 @@ tt_size_init( FT_Size ttsize ) /* TT_Size */ { TT_Size size = (TT_Size)ttsize; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; + #ifdef TT_USE_BYTECODE_INTERPRETER - size->bytecode_ready = 0; - size->cvt_ready = 0; + size->bytecode_ready = -1; + size->cvt_ready = -1; #endif size->ttmetrics.valid = FALSE; @@ -1102,8 +1147,7 @@ #ifdef TT_USE_BYTECODE_INTERPRETER - if ( size->bytecode_ready ) - tt_size_done_bytecode( ttsize ); + tt_size_done_bytecode( ttsize ); #endif size->ttmetrics.valid = FALSE; @@ -1126,7 +1170,7 @@ tt_size_reset( TT_Size size ) { TT_Face face; - FT_Error error = TT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Size_Metrics* metrics; @@ -1140,7 +1184,7 @@ *metrics = size->root.metrics; if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 ) - return TT_Err_Invalid_PPem; + return FT_THROW( Invalid_PPem ); /* This bit flag, if set, indicates that the ppems must be */ /* rounded to integers. Nearly all TrueType fonts have this bit */ @@ -1170,22 +1214,20 @@ size->ttmetrics.scale = metrics->x_scale; size->ttmetrics.ppem = metrics->x_ppem; size->ttmetrics.x_ratio = 0x10000L; - size->ttmetrics.y_ratio = FT_MulDiv( metrics->y_ppem, - 0x10000L, + size->ttmetrics.y_ratio = FT_DivFix( metrics->y_ppem, metrics->x_ppem ); } else { size->ttmetrics.scale = metrics->y_scale; size->ttmetrics.ppem = metrics->y_ppem; - size->ttmetrics.x_ratio = FT_MulDiv( metrics->x_ppem, - 0x10000L, + size->ttmetrics.x_ratio = FT_DivFix( metrics->x_ppem, metrics->y_ppem ); size->ttmetrics.y_ratio = 0x10000L; } #ifdef TT_USE_BYTECODE_INTERPRETER - size->cvt_ready = 0; + size->cvt_ready = -1; #endif /* TT_USE_BYTECODE_INTERPRETER */ if ( !error ) @@ -1219,15 +1261,21 @@ if ( !TT_New_Context( driver ) ) - return TT_Err_Could_Not_Find_Context; + return FT_THROW( Could_Not_Find_Context ); +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + driver->interpreter_version = TT_INTERPRETER_VERSION_38; #else + driver->interpreter_version = TT_INTERPRETER_VERSION_35; +#endif + +#else /* !TT_USE_BYTECODE_INTERPRETER */ FT_UNUSED( ttdriver ); -#endif +#endif /* !TT_USE_BYTECODE_INTERPRETER */ - return TT_Err_Ok; + return FT_Err_Ok; } diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h index 47e4129..859164f 100644 --- a/src/truetype/ttobjs.h +++ b/src/truetype/ttobjs.h @@ -4,7 +4,7 @@ /* */ /* Objects manager (specification). */ /* */ -/* Copyright 1996-2009, 2011-2012 by */ +/* Copyright 1996-2009, 2011-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -95,8 +95,8 @@ FT_BEGIN_HEADER FT_F26Dot6 control_value_cutin; FT_F26Dot6 single_width_cutin; FT_F26Dot6 single_width_value; - FT_Short delta_base; - FT_Short delta_shift; + FT_UShort delta_base; + FT_UShort delta_shift; FT_Byte instruct_control; /* According to Greg Hitchcock from Microsoft, the `scan_control' */ @@ -173,11 +173,13 @@ FT_BEGIN_HEADER /* */ typedef struct TT_DefRecord_ { - FT_Int range; /* in which code range is it located? */ - FT_Long start; /* where does it start? */ - FT_Long end; /* where does it end? */ - FT_UInt opc; /* function #, or instruction code */ - FT_Bool active; /* is it active? */ + FT_Int range; /* in which code range is it located? */ + FT_Long start; /* where does it start? */ + FT_Long end; /* where does it end? */ + FT_UInt opc; /* function #, or instruction code */ + FT_Bool active; /* is it active? */ + FT_Bool inline_delta; /* is function that defines inline delta? */ + FT_ULong sph_fdef_flags; /* flags to identify special functions */ } TT_DefRecord, *TT_DefArray; @@ -190,7 +192,7 @@ FT_BEGIN_HEADER { FT_Fixed xx, xy; /* transformation matrix coefficients */ FT_Fixed yx, yy; - FT_F26Dot6 ox, oy; /* offsets */ + FT_F26Dot6 ox, oy; /* offsets */ } TT_Transform; @@ -331,8 +333,10 @@ FT_BEGIN_HEADER FT_Bool debug; TT_ExecContext context; - FT_Bool bytecode_ready; - FT_Bool cvt_ready; + /* if negative, `fpgm' (resp. `prep'), wasn't executed yet; */ + /* otherwise it is the returned error code */ + FT_Error bytecode_ready; + FT_Error cvt_ready; #endif /* TT_USE_BYTECODE_INTERPRETER */ @@ -345,11 +349,12 @@ FT_BEGIN_HEADER /* */ typedef struct TT_DriverRec_ { - FT_DriverRec root; + FT_DriverRec root; + TT_ExecContext context; /* execution context */ TT_GlyphZoneRec zone; /* glyph loader points zone */ - void* extension_component; + FT_UInt interpreter_version; } TT_DriverRec; @@ -427,6 +432,10 @@ FT_BEGIN_HEADER tt_slot_init( FT_GlyphSlot slot ); + /* auxiliary */ +#define IS_HINTED( flags ) ( ( flags & FT_LOAD_NO_HINTING ) == 0 ) + + FT_END_HEADER #endif /* __TTOBJS_H__ */ diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c index 65ca845..edefae7 100644 --- a/src/truetype/ttpic.c +++ b/src/truetype/ttpic.c @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for truetype module. */ /* */ -/* Copyright 2009, 2010 by */ +/* Copyright 2009, 2010, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -22,30 +22,29 @@ #include "ttpic.h" #include "tterrors.h" + #ifdef FT_CONFIG_OPTION_PIC /* forward declaration of PIC init functions from ttdriver.c */ FT_Error FT_Create_Class_tt_services( FT_Library library, FT_ServiceDescRec** output_class ); - void FT_Destroy_Class_tt_services( FT_Library library, FT_ServiceDescRec* clazz ); - void FT_Init_Class_tt_service_gx_multi_masters( FT_Service_MultiMastersRec* sv_mm ); - void FT_Init_Class_tt_service_truetype_glyf( FT_Service_TTGlyfRec* sv_ttglyf ); + void tt_driver_class_pic_free( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Memory memory = library->memory; + FT_Memory memory = library->memory; if ( pic_container->truetype ) @@ -66,18 +65,19 @@ tt_driver_class_pic_init( FT_Library library ) { FT_PIC_Container* pic_container = &library->pic_container; - FT_Error error = TT_Err_Ok; - TTModulePIC* container; + FT_Error error = FT_Err_Ok; + TTModulePIC* container = NULL; FT_Memory memory = library->memory; /* allocate pointer, clear and set global container pointer */ - if ( FT_ALLOC ( container, sizeof ( *container ) ) ) + if ( FT_ALLOC( container, sizeof ( *container ) ) ) return error; FT_MEM_SET( container, 0, sizeof ( *container ) ); pic_container->truetype = container; - /* initialize pointer table - this is how the module usually expects this data */ + /* initialize pointer table - this is how the module usually */ + /* expects this data */ error = FT_Create_Class_tt_services( library, &container->tt_services ); if ( error ) @@ -88,7 +88,8 @@ #endif FT_Init_Class_tt_service_truetype_glyf( &container->tt_service_truetype_glyf ); -Exit: + + Exit: if ( error ) tt_driver_class_pic_free( library ); return error; diff --git a/src/truetype/ttpic.h b/src/truetype/ttpic.h index 48f43a5..cfb4ee6 100644 --- a/src/truetype/ttpic.h +++ b/src/truetype/ttpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services for truetype module. */ /* */ -/* Copyright 2009 by */ +/* Copyright 2009, 2012, 2013 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -23,29 +23,43 @@ FT_BEGIN_HEADER #ifndef FT_CONFIG_OPTION_PIC -#define FT_TT_SERVICES_GET tt_services -#define FT_TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters -#define FT_TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf + +#define TT_SERVICES_GET tt_services +#define TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters +#define TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf +#define TT_SERVICE_PROPERTIES_GET tt_service_properties #else /* FT_CONFIG_OPTION_PIC */ #include FT_MULTIPLE_MASTERS_H #include FT_SERVICE_MULTIPLE_MASTERS_H #include FT_SERVICE_TRUETYPE_GLYF_H +#include FT_SERVICE_PROPERTIES_H + - typedef struct TTModulePIC_ + typedef struct TTModulePIC_ { - FT_ServiceDescRec* tt_services; + FT_ServiceDescRec* tt_services; #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT - FT_Service_MultiMastersRec tt_service_gx_multi_masters; + FT_Service_MultiMastersRec tt_service_gx_multi_masters; #endif - FT_Service_TTGlyfRec tt_service_truetype_glyf; + FT_Service_TTGlyfRec tt_service_truetype_glyf; + FT_Service_PropertiesRec tt_service_properties; + } TTModulePIC; -#define GET_PIC(lib) ((TTModulePIC*)((lib)->pic_container.truetype)) -#define FT_TT_SERVICES_GET (GET_PIC(library)->tt_services) -#define FT_TT_SERVICE_GX_MULTI_MASTERS_GET (GET_PIC(library)->tt_service_gx_multi_masters) -#define FT_TT_SERVICE_TRUETYPE_GLYF_GET (GET_PIC(library)->tt_service_truetype_glyf) + +#define GET_PIC( lib ) \ + ( (TTModulePIC*)((lib)->pic_container.truetype) ) +#define TT_SERVICES_GET \ + ( GET_PIC( library )->tt_services ) +#define TT_SERVICE_GX_MULTI_MASTERS_GET \ + ( GET_PIC( library )->tt_service_gx_multi_masters ) +#define TT_SERVICE_TRUETYPE_GLYF_GET \ + ( GET_PIC( library )->tt_service_truetype_glyf ) +#define TT_SERVICE_PROPERTIES_GET \ + ( GET_PIC( library )->tt_service_properties ) + /* see ttpic.c for the implementation */ void @@ -58,6 +72,7 @@ FT_BEGIN_HEADER /* */ + FT_END_HEADER #endif /* __TTPIC_H__ */ diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c index bb6005d..9991925 100644 --- a/src/truetype/ttpload.c +++ b/src/truetype/ttpload.c @@ -4,7 +4,7 @@ /* */ /* TrueType-specific tables loader (body). */ /* */ -/* Copyright 1996-2002, 2004-2012 by */ +/* Copyright 1996-2002, 2004-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -72,7 +72,7 @@ /* it is possible that a font doesn't have a glyf table at all */ /* or its size is zero */ - if ( error == TT_Err_Table_Missing ) + if ( FT_ERR_EQ( error, Table_Missing ) ) face->glyf_len = 0; else if ( error ) goto Exit; @@ -81,7 +81,7 @@ error = face->goto_table( face, TTAG_loca, stream, &table_len ); if ( error ) { - error = TT_Err_Locations_Missing; + error = FT_THROW( Locations_Missing ); goto Exit; } @@ -92,7 +92,7 @@ if ( table_len >= 0x40000L ) { FT_TRACE2(( "table too large\n" )); - error = TT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } face->num_locations = table_len >> shift; @@ -104,7 +104,7 @@ if ( table_len >= 0x20000L ) { FT_TRACE2(( "table too large\n" )); - error = TT_Err_Invalid_Table; + error = FT_THROW( Invalid_Table ); goto Exit; } face->num_locations = table_len >> shift; @@ -296,7 +296,7 @@ face->cvt_size = 0; face->cvt = NULL; - error = TT_Err_Ok; + error = FT_Err_Ok; goto Exit; } @@ -334,7 +334,7 @@ FT_UNUSED( face ); FT_UNUSED( stream ); - return TT_Err_Ok; + return FT_Err_Ok; #endif } @@ -375,7 +375,7 @@ { face->font_program = NULL; face->font_program_size = 0; - error = TT_Err_Ok; + error = FT_Err_Ok; FT_TRACE2(( "is missing\n" )); } @@ -396,7 +396,7 @@ FT_UNUSED( face ); FT_UNUSED( stream ); - return TT_Err_Ok; + return FT_Err_Ok; #endif } @@ -436,7 +436,7 @@ { face->cvt_program = NULL; face->cvt_program_size = 0; - error = TT_Err_Ok; + error = FT_Err_Ok; FT_TRACE2(( "is missing\n" )); } @@ -457,7 +457,7 @@ FT_UNUSED( face ); FT_UNUSED( stream ); - return TT_Err_Ok; + return FT_Err_Ok; #endif } @@ -495,7 +495,7 @@ /* this table is optional */ error = face->goto_table( face, TTAG_hdmx, stream, &table_size ); if ( error || table_size < 8 ) - return TT_Err_Ok; + return FT_Err_Ok; if ( FT_FRAME_EXTRACT( table_size, face->hdmx_table ) ) goto Exit; @@ -508,9 +508,9 @@ record_size = FT_NEXT_ULONG( p ); /* The maximum number of bytes in an hdmx device record is the */ - /* maximum number of glyphs + 2; this is 0xFFFF + 2; this is */ - /* the reason why `record_size' is a long (which we read as */ - /* unsigned long for convenience). In practice, two bytes */ + /* maximum number of glyphs + 2; this is 0xFFFF + 2, thus */ + /* explaining why `record_size' is a long (which we read as */ + /* unsigned long for convenience). In practice, two bytes are */ /* sufficient to hold the size value. */ /* */ /* There are at least two fonts, HANNOM-A and HANNOM-B version */ @@ -522,10 +522,12 @@ record_size &= 0xFFFFU; /* The limit for `num_records' is a heuristic value. */ - - if ( version != 0 || num_records > 255 || record_size > 0x10001L ) + if ( version != 0 || + num_records > 255 || + record_size > 0x10001L || + record_size < 4 ) { - error = TT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c new file mode 100644 index 0000000..ca60451 --- /dev/null +++ b/src/truetype/ttsubpix.c @@ -0,0 +1,1011 @@ +/***************************************************************************/ +/* */ +/* ttsubpix.c */ +/* */ +/* TrueType Subpixel Hinting. */ +/* */ +/* Copyright 2010-2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +#include +#include FT_INTERNAL_DEBUG_H +#include FT_INTERNAL_CALC_H +#include FT_INTERNAL_STREAM_H +#include FT_INTERNAL_SFNT_H +#include FT_TRUETYPE_TAGS_H +#include FT_OUTLINE_H +#include FT_TRUETYPE_DRIVER_H + +#include "ttsubpix.h" + + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + /*************************************************************************/ + /* */ + /* These rules affect how the TT Interpreter does hinting, with the */ + /* goal of doing subpixel hinting by (in general) ignoring x moves. */ + /* Some of these rules are fixes that go above and beyond the */ + /* stated techniques in the MS whitepaper on Cleartype, due to */ + /* artifacts in many glyphs. So, these rules make some glyphs render */ + /* better than they do in the MS rasterizer. */ + /* */ + /* "" string or 0 int/char indicates to apply to all glyphs. */ + /* "-" used as dummy placeholders, but any non-matching string works. */ + /* */ + /* Some of this could arguably be implemented in fontconfig, however: */ + /* */ + /* - Fontconfig can't set things on a glyph-by-glyph basis. */ + /* - The tweaks that happen here are very low-level, from an average */ + /* user's point of view and are best implemented in the hinter. */ + /* */ + /* The goal is to make the subpixel hinting techniques as generalized */ + /* as possible across all fonts to prevent the need for extra rules such */ + /* as these. */ + /* */ + /* The rule structure is designed so that entirely new rules can easily */ + /* be added when a new compatibility feature is discovered. */ + /* */ + /* The rule structures could also use some enhancement to handle ranges. */ + /* */ + /* ****************** WORK IN PROGRESS ******************* */ + /* */ + + /* These are `classes' of fonts that can be grouped together and used in */ + /* rules below. A blank entry "" is required at the end of these! */ +#define FAMILY_CLASS_RULES_SIZE 7 + + static const SPH_Font_Class FAMILY_CLASS_Rules + [FAMILY_CLASS_RULES_SIZE] = + { + { "MS Legacy Fonts", + { "Aharoni", + "Andale Mono", + "Andalus", + "Angsana New", + "AngsanaUPC", + "Arabic Transparent", + "Arial Black", + "Arial Narrow", + "Arial Unicode MS", + "Arial", + "Batang", + "Browallia New", + "BrowalliaUPC", + "Comic Sans MS", + "Cordia New", + "CordiaUPC", + "Courier New", + "DFKai-SB", + "David Transparent", + "David", + "DilleniaUPC", + "Estrangelo Edessa", + "EucrosiaUPC", + "FangSong_GB2312", + "Fixed Miriam Transparent", + "FrankRuehl", + "Franklin Gothic Medium", + "FreesiaUPC", + "Garamond", + "Gautami", + "Georgia", + "Gulim", + "Impact", + "IrisUPC", + "JasmineUPC", + "KaiTi_GB2312", + "KodchiangUPC", + "Latha", + "Levenim MT", + "LilyUPC", + "Lucida Console", + "Lucida Sans Unicode", + "MS Gothic", + "MS Mincho", + "MV Boli", + "Mangal", + "Marlett", + "Microsoft Sans Serif", + "Mingliu", + "Miriam Fixed", + "Miriam Transparent", + "Miriam", + "Narkisim", + "Palatino Linotype", + "Raavi", + "Rod Transparent", + "Rod", + "Shruti", + "SimHei", + "Simplified Arabic Fixed", + "Simplified Arabic", + "Simsun", + "Sylfaen", + "Symbol", + "Tahoma", + "Times New Roman", + "Traditional Arabic", + "Trebuchet MS", + "Tunga", + "Verdana", + "Webdings", + "Wingdings", + "", + }, + }, + { "Core MS Legacy Fonts", + { "Arial Black", + "Arial Narrow", + "Arial Unicode MS", + "Arial", + "Comic Sans MS", + "Courier New", + "Garamond", + "Georgia", + "Impact", + "Lucida Console", + "Lucida Sans Unicode", + "Microsoft Sans Serif", + "Palatino Linotype", + "Tahoma", + "Times New Roman", + "Trebuchet MS", + "Verdana", + "", + }, + }, + { "Apple Legacy Fonts", + { "Geneva", + "Times", + "Monaco", + "Century", + "Chalkboard", + "Lobster", + "Century Gothic", + "Optima", + "Lucida Grande", + "Gill Sans", + "Baskerville", + "Helvetica", + "Helvetica Neue", + "", + }, + }, + { "Legacy Sans Fonts", + { "Andale Mono", + "Arial Unicode MS", + "Arial", + "Century Gothic", + "Comic Sans MS", + "Franklin Gothic Medium", + "Geneva", + "Lucida Console", + "Lucida Grande", + "Lucida Sans Unicode", + "Lucida Sans Typewriter", + "Microsoft Sans Serif", + "Monaco", + "Tahoma", + "Trebuchet MS", + "Verdana", + "", + }, + }, + + { "Misc Legacy Fonts", + { "Dark Courier", "", }, }, + { "Verdana Clones", + { "DejaVu Sans", + "Bitstream Vera Sans", "", }, }, + { "Verdana and Clones", + { "DejaVu Sans", + "Bitstream Vera Sans", + "Verdana", "", }, }, + }; + + + /* Define this to force natural (i.e. not bitmap-compatible) widths. */ + /* The default leans strongly towards natural widths except for a few */ + /* legacy fonts where a selective combination produces nicer results. */ +/* #define FORCE_NATURAL_WIDTHS */ + + + /* Define `classes' of styles that can be grouped together and used in */ + /* rules below. A blank entry "" is required at the end of these! */ +#define STYLE_CLASS_RULES_SIZE 5 + + const SPH_Font_Class STYLE_CLASS_Rules + [STYLE_CLASS_RULES_SIZE] = + { + { "Regular Class", + { "Regular", + "Book", + "Medium", + "Roman", + "Normal", + "", + }, + }, + { "Regular/Italic Class", + { "Regular", + "Book", + "Medium", + "Italic", + "Oblique", + "Roman", + "Normal", + "", + }, + }, + { "Bold/BoldItalic Class", + { "Bold", + "Bold Italic", + "Black", + "", + }, + }, + { "Bold/Italic/BoldItalic Class", + { "Bold", + "Bold Italic", + "Black", + "Italic", + "Oblique", + "", + }, + }, + { "Regular/Bold Class", + { "Regular", + "Book", + "Medium", + "Normal", + "Roman", + "Bold", + "Black", + "", + }, + }, + }; + + + /* Force special legacy fixes for fonts. */ +#define COMPATIBILITY_MODE_RULES_SIZE 1 + + const SPH_TweakRule COMPATIBILITY_MODE_Rules + [COMPATIBILITY_MODE_RULES_SIZE] = + { + { "Verdana Clones", 0, "", 0 }, + }; + + + /* Don't do subpixel (ignore_x_mode) hinting; do normal hinting. */ +#define PIXEL_HINTING_RULES_SIZE 2 + + const SPH_TweakRule PIXEL_HINTING_Rules + [PIXEL_HINTING_RULES_SIZE] = + { + /* these characters are almost always safe */ + { "Courier New", 12, "Italic", 'z' }, + { "Courier New", 11, "Italic", 'z' }, + }; + + + /* Subpixel hinting ignores SHPIX rules on X. Force SHPIX for these. */ +#define DO_SHPIX_RULES_SIZE 1 + + const SPH_TweakRule DO_SHPIX_Rules + [DO_SHPIX_RULES_SIZE] = + { + { "-", 0, "", 0 }, + }; + + + /* Skip Y moves that start with a point that is not on a Y pixel */ + /* boundary and don't move that point to a Y pixel boundary. */ +#define SKIP_NONPIXEL_Y_MOVES_RULES_SIZE 4 + + const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules + [SKIP_NONPIXEL_Y_MOVES_RULES_SIZE] = + { + /* fix vwxyz thinness*/ + { "Consolas", 0, "", 0 }, + /* Fix thin middle stems */ + { "Core MS Legacy Fonts", 0, "Regular", 0 }, + /* Cyrillic small letter I */ + { "Legacy Sans Fonts", 0, "", 0 }, + /* Fix artifacts with some Regular & Bold */ + { "Verdana Clones", 0, "", 0 }, + }; + + +#define SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1 + + const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions + [SKIP_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] = + { + /* Fixes < and > */ + { "Courier New", 0, "Regular", 0 }, + }; + + + /* Skip Y moves that start with a point that is not on a Y pixel */ + /* boundary and don't move that point to a Y pixel boundary. */ +#define SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE 2 + + const SPH_TweakRule SKIP_NONPIXEL_Y_MOVES_DELTAP_Rules + [SKIP_NONPIXEL_Y_MOVES_DELTAP_RULES_SIZE] = + { + /* Maintain thickness of diagonal in 'N' */ + { "Times New Roman", 0, "Regular/Bold Class", 'N' }, + { "Georgia", 0, "Regular/Bold Class", 'N' }, + }; + + + /* Skip Y moves that move a point off a Y pixel boundary. */ +#define SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE 1 + + const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules + [SKIP_OFFPIXEL_Y_MOVES_RULES_SIZE] = + { + { "-", 0, "", 0 }, + }; + + +#define SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1 + + const SPH_TweakRule SKIP_OFFPIXEL_Y_MOVES_Rules_Exceptions + [SKIP_OFFPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] = + { + { "-", 0, "", 0 }, + }; + + + /* Round moves that don't move a point to a Y pixel boundary. */ +#define ROUND_NONPIXEL_Y_MOVES_RULES_SIZE 2 + + const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules + [ROUND_NONPIXEL_Y_MOVES_RULES_SIZE] = + { + /* Droid font instructions don't snap Y to pixels */ + { "Droid Sans", 0, "Regular/Italic Class", 0 }, + { "Droid Sans Mono", 0, "", 0 }, + }; + + +#define ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE 1 + + const SPH_TweakRule ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions + [ROUND_NONPIXEL_Y_MOVES_RULES_EXCEPTIONS_SIZE] = + { + { "-", 0, "", 0 }, + }; + + + /* Allow a Direct_Move along X freedom vector if matched. */ +#define ALLOW_X_DMOVE_RULES_SIZE 1 + + const SPH_TweakRule ALLOW_X_DMOVE_Rules + [ALLOW_X_DMOVE_RULES_SIZE] = + { + /* Fixes vanishing diagonal in 4 */ + { "Verdana", 0, "Regular", '4' }, + }; + + + /* Return MS rasterizer version 35 if matched. */ +#define RASTERIZER_35_RULES_SIZE 8 + + const SPH_TweakRule RASTERIZER_35_Rules + [RASTERIZER_35_RULES_SIZE] = + { + /* This seems to be the only way to make these look good */ + { "Times New Roman", 0, "Regular", 'i' }, + { "Times New Roman", 0, "Regular", 'j' }, + { "Times New Roman", 0, "Regular", 'm' }, + { "Times New Roman", 0, "Regular", 'r' }, + { "Times New Roman", 0, "Regular", 'a' }, + { "Times New Roman", 0, "Regular", 'n' }, + { "Times New Roman", 0, "Regular", 'p' }, + { "Times", 0, "", 0 }, + }; + + + /* Don't round to the subpixel grid. Round to pixel grid. */ +#define NORMAL_ROUND_RULES_SIZE 1 + + const SPH_TweakRule NORMAL_ROUND_Rules + [NORMAL_ROUND_RULES_SIZE] = + { + /* Fix serif thickness for certain ppems */ + /* Can probably be generalized somehow */ + { "Courier New", 0, "", 0 }, + }; + + + /* Skip IUP instructions if matched. */ +#define SKIP_IUP_RULES_SIZE 1 + + const SPH_TweakRule SKIP_IUP_Rules + [SKIP_IUP_RULES_SIZE] = + { + { "Arial", 13, "Regular", 'a' }, + }; + + + /* Skip MIAP Twilight hack if matched. */ +#define MIAP_HACK_RULES_SIZE 1 + + const SPH_TweakRule MIAP_HACK_Rules + [MIAP_HACK_RULES_SIZE] = + { + { "Geneva", 12, "", 0 }, + }; + + + /* Skip DELTAP instructions if matched. */ +#define ALWAYS_SKIP_DELTAP_RULES_SIZE 23 + + const SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules + [ALWAYS_SKIP_DELTAP_RULES_SIZE] = + { + { "Georgia", 0, "Regular", 'k' }, + /* fix various problems with e in different versions */ + { "Trebuchet MS", 14, "Regular", 'e' }, + { "Trebuchet MS", 13, "Regular", 'e' }, + { "Trebuchet MS", 15, "Regular", 'e' }, + { "Trebuchet MS", 0, "Italic", 'v' }, + { "Trebuchet MS", 0, "Italic", 'w' }, + { "Trebuchet MS", 0, "Regular", 'Y' }, + { "Arial", 11, "Regular", 's' }, + /* prevent problems with '3' and others */ + { "Verdana", 10, "Regular", 0 }, + { "Verdana", 9, "Regular", 0 }, + /* Cyrillic small letter short I */ + { "Legacy Sans Fonts", 0, "", 0x438 }, + { "Legacy Sans Fonts", 0, "", 0x439 }, + { "Arial", 10, "Regular", '6' }, + { "Arial", 0, "Bold/BoldItalic Class", 'a' }, + /* Make horizontal stems consistent with the rest */ + { "Arial", 24, "Bold", 'a' }, + { "Arial", 25, "Bold", 'a' }, + { "Arial", 24, "Bold", 's' }, + { "Arial", 25, "Bold", 's' }, + { "Arial", 34, "Bold", 's' }, + { "Arial", 35, "Bold", 's' }, + { "Arial", 36, "Bold", 's' }, + { "Arial", 25, "Regular", 's' }, + { "Arial", 26, "Regular", 's' }, + }; + + + /* Always do DELTAP instructions if matched. */ +#define ALWAYS_DO_DELTAP_RULES_SIZE 1 + + const SPH_TweakRule ALWAYS_DO_DELTAP_Rules + [ALWAYS_DO_DELTAP_RULES_SIZE] = + { + { "-", 0, "", 0 }, + }; + + + /* Don't allow ALIGNRP after IUP. */ +#define NO_ALIGNRP_AFTER_IUP_RULES_SIZE 1 + + static const SPH_TweakRule NO_ALIGNRP_AFTER_IUP_Rules + [NO_ALIGNRP_AFTER_IUP_RULES_SIZE] = + { + /* Prevent creation of dents in outline */ + { "-", 0, "", 0 }, + }; + + + /* Don't allow DELTAP after IUP. */ +#define NO_DELTAP_AFTER_IUP_RULES_SIZE 1 + + static const SPH_TweakRule NO_DELTAP_AFTER_IUP_Rules + [NO_DELTAP_AFTER_IUP_RULES_SIZE] = + { + { "-", 0, "", 0 }, + }; + + + /* Don't allow CALL after IUP. */ +#define NO_CALL_AFTER_IUP_RULES_SIZE 1 + + static const SPH_TweakRule NO_CALL_AFTER_IUP_Rules + [NO_CALL_AFTER_IUP_RULES_SIZE] = + { + /* Prevent creation of dents in outline */ + { "-", 0, "", 0 }, + }; + + + /* De-embolden these glyphs slightly. */ +#define DEEMBOLDEN_RULES_SIZE 9 + + static const SPH_TweakRule DEEMBOLDEN_Rules + [DEEMBOLDEN_RULES_SIZE] = + { + { "Courier New", 0, "Bold", 'A' }, + { "Courier New", 0, "Bold", 'W' }, + { "Courier New", 0, "Bold", 'w' }, + { "Courier New", 0, "Bold", 'M' }, + { "Courier New", 0, "Bold", 'X' }, + { "Courier New", 0, "Bold", 'K' }, + { "Courier New", 0, "Bold", 'x' }, + { "Courier New", 0, "Bold", 'z' }, + { "Courier New", 0, "Bold", 'v' }, + }; + + + /* Embolden these glyphs slightly. */ +#define EMBOLDEN_RULES_SIZE 2 + + static const SPH_TweakRule EMBOLDEN_Rules + [EMBOLDEN_RULES_SIZE] = + { + { "Courier New", 0, "Regular", 0 }, + { "Courier New", 0, "Italic", 0 }, + }; + + + /* This is a CVT hack that makes thick horizontal stems on 2, 5, 7 */ + /* similar to Windows XP. */ +#define TIMES_NEW_ROMAN_HACK_RULES_SIZE 12 + + static const SPH_TweakRule TIMES_NEW_ROMAN_HACK_Rules + [TIMES_NEW_ROMAN_HACK_RULES_SIZE] = + { + { "Times New Roman", 16, "Italic", '2' }, + { "Times New Roman", 16, "Italic", '5' }, + { "Times New Roman", 16, "Italic", '7' }, + { "Times New Roman", 16, "Regular", '2' }, + { "Times New Roman", 16, "Regular", '5' }, + { "Times New Roman", 16, "Regular", '7' }, + { "Times New Roman", 17, "Italic", '2' }, + { "Times New Roman", 17, "Italic", '5' }, + { "Times New Roman", 17, "Italic", '7' }, + { "Times New Roman", 17, "Regular", '2' }, + { "Times New Roman", 17, "Regular", '5' }, + { "Times New Roman", 17, "Regular", '7' }, + }; + + + /* This fudges distance on 2 to get rid of the vanishing stem issue. */ + /* A real solution to this is certainly welcome. */ +#define COURIER_NEW_2_HACK_RULES_SIZE 15 + + static const SPH_TweakRule COURIER_NEW_2_HACK_Rules + [COURIER_NEW_2_HACK_RULES_SIZE] = + { + { "Courier New", 10, "Regular", '2' }, + { "Courier New", 11, "Regular", '2' }, + { "Courier New", 12, "Regular", '2' }, + { "Courier New", 13, "Regular", '2' }, + { "Courier New", 14, "Regular", '2' }, + { "Courier New", 15, "Regular", '2' }, + { "Courier New", 16, "Regular", '2' }, + { "Courier New", 17, "Regular", '2' }, + { "Courier New", 18, "Regular", '2' }, + { "Courier New", 19, "Regular", '2' }, + { "Courier New", 20, "Regular", '2' }, + { "Courier New", 21, "Regular", '2' }, + { "Courier New", 22, "Regular", '2' }, + { "Courier New", 23, "Regular", '2' }, + { "Courier New", 24, "Regular", '2' }, + }; + + +#ifndef FORCE_NATURAL_WIDTHS + + /* Use compatible widths with these glyphs. Compatible widths is always */ + /* on when doing B/W TrueType instructing, but is used selectively here, */ + /* typically on glyphs with 3 or more vertical stems. */ +#define COMPATIBLE_WIDTHS_RULES_SIZE 38 + + static const SPH_TweakRule COMPATIBLE_WIDTHS_Rules + [COMPATIBLE_WIDTHS_RULES_SIZE] = + { + { "Arial Unicode MS", 12, "Regular Class", 'm' }, + { "Arial Unicode MS", 14, "Regular Class", 'm' }, + /* Cyrillic small letter sha */ + { "Arial", 10, "Regular Class", 0x448 }, + { "Arial", 11, "Regular Class", 'm' }, + { "Arial", 12, "Regular Class", 'm' }, + /* Cyrillic small letter sha */ + { "Arial", 12, "Regular Class", 0x448 }, + { "Arial", 13, "Regular Class", 0x448 }, + { "Arial", 14, "Regular Class", 'm' }, + /* Cyrillic small letter sha */ + { "Arial", 14, "Regular Class", 0x448 }, + { "Arial", 15, "Regular Class", 0x448 }, + { "Arial", 17, "Regular Class", 'm' }, + { "DejaVu Sans", 15, "Regular Class", 0 }, + { "Microsoft Sans Serif", 11, "Regular Class", 0 }, + { "Microsoft Sans Serif", 12, "Regular Class", 0 }, + { "Segoe UI", 11, "Regular Class", 0 }, + { "Monaco", 0, "Regular Class", 0 }, + { "Segoe UI", 12, "Regular Class", 'm' }, + { "Segoe UI", 14, "Regular Class", 'm' }, + { "Tahoma", 11, "Regular Class", 0 }, + { "Times New Roman", 16, "Regular Class", 'c' }, + { "Times New Roman", 16, "Regular Class", 'm' }, + { "Times New Roman", 16, "Regular Class", 'o' }, + { "Times New Roman", 16, "Regular Class", 'w' }, + { "Trebuchet MS", 11, "Regular Class", 0 }, + { "Trebuchet MS", 12, "Regular Class", 0 }, + { "Trebuchet MS", 14, "Regular Class", 0 }, + { "Trebuchet MS", 15, "Regular Class", 0 }, + { "Ubuntu", 12, "Regular Class", 'm' }, + /* Cyrillic small letter sha */ + { "Verdana", 10, "Regular Class", 0x448 }, + { "Verdana", 11, "Regular Class", 0x448 }, + { "Verdana and Clones", 12, "Regular Class", 'i' }, + { "Verdana and Clones", 12, "Regular Class", 'j' }, + { "Verdana and Clones", 12, "Regular Class", 'l' }, + { "Verdana and Clones", 12, "Regular Class", 'm' }, + { "Verdana and Clones", 13, "Regular Class", 'i' }, + { "Verdana and Clones", 13, "Regular Class", 'j' }, + { "Verdana and Clones", 13, "Regular Class", 'l' }, + { "Verdana and Clones", 14, "Regular Class", 'm' }, + }; + + + /* Scaling slightly in the x-direction prior to hinting results in */ + /* more visually pleasing glyphs in certain cases. */ + /* This sometimes needs to be coordinated with compatible width rules. */ + /* A value of 1000 corresponds to a scaled value of 1.0. */ + +#define X_SCALING_RULES_SIZE 50 + + static const SPH_ScaleRule X_SCALING_Rules[X_SCALING_RULES_SIZE] = + { + { "DejaVu Sans", 12, "Regular Class", 'm', 950 }, + { "Verdana and Clones", 12, "Regular Class", 'a', 1100 }, + { "Verdana and Clones", 13, "Regular Class", 'a', 1050 }, + { "Arial", 11, "Regular Class", 'm', 975 }, + { "Arial", 12, "Regular Class", 'm', 1050 }, + /* Cyrillic small letter el */ + { "Arial", 13, "Regular Class", 0x43B, 950 }, + { "Arial", 13, "Regular Class", 'o', 950 }, + { "Arial", 13, "Regular Class", 'e', 950 }, + { "Arial", 14, "Regular Class", 'm', 950 }, + /* Cyrillic small letter el */ + { "Arial", 15, "Regular Class", 0x43B, 925 }, + { "Bitstream Vera Sans", 10, "Regular/Italic Class", 0, 1100 }, + { "Bitstream Vera Sans", 12, "Regular/Italic Class", 0, 1050 }, + { "Bitstream Vera Sans", 16, "Regular Class", 0, 1050 }, + { "Bitstream Vera Sans", 9, "Regular/Italic Class", 0, 1050 }, + { "DejaVu Sans", 12, "Regular Class", 'l', 975 }, + { "DejaVu Sans", 12, "Regular Class", 'i', 975 }, + { "DejaVu Sans", 12, "Regular Class", 'j', 975 }, + { "DejaVu Sans", 13, "Regular Class", 'l', 950 }, + { "DejaVu Sans", 13, "Regular Class", 'i', 950 }, + { "DejaVu Sans", 13, "Regular Class", 'j', 950 }, + { "DejaVu Sans", 10, "Regular/Italic Class", 0, 1100 }, + { "DejaVu Sans", 12, "Regular/Italic Class", 0, 1050 }, + { "Georgia", 10, "", 0, 1050 }, + { "Georgia", 11, "", 0, 1100 }, + { "Georgia", 12, "", 0, 1025 }, + { "Georgia", 13, "", 0, 1050 }, + { "Georgia", 16, "", 0, 1050 }, + { "Georgia", 17, "", 0, 1030 }, + { "Liberation Sans", 12, "Regular Class", 'm', 1100 }, + { "Lucida Grande", 11, "Regular Class", 'm', 1100 }, + { "Microsoft Sans Serif", 11, "Regular Class", 'm', 950 }, + { "Microsoft Sans Serif", 12, "Regular Class", 'm', 1050 }, + { "Segoe UI", 12, "Regular Class", 'H', 1050 }, + { "Segoe UI", 12, "Regular Class", 'm', 1050 }, + { "Segoe UI", 14, "Regular Class", 'm', 1050 }, + { "Tahoma", 11, "Regular Class", 'i', 975 }, + { "Tahoma", 11, "Regular Class", 'l', 975 }, + { "Tahoma", 11, "Regular Class", 'j', 900 }, + { "Tahoma", 11, "Regular Class", 'm', 918 }, + { "Verdana", 10, "Regular/Italic Class", 0, 1100 }, + { "Verdana", 12, "Regular Class", 'm', 975 }, + { "Verdana", 12, "Regular/Italic Class", 0, 1050 }, + { "Verdana", 13, "Regular/Italic Class", 'i', 950 }, + { "Verdana", 13, "Regular/Italic Class", 'j', 950 }, + { "Verdana", 13, "Regular/Italic Class", 'l', 950 }, + { "Verdana", 16, "Regular Class", 0, 1050 }, + { "Verdana", 9, "Regular/Italic Class", 0, 1050 }, + { "Times New Roman", 16, "Regular Class", 'm', 918 }, + { "Trebuchet MS", 11, "Regular Class", 'm', 800 }, + { "Trebuchet MS", 12, "Regular Class", 'm', 800 }, + }; + +#else + +#define COMPATIBLE_WIDTHS_RULES_SIZE 1 + + static const SPH_TweakRule COMPATIBLE_WIDTHS_Rules + [COMPATIBLE_WIDTHS_RULES_SIZE] = + { + { "-", 0, "", 0 }, + }; + + +#define X_SCALING_RULES_SIZE 1 + + static const SPH_ScaleRule X_SCALING_Rules + [X_SCALING_RULES_SIZE] = + { + { "-", 0, "", 0, 1000 }, + }; + +#endif /* FORCE_NATURAL_WIDTHS */ + + + FT_LOCAL_DEF( FT_Bool ) + is_member_of_family_class( const FT_String* detected_font_name, + const FT_String* rule_font_name ) + { + FT_UInt i, j; + + + /* Does font name match rule family? */ + if ( strcmp( detected_font_name, rule_font_name ) == 0 ) + return TRUE; + + /* Is font name a wildcard ""? */ + if ( strcmp( rule_font_name, "" ) == 0 ) + return TRUE; + + /* Is font name contained in a class list? */ + for ( i = 0; i < FAMILY_CLASS_RULES_SIZE; i++ ) + { + if ( strcmp( FAMILY_CLASS_Rules[i].name, rule_font_name ) == 0 ) + { + for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ ) + { + if ( strcmp( FAMILY_CLASS_Rules[i].member[j], "" ) == 0 ) + continue; + if ( strcmp( FAMILY_CLASS_Rules[i].member[j], + detected_font_name ) == 0 ) + return TRUE; + } + } + } + + return FALSE; + } + + + FT_LOCAL_DEF( FT_Bool ) + is_member_of_style_class( const FT_String* detected_font_style, + const FT_String* rule_font_style ) + { + FT_UInt i, j; + + + /* Does font style match rule style? */ + if ( strcmp( detected_font_style, rule_font_style ) == 0 ) + return TRUE; + + /* Is font style a wildcard ""? */ + if ( strcmp( rule_font_style, "" ) == 0 ) + return TRUE; + + /* Is font style contained in a class list? */ + for ( i = 0; i < STYLE_CLASS_RULES_SIZE; i++ ) + { + if ( strcmp( STYLE_CLASS_Rules[i].name, rule_font_style ) == 0 ) + { + for ( j = 0; j < SPH_MAX_CLASS_MEMBERS; j++ ) + { + if ( strcmp( STYLE_CLASS_Rules[i].member[j], "" ) == 0 ) + continue; + if ( strcmp( STYLE_CLASS_Rules[i].member[j], + detected_font_style ) == 0 ) + return TRUE; + } + } + } + + return FALSE; + } + + + FT_LOCAL_DEF( FT_Bool ) + sph_test_tweak( TT_Face face, + const FT_String* family, + FT_UInt ppem, + const FT_String* style, + FT_UInt glyph_index, + const SPH_TweakRule* rule, + FT_UInt num_rules ) + { + FT_UInt i; + + + /* rule checks may be able to be optimized further */ + for ( i = 0; i < num_rules; i++ ) + { + if ( family && + ( is_member_of_family_class ( family, rule[i].family ) ) ) + if ( rule[i].ppem == 0 || + rule[i].ppem == ppem ) + if ( style && + is_member_of_style_class ( style, rule[i].style ) ) + if ( rule[i].glyph == 0 || + FT_Get_Char_Index( (FT_Face)face, + rule[i].glyph ) == glyph_index ) + return TRUE; + } + + return FALSE; + } + + + static FT_UInt + scale_test_tweak( TT_Face face, + const FT_String* family, + FT_UInt ppem, + const FT_String* style, + FT_UInt glyph_index, + const SPH_ScaleRule* rule, + FT_UInt num_rules ) + { + FT_UInt i; + + + /* rule checks may be able to be optimized further */ + for ( i = 0; i < num_rules; i++ ) + { + if ( family && + ( is_member_of_family_class ( family, rule[i].family ) ) ) + if ( rule[i].ppem == 0 || + rule[i].ppem == ppem ) + if ( style && + is_member_of_style_class( style, rule[i].style ) ) + if ( rule[i].glyph == 0 || + FT_Get_Char_Index( (FT_Face)face, + rule[i].glyph ) == glyph_index ) + return rule[i].scale; + } + + return 1000; + } + + + FT_LOCAL_DEF( FT_UInt ) + sph_test_tweak_x_scaling( TT_Face face, + const FT_String* family, + FT_UInt ppem, + const FT_String* style, + FT_UInt glyph_index ) + { + return scale_test_tweak( face, family, ppem, style, glyph_index, + X_SCALING_Rules, X_SCALING_RULES_SIZE ); + } + + +#define TWEAK_RULES( x ) \ + if ( sph_test_tweak( face, family, ppem, style, glyph_index, \ + x##_Rules, x##_RULES_SIZE ) ) \ + loader->exec->sph_tweak_flags |= SPH_TWEAK_##x; + +#define TWEAK_RULES_EXCEPTIONS( x ) \ + if ( sph_test_tweak( face, family, ppem, style, glyph_index, \ + x##_Rules_Exceptions, x##_RULES_EXCEPTIONS_SIZE ) ) \ + loader->exec->sph_tweak_flags &= ~SPH_TWEAK_##x; + + + FT_LOCAL_DEF( void ) + sph_set_tweaks( TT_Loader loader, + FT_UInt glyph_index ) + { + TT_Face face = (TT_Face)loader->face; + FT_String* family = face->root.family_name; + int ppem = loader->size->metrics.x_ppem; + FT_String* style = face->root.style_name; + + + /* don't apply rules if style isn't set */ + if ( !face->root.style_name ) + return; + +#ifdef SPH_DEBUG_MORE_VERBOSE + printf( "%s,%d,%s,%c=%d ", + family, ppem, style, glyph_index, glyph_index ); +#endif + + TWEAK_RULES( PIXEL_HINTING ); + + if ( loader->exec->sph_tweak_flags & SPH_TWEAK_PIXEL_HINTING ) + { + loader->exec->ignore_x_mode = FALSE; + return; + } + + TWEAK_RULES( ALLOW_X_DMOVE ); + TWEAK_RULES( ALWAYS_DO_DELTAP ); + TWEAK_RULES( ALWAYS_SKIP_DELTAP ); + TWEAK_RULES( DEEMBOLDEN ); + TWEAK_RULES( DO_SHPIX ); + TWEAK_RULES( EMBOLDEN ); + TWEAK_RULES( MIAP_HACK ); + TWEAK_RULES( NORMAL_ROUND ); + TWEAK_RULES( NO_ALIGNRP_AFTER_IUP ); + TWEAK_RULES( NO_CALL_AFTER_IUP ); + TWEAK_RULES( NO_DELTAP_AFTER_IUP ); + TWEAK_RULES( RASTERIZER_35 ); + TWEAK_RULES( SKIP_IUP ); + + TWEAK_RULES( SKIP_OFFPIXEL_Y_MOVES ); + TWEAK_RULES_EXCEPTIONS( SKIP_OFFPIXEL_Y_MOVES ); + + TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES_DELTAP ); + + TWEAK_RULES( SKIP_NONPIXEL_Y_MOVES ); + TWEAK_RULES_EXCEPTIONS( SKIP_NONPIXEL_Y_MOVES ); + + TWEAK_RULES( ROUND_NONPIXEL_Y_MOVES ); + TWEAK_RULES_EXCEPTIONS( ROUND_NONPIXEL_Y_MOVES ); + + if ( loader->exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 ) + { + if ( loader->exec->rasterizer_version != TT_INTERPRETER_VERSION_35 ) + { + loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35; + loader->exec->size->cvt_ready = -1; + + tt_size_ready_bytecode( + loader->exec->size, + FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) ); + } + else + loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35; + } + else + { + if ( loader->exec->rasterizer_version != + SPH_OPTION_SET_RASTERIZER_VERSION ) + { + loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; + loader->exec->size->cvt_ready = -1; + + tt_size_ready_bytecode( + loader->exec->size, + FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) ); + } + else + loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; + } + + if ( IS_HINTED( loader->load_flags ) ) + { + TWEAK_RULES( TIMES_NEW_ROMAN_HACK ); + TWEAK_RULES( COURIER_NEW_2_HACK ); + } + + if ( sph_test_tweak( face, family, ppem, style, glyph_index, + COMPATIBILITY_MODE_Rules, COMPATIBILITY_MODE_RULES_SIZE ) ) + loader->exec->face->sph_compatibility_mode = TRUE; + + + if ( IS_HINTED( loader->load_flags ) ) + { + if ( sph_test_tweak( face, family, ppem, style, glyph_index, + COMPATIBLE_WIDTHS_Rules, COMPATIBLE_WIDTHS_RULES_SIZE ) ) + loader->exec->compatible_widths |= TRUE; + } + } + +#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* ANSI C doesn't like empty source files */ + typedef int _tt_subpix_dummy; + +#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + +/* END */ diff --git a/src/truetype/ttsubpix.h b/src/truetype/ttsubpix.h new file mode 100644 index 0000000..8a54fc7 --- /dev/null +++ b/src/truetype/ttsubpix.h @@ -0,0 +1,110 @@ +/***************************************************************************/ +/* */ +/* ttsubpix.h */ +/* */ +/* TrueType Subpixel Hinting. */ +/* */ +/* Copyright 2010-2013 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef __TTSUBPIX_H__ +#define __TTSUBPIX_H__ + +#include +#include "ttobjs.h" +#include "ttinterp.h" + + +FT_BEGIN_HEADER + + +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + + /*************************************************************************/ + /* */ + /* ID flags to identify special functions at FDEF and runtime. */ + /* */ + /* */ +#define SPH_FDEF_INLINE_DELTA_1 0x0000001 +#define SPH_FDEF_INLINE_DELTA_2 0x0000002 +#define SPH_FDEF_DIAGONAL_STROKE 0x0000004 +#define SPH_FDEF_VACUFORM_ROUND_1 0x0000008 +#define SPH_FDEF_TTFAUTOHINT_1 0x0000010 +#define SPH_FDEF_SPACING_1 0x0000020 +#define SPH_FDEF_SPACING_2 0x0000040 +#define SPH_FDEF_TYPEMAN_STROKES 0x0000080 +#define SPH_FDEF_TYPEMAN_DIAGENDCTRL 0x0000100 + + + /*************************************************************************/ + /* */ + /* Tweak flags that are set for each glyph by the below rules. */ + /* */ + /* */ +#define SPH_TWEAK_ALLOW_X_DMOVE 0x0000001 +#define SPH_TWEAK_ALWAYS_DO_DELTAP 0x0000002 +#define SPH_TWEAK_ALWAYS_SKIP_DELTAP 0x0000004 +#define SPH_TWEAK_COURIER_NEW_2_HACK 0x0000008 +#define SPH_TWEAK_DEEMBOLDEN 0x0000010 +#define SPH_TWEAK_DO_SHPIX 0x0000020 +#define SPH_TWEAK_EMBOLDEN 0x0000040 +#define SPH_TWEAK_MIAP_HACK 0x0000080 +#define SPH_TWEAK_NORMAL_ROUND 0x0000100 +#define SPH_TWEAK_NO_ALIGNRP_AFTER_IUP 0x0000200 +#define SPH_TWEAK_NO_CALL_AFTER_IUP 0x0000400 +#define SPH_TWEAK_NO_DELTAP_AFTER_IUP 0x0000800 +#define SPH_TWEAK_PIXEL_HINTING 0x0001000 +#define SPH_TWEAK_RASTERIZER_35 0x0002000 +#define SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES 0x0004000 +#define SPH_TWEAK_SKIP_IUP 0x0008000 +#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES 0x0010000 +#define SPH_TWEAK_SKIP_OFFPIXEL_Y_MOVES 0x0020000 +#define SPH_TWEAK_TIMES_NEW_ROMAN_HACK 0x0040000 +#define SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP 0x0080000 + + + FT_LOCAL( FT_Bool ) + sph_test_tweak( TT_Face face, + const FT_String* family, + FT_UInt ppem, + const FT_String* style, + FT_UInt glyph_index, + const SPH_TweakRule* rule, + FT_UInt num_rules ); + + FT_LOCAL( FT_UInt ) + sph_test_tweak_x_scaling( TT_Face face, + const FT_String* family, + FT_UInt ppem, + const FT_String* style, + FT_UInt glyph_index ); + + FT_LOCAL( void ) + sph_set_tweaks( TT_Loader loader, + FT_UInt glyph_index ); + + + /* These macros are defined absent a method for setting them */ +#define SPH_OPTION_BITMAP_WIDTHS FALSE +#define SPH_OPTION_SET_SUBPIXEL TRUE +#define SPH_OPTION_SET_GRAYSCALE FALSE +#define SPH_OPTION_SET_COMPATIBLE_WIDTHS FALSE +#define SPH_OPTION_SET_RASTERIZER_VERSION 38 + +#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + +FT_END_HEADER + +#endif /* __TTSUBPIX_H__ */ + +/* END */ diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index 1fff15d..de9c199 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -4,7 +4,7 @@ /* */ /* AFM support for Type 1 fonts (body). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,9 +18,10 @@ #include #include "t1afm.h" -#include "t1errors.h" +#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_POSTSCRIPT_AUX_H +#include "t1errors.h" /*************************************************************************/ @@ -107,7 +108,7 @@ FT_Stream stream, AFM_FontInfo fi ) { - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Memory memory = stream->memory; FT_Byte* start; FT_Byte* limit; @@ -121,14 +122,13 @@ start = (FT_Byte*)stream->cursor; limit = (FT_Byte*)stream->limit; - p = start; /* Figure out how long the width table is. */ /* This info is a little-endian short at offset 99. */ p = start + 99; if ( p + 2 > limit ) { - error = T1_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } width_table_length = FT_PEEK_USHORT_LE( p ); @@ -148,7 +148,7 @@ if ( p + 2 > limit ) { - error = T1_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -156,7 +156,7 @@ p += 2; if ( p + 4 * fi->NumKernPair > limit ) { - error = T1_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -238,7 +238,7 @@ FT_Memory memory = stream->memory; AFM_ParserRec parser; AFM_FontInfo fi = NULL; - FT_Error error = T1_Err_Unknown_File_Format; + FT_Error error = FT_ERR( Unknown_File_Format ); T1_Font t1_font = &( (T1_Face)t1_face )->type1; @@ -269,7 +269,7 @@ } } - if ( error == T1_Err_Unknown_File_Format ) + if ( FT_ERR_EQ( error, Unknown_File_Format ) ) { FT_Byte* start = stream->cursor; @@ -366,7 +366,7 @@ if ( !fi ) - return T1_Err_Invalid_Argument; + return FT_THROW( Invalid_Argument ); for ( i = 0; i < fi->NumTrackKern; i++ ) { @@ -389,7 +389,7 @@ } } - return T1_Err_Ok; + return FT_Err_Ok; } diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c index e35d7b1..2602bdb 100644 --- a/src/type1/t1driver.c +++ b/src/type1/t1driver.c @@ -4,7 +4,7 @@ /* */ /* Type 1 driver interface (body). */ /* */ -/* Copyright 1996-2004, 2006, 2007, 2009, 2011 by */ +/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,7 +61,7 @@ { FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max ); - return T1_Err_Ok; + return FT_Err_Ok; } @@ -69,13 +69,13 @@ t1_get_name_index( T1_Face face, FT_String* glyph_name ) { - FT_Int i; - FT_String* gname; + FT_Int i; for ( i = 0; i < face->type1.num_glyphs; i++ ) { - gname = face->type1.glyph_names[i]; + FT_String* gname = face->type1.glyph_names[i]; + if ( !ft_strcmp( glyph_name, gname ) ) return (FT_UInt)i; @@ -138,7 +138,7 @@ { *afont_info = ((T1_Face)face)->type1.font_info; - return T1_Err_Ok; + return FT_Err_Ok; } @@ -148,7 +148,7 @@ { *afont_extra = ((T1_Face)face)->type1.font_extra; - return T1_Err_Ok; + return FT_Err_Ok; } @@ -167,7 +167,7 @@ { *afont_private = ((T1_Face)face)->type1.private_dict; - return T1_Err_Ok; + return FT_Err_Ok; } @@ -258,7 +258,7 @@ break; case PS_DICT_FONT_NAME: - retval = ft_strlen( type1->font_name ) + 1; + retval = (FT_Long)( ft_strlen( type1->font_name ) + 1 ); if ( value && value_len >= retval ) ft_memcpy( value, (void *)( type1->font_name ), retval ); break; @@ -278,7 +278,7 @@ case PS_DICT_CHAR_STRING_KEY: if ( idx < (FT_UInt)type1->num_glyphs ) { - retval = ft_strlen( type1->glyph_names[idx] ) + 1; + retval = (FT_Long)( ft_strlen( type1->glyph_names[idx] ) + 1 ); if ( value && value_len >= retval ) { ft_memcpy( value, (void *)( type1->glyph_names[idx] ), retval ); @@ -290,7 +290,7 @@ case PS_DICT_CHAR_STRING: if ( idx < (FT_UInt)type1->num_glyphs ) { - retval = type1->charstrings_len[idx] + 1; + retval = (FT_Long)( type1->charstrings_len[idx] + 1 ); if ( value && value_len >= retval ) { ft_memcpy( value, (void *)( type1->charstrings[idx] ), @@ -310,7 +310,7 @@ if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY && idx < (FT_UInt)type1->encoding.num_chars ) { - retval = ft_strlen( type1->encoding.char_name[idx] ) + 1; + retval = (FT_Long)( ft_strlen( type1->encoding.char_name[idx] ) + 1 ); if ( value && value_len >= retval ) { ft_memcpy( value, (void *)( type1->encoding.char_name[idx] ), @@ -329,7 +329,7 @@ case PS_DICT_SUBR: if ( idx < (FT_UInt)type1->num_subrs ) { - retval = type1->subrs_len[idx] + 1; + retval = (FT_Long)( type1->subrs_len[idx] + 1 ); if ( value && value_len >= retval ) { ft_memcpy( value, (void *)( type1->subrs[idx] ), retval - 1 ); @@ -523,31 +523,31 @@ break; case PS_DICT_VERSION: - retval = ft_strlen( type1->font_info.version ) + 1; + retval = (FT_Long)( ft_strlen( type1->font_info.version ) + 1 ); if ( value && value_len >= retval ) ft_memcpy( value, (void *)( type1->font_info.version ), retval ); break; case PS_DICT_NOTICE: - retval = ft_strlen( type1->font_info.notice ) + 1; + retval = (FT_Long)( ft_strlen( type1->font_info.notice ) + 1 ); if ( value && value_len >= retval ) ft_memcpy( value, (void *)( type1->font_info.notice ), retval ); break; case PS_DICT_FULL_NAME: - retval = ft_strlen( type1->font_info.full_name ) + 1; + retval = (FT_Long)( ft_strlen( type1->font_info.full_name ) + 1 ); if ( value && value_len >= retval ) ft_memcpy( value, (void *)( type1->font_info.full_name ), retval ); break; case PS_DICT_FAMILY_NAME: - retval = ft_strlen( type1->font_info.family_name ) + 1; + retval = (FT_Long)( ft_strlen( type1->font_info.family_name ) + 1 ); if ( value && value_len >= retval ) ft_memcpy( value, (void *)( type1->font_info.family_name ), retval ); break; case PS_DICT_WEIGHT: - retval = ft_strlen( type1->font_info.weight ) + 1; + retval = (FT_Long)( ft_strlen( type1->font_info.weight ) + 1 ); if ( value && value_len >= retval ) ft_memcpy( value, (void *)( type1->font_info.weight ), retval ); break; @@ -557,9 +557,6 @@ if ( value && value_len >= retval ) *((FT_Long *)value) = type1->font_info.italic_angle; break; - - default: - break; } return retval; @@ -669,7 +666,7 @@ right_glyph, kerning ); - return T1_Err_Ok; + return FT_Err_Ok; } @@ -708,10 +705,6 @@ T1_GlyphSlot_Init, T1_GlyphSlot_Done, -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif T1_Load_Glyph, #ifdef T1_CONFIG_OPTION_NO_AFM diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c index 80e5453..af102fd 100644 --- a/src/type1/t1gload.c +++ b/src/type1/t1gload.c @@ -4,7 +4,7 @@ /* */ /* Type 1 Glyph Loader (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */ +/* Copyright 1996-2006, 2008-2010, 2013, 2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -61,7 +61,7 @@ { T1_Face face = (T1_Face)decoder->builder.face; T1_Font type1 = &face->type1; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; #ifdef FT_CONFIG_OPTION_INCREMENTAL FT_Incremental_InterfaceRec *inc = @@ -194,7 +194,7 @@ for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ ) { /* now get load the unscaled outline */ - error = T1_Parse_Glyph( &decoder, glyph_index ); + (void)T1_Parse_Glyph( &decoder, glyph_index ); if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance ) *max_advance = decoder.builder.advance.x; @@ -203,7 +203,7 @@ psaux->t1_decoder_funcs->done( &decoder ); - return T1_Err_Ok; + return FT_Err_Ok; } @@ -227,7 +227,7 @@ for ( nn = 0; nn < count; nn++ ) advances[nn] = 0; - return T1_Err_Ok; + return FT_Err_Ok; } error = psaux->t1_decoder_funcs->init( &decoder, @@ -261,7 +261,7 @@ advances[nn] = 0; } - return T1_Err_Ok; + return FT_Err_Ok; } @@ -296,10 +296,12 @@ if ( glyph_index >= (FT_UInt)face->root.num_glyphs ) #endif /* FT_CONFIG_OPTION_INCREMENTAL */ { - error = T1_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } + FT_TRACE1(( "T1_Load_Glyph: glyph index %d\n", glyph_index )); + FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) ); if ( load_flags & FT_LOAD_NO_RECURSE ) diff --git a/src/type1/t1load.c b/src/type1/t1load.c index a0adfd4..22b3f6b 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -71,6 +71,13 @@ #include "t1errors.h" +#ifdef FT_CONFIG_OPTION_INCREMENTAL +#define IS_INCREMENTAL (FT_Bool)( face->root.internal->incremental_interface != 0 ) +#else +#define IS_INCREMENTAL 0 +#endif + + /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ @@ -99,7 +106,7 @@ { PS_Blend blend; FT_Memory memory = face->root.memory; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; blend = face->blend; @@ -123,8 +130,8 @@ /* allocate the blend `private' and `font_info' dictionaries */ if ( FT_NEW_ARRAY( blend->font_infos[1], num_designs ) || - FT_NEW_ARRAY( blend->privates[1], num_designs ) || - FT_NEW_ARRAY( blend->bboxes[1], num_designs ) || + FT_NEW_ARRAY( blend->privates [1], num_designs ) || + FT_NEW_ARRAY( blend->bboxes [1], num_designs ) || FT_NEW_ARRAY( blend->weight_vector, num_designs * 2 ) ) goto Exit; @@ -136,12 +143,12 @@ for ( nn = 2; nn <= num_designs; nn++ ) { - blend->privates[nn] = blend->privates [nn - 1] + 1; blend->font_infos[nn] = blend->font_infos[nn - 1] + 1; - blend->bboxes[nn] = blend->bboxes [nn - 1] + 1; + blend->privates [nn] = blend->privates [nn - 1] + 1; + blend->bboxes [nn] = blend->bboxes [nn - 1] + 1; } - blend->num_designs = num_designs; + blend->num_designs = num_designs; } else if ( blend->num_designs != num_designs ) goto Fail; @@ -175,7 +182,7 @@ return error; Fail: - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -189,7 +196,7 @@ FT_Error error; - error = T1_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); if ( blend ) { @@ -207,7 +214,7 @@ axis->maximum = map->design_points[map->num_points - 1]; } - error = T1_Err_Ok; + error = FT_Err_Ok; } return error; @@ -232,18 +239,11 @@ for ( j = 1; j < axismap->num_points; ++j ) { if ( ncv <= axismap->blend_points[j] ) - { - FT_Fixed t = FT_MulDiv( ncv - axismap->blend_points[j - 1], - 0x10000L, - axismap->blend_points[j] - - axismap->blend_points[j - 1] ); - return INT_TO_FIXED( axismap->design_points[j - 1] ) + - FT_MulDiv( t, - axismap->design_points[j] - - axismap->design_points[j - 1], - 1L ); - } + ( axismap->design_points[j] - axismap->design_points[j - 1] ) * + FT_DivFix( ncv - axismap->blend_points[j - 1], + axismap->blend_points[j] - + axismap->blend_points[j - 1] ); } return INT_TO_FIXED( axismap->design_points[axismap->num_points - 1] ); @@ -320,7 +320,7 @@ mmvar->num_axis = mmaster.num_axis; mmvar->num_designs = mmaster.num_designs; - mmvar->num_namedstyles = (FT_UInt)-1; /* Does not apply */ + mmvar->num_namedstyles = ~0U; /* Does not apply */ mmvar->axis = (FT_Var_Axis*)&mmvar[1]; /* Point to axes after MM_Var struct */ mmvar->namedstyle = NULL; @@ -333,8 +333,8 @@ mmvar->axis[i].def = ( mmvar->axis[i].minimum + mmvar->axis[i].maximum ) / 2; /* Does not apply. But this value is in range */ - mmvar->axis[i].strid = (FT_UInt)-1; /* Does not apply */ - mmvar->axis[i].tag = (FT_ULong)-1; /* Does not apply */ + mmvar->axis[i].strid = ~0U; /* Does not apply */ + mmvar->axis[i].tag = ~0U; /* Does not apply */ if ( ft_strcmp( mmvar->axis[i].name, "Weight" ) == 0 ) mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'g', 'h', 't' ); @@ -372,13 +372,11 @@ FT_UInt n, m; - error = T1_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( blend && blend->num_axis == num_coords ) { /* recompute the weight vector from the blend coordinates */ - error = T1_Err_Ok; - for ( n = 0; n < blend->num_designs; n++ ) { FT_Fixed result = 0x10000L; /* 1.0 fixed */ @@ -391,8 +389,10 @@ /* get current blend axis position */ factor = coords[m]; - if ( factor < 0 ) factor = 0; - if ( factor > 0x10000L ) factor = 0x10000L; + if ( factor < 0 ) + factor = 0; + if ( factor > 0x10000L ) + factor = 0x10000L; if ( ( n & ( 1 << m ) ) == 0 ) factor = 0x10000L - factor; @@ -402,7 +402,7 @@ blend->weight_vector[n] = result; } - error = T1_Err_Ok; + error = FT_Err_Ok; } return error; @@ -419,7 +419,7 @@ FT_UInt n, p; - error = T1_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( blend && blend->num_axis == num_coords ) { /* compute the blend coordinates through the blend design map */ @@ -495,7 +495,7 @@ FT_Error error; - error = T1_Err_Invalid_Argument; + error = FT_ERR( Invalid_Argument ); if ( num_coords <= 4 && num_coords > 0 ) { for ( i = 0; i < num_coords; ++i ) @@ -524,7 +524,7 @@ /* release design pos table */ FT_FREE( blend->design_pos[0] ); for ( n = 1; n < num_designs; n++ ) - blend->design_pos[n] = 0; + blend->design_pos[n] = NULL; /* release blend `private' and `font info' dictionaries */ FT_FREE( blend->privates[1] ); @@ -533,14 +533,14 @@ for ( n = 0; n < num_designs; n++ ) { - blend->privates [n] = 0; - blend->font_infos[n] = 0; - blend->bboxes [n] = 0; + blend->privates [n] = NULL; + blend->font_infos[n] = NULL; + blend->bboxes [n] = NULL; } /* release weight vectors */ FT_FREE( blend->weight_vector ); - blend->default_weight_vector = 0; + blend->default_weight_vector = NULL; /* release axis names */ for ( n = 0; n < num_axis; n++ ) @@ -567,7 +567,7 @@ { T1_TokenRec axis_tokens[T1_MAX_MM_AXIS]; FT_Int n, num_axis; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; PS_Blend blend; FT_Memory memory; @@ -577,14 +577,14 @@ T1_MAX_MM_AXIS, &num_axis ); if ( num_axis < 0 ) { - error = T1_Err_Ignore; + error = FT_ERR( Ignore ); goto Exit; } if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS ) { FT_ERROR(( "parse_blend_axis_types: incorrect number of axes: %d\n", num_axis )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -611,16 +611,16 @@ len = token->limit - token->start; if ( len == 0 ) { - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } - if ( FT_ALLOC( blend->axis_names[n], len + 1 ) ) + if ( FT_ALLOC( blend->axis_names[n], (FT_Long)( len + 1 ) ) ) goto Exit; name = (FT_Byte*)blend->axis_names[n]; FT_MEM_COPY( name, token->start, len ); - name[len] = 0; + name[len] = '\0'; } Exit: @@ -637,7 +637,7 @@ FT_Int num_axis; T1_Parser parser = &loader->parser; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; PS_Blend blend; @@ -646,7 +646,7 @@ T1_MAX_MM_DESIGNS, &num_designs ); if ( num_designs < 0 ) { - error = T1_Err_Ignore; + error = FT_ERR( Ignore ); goto Exit; } if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS ) @@ -654,7 +654,7 @@ FT_ERROR(( "parse_blend_design_positions:" " incorrect number of designs: %d\n", num_designs )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -687,7 +687,7 @@ FT_ERROR(( "parse_blend_design_positions:" " invalid number of axes: %d\n", n_axis )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -700,7 +700,7 @@ else if ( n_axis != num_axis ) { FT_ERROR(( "parse_blend_design_positions: incorrect table\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -729,7 +729,7 @@ parse_blend_design_map( T1_Face face, T1_Loader loader ) { - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; T1_Parser parser = &loader->parser; PS_Blend blend; T1_TokenRec axis_tokens[T1_MAX_MM_AXIS]; @@ -743,14 +743,14 @@ T1_MAX_MM_AXIS, &num_axis ); if ( num_axis < 0 ) { - error = T1_Err_Ignore; + error = FT_ERR( Ignore ); goto Exit; } if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS ) { FT_ERROR(( "parse_blend_design_map: incorrect number of axes: %d\n", num_axis )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -781,7 +781,7 @@ if ( num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS ) { FT_ERROR(( "parse_blend_design_map: incorrect table\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -821,7 +821,7 @@ { T1_TokenRec design_tokens[T1_MAX_MM_DESIGNS]; FT_Int num_designs; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; T1_Parser parser = &loader->parser; PS_Blend blend = face->blend; T1_Token token; @@ -834,7 +834,7 @@ T1_MAX_MM_DESIGNS, &num_designs ); if ( num_designs < 0 ) { - error = T1_Err_Ignore; + error = FT_ERR( Ignore ); goto Exit; } if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS ) @@ -842,7 +842,7 @@ FT_ERROR(( "parse_weight_vector:" " incorrect number of designs: %d\n", num_designs )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -859,7 +859,7 @@ " /BlendDesignPosition and /WeightVector have\n" " " " different number of elements\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1004,13 +1004,24 @@ max_objects = 0; } - if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY || - field->type == T1_FIELD_TYPE_FIXED_ARRAY ) - error = T1_Load_Field_Table( &loader->parser, field, - objects, max_objects, 0 ); + if ( *objects ) + { + if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY || + field->type == T1_FIELD_TYPE_FIXED_ARRAY ) + error = T1_Load_Field_Table( &loader->parser, field, + objects, max_objects, 0 ); + else + error = T1_Load_Field( &loader->parser, field, + objects, max_objects, 0 ); + } else - error = T1_Load_Field( &loader->parser, field, - objects, max_objects, 0 ); + { + FT_TRACE1(( "t1_load_keyword: ignoring keyword `%s'" + " which is not valid at this point\n" + " (probably due to missing keywords)\n", + field->ident )); + error = FT_Err_Ok; + } Exit: return error; @@ -1030,7 +1041,8 @@ static int read_binary_data( T1_Parser parser, FT_Long* size, - FT_Byte** base ) + FT_Byte** base, + FT_Bool incremental ) { FT_Byte* cur; FT_Byte* limit = parser->root.limit; @@ -1065,8 +1077,12 @@ } } - FT_ERROR(( "read_binary_data: invalid size field\n" )); - parser->root.error = T1_Err_Invalid_File_Format; + if( !incremental ) + { + FT_ERROR(( "read_binary_data: invalid size field\n" )); + parser->root.error = FT_THROW( Invalid_File_Format ); + } + return 0; } @@ -1089,9 +1105,9 @@ result = T1_ToFixedArray( parser, 6, temp, 3 ); - if ( result < 0 ) + if ( result < 6 ) { - parser->root.error = T1_Err_Invalid_File_Format; + parser->root.error = FT_THROW( Invalid_File_Format ); return; } @@ -1100,7 +1116,7 @@ if ( temp_scale == 0 ) { FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" )); - parser->root.error = T1_Err_Invalid_File_Format; + parser->root.error = FT_THROW( Invalid_File_Format ); return; } @@ -1108,8 +1124,7 @@ /* 1000 / temp_scale, because temp_scale was already multiplied by */ /* 1000 (in t1_tofixed, from psobjs.c). */ - root->units_per_EM = (FT_UShort)( FT_DivFix( 1000 * 0x10000L, - temp_scale ) >> 16 ); + root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale ); /* we need to scale the values by 1.0/temp_scale */ if ( temp_scale != 0x10000L ) @@ -1149,7 +1164,7 @@ if ( cur >= limit ) { FT_ERROR(( "parse_encoding: out of bounds\n" )); - parser->root.error = T1_Err_Invalid_File_Format; + parser->root.error = FT_THROW( Invalid_File_Format ); return; } @@ -1196,7 +1211,7 @@ char* notdef = (char *)".notdef"; - T1_Add_Table( char_table, n, notdef, 8 ); + (void)T1_Add_Table( char_table, n, notdef, 8 ); } /* Now we need to read records of the form */ @@ -1257,11 +1272,18 @@ { charcode = (FT_Int)T1_ToInt( parser ); T1_Skip_Spaces( parser ); + + /* protect against invalid charcode */ + if ( cur == parser->root.cursor ) + { + parser->root.error = FT_THROW( Unknown_File_Format ); + return; + } } cur = parser->root.cursor; - if ( *cur == '/' && cur + 2 < limit && n < count ) + if ( cur + 2 < limit && *cur == '/' && n < count ) { FT_PtrDist len; @@ -1270,6 +1292,8 @@ parser->root.cursor = cur; T1_Skip_PS_Token( parser ); + if ( parser->root.cursor >= limit ) + return; if ( parser->root.error ) return; @@ -1293,7 +1317,7 @@ /* specification (it might be an encoding for a CID type1 */ /* font, however), so we conclude that this font is NOT a */ /* type1 font. */ - parser->root.error = FT_Err_Unknown_File_Format; + parser->root.error = FT_THROW( Unknown_File_Format ); return; } } @@ -1328,7 +1352,7 @@ face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1; else - parser->root.error = T1_Err_Ignore; + parser->root.error = FT_ERR( Ignore ); } } @@ -1356,7 +1380,7 @@ T1_Skip_Spaces ( parser ); if ( parser->root.cursor >= parser->root.limit || *parser->root.cursor != ']' ) - parser->root.error = T1_Err_Invalid_File_Format; + parser->root.error = FT_THROW( Invalid_File_Format ); return; } @@ -1387,16 +1411,17 @@ FT_Byte* base; - /* If the next token isn't `dup' we are done. */ - if ( parser->root.cursor + 4 < parser->root.limit && - ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 ) + /* If we are out of data, or if the next token isn't `dup', */ + /* we are done. */ + if ( parser->root.cursor + 4 >= parser->root.limit || + ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 ) break; T1_Skip_PS_Token( parser ); /* `dup' */ idx = T1_ToInt( parser ); - if ( !read_binary_data( parser, &size, &base ) ) + if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) ) return; /* The binary string is followed by one token, e.g. `NP' */ @@ -1434,7 +1459,7 @@ /* least contain a `return'), but we support them anyway */ if ( size < face->type1.private_dict.lenIV ) { - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -1488,6 +1513,12 @@ num_glyphs = (FT_Int)T1_ToInt( parser ); + if ( num_glyphs < 0 ) + { + error = FT_THROW( Invalid_File_Format ); + goto Fail; + } + /* some fonts like Optima-Oblique not only define the /CharStrings */ /* array but access it also */ if ( num_glyphs == 0 || parser->root.error ) @@ -1565,6 +1596,11 @@ } T1_Skip_PS_Token( parser ); + if ( parser->root.cursor >= limit ) + { + error = FT_THROW( Invalid_File_Format ); + goto Fail; + } if ( parser->root.error ) return; @@ -1573,16 +1609,16 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } cur++; /* skip `/' */ len = parser->root.cursor - cur; - if ( !read_binary_data( parser, &size, &base ) ) + if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) ) return; /* for some non-standard fonts like `Optima' which provides */ @@ -1615,7 +1651,7 @@ if ( size <= face->type1.private_dict.lenIV ) { - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -1819,7 +1855,7 @@ parser->root.cursor = base; parser->root.limit = base + size; - parser->root.error = T1_Err_Ok; + parser->root.error = FT_Err_Ok; limit = parser->root.limit; @@ -1871,8 +1907,8 @@ parser->root.cursor = start_binary; - if ( !read_binary_data( parser, &s, &b ) ) - return T1_Err_Invalid_File_Format; + if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) ) + return FT_THROW( Invalid_File_Format ); have_integer = 0; } @@ -1884,8 +1920,8 @@ parser->root.cursor = start_binary; - if ( !read_binary_data( parser, &s, &b ) ) - return T1_Err_Invalid_File_Format; + if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) ) + return FT_THROW( Invalid_File_Format ); have_integer = 0; } @@ -1957,8 +1993,8 @@ if ( !( dict & keyword->dict ) ) { - FT_TRACE1(( "parse_dict: found %s but ignoring it " - "since it is in the wrong dictionary\n", + FT_TRACE1(( "parse_dict: found `%s' but ignoring it" + " since it is in the wrong dictionary\n", keyword->ident )); break; } @@ -1970,10 +2006,10 @@ parser->root.error = t1_load_keyword( face, loader, keyword ); - if ( parser->root.error != T1_Err_Ok ) + if ( parser->root.error != FT_Err_Ok ) { - if ( FT_ERROR_BASE( parser->root.error ) == FT_Err_Ignore ) - parser->root.error = T1_Err_Ok; + if ( FT_ERR_EQ( parser->root.error, Ignore ) ) + parser->root.error = FT_Err_Ok; else return parser->root.error; } @@ -2160,13 +2196,11 @@ type1->subrs_len = loader.subrs.lengths; } -#ifdef FT_CONFIG_OPTION_INCREMENTAL - if ( !face->root.internal->incremental_interface ) -#endif + if ( !IS_INCREMENTAL ) if ( !loader.charstrings.init ) { FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); } loader.charstrings.init = 0; @@ -2185,7 +2219,6 @@ if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY ) { FT_Int charcode, idx, min_char, max_char; - FT_Byte* char_name; FT_Byte* glyph_name; @@ -2200,6 +2233,9 @@ charcode = 0; for ( ; charcode < loader.encoding_table.max_elems; charcode++ ) { + FT_Byte* char_name; + + type1->encoding.char_index[charcode] = 0; type1->encoding.char_name [charcode] = (char *)".notdef"; diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c index b685f2f..e11770f 100644 --- a/src/type1/t1objs.c +++ b/src/type1/t1objs.c @@ -4,7 +4,7 @@ /* */ /* Type 1 objects manager (body). */ /* */ -/* Copyright 1996-2009, 2011 by */ +/* Copyright 1996-2009, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -95,7 +95,7 @@ T1_Size_Init( FT_Size t1size ) /* T1_Size */ { T1_Size size = (T1_Size)t1size; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size ); @@ -131,7 +131,7 @@ size->root.metrics.y_scale, 0, 0 ); - return T1_Err_Ok; + return FT_Err_Ok; } @@ -326,7 +326,7 @@ if ( !psaux ) { FT_ERROR(( "T1_Face_Init: cannot access `psaux' module\n" )); - error = T1_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -348,7 +348,7 @@ if ( face_index > 0 ) { FT_ERROR(( "T1_Face_Init: invalid face index\n" )); - error = T1_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -364,10 +364,10 @@ root->num_glyphs = type1->num_glyphs; root->face_index = 0; - root->face_flags = FT_FACE_FLAG_SCALABLE | - FT_FACE_FLAG_HORIZONTAL | - FT_FACE_FLAG_GLYPH_NAMES | - FT_FACE_FLAG_HINTER; + root->face_flags |= FT_FACE_FLAG_SCALABLE | + FT_FACE_FLAG_HORIZONTAL | + FT_FACE_FLAG_GLYPH_NAMES | + FT_FACE_FLAG_HINTER; if ( info->is_fixed_pitch ) root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH; @@ -489,7 +489,7 @@ if ( !error ) root->max_advance_width = (FT_Short)FIXED_TO_INT( max_advance ); else - error = T1_Err_Ok; /* clear error */ + error = FT_Err_Ok; /* clear error */ } root->max_advance_height = root->height; @@ -517,7 +517,8 @@ charmap.encoding = FT_ENCODING_UNICODE; error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL ); - if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + if ( error && + FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) ) goto Exit; error = FT_Err_Ok; @@ -590,7 +591,7 @@ { FT_UNUSED( driver ); - return T1_Err_Ok; + return FT_Err_Ok; } diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c index 4955279..ccf9f4c 100644 --- a/src/type1/t1parse.c +++ b/src/type1/t1parse.c @@ -4,7 +4,7 @@ /* */ /* Type 1 parser (body). */ /* */ -/* Copyright 1996-2005, 2008, 2009, 2012 by */ +/* Copyright 1996-2005, 2008, 2009, 2012-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -119,10 +119,10 @@ if ( !FT_FRAME_ENTER( header_length ) ) { - error = T1_Err_Ok; + error = FT_Err_Ok; if ( ft_memcmp( stream->cursor, header_string, header_length ) != 0 ) - error = T1_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); FT_FRAME_EXIT(); } @@ -158,7 +158,7 @@ error = check_type1_format( stream, "%!PS-AdobeFont", 14 ); if ( error ) { - if ( error != T1_Err_Unknown_File_Format ) + if ( FT_ERR_NEQ( error, Unknown_File_Format ) ) goto Exit; error = check_type1_format( stream, "%!FontType", 10 ); @@ -263,7 +263,7 @@ { FT_Stream stream = parser->stream; FT_Memory memory = parser->root.memory; - FT_Error error = T1_Err_Ok; + FT_Error error = FT_Err_Ok; FT_ULong size; @@ -299,7 +299,7 @@ { FT_ERROR(( "T1_Get_Private_Dict:" " invalid private dictionary section\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -313,7 +313,7 @@ error = read_pfb_tag( stream, &tag, &size ); if ( error || tag != 0x8002U ) { - error = T1_Err_Ok; + error = FT_Err_Ok; break; } @@ -332,9 +332,11 @@ /* dictionary block in the heap. */ /* first of all, look at the `eexec' keyword */ - FT_Byte* cur = parser->base_dict; - FT_Byte* limit = cur + parser->base_len; - FT_Byte c; + FT_Byte* cur = parser->base_dict; + FT_Byte* limit = cur + parser->base_len; + FT_Byte c; + FT_Pointer pos_lf; + FT_Bool test_cr; Again: @@ -342,7 +344,7 @@ { c = cur[0]; if ( c == 'e' && cur + 9 < limit ) /* 9 = 5 letters for `eexec' + */ - /* newline + 4 chars */ + /* whitespace + 4 chars */ { if ( cur[1] == 'e' && cur[2] == 'x' && @@ -355,7 +357,7 @@ { FT_ERROR(( "T1_Get_Private_Dict:" " could not find `eexec' keyword\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } } @@ -364,7 +366,8 @@ /* or string (as e.g. in u003043t.gsf from ghostscript) */ parser->root.cursor = parser->base_dict; - parser->root.limit = cur + 9; + /* set limit to `eexec' + whitespace + 4 characters */ + parser->root.limit = cur + 10; cur = parser->root.cursor; limit = parser->root.limit; @@ -396,27 +399,37 @@ parser->root.limit = parser->base_dict + parser->base_len; T1_Skip_PS_Token( parser ); - cur = parser->root.cursor; + cur = parser->root.cursor; + limit = parser->root.limit; - /* according to the Type1 spec, the first cipher byte must not be */ + /* According to the Type 1 spec, the first cipher byte must not be */ /* an ASCII whitespace character code (blank, tab, carriage return */ /* or line feed). We have seen Type 1 fonts with two line feed */ /* characters... So skip now all whitespace character codes. */ - while ( cur < limit && - ( *cur == ' ' || - *cur == '\t' || - *cur == '\r' || - *cur == '\n' ) ) + /* */ + /* On the other hand, Adobe's Type 1 parser handles fonts just */ + /* fine that are violating this limitation, so we add a heuristic */ + /* test to stop at \r only if it is not used for EOL. */ + + pos_lf = ft_memchr( cur, '\n', limit - cur ); + test_cr = FT_BOOL( !pos_lf || + pos_lf > ft_memchr( cur, '\r', limit - cur ) ); + + while ( cur < limit && + ( *cur == ' ' || + *cur == '\t' || + (test_cr && *cur == '\r' ) || + *cur == '\n' ) ) ++cur; if ( cur >= limit ) { FT_ERROR(( "T1_Get_Private_Dict:" " `eexec' not properly terminated\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } - size = parser->base_len - ( cur - parser->base_dict ); + size = (FT_ULong)( parser->base_len - ( cur - parser->base_dict ) ); if ( parser->in_memory ) { @@ -437,11 +450,12 @@ /* now determine whether the private dictionary is encoded in binary */ /* or hexadecimal ASCII format -- decode it accordingly */ - /* we need to access the next 4 bytes (after the final \r following */ - /* the `eexec' keyword); if they all are hexadecimal digits, then */ - /* we have a case of ASCII storage */ + /* we need to access the next 4 bytes (after the final whitespace */ + /* following the `eexec' keyword); if they all are hexadecimal */ + /* digits, then we have a case of ASCII storage */ - if ( ft_isxdigit( cur[0] ) && ft_isxdigit( cur[1] ) && + if ( cur + 3 < limit && + ft_isxdigit( cur[0] ) && ft_isxdigit( cur[1] ) && ft_isxdigit( cur[2] ) && ft_isxdigit( cur[3] ) ) { /* ASCII hexadecimal encoding */ @@ -471,7 +485,7 @@ { FT_ERROR(( "T1_Get_Private_Dict:" " invalid private dictionary section\n" )); - error = T1_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c index 9b93209..3ad1bde 100644 --- a/src/type42/t42drivr.c +++ b/src/type42/t42drivr.c @@ -4,7 +4,8 @@ /* */ /* High-level Type 42 driver interface (body). */ /* */ -/* Copyright 2002-2004, 2006, 2007, 2009, 2011 by Roberto Alameda. */ +/* Copyright 2002-2004, 2006, 2007, 2009, 2011, 2013 by */ +/* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -63,7 +64,7 @@ { FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max ); - return T42_Err_Ok; + return FT_Err_Ok; } @@ -71,13 +72,13 @@ t42_get_name_index( T42_Face face, FT_String* glyph_name ) { - FT_Int i; - FT_String* gname; + FT_Int i; for ( i = 0; i < face->type1.num_glyphs; i++ ) { - gname = face->type1.glyph_names[i]; + FT_String* gname = face->type1.glyph_names[i]; + if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) ) return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] ); @@ -125,7 +126,7 @@ { *afont_info = ((T42_Face)face)->type1.font_info; - return T42_Err_Ok; + return FT_Err_Ok; } @@ -135,7 +136,7 @@ { *afont_extra = ((T42_Face)face)->type1.font_extra; - return T42_Err_Ok; + return FT_Err_Ok; } @@ -154,7 +155,7 @@ { *afont_private = ((T42_Face)face)->type1.private_dict; - return T42_Err_Ok; + return FT_Err_Ok; } @@ -229,10 +230,6 @@ T42_GlyphSlot_Init, T42_GlyphSlot_Done, -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif T42_GlyphSlot_Load, 0, /* FT_Face_GetKerningFunc */ diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index c6053af..915e81f 100644 --- a/src/type42/t42objs.c +++ b/src/type42/t42objs.c @@ -4,7 +4,7 @@ /* */ /* Type 42 objects manager (body). */ /* */ -/* Copyright 2002-2009, 2011 */ +/* Copyright 2002-2009, 2011, 2013 */ /* by Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T42_Face_Init' passes the correct size */ + face->ttf_size = 12; + error = t42_parser_init( parser, face->root.stream, memory, @@ -63,7 +69,7 @@ { FT_ERROR(( "T42_Open_Face: cannot handle FontType %d\n", type1->font_type )); - error = T42_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -74,7 +80,7 @@ if ( !loader.charstrings.init ) { FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); } loader.charstrings.init = 0; @@ -93,7 +99,6 @@ if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY ) { FT_Int charcode, idx, min_char, max_char; - FT_Byte* char_name; FT_Byte* glyph_name; @@ -109,6 +114,9 @@ charcode = 0; for ( ; charcode < loader.encoding_table.max_elems; charcode++ ) { + FT_Byte* char_name; + + type1->encoding.char_index[charcode] = 0; type1->encoding.char_name [charcode] = (char *)".notdef"; @@ -169,7 +177,6 @@ FT_UNUSED( num_params ); FT_UNUSED( params ); - FT_UNUSED( face_index ); FT_UNUSED( stream ); @@ -185,7 +192,7 @@ if ( !psaux ) { FT_ERROR(( "T42_Face_Init: cannot access `psaux' module\n" )); - error = T42_Err_Missing_Module; + error = FT_THROW( Missing_Module ); goto Exit; } @@ -204,7 +211,7 @@ if ( face_index > 0 ) { FT_ERROR(( "T42_Face_Init: invalid face index\n" )); - error = T42_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -217,9 +224,9 @@ root->num_charmaps = 0; root->face_index = 0; - root->face_flags = FT_FACE_FLAG_SCALABLE | - FT_FACE_FLAG_HORIZONTAL | - FT_FACE_FLAG_GLYPH_NAMES; + root->face_flags |= FT_FACE_FLAG_SCALABLE | + FT_FACE_FLAG_HORIZONTAL | + FT_FACE_FLAG_GLYPH_NAMES; if ( info->is_fixed_pitch ) root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH; @@ -285,7 +292,9 @@ FT_Open_Args args; - args.flags = FT_OPEN_MEMORY; + args.flags = FT_OPEN_MEMORY | FT_OPEN_DRIVER; + args.driver = FT_Get_Module( FT_FACE_LIBRARY( face ), + "truetype" ); args.memory_base = face->ttf_data; args.memory_size = face->ttf_size; @@ -347,7 +356,8 @@ charmap.encoding = FT_ENCODING_UNICODE; error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL ); - if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + if ( error && + FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) ) goto Exit; error = FT_Err_Ok; @@ -481,12 +491,12 @@ if ( !ttmodule ) { FT_ERROR(( "T42_Driver_Init: cannot access `truetype' module\n" )); - return T42_Err_Missing_Module; + return FT_THROW( Missing_Module ); } driver->ttclazz = (FT_Driver_Class)ttmodule->clazz; - return T42_Err_Ok; + return FT_Err_Ok; } @@ -504,7 +514,7 @@ FT_Face face = size->face; T42_Face t42face = (T42_Face)face; FT_Size ttsize; - FT_Error error = T42_Err_Ok; + FT_Error error; error = FT_New_Size( t42face->ttf_face, &ttsize ); @@ -580,7 +590,7 @@ FT_Face face = t42slot->face; T42_Face t42face = (T42_Face)face; FT_GlyphSlot ttslot; - FT_Error error = T42_Err_Ok; + FT_Error error = FT_Err_Ok; if ( face->glyph == NULL ) @@ -645,6 +655,8 @@ FT_Driver_Class ttclazz = ((T42_Driver)glyph->face->driver)->ttclazz; + FT_TRACE1(( "T42_GlyphSlot_Load: glyph index %d\n", glyph_index )); + t42_glyphslot_clear( t42slot->ttslot ); error = ttclazz->load_glyph( t42slot->ttslot, t42size->ttsize, diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index 468b463..5070853 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -4,7 +4,7 @@ /* */ /* Type 42 font parser (body). */ /* */ -/* Copyright 2002-2012 by */ +/* Copyright 2002-2014 by */ /* Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -144,7 +144,7 @@ FT_Memory memory, PSAux_Service psaux ) { - FT_Error error = T42_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Long size; @@ -176,7 +176,7 @@ if ( ft_memcmp( stream->cursor, "%!PS-TrueTypeFont", 17 ) != 0 ) { FT_TRACE2(( " not a Type42 font\n" )); - error = T42_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); } FT_FRAME_EXIT(); @@ -255,18 +255,31 @@ FT_Face root = (FT_Face)&face->root; FT_Fixed temp[6]; FT_Fixed temp_scale; + FT_Int result; - (void)T1_ToFixedArray( parser, 6, temp, 3 ); + result = T1_ToFixedArray( parser, 6, temp, 3 ); + + if ( result < 6 ) + { + parser->root.error = FT_THROW( Invalid_File_Format ); + return; + } temp_scale = FT_ABS( temp[3] ); + if ( temp_scale == 0 ) + { + FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" )); + parser->root.error = FT_THROW( Invalid_File_Format ); + return; + } + /* Set Units per EM based on FontMatrix values. We set the value to */ /* 1000 / temp_scale, because temp_scale was already multiplied by */ /* 1000 (in t1_tofixed, from psobjs.c). */ - root->units_per_EM = (FT_UShort)( FT_DivFix( 1000 * 0x10000L, - temp_scale ) >> 16 ); + root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale ); /* we need to scale the values by 1.0/temp_scale */ if ( temp_scale != 0x10000L ) @@ -276,7 +289,7 @@ temp[2] = FT_DivFix( temp[2], temp_scale ); temp[4] = FT_DivFix( temp[4], temp_scale ); temp[5] = FT_DivFix( temp[5], temp_scale ); - temp[3] = 0x10000L; + temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L; } matrix->xx = temp[0]; @@ -306,7 +319,7 @@ if ( cur >= limit ) { FT_ERROR(( "t42_parse_encoding: out of bounds\n" )); - parser->root.error = T42_Err_Invalid_File_Format; + parser->root.error = FT_THROW( Invalid_File_Format ); return; } @@ -315,7 +328,7 @@ if ( ft_isdigit( *cur ) || *cur == '[' ) { T1_Encoding encode = &face->type1.encoding; - FT_UInt count, n; + FT_Int count, n; PS_Table char_table = &loader->encoding_table; FT_Memory memory = parser->root.memory; FT_Error error; @@ -330,7 +343,7 @@ parser->root.cursor++; } else - count = (FT_UInt)T1_ToInt( parser ); + count = (FT_Int)T1_ToInt( parser ); T1_Skip_Spaces( parser ); if ( parser->root.cursor >= limit ) @@ -353,7 +366,7 @@ char* notdef = (char *)".notdef"; - T1_Add_Table( char_table, n, notdef, 8 ); + (void)T1_Add_Table( char_table, n, notdef, 8 ); } /* Now we need to read records of the form */ @@ -418,7 +431,7 @@ cur = parser->root.cursor; - if ( *cur == '/' && cur + 2 < limit && n < count ) + if ( cur + 2 < limit && *cur == '/' && n < count ) { FT_PtrDist len; @@ -427,6 +440,8 @@ parser->root.cursor = cur; T1_Skip_PS_Token( parser ); + if ( parser->root.cursor >= limit ) + return; if ( parser->root.error ) return; @@ -440,6 +455,19 @@ n++; } + else if ( only_immediates ) + { + /* Since the current position is not updated for */ + /* immediates-only mode we would get an infinite loop if */ + /* we don't do anything here. */ + /* */ + /* This encoding array is not valid according to the type1 */ + /* specification (it might be an encoding for a CID type1 */ + /* font, however), so we conclude that this font is NOT a */ + /* type1 font. */ + parser->root.error = FT_THROW( Unknown_File_Format ); + return; + } } else { @@ -451,8 +479,8 @@ T1_Skip_Spaces( parser ); } - face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY; - parser->root.cursor = cur; + face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY; + parser->root.cursor = cur; } /* Otherwise, we should have either `StandardEncoding', */ @@ -472,10 +500,7 @@ face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1; else - { - FT_ERROR(( "t42_parse_encoding: invalid token\n" )); - parser->root.error = T42_Err_Invalid_File_Format; - } + parser->root.error = FT_THROW( Ignore ); } } @@ -499,7 +524,7 @@ FT_Byte* limit = parser->root.limit; FT_Error error; FT_Int num_tables = 0; - FT_ULong count, ttf_size = 0; + FT_ULong count; FT_Long n, string_size, old_string_size, real_size; FT_Byte* string_buf = NULL; @@ -527,7 +552,7 @@ if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' ) { FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -555,6 +580,12 @@ /* don't include delimiters */ string_size = (FT_Long)( ( parser->root.cursor - cur - 2 + 1 ) / 2 ); + if ( !string_size ) + { + FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Fail; + } if ( FT_REALLOC( string_buf, old_string_size, string_size ) ) goto Fail; @@ -572,7 +603,7 @@ { FT_ERROR(( "t42_parse_sfnts: " "can't handle mixed binary and hex strings\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -580,7 +611,7 @@ if ( string_size < 0 ) { FT_ERROR(( "t42_parse_sfnts: invalid string size\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -592,8 +623,8 @@ if ( limit - parser->root.cursor < string_size ) { - FT_ERROR(( "t42_parse_sfnts: too many binary data\n" )); - error = T42_Err_Invalid_File_Format; + FT_ERROR(( "t42_parse_sfnts: too much binary data\n" )); + error = FT_THROW( Invalid_File_Format ); goto Fail; } else @@ -603,7 +634,7 @@ if ( !string_buf ) { FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -615,7 +646,7 @@ if ( !string_size ) { FT_ERROR(( "t42_parse_sfnts: invalid string\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -632,18 +663,25 @@ } else { - num_tables = 16 * face->ttf_data[4] + face->ttf_data[5]; - status = BEFORE_TABLE_DIR; - ttf_size = 12 + 16 * num_tables; + num_tables = 16 * face->ttf_data[4] + face->ttf_data[5]; + status = BEFORE_TABLE_DIR; + face->ttf_size = 12 + 16 * num_tables; + + if ( (FT_ULong)( limit - parser->root.cursor ) < face->ttf_size ) + { + FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Fail; + } - if ( FT_REALLOC( face->ttf_data, 12, ttf_size ) ) + if ( FT_REALLOC( face->ttf_data, 12, face->ttf_size ) ) goto Fail; } /* fall through */ case BEFORE_TABLE_DIR: /* the offset table is read; read the table directory */ - if ( count < ttf_size ) + if ( count < face->ttf_size ) { face->ttf_data[count++] = string_buf[n]; continue; @@ -662,25 +700,24 @@ len = FT_PEEK_ULONG( p ); /* Pad to a 4-byte boundary length */ - ttf_size += ( len + 3 ) & ~3; + face->ttf_size += ( len + 3 ) & ~3; } - status = OTHER_TABLES; - face->ttf_size = ttf_size; + status = OTHER_TABLES; /* there are no more than 256 tables, so no size check here */ if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables, - ttf_size + 1 ) ) + face->ttf_size + 1 ) ) goto Fail; } /* fall through */ case OTHER_TABLES: /* all other tables are just copied */ - if ( count >= ttf_size ) + if ( count >= face->ttf_size ) { - FT_ERROR(( "t42_parse_sfnts: too many binary data\n" )); - error = T42_Err_Invalid_File_Format; + FT_ERROR(( "t42_parse_sfnts: too much binary data\n" )); + error = FT_THROW( Invalid_File_Format ); goto Fail; } face->ttf_data[count++] = string_buf[n]; @@ -691,7 +728,7 @@ } /* if control reaches this point, the format was not valid */ - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); Fail: parser->root.error = error; @@ -727,7 +764,7 @@ if ( parser->root.cursor >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -769,14 +806,14 @@ else { FT_ERROR(( "t42_parse_charstrings: invalid token\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } if ( parser->root.cursor >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -825,6 +862,12 @@ break; T1_Skip_PS_Token( parser ); + if ( parser->root.cursor >= limit ) + { + FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Fail; + } if ( parser->root.error ) return; @@ -833,10 +876,10 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -867,7 +910,7 @@ if ( parser->root.cursor >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -890,7 +933,7 @@ if ( !notdef_found ) { FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph\n" )); - error = T42_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -1034,7 +1077,7 @@ parser->root.cursor = base; parser->root.limit = base + size; - parser->root.error = T42_Err_Ok; + parser->root.error = FT_Err_Ok; limit = parser->root.limit; diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index a551896..4705c53 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -4,7 +4,7 @@ /* */ /* FreeType font driver for Windows FNT/FON files */ /* */ -/* Copyright 1996-2004, 2006-2012 by */ +/* Copyright 1996-2004, 2006-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* Copyright 2003 Huw D M Davies for Codeweavers */ /* Copyright 2007 Dmitry Timoshkov for Codeweavers */ @@ -72,12 +72,12 @@ FT_FRAME_START( 248 ), FT_FRAME_ULONG_LE ( magic ), /* PE00 */ - FT_FRAME_USHORT_LE ( machine ), /* 0x014c - i386 */ + FT_FRAME_USHORT_LE ( machine ), /* 0x014C - i386 */ FT_FRAME_USHORT_LE ( number_of_sections ), FT_FRAME_SKIP_BYTES( 12 ), FT_FRAME_USHORT_LE ( size_of_optional_header ), FT_FRAME_SKIP_BYTES( 2 ), - FT_FRAME_USHORT_LE ( magic32 ), /* 0x10b */ + FT_FRAME_USHORT_LE ( magic32 ), /* 0x10B */ FT_FRAME_SKIP_BYTES( 110 ), FT_FRAME_ULONG_LE ( rsrc_virtual_address ), FT_FRAME_ULONG_LE ( rsrc_size ), @@ -225,7 +225,7 @@ header->version != 0x300 ) { FT_TRACE2(( " not a Windows FNT file\n" )); - error = FNT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -235,7 +235,7 @@ if ( header->file_size < size ) { FT_TRACE2(( " not a Windows FNT file\n" )); - error = FNT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -253,7 +253,7 @@ if ( header->file_type & 1 ) { FT_TRACE2(( "[can't handle vector FNT fonts]\n" )); - error = FNT_Err_Unknown_File_Format; + error = FT_THROW( Unknown_File_Format ); goto Exit; } @@ -284,7 +284,7 @@ FT_STREAM_READ_FIELDS( winmz_header_fields, &mz_header ) ) goto Exit; - error = FNT_Err_Unknown_File_Format; + error = FT_ERR( Unknown_File_Format ); if ( mz_header.magic == WINFNT_MZ_MAGIC ) { /* yes, now look for an NE header in the file */ @@ -297,7 +297,7 @@ FT_STREAM_READ_FIELDS( winne_header_fields, &ne_header ) ) goto Exit; - error = FNT_Err_Unknown_File_Format; + error = FT_ERR( Unknown_File_Format ); if ( ne_header.magic == WINFNT_NE_MAGIC ) { /* good, now look into the resource table for each FNT resource */ @@ -344,7 +344,7 @@ if ( !font_count || !font_offset ) { FT_TRACE2(( "this file doesn't contain any FNT resources\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -353,7 +353,7 @@ if ( font_count * 118UL > stream->size ) { FT_TRACE2(( "invalid number of faces\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -361,7 +361,7 @@ if ( face_index >= font_count ) { - error = FNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } else if ( face_index < 0 ) @@ -412,12 +412,12 @@ pe32_header.rsrc_size )); if ( pe32_header.magic != WINFNT_PE_MAGIC /* check full signature */ || - pe32_header.machine != 0x014c /* i386 */ || - pe32_header.size_of_optional_header != 0xe0 /* FIXME */ || - pe32_header.magic32 != 0x10b ) + pe32_header.machine != 0x014C /* i386 */ || + pe32_header.size_of_optional_header != 0xE0 /* FIXME */ || + pe32_header.magic32 != 0x10B ) { FT_TRACE2(( "this file has an invalid PE header\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -440,7 +440,7 @@ } FT_TRACE2(( "this file doesn't contain any resources\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; Found_rsrc_section: @@ -462,7 +462,7 @@ if ( !(dir_entry1.offset & 0x80000000UL ) /* DataIsDirectory */ ) { - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -486,7 +486,7 @@ if ( !(dir_entry2.offset & 0x80000000UL ) /* DataIsDirectory */ ) { - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -510,7 +510,7 @@ if ( dir_entry2.offset & 0x80000000UL /* DataIsDirectory */ ) { - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -561,13 +561,13 @@ if ( !face->root.num_faces ) { FT_TRACE2(( "this file doesn't contain any RT_FONT resources\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } if ( face_index >= face->root.num_faces ) { - error = FNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } } @@ -591,11 +591,14 @@ static FT_Error - fnt_cmap_init( FNT_CMap cmap ) + fnt_cmap_init( FNT_CMap cmap, + FT_Pointer pointer ) { FNT_Face face = (FNT_Face)FT_CMAP_FACE( cmap ); FNT_Font font = face->font; + FT_UNUSED( pointer ); + cmap->first = (FT_UInt32) font->header.first_char; cmap->count = (FT_UInt32)( font->header.last_char - cmap->first + 1 ); @@ -705,7 +708,7 @@ if ( !error && face_index < 0 ) goto Exit; - if ( error == FNT_Err_Unknown_File_Format ) + if ( FT_ERR_EQ( error, Unknown_File_Format ) ) { /* this didn't work; try to load a single FNT font */ FNT_Font font; @@ -724,7 +727,7 @@ if ( !error ) { if ( face_index > 0 ) - error = FNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); else if ( face_index < 0 ) goto Exit; } @@ -743,8 +746,8 @@ root->face_index = face_index; - root->face_flags = FT_FACE_FLAG_FIXED_SIZES | - FT_FACE_FLAG_HORIZONTAL; + root->face_flags |= FT_FACE_FLAG_FIXED_SIZES | + FT_FACE_FLAG_HORIZONTAL; if ( font->header.avg_width == font->header.max_width ) root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH; @@ -836,7 +839,7 @@ if ( font->header.last_char < font->header.first_char ) { FT_TRACE2(( "invalid number of glyphs\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } @@ -847,7 +850,7 @@ if ( font->header.face_name_offset >= font->header.file_size ) { FT_TRACE2(( "invalid family name offset\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Fail; } family_size = font->header.file_size - font->header.face_name_offset; @@ -909,7 +912,7 @@ header->ascent ) * 64; size->metrics.max_advance = header->max_width * 64; - return FNT_Err_Ok; + return FT_Err_Ok; } @@ -920,7 +923,7 @@ FNT_Face face = (FNT_Face)size->face; FT_WinFNT_Header header = &face->font->header; FT_Bitmap_Size* bsize = size->face->available_sizes; - FT_Error error = FNT_Err_Invalid_Pixel_Size; + FT_Error error = FT_ERR( Invalid_Pixel_Size ); FT_Long height; @@ -931,16 +934,16 @@ { case FT_SIZE_REQUEST_TYPE_NOMINAL: if ( height == ( ( bsize->y_ppem + 32 ) >> 6 ) ) - error = FNT_Err_Ok; + error = FT_Err_Ok; break; case FT_SIZE_REQUEST_TYPE_REAL_DIM: if ( height == header->pixel_height ) - error = FNT_Err_Ok; + error = FT_Err_Ok; break; default: - error = FNT_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); break; } @@ -959,7 +962,7 @@ { FNT_Face face = (FNT_Face)FT_SIZE_FACE( size ); FNT_Font font; - FT_Error error = FNT_Err_Ok; + FT_Error error = FT_Err_Ok; FT_Byte* p; FT_Int len; FT_Bitmap* bitmap = &slot->bitmap; @@ -971,32 +974,44 @@ if ( !face ) { - error = FNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } font = face->font; - if ( !font || + if ( !font || glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) ) { - error = FNT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } + FT_TRACE1(( "FNT_Load_Glyph: glyph index %d\n", glyph_index )); + if ( glyph_index > 0 ) glyph_index--; /* revert to real index */ else - glyph_index = font->header.default_char; /* the .notdef glyph */ + glyph_index = font->header.default_char; /* the `.notdef' glyph */ new_format = FT_BOOL( font->header.version == 0x300 ); len = new_format ? 6 : 4; - /* jump to glyph entry */ - p = font->fnt_frame + ( new_format ? 148 : 118 ) + len * glyph_index; + /* get glyph width and offset */ + offset = ( new_format ? 148 : 118 ) + len * glyph_index; + + if ( offset >= font->header.file_size - 2 - ( new_format ? 4 : 2 ) ) + { + FT_TRACE2(( "invalid FNT offset\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + } + + p = font->fnt_frame + offset; bitmap->width = FT_NEXT_SHORT_LE( p ); + /* jump to glyph entry */ if ( new_format ) offset = FT_NEXT_ULONG_LE( p ); else @@ -1005,7 +1020,7 @@ if ( offset >= font->header.file_size ) { FT_TRACE2(( "invalid FNT offset\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1024,10 +1039,10 @@ bitmap->rows = font->header.pixel_height; bitmap->pixel_mode = FT_PIXEL_MODE_MONO; - if ( offset + pitch * bitmap->rows >= font->header.file_size ) + if ( offset + pitch * bitmap->rows > font->header.file_size ) { FT_TRACE2(( "invalid bitmap width\n" )); - error = FNT_Err_Invalid_File_Format; + error = FT_THROW( Invalid_File_Format ); goto Exit; } @@ -1141,10 +1156,6 @@ 0, /* FT_Slot_InitFunc */ 0, /* FT_Slot_DoneFunc */ -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS - ft_stub_set_char_sizes, - ft_stub_set_pixel_sizes, -#endif FNT_Load_Glyph, 0, /* FT_Face_GetKerningFunc */ diff --git a/vms_make.com b/vms_make.com index 1aa83e7..8d8fdf7 100644 --- a/vms_make.com +++ b/vms_make.com @@ -1,6 +1,6 @@ $! make Freetype2 under OpenVMS $! -$! Copyright 2003, 2004, 2006, 2007 by +$! Copyright 2003, 2004, 2006, 2007, 2013 by $! David Turner, Robert Wilhelm, and Werner Lemberg. $! $! This file is part of the FreeType project, and may only be used, modified, @@ -172,7 +172,7 @@ $ deck all : - define freetype [--.include.freetype] + define freetype [--.include] define psaux [-.psaux] define autofit [-.autofit] define autohint [-.autohint] -- 2.7.4