From b6385107a59d1734e9c8edb4a06005319d27fc28 Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Mon, 2 Apr 2018 19:41:11 +0900 Subject: [PATCH] Imported Upstream version 2.9 --- CMakeLists.txt | 8 +- ChangeLog | 5970 ++++++++++++--------- ChangeLog.20 | 2 +- ChangeLog.21 | 2 +- ChangeLog.22 | 6 +- ChangeLog.23 | 50 +- ChangeLog.24 | 66 +- ChangeLog.25 | 18 +- ChangeLog.26 | 16 +- ChangeLog.27 | 2106 ++++++++ Jamfile | 4 +- Jamrules | 2 +- Makefile | 2 +- README | 18 +- README.git | 2 +- autogen.sh | 2 +- builds/amiga/README | 2 +- builds/amiga/include/config/ftconfig.h | 2 +- builds/amiga/include/config/ftmodule.h | 2 +- builds/amiga/makefile | 2 +- builds/amiga/makefile.os4 | 2 +- builds/amiga/smakefile | 2 +- builds/amiga/src/base/ftdebug.c | 2 +- builds/amiga/src/base/ftsystem.c | 2 +- builds/ansi/ansi-def.mk | 2 +- builds/ansi/ansi.mk | 2 +- builds/beos/beos-def.mk | 2 +- builds/beos/beos.mk | 2 +- builds/beos/detect.mk | 2 +- builds/cmake/iOS.cmake | 2 +- builds/cmake/testbuild.sh | 2 +- builds/compiler/ansi-cc.mk | 2 +- builds/compiler/bcc-dev.mk | 2 +- builds/compiler/bcc.mk | 2 +- builds/compiler/emx.mk | 2 +- builds/compiler/gcc-dev.mk | 2 +- builds/compiler/gcc.mk | 2 +- builds/compiler/intelc.mk | 2 +- builds/compiler/unix-lcc.mk | 2 +- builds/compiler/visualage.mk | 2 +- builds/compiler/visualc.mk | 2 +- builds/compiler/watcom.mk | 2 +- builds/compiler/win-lcc.mk | 2 +- builds/detect.mk | 7 +- builds/dos/detect.mk | 2 +- builds/dos/dos-def.mk | 2 +- builds/dos/dos-emx.mk | 2 +- builds/dos/dos-gcc.mk | 2 +- builds/dos/dos-wat.mk | 2 +- builds/exports.mk | 2 +- builds/freetype.mk | 5 +- builds/link_dos.mk | 2 +- builds/link_std.mk | 2 +- builds/mac/ftmac.c | 6 +- builds/modules.mk | 2 +- builds/os2/detect.mk | 2 +- builds/os2/os2-def.mk | 2 +- builds/os2/os2-dev.mk | 2 +- builds/os2/os2-gcc.mk | 2 +- builds/symbian/bld.inf | 12 +- builds/symbian/freetype.mmp | 12 +- builds/toplevel.mk | 2 +- builds/unix/config.guess | 108 +- builds/unix/config.sub | 52 +- builds/unix/configure | 153 +- builds/unix/configure.ac | 81 +- builds/unix/configure.raw | 79 +- builds/unix/detect.mk | 2 +- builds/unix/freetype-config.in | 20 +- builds/unix/freetype2.in | 2 +- builds/unix/freetype2.m4 | 2 +- builds/unix/ft-munmap.m4 | 2 +- builds/unix/ftconfig.in | 65 +- builds/unix/ftsystem.c | 2 +- builds/unix/install.mk | 7 +- builds/unix/unix-cc.in | 5 +- builds/unix/unix-def.in | 5 +- builds/unix/unix-dev.mk | 2 +- builds/unix/unix-lcc.mk | 2 +- builds/unix/unix.mk | 2 +- builds/unix/unixddef.mk | 2 +- builds/vms/ftconfig.h | 92 +- builds/vms/ftsystem.c | 2 +- builds/wince/ftdebug.c | 4 +- builds/wince/vc2005-ce/freetype.vcproj | 76 +- builds/wince/vc2005-ce/index.html | 10 +- builds/wince/vc2008-ce/freetype.vcproj | 76 +- builds/wince/vc2008-ce/index.html | 10 +- builds/windows/detect.mk | 4 +- builds/windows/ftdebug.c | 4 +- builds/windows/ftver.rc | 43 + builds/windows/vc2005/freetype.vcproj | 16 +- builds/windows/vc2005/index.html | 10 +- builds/windows/vc2008/freetype.vcproj | 20 +- builds/windows/vc2008/index.html | 10 +- builds/windows/vc2010/freetype.vcxproj | 1506 +----- builds/windows/vc2010/freetype.vcxproj.filters | 88 +- builds/windows/vc2010/index.html | 14 +- builds/windows/visualc/freetype.dsp | 32 +- builds/windows/visualc/freetype.vcproj | 20 +- builds/windows/visualc/index.html | 10 +- builds/windows/visualce/freetype.dsp | 32 +- builds/windows/visualce/freetype.vcproj | 92 +- builds/windows/visualce/index.html | 10 +- builds/windows/w32-bcc.mk | 2 +- builds/windows/w32-bccd.mk | 2 +- builds/windows/w32-dev.mk | 2 +- builds/windows/w32-gcc.mk | 2 +- builds/windows/w32-icc.mk | 2 +- builds/windows/w32-intl.mk | 2 +- builds/windows/w32-lcc.mk | 2 +- builds/windows/w32-mingw32.mk | 2 +- builds/windows/w32-vcc.mk | 2 +- builds/windows/w32-wat.mk | 2 +- builds/windows/win32-def.mk | 2 +- configure | 2 +- devel/ft2build.h | 2 +- devel/ftoption.h | 81 +- docs/CHANGES | 218 +- docs/CUSTOMIZE | 2 +- docs/DEBUG | 2 +- docs/FTL.TXT | 2 +- docs/INSTALL | 2 +- docs/INSTALL.ANY | 2 +- docs/INSTALL.CROSS | 2 +- docs/INSTALL.GNU | 2 +- docs/INSTALL.UNIX | 2 +- docs/INSTALL.VMS | 14 +- docs/TODO | 2 +- docs/VERSIONS.TXT | 6 +- docs/formats.txt | 15 +- docs/freetype-config.1 | 2 +- docs/raster.txt | 2 +- docs/reference/ft2-auto_hinter.html | 331 +- docs/reference/ft2-base_interface.html | 257 +- docs/reference/ft2-basic_types.html | 12 +- docs/reference/ft2-bdf_fonts.html | 6 +- docs/reference/ft2-bitmap_handling.html | 8 +- docs/reference/ft2-bzip2.html | 6 +- docs/reference/ft2-cache_subsystem.html | 6 +- docs/reference/ft2-cff_driver.html | 149 +- docs/reference/ft2-cid_fonts.html | 8 +- docs/reference/ft2-computations.html | 13 +- docs/reference/ft2-error_code_values.html | 8 +- docs/reference/ft2-error_enumerations.html | 10 +- docs/reference/ft2-font_formats.html | 6 +- docs/reference/ft2-gasp_table.html | 6 +- docs/reference/ft2-glyph_management.html | 11 +- docs/reference/ft2-glyph_stroker.html | 16 +- docs/reference/ft2-glyph_variants.html | 8 +- docs/reference/ft2-gx_validation.html | 8 +- docs/reference/ft2-gzip.html | 9 +- docs/reference/ft2-header_file_macros.html | 138 +- docs/reference/ft2-header_inclusion.html | 6 +- docs/reference/ft2-incremental.html | 24 +- docs/reference/ft2-index.html | 544 +- docs/reference/ft2-lcd_filtering.html | 58 +- docs/reference/ft2-list_processing.html | 6 +- docs/reference/ft2-lzw.html | 6 +- docs/reference/ft2-mac_specific.html | 6 +- docs/reference/ft2-module_management.html | 37 +- docs/reference/ft2-multiple_masters.html | 168 +- docs/reference/ft2-ot_validation.html | 6 +- docs/reference/ft2-outline_processing.html | 34 +- docs/reference/ft2-parameter_tags.html | 232 + docs/reference/ft2-pcf_driver.html | 48 +- docs/reference/ft2-pfr_fonts.html | 6 +- docs/reference/ft2-properties.html | 704 +++ docs/reference/ft2-quick_advance.html | 6 +- docs/reference/ft2-raster.html | 16 +- docs/reference/ft2-sfnt_names.html | 55 +- docs/reference/ft2-sizes_management.html | 6 +- docs/reference/ft2-system_interface.html | 6 +- docs/reference/ft2-t1_cid_driver.html | 114 + docs/reference/ft2-toc.html | 17 +- docs/reference/ft2-truetype_engine.html | 6 +- docs/reference/ft2-truetype_tables.html | 38 +- docs/reference/ft2-tt_driver.html | 115 +- docs/reference/ft2-type1_tables.html | 15 +- docs/reference/ft2-user_allocation.html | 6 +- docs/reference/ft2-version.html | 8 +- docs/reference/ft2-winfnt_fonts.html | 8 +- docs/release | 2 +- include/freetype/config/ftconfig.h | 97 +- include/freetype/config/ftheader.h | 128 +- include/freetype/config/ftoption.h | 110 +- include/freetype/config/ftstdlib.h | 2 +- include/freetype/freetype.h | 276 +- include/freetype/ftadvanc.h | 2 +- include/freetype/ftautoh.h | 533 -- include/freetype/ftbbox.h | 4 +- include/freetype/ftbdf.h | 2 +- include/freetype/ftbitmap.h | 4 +- include/freetype/ftbzip2.h | 2 +- include/freetype/ftcache.h | 17 +- include/freetype/ftcffdrv.h | 321 -- include/freetype/ftchapters.h | 3 + include/freetype/ftcid.h | 4 +- include/freetype/ftdriver.h | 1225 +++++ include/freetype/fterrdef.h | 4 +- include/freetype/fterrors.h | 8 +- include/freetype/ftfntfmt.h | 2 +- include/freetype/ftgasp.h | 2 +- include/freetype/ftglyph.h | 15 +- include/freetype/ftgxval.h | 10 +- include/freetype/ftgzip.h | 5 +- include/freetype/ftimage.h | 56 +- include/freetype/ftincrem.h | 15 +- include/freetype/ftlcdfil.h | 42 +- include/freetype/ftlist.h | 2 +- include/freetype/ftlzw.h | 2 +- include/freetype/ftmac.h | 11 +- include/freetype/ftmm.h | 156 +- include/freetype/ftmodapi.h | 23 +- include/freetype/ftmoderr.h | 2 +- include/freetype/ftotval.h | 2 +- include/freetype/ftoutln.h | 14 +- include/freetype/ftparams.h | 205 + include/freetype/ftpcfdrv.h | 105 - include/freetype/ftpfr.h | 2 +- include/freetype/ftrender.h | 4 +- include/freetype/ftsizes.h | 2 +- include/freetype/ftsnames.h | 50 +- include/freetype/ftstroke.h | 12 +- include/freetype/ftsynth.h | 2 +- include/freetype/ftsystem.h | 2 +- include/freetype/fttrigon.h | 2 +- include/freetype/ftttdrv.h | 328 -- include/freetype/fttypes.h | 4 +- include/freetype/ftwinfnt.h | 4 +- include/freetype/internal/autohint.h | 2 +- include/freetype/internal/cffotypes.h | 108 + {src/cff => include/freetype/internal}/cfftypes.h | 9 +- include/freetype/internal/ftcalc.h | 38 +- include/freetype/internal/ftdebug.h | 2 +- include/freetype/internal/{ftdriver.h => ftdrv.h} | 12 +- include/freetype/internal/ftgloadr.h | 2 +- include/freetype/internal/ftmemory.h | 4 +- include/freetype/internal/ftobjs.h | 113 +- include/freetype/internal/ftpic.h | 2 +- include/freetype/internal/ftpsprop.h | 48 + include/freetype/internal/ftrfork.h | 2 +- include/freetype/internal/ftserv.h | 103 +- include/freetype/internal/ftstream.h | 6 +- include/freetype/internal/fttrace.h | 9 +- include/freetype/internal/ftvalid.h | 2 +- include/freetype/internal/internal.h | 8 +- include/freetype/internal/psaux.h | 501 +- include/freetype/internal/pshints.h | 2 +- include/freetype/internal/services/svbdf.h | 2 +- include/freetype/internal/services/svcfftl.h | 112 + include/freetype/internal/services/svcid.h | 2 +- include/freetype/internal/services/svfntfmt.h | 2 +- include/freetype/internal/services/svgldict.h | 6 +- include/freetype/internal/services/svgxval.h | 2 +- include/freetype/internal/services/svkern.h | 2 +- include/freetype/internal/services/svmetric.h | 2 +- include/freetype/internal/services/svmm.h | 57 +- include/freetype/internal/services/svotval.h | 2 +- include/freetype/internal/services/svpfr.h | 2 +- include/freetype/internal/services/svpostnm.h | 2 +- include/freetype/internal/services/svprop.h | 2 +- include/freetype/internal/services/svpscmap.h | 2 +- include/freetype/internal/services/svpsinfo.h | 2 +- include/freetype/internal/services/svsfnt.h | 2 +- include/freetype/internal/services/svttcmap.h | 2 +- include/freetype/internal/services/svtteng.h | 2 +- include/freetype/internal/services/svttglyf.h | 2 +- include/freetype/internal/services/svwinfnt.h | 2 +- include/freetype/internal/sfnt.h | 2 +- include/freetype/internal/t1types.h | 2 +- include/freetype/internal/tttypes.h | 12 +- include/freetype/t1tables.h | 11 +- include/freetype/ttnameid.h | 4 +- include/freetype/tttables.h | 2 +- include/freetype/tttags.h | 8 +- include/freetype/ttunpat.h | 63 - include/ft2build.h | 2 +- modules.cfg | 4 +- src/Jamfile | 2 +- src/autofit/Jamfile | 2 +- src/autofit/afangles.c | 2 +- src/autofit/afblue.c | 14 +- src/autofit/afblue.cin | 2 +- src/autofit/afblue.dat | 22 +- src/autofit/afblue.h | 12 +- src/autofit/afblue.hin | 2 +- src/autofit/afcjk.c | 18 +- src/autofit/afcjk.h | 2 +- src/autofit/afcover.h | 2 +- src/autofit/afdummy.c | 2 +- src/autofit/afdummy.h | 2 +- src/autofit/aferrors.h | 2 +- src/autofit/afglobal.c | 2 +- src/autofit/afglobal.h | 2 +- src/autofit/afhints.c | 21 +- src/autofit/afhints.h | 4 +- src/autofit/afindic.c | 2 +- src/autofit/afindic.h | 2 +- src/autofit/aflatin.c | 35 +- src/autofit/aflatin.h | 2 +- src/autofit/aflatin2.c | 14 +- src/autofit/aflatin2.h | 2 +- src/autofit/afloader.c | 10 +- src/autofit/afloader.h | 2 +- src/autofit/afmodule.c | 4 +- src/autofit/afmodule.h | 2 +- src/autofit/afpic.c | 2 +- src/autofit/afpic.h | 2 +- src/autofit/afranges.c | 2 +- src/autofit/afranges.h | 2 +- src/autofit/afscript.h | 26 +- src/autofit/afshaper.c | 34 +- src/autofit/afshaper.h | 2 +- src/autofit/afstyles.h | 30 +- src/autofit/aftypes.h | 2 +- src/autofit/afwarp.c | 2 +- src/autofit/afwarp.h | 2 +- src/autofit/afwrtsys.h | 2 +- src/autofit/autofit.c | 2 +- src/autofit/module.mk | 2 +- src/autofit/rules.mk | 2 +- src/base/Jamfile | 3 +- src/base/basepic.c | 2 +- src/base/basepic.h | 2 +- src/base/ftadvanc.c | 16 +- src/base/ftapi.c | 2 +- src/base/ftbase.c | 3 +- src/base/ftbase.h | 8 +- src/base/ftbbox.c | 2 +- src/base/ftbdf.c | 2 +- src/base/ftbitmap.c | 80 +- src/base/ftcalc.c | 152 +- src/base/ftcid.c | 2 +- src/base/ftdbgmem.c | 10 +- src/base/ftdebug.c | 4 +- src/base/ftfntfmt.c | 2 +- src/base/ftfstype.c | 2 +- src/base/ftgasp.c | 2 +- src/base/ftgloadr.c | 2 +- src/base/ftglyph.c | 18 +- src/base/ftgxval.c | 2 +- src/base/ftinit.c | 2 +- src/base/ftlcdfil.c | 266 +- src/base/ftmac.c | 4 +- src/base/ftmm.c | 113 +- src/base/ftobjs.c | 508 +- src/base/ftotval.c | 2 +- src/base/ftoutln.c | 9 +- src/base/ftpatent.c | 2 +- src/base/ftpfr.c | 2 +- src/base/ftpic.c | 2 +- src/base/ftpsprop.c | 285 + src/base/ftrfork.c | 14 +- src/base/ftsnames.c | 2 +- src/base/ftstream.c | 2 +- src/base/ftstroke.c | 2 +- src/base/ftsynth.c | 4 +- src/base/ftsystem.c | 2 +- src/base/fttrigon.c | 2 +- src/base/fttype1.c | 2 +- src/base/ftutil.c | 12 +- src/base/ftwinfnt.c | 2 +- src/base/rules.mk | 3 +- src/bdf/Jamfile | 2 +- src/bdf/README | 2 +- src/bdf/bdfdrivr.c | 146 +- src/bdf/bdflib.c | 40 +- src/bzip2/Jamfile | 2 +- src/bzip2/ftbzip2.c | 2 +- src/bzip2/rules.mk | 2 +- src/cache/Jamfile | 2 +- src/cache/ftcache.c | 2 +- src/cache/ftcbasic.c | 40 +- src/cache/ftccache.c | 2 +- src/cache/ftccache.h | 2 +- src/cache/ftccback.h | 2 +- src/cache/ftccmap.c | 2 +- src/cache/ftcerror.h | 2 +- src/cache/ftcglyph.c | 2 +- src/cache/ftcglyph.h | 2 +- src/cache/ftcimage.c | 2 +- src/cache/ftcimage.h | 2 +- src/cache/ftcmanag.c | 2 +- src/cache/ftcmanag.h | 2 +- src/cache/ftcmru.c | 2 +- src/cache/ftcmru.h | 2 +- src/cache/ftcsbits.c | 2 +- src/cache/ftcsbits.h | 2 +- src/cache/rules.mk | 2 +- src/cff/Jamfile | 11 +- src/cff/cf2intrp.c | 1920 ------- src/cff/cff.c | 13 +- src/cff/cffcmap.c | 2 +- src/cff/cffcmap.h | 4 +- src/cff/cffdrivr.c | 381 +- src/cff/cffdrivr.h | 2 +- src/cff/cfferrs.h | 2 +- src/cff/cffgload.c | 2700 +--------- src/cff/cffgload.h | 187 +- src/cff/cffload.c | 63 +- src/cff/cffload.h | 9 +- src/cff/cffobjs.c | 120 +- src/cff/cffobjs.h | 106 +- src/cff/cffparse.c | 54 +- src/cff/cffparse.h | 4 +- src/cff/cffpic.c | 2 +- src/cff/cffpic.h | 7 +- src/cff/cfftoken.h | 2 +- src/cff/module.mk | 2 +- src/cff/rules.mk | 19 +- src/cid/Jamfile | 2 +- src/cid/ciderrs.h | 2 +- src/cid/cidgload.c | 87 +- src/cid/cidgload.h | 2 +- src/cid/cidload.c | 2 +- src/cid/cidload.h | 2 +- src/cid/cidobjs.c | 40 +- src/cid/cidobjs.h | 2 +- src/cid/cidparse.c | 2 +- src/cid/cidparse.h | 2 +- src/cid/cidriver.c | 22 +- src/cid/cidriver.h | 2 +- src/cid/cidtoken.h | 2 +- src/cid/module.mk | 2 +- src/cid/rules.mk | 2 +- src/cid/type1cid.c | 2 +- src/gxvalid/Jamfile | 2 +- src/gxvalid/README | 14 +- src/gxvalid/gxvalid.c | 2 +- src/gxvalid/gxvalid.h | 2 +- src/gxvalid/gxvbsln.c | 2 +- src/gxvalid/gxvcommn.c | 2 +- src/gxvalid/gxvcommn.h | 2 +- src/gxvalid/gxverror.h | 2 +- src/gxvalid/gxvfeat.c | 2 +- src/gxvalid/gxvfeat.h | 2 +- src/gxvalid/gxvfgen.c | 4 +- src/gxvalid/gxvjust.c | 2 +- src/gxvalid/gxvkern.c | 2 +- src/gxvalid/gxvlcar.c | 2 +- src/gxvalid/gxvmod.c | 2 +- src/gxvalid/gxvmod.h | 2 +- src/gxvalid/gxvmort.c | 2 +- src/gxvalid/gxvmort.h | 2 +- src/gxvalid/gxvmort0.c | 2 +- src/gxvalid/gxvmort1.c | 2 +- src/gxvalid/gxvmort2.c | 2 +- src/gxvalid/gxvmort4.c | 2 +- src/gxvalid/gxvmort5.c | 2 +- src/gxvalid/gxvmorx.c | 2 +- src/gxvalid/gxvmorx.h | 2 +- src/gxvalid/gxvmorx0.c | 2 +- src/gxvalid/gxvmorx1.c | 2 +- src/gxvalid/gxvmorx2.c | 2 +- src/gxvalid/gxvmorx4.c | 2 +- src/gxvalid/gxvmorx5.c | 2 +- src/gxvalid/gxvopbd.c | 2 +- src/gxvalid/gxvprop.c | 2 +- src/gxvalid/gxvtrak.c | 2 +- src/gxvalid/module.mk | 2 +- src/gxvalid/rules.mk | 2 +- src/gzip/Jamfile | 2 +- src/gzip/ftgzip.c | 2 +- src/gzip/rules.mk | 2 +- src/lzw/Jamfile | 2 +- src/lzw/ftlzw.c | 2 +- src/lzw/ftzopen.c | 2 +- src/lzw/ftzopen.h | 2 +- src/lzw/rules.mk | 2 +- src/otvalid/Jamfile | 2 +- src/otvalid/module.mk | 2 +- src/otvalid/otvalid.c | 2 +- src/otvalid/otvalid.h | 2 +- src/otvalid/otvbase.c | 35 +- src/otvalid/otvcommn.c | 30 +- src/otvalid/otvcommn.h | 54 +- src/otvalid/otverror.h | 2 +- src/otvalid/otvgdef.c | 113 +- src/otvalid/otvgpos.c | 56 +- src/otvalid/otvgpos.h | 2 +- src/otvalid/otvgsub.c | 36 +- src/otvalid/otvjstf.c | 2 +- src/otvalid/otvmath.c | 2 +- src/otvalid/otvmod.c | 2 +- src/otvalid/otvmod.h | 2 +- src/otvalid/rules.mk | 2 +- src/pcf/Jamfile | 2 +- src/pcf/README | 4 +- src/pcf/pcfdrivr.c | 14 +- src/pcf/pcfread.c | 84 +- src/pfr/Jamfile | 2 +- src/pfr/module.mk | 2 +- src/pfr/pfr.c | 2 +- src/pfr/pfrcmap.c | 2 +- src/pfr/pfrcmap.h | 2 +- src/pfr/pfrdrivr.c | 2 +- src/pfr/pfrdrivr.h | 2 +- src/pfr/pfrerror.h | 2 +- src/pfr/pfrgload.c | 12 +- src/pfr/pfrgload.h | 2 +- src/pfr/pfrload.c | 2 +- src/pfr/pfrload.h | 2 +- src/pfr/pfrobjs.c | 8 +- src/pfr/pfrobjs.h | 2 +- src/pfr/pfrsbit.c | 2 +- src/pfr/pfrsbit.h | 2 +- src/pfr/pfrtypes.h | 2 +- src/pfr/rules.mk | 2 +- src/psaux/Jamfile | 12 +- src/psaux/afmparse.c | 2 +- src/psaux/afmparse.h | 2 +- src/psaux/cffdecode.c | 2370 ++++++++ src/psaux/cffdecode.h | 64 + src/psaux/module.mk | 2 +- src/{cff/cf2arrst.c => psaux/psarrst.c} | 10 +- src/{cff/cf2arrst.h => psaux/psarrst.h} | 10 +- src/psaux/psaux.c | 13 +- src/psaux/psauxerr.h | 2 +- src/psaux/psauxmod.c | 56 +- src/psaux/psauxmod.h | 11 +- src/{cff/cf2blues.c => psaux/psblues.c} | 57 +- src/{cff/cf2blues.h => psaux/psblues.h} | 12 +- src/psaux/psconv.c | 10 +- src/psaux/psconv.h | 2 +- src/{cff/cf2error.c => psaux/pserror.c} | 6 +- src/{cff/cf2error.h => psaux/pserror.h} | 10 +- src/{cff/cf2fixed.h => psaux/psfixed.h} | 12 +- src/{cff/cf2font.c => psaux/psfont.c} | 89 +- src/{cff/cf2font.h => psaux/psfont.h} | 20 +- src/{cff/cf2ft.c => psaux/psft.c} | 361 +- src/{cff/cf2ft.h => psaux/psft.h} | 108 +- src/{cff/cf2glue.h => psaux/psglue.h} | 16 +- src/{cff/cf2hints.c => psaux/pshints.c} | 333 +- src/{cff/cf2hints.h => psaux/pshints.h} | 9 +- src/psaux/psintrp.c | 3038 +++++++++++ src/{cff/cf2intrp.h => psaux/psintrp.h} | 12 +- src/psaux/psobjs.c | 753 ++- src/psaux/psobjs.h | 103 +- src/{cff/cf2read.c => psaux/psread.c} | 8 +- src/{cff/cf2read.h => psaux/psread.h} | 8 +- src/{cff/cf2stack.c => psaux/psstack.c} | 12 +- src/{cff/cf2stack.h => psaux/psstack.h} | 8 +- src/{cff/cf2types.h => psaux/pstypes.h} | 8 +- src/psaux/rules.mk | 19 +- src/psaux/t1cmap.c | 2 +- src/psaux/t1cmap.h | 2 +- src/psaux/t1decode.c | 442 +- src/psaux/t1decode.h | 12 +- src/pshinter/Jamfile | 2 +- src/pshinter/module.mk | 2 +- src/pshinter/pshalgo.c | 4 +- src/pshinter/pshalgo.h | 2 +- src/pshinter/pshglob.c | 2 +- src/pshinter/pshglob.h | 2 +- src/pshinter/pshinter.c | 2 +- src/pshinter/pshmod.c | 2 +- src/pshinter/pshmod.h | 2 +- src/pshinter/pshnterr.h | 2 +- src/pshinter/pshpic.c | 2 +- src/pshinter/pshpic.h | 2 +- src/pshinter/pshrec.c | 2 +- src/pshinter/pshrec.h | 2 +- src/pshinter/rules.mk | 2 +- src/psnames/Jamfile | 2 +- src/psnames/module.mk | 2 +- src/psnames/psmodule.c | 15 +- src/psnames/psmodule.h | 2 +- src/psnames/psnamerr.h | 2 +- src/psnames/psnames.c | 2 +- src/psnames/pspic.c | 2 +- src/psnames/pspic.h | 2 +- src/psnames/pstables.h | 38 +- src/psnames/rules.mk | 2 +- src/raster/Jamfile | 2 +- src/raster/ftmisc.h | 2 +- src/raster/ftraster.c | 2 +- src/raster/ftraster.h | 2 +- src/raster/ftrend1.c | 118 +- src/raster/ftrend1.h | 2 +- src/raster/module.mk | 2 +- src/raster/raster.c | 2 +- src/raster/rasterrs.h | 2 +- src/raster/rastpic.c | 2 +- src/raster/rastpic.h | 2 +- src/raster/rules.mk | 2 +- src/sfnt/Jamfile | 2 +- src/sfnt/module.mk | 2 +- src/sfnt/pngshim.c | 79 +- src/sfnt/pngshim.h | 2 +- src/sfnt/rules.mk | 2 +- src/sfnt/sfdriver.c | 9 +- src/sfnt/sfdriver.h | 2 +- src/sfnt/sferrors.h | 2 +- src/sfnt/sfnt.c | 2 +- src/sfnt/sfntpic.c | 2 +- src/sfnt/sfntpic.h | 2 +- src/sfnt/sfobjs.c | 61 +- src/sfnt/sfobjs.h | 2 +- src/sfnt/ttbdf.c | 2 +- src/sfnt/ttbdf.h | 6 +- src/sfnt/ttcmap.c | 132 +- src/sfnt/ttcmap.h | 4 +- src/sfnt/ttcmapc.h | 2 +- src/sfnt/ttkern.c | 10 +- src/sfnt/ttkern.h | 2 +- src/sfnt/ttload.c | 4 +- src/sfnt/ttload.h | 2 +- src/sfnt/ttmtx.c | 2 +- src/sfnt/ttmtx.h | 2 +- src/sfnt/ttpost.c | 9 +- src/sfnt/ttpost.h | 2 +- src/sfnt/ttsbit.c | 27 +- src/sfnt/ttsbit.h | 2 +- src/smooth/Jamfile | 2 +- src/smooth/ftgrays.c | 98 +- src/smooth/ftgrays.h | 2 +- src/smooth/ftsmerrs.h | 2 +- src/smooth/ftsmooth.c | 357 +- src/smooth/ftsmooth.h | 2 +- src/smooth/ftspic.c | 2 +- src/smooth/ftspic.h | 2 +- src/smooth/module.mk | 2 +- src/smooth/rules.mk | 2 +- src/smooth/smooth.c | 2 +- src/tools/afblue.pl | 2 +- src/tools/docmaker/content.py | 33 +- src/tools/docmaker/docmaker.py | 2 +- src/tools/docmaker/formatter.py | 2 +- src/tools/docmaker/sources.py | 4 +- src/tools/docmaker/tohtml.py | 4 +- src/tools/docmaker/utils.py | 2 +- src/tools/ftfuzzer/README | 12 +- src/tools/ftfuzzer/ftfuzzer.cc | 7 +- src/tools/ftfuzzer/ftmutator.cc | 2 +- src/tools/ftfuzzer/rasterfuzzer.cc | 2 +- src/tools/ftfuzzer/runinput.cc | 2 +- src/tools/glnames.py | 32 +- src/tools/update-copyright-year | 2 +- src/truetype/Jamfile | 2 +- src/truetype/module.mk | 2 +- src/truetype/rules.mk | 2 +- src/truetype/truetype.c | 2 +- src/truetype/ttdriver.c | 13 +- src/truetype/ttdriver.h | 2 +- src/truetype/tterrors.h | 2 +- src/truetype/ttgload.c | 208 +- src/truetype/ttgload.h | 2 +- src/truetype/ttgxvar.c | 623 ++- src/truetype/ttgxvar.h | 10 +- src/truetype/ttinterp.c | 331 +- src/truetype/ttinterp.h | 52 +- src/truetype/ttobjs.c | 99 +- src/truetype/ttobjs.h | 2 +- src/truetype/ttpic.c | 2 +- src/truetype/ttpic.h | 2 +- src/truetype/ttpload.c | 10 +- src/truetype/ttpload.h | 2 +- src/truetype/ttsubpix.c | 28 +- src/truetype/ttsubpix.h | 2 +- src/type1/Jamfile | 2 +- src/type1/module.mk | 2 +- src/type1/rules.mk | 2 +- src/type1/t1afm.c | 2 +- src/type1/t1afm.h | 2 +- src/type1/t1driver.c | 21 +- src/type1/t1driver.h | 2 +- src/type1/t1errors.h | 2 +- src/type1/t1gload.c | 118 +- src/type1/t1gload.h | 2 +- src/type1/t1load.c | 99 +- src/type1/t1load.h | 6 +- src/type1/t1objs.c | 48 +- src/type1/t1objs.h | 8 +- src/type1/t1parse.c | 2 +- src/type1/t1parse.h | 2 +- src/type1/t1tokens.h | 2 +- src/type1/type1.c | 2 +- src/type42/Jamfile | 2 +- src/type42/module.mk | 2 +- src/type42/rules.mk | 2 +- src/type42/t42drivr.c | 2 +- src/type42/t42drivr.h | 2 +- src/type42/t42error.h | 2 +- src/type42/t42objs.c | 8 +- src/type42/t42objs.h | 2 +- src/type42/t42parse.c | 2 +- src/type42/t42parse.h | 2 +- src/type42/t42types.h | 2 +- src/type42/type42.c | 2 +- src/winfonts/Jamfile | 2 +- src/winfonts/fnterrs.h | 2 +- src/winfonts/module.mk | 2 +- src/winfonts/rules.mk | 2 +- src/winfonts/winfnt.c | 8 +- src/winfonts/winfnt.h | 2 +- vms_make.com | 16 +- 697 files changed, 23913 insertions(+), 15607 deletions(-) create mode 100644 ChangeLog.27 create mode 100644 builds/windows/ftver.rc create mode 100644 docs/reference/ft2-parameter_tags.html create mode 100644 docs/reference/ft2-properties.html create mode 100644 docs/reference/ft2-t1_cid_driver.html delete mode 100644 include/freetype/ftautoh.h delete mode 100644 include/freetype/ftcffdrv.h create mode 100644 include/freetype/ftdriver.h create mode 100644 include/freetype/ftparams.h delete mode 100644 include/freetype/ftpcfdrv.h delete mode 100644 include/freetype/ftttdrv.h create mode 100644 include/freetype/internal/cffotypes.h rename {src/cff => include/freetype/internal}/cfftypes.h (98%) rename include/freetype/internal/{ftdriver.h => ftdrv.h} (98%) create mode 100644 include/freetype/internal/ftpsprop.h create mode 100644 include/freetype/internal/services/svcfftl.h delete mode 100644 include/freetype/ttunpat.h create mode 100644 src/base/ftpsprop.c delete mode 100644 src/cff/cf2intrp.c create mode 100644 src/psaux/cffdecode.c create mode 100644 src/psaux/cffdecode.h rename src/{cff/cf2arrst.c => psaux/psarrst.c} (98%) rename src/{cff/cf2arrst.h => psaux/psarrst.h} (96%) rename src/{cff/cf2blues.c => psaux/psblues.c} (91%) rename src/{cff/cf2blues.h => psaux/psblues.h} (97%) rename src/{cff/cf2error.c => psaux/pserror.c} (96%) rename src/{cff/cf2error.h => psaux/pserror.h} (96%) rename src/{cff/cf2fixed.h => psaux/psfixed.h} (95%) rename src/{cff/cf2font.c => psaux/psfont.c} (91%) rename src/{cff/cf2font.h => psaux/psfont.h} (94%) rename src/{cff/cf2ft.c => psaux/psft.c} (65%) rename src/{cff/cf2ft.h => psaux/psft.h} (60%) rename src/{cff/cf2glue.h => psaux/psglue.h} (96%) rename src/{cff/cf2hints.c => psaux/pshints.c} (86%) rename src/{cff/cf2hints.h => psaux/pshints.h} (98%) create mode 100644 src/psaux/psintrp.c rename src/{cff/cf2intrp.h => psaux/psintrp.h} (95%) rename src/{cff/cf2read.c => psaux/psread.c} (97%) rename src/{cff/cf2read.h => psaux/psread.h} (96%) rename src/{cff/cf2stack.c => psaux/psstack.c} (98%) rename src/{cff/cf2stack.h => psaux/psstack.h} (97%) rename src/{cff/cf2types.h => psaux/pstypes.h} (96%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1b053e..b0f8612 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright 2013-2017 by +# Copyright 2013-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written originally by John Cary @@ -153,7 +153,7 @@ endif () set(VERSION_MAJOR "2") -set(VERSION_MINOR "8") +set(VERSION_MINOR "9") set(VERSION_PATCH "0") set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) @@ -331,7 +331,9 @@ if (BUILD_FRAMEWORK) ) endif () -set(CMAKE_DEBUG_POSTFIX d) +if (NOT DISABLE_FORCE_DEBUG_POSTFIX) + set(CMAKE_DEBUG_POSTFIX d) +endif() add_library(freetype ${PUBLIC_HEADERS} diff --git a/ChangeLog b/ChangeLog index b81af15..fa38730 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,12 @@ -2017-05-13 Werner Lemberg +2018-01-08 Werner Lemberg - * Version 2.8 released. + * Version 2.9 released. ======================= - Tag sources with `VER-2-8'. + Tag sources with `VER-2-9'. - * docs/VERSION.TXT: Add entry for version 2.8. - * docs/CHANGES: Updated. + * docs/VERSION.TXT: Add entry for version 2.9. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, @@ -21,4092 +20,4915 @@ builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, + builds/windows/ftver.rc, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/. + builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/. - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9. (FREETYPE_PATCH): Set to 0. - * builds/unix/configure.raw (version_info): Set to 20:0:14. - * CMakeLists.txt (VERSION_MINOR): Set to 8. - (VERSION_PATCH): Set to 0. + * builds/unix/configure.raw (version_info): Set to 22:0:16. + * CMakeLists.txt (VERSION_PATCH): Set to 1. -2017-05-12 Hin-Tak Leung +2018-01-07 Werner Lemberg - Fix `FT_UINT_TO_POINTER' macro for Windows. + Add check for librt, needed for `ftbench' (#52824). - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: - Fix definition. + * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will + hold `-lrt' if necessary. -2017-05-11 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Chakma. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + [psaux] Fix Type 1 glyphs with too many stem hints. - * src/autofit/afscript.h: Add Chakma standard character. + According to the CFF specification, charstrings can have up to 96 stem + hints. Due to hint replacement routines in Type 1 charstrings, some + glyphs are rejected by the Adobe engine, which implements the above + limit. This fix turns off hinting for such glyphs. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data. + * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling + `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off + hinting. -2017-05-10 Sascha Brawer - Werner Lemberg - [autofit] Add support for Kayah Li script. + Add `FT_Done_MM_Var'. - * src/autofit/afblue.dat: Add blue zone data for Kayah Li. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + This is necessary in case the application's memory routines differ + from FreeType. A typical example is a Python application on Windows + that calls FreeType compiled as a DLL via the `ctypes' interface. - * src/autofit/afscript.h: Add Kayah Li standard character. + * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare + and define. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data. + * docs/CHANGES: Updated. -2017-05-10 Sascha Brawer - Werner Lemberg - [autofit] Add support for Bamum script. + [truetype] Round offsets of glyph components only if hinting is on. - * src/autofit/afblue.dat: Add blue zone data for Bamum. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement + it. - * src/autofit/afscript.h: Add Bamum standard character. +2018-01-03 Werner Lemberg - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data. + * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code. -2017-05-10 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Saurashtra. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + Move internal LCD-related declarations. - * src/autofit/afscript.h: Add Saurashtra standard character. + * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir): + Move from here... + * include/freetype/internal/ftobjs.h: ... to here. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra - data. +2018-01-03 Alexei Podtelezhnikov -2017-05-10 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Buhid. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + [truetype] Make blend/design coordinate round-tripping work. - * src/autofit/afscript.h: Add Buhid standard character. + Behdad reported that setting blend coordinates, then getting design + coordinates did incorrectly return the default instance's + coordinates. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data. + * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it. -2017-05-08 Sascha Brawer - Werner Lemberg - [autofit] Add support for Shavian script. + * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop. - * src/autofit/afblue.dat: Add blue zone data for Shavian. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + Reported as - * src/autofit/afscript.h: Add Shavian standard character. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838 - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data. +2017-12-31 Werner Lemberg -2017-05-08 Sascha Brawer - Werner Lemberg - * src/autofit/afscript.h: Add Vai standard character. + Update Visual C 2010 project files. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data. + Problem reported by Hin-Tak. -2017-05-08 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Osmanya. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file. - * src/autofit/afscript.h: Add Osmanya standard character. +2017-12-28 Werner Lemberg - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data. + * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file. -2017-05-08 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Coptic. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + Fix compiler warnings. - * src/autofit/afscript.h: Add Coptic standard character. + * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and + `new_pitch' unsigned. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data. + * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H. -2017-05-08 Sascha Brawer - Werner Lemberg - [autofit] Add support for Carian script. + Fixes for `make multi'. - * src/autofit/afblue.dat: Add blue zone data for Carian. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'. + (ps_property_get): Harmonize declaration with corresponding + function typedef. - * src/autofit/afscript.h: Add Carian standard character. + * include/freety[e/internal/fttrace.h: Add `trace_psprops'. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data. + * src/base/ftpsprop.c: Include necessary header files. + (FT_COMPONENT): Define. + (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'. + (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'. + Harmonize declaration with corresponding function typedef. -2017-05-07 Werner Lemberg +2017-12-27 Werner Lemberg - [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). + Provide support for intra-module callback functions. - Reported by Roy Tam . + This is needed especially for `make multi' with C++. - * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. + * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK, + FT_BASE_CALLBACK_DEF): New macros. -2017-05-07 Roy Tam - Werner Lemberg +2017-12-25 Ewald Hew - [truetype] More tricky fonts (mainly from Dynalab). + Move PostScript drivers' property handlers to `base'. - * src/truetype/ttobjs.c (tt_check_trickyness_family, - tt_check_trickyness_sfnt_ids): Add them. + This reduces the amount of duplicated code across PostScript + drivers. -2017-05-07 Werner Lemberg + * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c + ({cff,cid,t1}_property_{get,set}): Moved to... + * include/freetype/internal/ftpsprop.h: ...this new file. + (ps_property_{get,set}): New functions to replace moved ones. - [truetype] Add tricky font `DLCHayMedium' (from Dynalab). + * src/base/ftpsprop.c: New file that implements above functions. - Reported by Roy Tam . + * include/freetype/internal/internal.h + (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro. - * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. + * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c: + Updated. -2017-05-03 Werner Lemberg + * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c: + Updated. - */*: s/backwards compatibility/backward compatibility/. +2017-12-20 Werner Lemberg -2017-05-03 Sascha Brawer - Werner Lemberg - Werner Lemberg +2017-12-18 Werner Lemberg - [autofit] Add blue-zone support for Sundanese script. + [sfnt] Fix charmap type 2 iterator (#52646). - This essentially moves the Sundanese script from the `Indic' hinter - to the `Latin' hinter. + The subsetted demo font of the report that exhibits the bug has a + very unusual type 2 cmap for Unicode(!): It contains only two + sub-headers, one for one-byte characters (covering the range 0x20 to + 0xFA), and a second one for higher byte 0x01 (just for character + code U+0131). - * src/autofit/afblue.dat: Add blue zone data for Sundanese. + Before this commit, the iterator wasn't able to correctly handle a + sub-header for higher byte 0x01. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment + for outer loop. - * src/autofit/afscript.h: Add Sundanese standard character and move - data out of AF_CONFIG_OPTION_INDIC block. +2017-12-18 Matthias Clasen - * src/autofit/afranges.c: Move Sundanese data out of - AF_CONFIG_OPTION_INDIC block. + [truetype] Fix clamping, minor tracing code beautification. - * src/autofit/afstyles.h: Update Sundanese data; in particular, use - AF_WRITING_SYSTEM_LATIN. + * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of + design coordinates. + Use clamped value. -2017-05-03 Sascha Brawer - Werner Lemberg - [autofit] Add support for Avestan script. + * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff. - * src/autofit/afblue.dat: Add blue zone data for Avestan. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2017-12-18 Werner Lemberg - * src/autofit/afscript.h: Add Avestan standard character. + * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688). - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data. +2017-12-18 Werner Lemberg -2017-05-02 Behdad Esfahbod + [truetype] Fix previous commit. - [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). + * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle + unhinted phantom points, which must be properly scaled. - When points are not touched by gvar interpolation deltas, FreeType - gave a slightly different result than Apple's CoreText. +2017-12-18 Werner Lemberg - The OpenType working group will update the specification to document - the following behaviour: If the two points with deltas to the `left' - and `right' of the untouched point have the same coordinate, then - the inferred delta for the untouched point should be zero. + [truetype] Don't apply HVAR and VVAR deltas twice (#52683). - * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new - behaviour. + * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust + `pp1' to `pp4', except if we have an HVAR and/or VVAR table. -2017-05-02 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle + alternative code branch identically w.r.t. presence of an HVAR + and/or VVAR table. - [autofit] Remove `slight' auto-hint mode again. +2017-12-17 Jonathan Kew - A poll on freetype-devel favoured changes directly applied to - `light'. + [truetype] Correctly handle variation font phantom points (#52683). - * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, - FT_RENDER_MODE_SLIGHT): Removed. + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom + point indices. - * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c - (af_latin_hints_init), src/autofit/aflatin2.c - (af_latin2_hints_init): Revert change from 2017-04-22. +2017-12-17 Jonathan Kew - * src/autofit/afloader.c (af_loader_load_glyph) Remove references to - FT_RENDER_MODE_SLIGHT. - [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics - unconditionally. + Fix incorrect advance width scaling (#52683). - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from - 2017-04-22. + * src/base/ftadvance.c (FT_Get_Advances): Always respect the + FT_LOAD_NO_SCALE flag if present. - * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. +2017-12-16 Alexei Podtelezhnikov - * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from - 2017-04-22. + * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy. + * objs/.gitignore: Ignore almost everything. - * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from - 2017-04-22. +2017-12-11 Werner Lemberg - * docs/CHANGES: Updated. + Fix compiler warning (#52640). -2017-04-30 Werner Lemberg + * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused + variable. - [autofit] Fix metrics computation. +2017-12-08 Azzuro - Problem reported by Markus Trippelsdorf and - Nikolaus Waxweiler . + * builds/windows/vc2010/freetype.vcxproj: Adjust output directory. - * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of - auto-hinter metrics. Without this change, multiple size changing - calls for a single face fail. + This allows builds with different configurations in parallel. -2017-04-29 Werner Lemberg +2017-12-08 Werner Lemberg - * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. + Fix `make setup dos', second try (#52622). - Reported by Earnestly in + * builds/detect.mk (dos_setup): Don't use literal `>' character at + all. Mixing the different escaping rules from make, dos, and + windows is too fragile. - http://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html +2017-12-08 Werner Lemberg -2017-04-27 Werner Lemberg + [docmaker] Fix code section parsing. - Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. + Stuff like - * include/freetype/config/ftoption.h - (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by - default. + { + + } - * src/autofit/afloader.c (af_loader_load_glyph): Use - AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code. + confused the parser, which incorrectly treated `' as a markup + tag. -2017-04-26 Werner Lemberg + * src/tools/docmaker/content.py (ContentProcessor::process_content): + Apply `re_markup_tags' only outside of code sections. - * include/freetype/freetype.h (FT_Render_Mode): Fix order. +2017-12-08 Werner Lemberg - This retains backward compatibility. + New `ftdriver.h' file, covering all driver modules. - Noted by Alexei. + This reduces redundancy and increases synergy; it also reduces the + number of header files. -2017-04-22 Werner Lemberg + * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro. + (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H, + FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to + FT_DRIVER_H. - [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). + * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, + include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h, + include/freetype/ftttdrv.h: Replaced with... + * include/freetype/ftdriver.h: ...this new file. + (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to... + (FT_HINTING_ADOBE): ... this new macro. + (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to... + (FT_HINTING_FREETYPE): ... this new macro. - * src/truetype/ttobs.h (TT_SizeRec): Add field `hinted_metrics' to - hold hinted metrics. - Make `metrics' a pointer so that `tt_glyph_load' can easily switch - between metrics. + * src/*/*: Updated accordingly. - * src/truetype/ttdriver.c (tt_size_request): Updated. - (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is - used. +2017-12-08 Werner Lemberg - * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, - TT_Process_Composite_Component, load_truetype_glyph, - compute_glyph_metrics, TT_Load_Glyph): Updated. + Move `ftdriver.h' to `ftdrv.h'. - * src/truetype/ttinterp.c (TT_Load_Context): Updated. + * include/freetype/internal/ftdriver.h: Renamed to... + * include/freetype/internal/ftdrv.h: ... this name. - * src/truetype/ttobjs.c (tt_size_reset): Updated. + * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H): + Updated. - * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. +2017-12-08 Werner Lemberg -2017-04-22 Werner Lemberg + Fix access to uninitalized memory (#52613). - Add new `slight' auto-hinting mode. + Also reported as - This mode uses fractional advance widths and doesn't scale glyphs - horizontally, only applying vertical scaling and hinting. + https://bugs.chromium.org/p/chromium/issues/detail?id=791317 - At the same time, the behaviour of the `light' auto-hinter gets - restored for backward compatibility: Both vertical and horizontal - scaling is again based on rounded metrics values (this was changed - in a commit from 2017-03-30 as a side effect). To be more precise, - the behaviour is restored for TrueType fonts only; for other font - formats like Type 1, this is a new feature of the `light' hinting - mode. + * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the + bitmap size needs a larger bitmap buffer, assure that the new memory + areas are initialized also. - * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. - (FT_RENDER_MODE_SLIGHT): New render mode. +2017-12-08 Werner Lemberg - * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add - `autohint_mode' and `autohint_metrics' fields. + Fix `make setup dos' (#52622). - * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c - (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): - Updated. + * builds/detect.mk (dos_setup): Properly escape literal `>' + character. - * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use - `autohint_metrics'. - (af_loader_load_glyph): s/internal/slot_internal/. - Initialize `autohint_metrics' and `autohint_mode' depending on - current auto-hint mode. - Use `autohint_metrics'. - Updated. +2017-12-07 Werner Lemberg - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. + Fix C++ compilation. - * src/base/ftobjs.c (FT_Load_Glyph): Updated. - (FT_New_Size): Allocate `internal' object. + * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary. - * src/pshinter/pshalgo.c (ps_hints_apply): Updated. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning. - * src/smooth/ftsmooth.c (ft_smooth_render): Updated. +2017-12-07 Werner Lemberg -2017-04-22 Werner Lemberg + Fix `make multi'. - Introduce `FT_Size_InternalRec' structure. + * include/freetype/internal/fttrace.h: Remove unused tracing macros. + s/pshalgo2/pshalgo/. + Add `trace_cffdecode'. + * src/pshinter/pshalgo.c (FT_COMPONENT): Updated. - We are going to extend this later on. + * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. + * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and + FT_SERVICE_CFF_TABLE_LOAD_H. - * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New - structure with a single field `module_data'. + * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. - * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of - `FT_Size' structure. + * src/psaux/cffdecode.c: Include FT_FREETYPE_H and + FT_INTERNAL_DEBUG_H. + (FT_COMPONENT): Define. + * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. + * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. + Declare `cff_builder_funcs' and `ps_builder_funcs'. + * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'. + * src/psaux/psobjs.c : Include `psauxmod.h'. - * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use - `size->internal->module_data' instead of `size->internal'. +2017-12-07 Werner Lemberg - * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. - (cff_size_init, cff_size_select, cff_size_request): Use - `size->internal->module_data' instead of `size->internal'. + * include/freetype/config/ftheader.h: Some clean-up. - * src/cif/cidobjs.c (cid_size_done, cid_size_init, - cid_size_request): Use `size->internal->module_data' instead of - `size->internal'. + This commit removes documentation of deprecated macros and does some + minor streamlining. - * src/psaux/psobjs.c (t1_builder_ini): Use - `size->internal->module_data' instead of `size->internal'. +2017-12-06 Werner Lemberg - * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): - Use `size->internal->module_data' instead of `size->internal'. - -2017-04-21 Alexei Podtelezhnikov + * builds/symbian/bld.inf: Updated. - * src/smooth/ftsmooth.h: Remove unused guards and declaration. +2017-12-06 Werner Lemberg -2017-04-16 Hin-Tak Leung + New header file `ftparams.h' that collects all parameter tags. - Fix tracing messages. + * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New + macro. + (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to + `ftparams.h'. - * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, - FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print - correct function name. + * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, + include/freetype/ftincrem.h, include/freetype/ftlcdfil.h, + include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include + FT_PARAMETER_TAGS_H. + Move FT_PARAM_TAG_XXX definitions to... + * include/freetype/ftparams.h: ...this new file. -2017-04-08 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Old Turkic. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + Improve tracing messages by using singular and plural forms. - * src/autofit/afscript.h: Add Old Turkic standard characters. + * src/*/*.c: Implement it. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data. +2017-12-04 Werner Lemberg -2017-04-08 Sascha Brawer - Werner Lemberg - * src/autofit/afscript.h: Add Gothic standard characters. + [truetype] Improving tracing of composite glyphs. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data. + * src/truetype/ttgload.c (TT_Load_Composite_Glyph) + [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information. -2017-04-08 Sascha Brawer - Werner Lemberg - [autofit] Add support for Cypriot script. + [type1] Allow (again) `/Encoding' with >256 elements (#52464). - * src/autofit/afblue.dat: Add blue zone data for Cypriot. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + In version 2.6.1, this has been disallowed to better reject + malformed fonts; however, this restriction was too strong. This + time, we only take the first 256 elements into account, since + encoding arrays are always accessed with a 8bit integer, according + to the PostScript Language Reference. - * src/autofit/afscript.h: Add Cypriot standard characters. + * src/type1/t1load.c (parse_encoding): Implement it. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data. +2017-11-27 Jan Alexander Steffens (heftig) -2017-04-08 Sascha Brawer - Werner Lemberg - * src/autofit/afscript.h: Add Deseret standard characters. + [unix] Install a massaged `ftoption.h' file (#51780). - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data. + * builds/unix/configure.raw (ftoption_set, ftoption_unset): New + auxiliary functions to construct... + (FTOPTION_H_SED): ... this new variable. + Apply it as a sed argument while copying `ftoption.h' to the + `builds/unix' directory (using `AC_CONFIG_FILES'). + Simplify code of test that checks cpp's computation of bit length + (the test previously created an empty `ftoption.h' file and deleted + it immediately afterwards); without this change, it can happen on my + GNU/Linux box that `configure's execution of `config.status' doesn't + create `ftoption.h' (no idea why this happens). -2017-04-07 Werner Lemberg + * builds/unix/install.mk (install): Install + `builds/unix/ftoption.h'. - [autofit] Fix invalid character range description (#50745). + * builds/unix/unix-def.in (DISTCLEAN): Updated. - Also reported as + * builds/unix/.gitignore: Updated. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 +2017-11-23 Tor Andersson - * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in - recent commit. + Silence unused function warnings (#52465). -2017-04-07 Werner Lemberg + Some static function declarations cause unused function warnings if + certain config options are turned off via `ftoption.h'. - [ftfuzzer] Fix clang warnings. + * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h, + src/truetype/ttgxvar.h: Add #ifdef guards around these sections. - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add - casts. +2017-11-22 Ewald Hew -2017-04-06 Sascha Brawer - Werner Lemberg - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data. + [psaux] Fix CFF advance widths. (#52466) -2017-04-06 Sascha Brawer - Werner Lemberg - * src/autofit/afscript.h: Add Osage standard characters. + * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data. +2017-11-14 Nikolaus Waxweiler -2017-04-06 Sascha Brawer - Werner Lemberg -2017-04-06 Sascha Brawer - Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Tai Viet. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition. - * src/autofit/afscript.h: Add Tai Viet standard characters. +2017-11-06 Alexei Podtelezhnikov - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data. + * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables. -2017-04-06 Sascha Brawer - Werner Lemberg - [autofit] Add support for Tifinagh script. + [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251) - * src/autofit/afblue.dat: Add blue zone data for Tifinagh. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + The interpreter in Type 1 mode rewinds the charstring after collecting + all hints for building the initial hintmap (commit d52dd7f). However, + some charstrings use `endchar' in a final subroutine call, rewinding to + the start of that subroutine, and only a small section of the actual + glyph is drawn. - * src/autofit/afscript.h: Add Tifinagh standard characters. + * src/psaux/psintrp.c (cf2_interpT2CharString) : + Ensure we are on the top level charstring before rewinding. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data. +2017-11-03 suzuki toshiya -2017-04-06 Sascha Brawer - Werner Lemberg - * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data. + [smooth] Fix complex rendering at high ppem. -2017-04-06 Sascha Brawer + We used to split large glyphs into horizontal bands and continue + bisecting them still horizontally if that was not enough. This is + guaranteed to fail when a single scanline cannot fit into the + rendering memory pool. Now we bisect the bands vertically so that + the smallest unit is a column of the band height, which is guranteed + to fit into memory. - [autofit] Add support for Adlam script. + * src/smooth/ftgrays.c (gray_convert_glyph): Implement it. - * src/autofit/afblue.dat: Add blue zone data for Adlam. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2017-10-20 Alexei Podtelezhnikov - * src/autofit/afscript.h: Add Adlam standard characters. + [smooth] Improve complex rendering at high ppem. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. + At large sizes almost but not exactly horizontal segments can quickly + drain the rendering pool. This patch at least avoids filling the pool + with trivial cells. Beyond this, we can only increase the pool size. -2017-04-06 Sascha Brawer + Reported, analyzed, and tested by Colin Fahey. - [autofit] Add support for Ol Chiki script. + * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells. - * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2017-10-20 Alexei Podtelezhnikov - * src/autofit/afscript.h: Add Ol Chiki standard character. + [base] Improve tracing in FT_Load_Glyph, FT_*_Size. - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. + * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with + function name, glyph index, and load flags. + (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing. + (FT_Select_Size, FT_Request_Size): Improve tracing. -2017-04-03 Werner Lemberg +2017-10-18 Alexei Podtelezhnikov - [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. + [base] Improve tracing in FT_Render_Glyph. - Reported as + * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage + calculations and downgrade Netpbm dump to bitmap:7. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 +2017-10-15 Ewald Hew - * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New - error code. + [cff] Fix segfault on missing `psaux' (#52218) - * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution - of these two opcodes in `glyf' bytecode. - (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode - in case of error since function tables can no longer be modified - (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can - enormously speed up handling of broken fonts. + * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr. -2017-04-02 Alexei Podtelezhnikov + * modules.cfg: Update dependency list. - [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. +2017-10-15 Alexei Podtelezhnikov - * src/autofit/aflatin.c (af_latin_hints_init): Updated. - * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. + [base, cff] Fix MSVC warnings. -2017-04-01 Werner Lemberg + * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code. + (ft_glyphslot_preset_bitmap): C4244: possible loss of data. + * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data. + Turn `sum' into unsigned. - * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. +2017-10-14 Alexei Podtelezhnikov - Otherwise FT_UINT_TO_POINTER might not be defined. + [base] Netpbm image tracing. - Problem reported by Alexei. + * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size. + (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format. -2017-03-31 Alexei Podtelezhnikov + * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing. - [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. +2017-10-14 Alexei Podtelezhnikov - * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. - * src/autofit/afcjk.c (af_cjk_hints_init): Updated. - * src/autofit/aflatin.c (af_latin_hints_init): Ditto. - * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. + * builds/windows/ftdebug.c (FT_Message): Print to stderr. + * builds/wince/ftdebug.c (FT_Message): Ditto. -2017-03-31 Werner Lemberg +2017-10-14 Behdad Esfahbod - * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. + [afshaper] Delay creating `hb_set' objects until needed. - Allow CFFs containing a single font to have an empty font name. + In runs on Noto Naskh Arabic, this results in 89 sets created + instead of 340 before. Makes auto-hinter setup with HarfBuzz + enabled 20% to 30% faster. - Problem reported by 張俊芝 <418092625@qq.com> in + * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it. - http://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html +2017-10-12 Ewald Hew -2017-03-30 Werner Lemberg + [type1, cid] Add hinting engine switch. - * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. + Implement property service in `type1' and `cid' drivers to allow + switching between FreeType or Adobe hinting engine when both are + available. - Requested by Dave Arnold. + * src/cid/cidriver.c (cid_property_{set,get}, cid_services), + src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add + Properties service. -2017-03-30 Werner Lemberg + * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c + (T1_Driver_Init): Add default property values. - [truetype] Fix HVAR and VVAR handling (#50678). +2017-10-12 Ewald Hew - * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle - glyph indices larger than `mapCount' as described in the - specification. + Add T1_CONFIG_OPTION_OLD_ENGINE configuration option. -2017-03-30 Werner Lemberg + This controls whether the old Type 1 engine gets compiled into FreeType. + It is disabled by default. - [truetype] Allow linear scaling for unhinted rendering (#50470). + * devel/ftoption.h, include/freetype/config/ftoption.h + (T1_CONFIG_OPTION_OLD_ENGINE): New macro. - * src/truetype/ttdriver.c (tt_size_request): Revert change from - 2011-07-16; the intended metrics fix seems now to be implemented in - a different way, making the patch unnecessary. Note that this - change was usually patched out by all major GNU/Linux distributions - due to heavy side effects. + * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field. + * include/freetype/internal/psaux.h, src/cid/cidgload.c + (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c + (ps_builder_add_point), src/psaux/t1decode.c + (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph, + t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h, + src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround + relevant code with macro. + Minor code changes. - * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): - Refer to the metrics of the `TT_Size' object. +2017-10-12 Ewald Hew -2017-03-29 Werner Lemberg + Extract width parsing from Type 1 parser. - [truetype] Fix thinko related to PS name of default named instance. + Duplicate the fast advance width calculations from the old parser. + This is to facilitate adding options for compiling out the old parser. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are - name ID values, not indices into the array of name entries. + * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function. + * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry + `parse_metrics'. + * src/psaux/psauxmod.c: Set the new entry. -2017-03-27 Werner Lemberg + * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String), + src/cid/cidgload.c (cid_load_glyph): Separate + conditional for selecting engine. - [cid, truetype] Don't use `index' as a variable name. +2017-10-09 Werner Lemberg - At least on FreeBSD there is a global declaration of `index' in file - `/usr/include/strings.h'. + * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow. - * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where - appropriate. + Reported as -2017-03-27 Wojciech Mamrak + https://bugs.chromium.org/p/chromium/issues/detail?id=772775 - [sfnt] Minor improvement for handling kern tables. +2017-10-08 Werner Lemberg - * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for - cross-stream kerning tables since we reject format 2 tables later - on anyways. - Modify code for limit test... - (tt_face_get_kerning): ... to avoid a limit test here. + * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows. -2017-03-27 Werner Lemberg + Reported as - [pcf] Fix compiler warnings. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579 - Reported by Alexander Hedges . +2017-10-07 Werner Lemberg - * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag - `property_name' with `FT_UNUSED' where necessary. + [sfnt] Adjust behaviour of PS font names for variation fonts. -2017-03-26 Werner Lemberg + * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's + PS name only if no variation is applied. - * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. +2017-10-07 Werner Lemberg - Reported as + [cff, truetype] Adjust behaviour of named instances. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 + This commit completely separates the interaction between named + instances and variation functions. In particular, resetting the + variation returns to the current named instance (if set) and not to + the base font. -2017-03-23 Werner Lemberg + As a side effect, variation functions no longer change the named + instance index. - [psaux] Better protect `flex' handling. + * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance' + function. + Also apply `MVAR' table to named instances. - Reported as + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast. + (tt_set_mm_blend): No longer check whether requested variation + coincides with a named instance. + (TT_Set_Var_Design): Use current named instance for default + coordinates. + * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 +2017-10-07 Werner Lemberg - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Since there is not a single flex operator but a - series of subroutine calls, malformed fonts can call arbitrary other - operators after the start of a flex, possibly adding points. For - this reason we have to check the available number of points before - inserting a point. + Make `FT_Set_Named_Instance' work. -2017-03-23 Werner Lemberg + * src/cff/cffdrivr.c (cff_set_instance): New function. + (cff_service_multi_masters): Register it. - [sfnt] Fix check for default named instance. + * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function. + * src/truetype/ttgxvar.h: Updated. + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register + it. - * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four - bytes, not two... + * src/type1/t1load.c (T1_Reset_MM_Blend): New function. + * src/type1/t1load.h: Updated. + * src/type1/t1driver.c (t1_service_multi_masters): Register it. -2017-03-23 Werner Lemberg +2017-10-07 Werner Lemberg - Make MM fonts work (again). + Make `FT_FACE_FLAG_VARIATION' work. - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore - return value of `ft_face_get_mvar_service'; instead, check whether a - service is actually returned. + * include/freetype/internal/tttypes.h (TT_Face): Remove + `is_default_instance'; this can be replaced with a combination of + `FT_IS_VARIATION' and `FT_IS_INSTANCE'. -2017-03-20 Werner Lemberg + * src/cff/cffdrivr.c (cff_get_advances): Updated. - [truetype] Some variable renamings. + * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c + (sfnt_init_face): Updated. - Too much local variables holding different structures were called - `metrics'. + * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c + (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE), + src/truetype/ttgxvar.c (tt_set_mm_blend): Updated. + * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): + Handle `FT_FACE_FLAG_VARIATION'. - * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. + * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle + `FT_FACE_FLAG_VARIATION'. - * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, - compute_glyph_metrics): s/metrics/incr_metrics/. - (load_sbit_image): s/metrics/sbit_metrics/. +2017-10-07 Werner Lemberg - * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. - (tt_size_init_bytecode): s/metrics/tt_metrics/. - (tt_size_reset): s/metrics/size_metrics/. + New function `FT_Set_Named_Instance'. -2017-03-20 Werner Lemberg + No effect yet. - [sfnt] Don't add instances to non-variation fonts. + * src/base/ftmm.c (FT_Set_Named_Instance): New function. - * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. + * include/freetype/ftmm.h: Updated. -2017-03-20 Werner Lemberg +2017-10-07 Werner Lemberg - * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). + Add macros for checking whether a font variation is active. -2017-03-18 Werner Lemberg + * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION, + FT_IS_VARIATION): New macros. + No effect yet. - Introduce FT_UINT_TO_POINTER macro (#50560). +2017-10-07 Werner Lemberg - We have to make a separate case for Windows 64's LLP64 data model. + Add framework for setting named instance in MM service. - * builds/unix/ftconfig.in, builds/vms/ftconfig.h, - include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. + * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): + New function typedef. + (MultiMasters): Add `set_instance' member. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. - * src/truetype/ttgload.c (load_truetype_glyph): Use it. + * src/cff/cffdrivr.c (cff_service_multi_masters), + src/truetype/ttdriver (tt_service_gx_multi_masters), + src/type1/t1driver.c (t1_service_multi_masters): Updated. -2017-03-18 Werner Lemberg +2017-10-07 Werner Lemberg - * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). + [type1] Minor code shuffling. - The problematic font that exceeds the old limit is Lato-Regular, - version 2.007, containing bytecode generated by a buggy version of - ttfautohint. + * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of... + (t1_set_mm_blend): ...this new function. + (T1_Set_MM_Design): Use `t1_set_mm_blend'. -2017-03-18 Werner Lemberg +2017-10-05 Werner Lemberg - [truetype] Another limitation for bytecode loop count maximum. + * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer + overflow. Reported as - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539 - * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' - by number of glyphs also. +2017-10-05 Werner Lemberg -2017-03-18 Werner Lemberg + Fix compiler warnings. - [ftfuzzer] Minor improvement. + * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies + on numeric overflow. + Add cast. - * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if - bitmap strikes are active. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable + types, add cast. -2017-03-18 Werner Lemberg +2017-10-04 John Tytgat - Improve `make multi'. + [cff] Add support for `FSType'. - * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. + * include/freetype/internal/cfftypes.h (CFF_FontRec): Add + `font_extra' entry. - * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. + * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to + retrieve FSType info from the embedded PostScript data. + (cff_service_ps_info): Register function. - * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. + * src/cff/cffload.c (cff_font_done): Free `font_extra'. - * src/sfnt/pngshim.c: Guard file with - TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. +2017-09-30 Alexei Podtelezhnikov - * src/sfnt/ttbdf.c: Avoid empty source file. - * src/sfnt/ttpost.c: Guard file with - TT_CONFIG_OPTION_POSTSCRIPT_NAMES. - * src/sfnt/ttsbit.c: Guard file with - TT_CONFIG_OPTION_EMBEDDED_BITMAPS. + Signedness fixes in bitmap presetting. - * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty - source file. + Reported as - * src/truetype/ttsubpix.c: Guard file with - TT_USE_BYTECODE_INTERPRETER also. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514. - * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. + * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. + * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned + subtraction. - * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, - src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, - src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, - src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, - src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, - src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort - entries. +2017-09-29 Alexei Podtelezhnikov -2017-03-17 Werner Lemberg + Bitmap metrics presetting [2/2]. - Fixes for conditional compilation. + * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when + appropriate but `FT_Render_Glyph' is not called. + * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change. - * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' - earlier. +2017-09-28 Alexei Podtelezhnikov - * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into - TT_CONFIG_OPTION_GX_VAR_SUPPORT block. - (sfnt_done_face): Protect some code with - TT_CONFIG_OPTION_GX_VAR_SUPPORT. + [smooth, raster] Miscellaneous cleanups. - * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler - warning. + * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce + translations and clean up the exit. + (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'. - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable - into TT_USE_BYTECODE_INTERPRETER block. +2017-09-28 Ben Wagner - (tt_loader_init): Put `error' variable into - TT_USE_BYTECODE_INTERPRETER block. + [truetype] Really, really fix #52082. -2017-03-17 Werner Lemberg + * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. - Fix preprocessor warning. +2017-09-28 Werner Lemberg - * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether - TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its - value. + * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow. -2017-03-17 Werner Lemberg + Reported as - `make multi' fixes; compiler warnings. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510 - * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. +2017-09-28 Ewald Hew - * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include - FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. + * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak. - * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include - FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. - (get_win_string, get_apple_string): Initialize `result'. + Reported as -2017-03-17 Dave Arnold + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489 - [cff] Fix potential bugs in default NDV for CFF2. +2017-09-28 Alexei Podtelezhnikov - * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend - vector when `lenNDV' is zero; don't rely on zero-init. - Save `lenNDV' as part of cache key even when `lenNDV' is zero. + Bitmap metrics presetting [1/2]. -2017-03-17 Dave Arnold + This mainly just extracts the code for presetting the bitmap metrics + from the monochrome, grayscale, and LCD renderers into a separate + function. - [cff] Fix CFF2 stack allocation. + * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that + calculates prospective bitmap metrics for the given rendering mode. + * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): + Declare it. - * src/cff/cffparse.c (cff_parser_init) add 1 for operator. + * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds + padding to CBox taking into account pecularities of LCD rendering. + * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it. -2017-03-16 Werner Lemberg + * src/raster/ftrend1.c (ft_raster1_render): Reworked to use + `ft_glyphslot_preset_bitmap'. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. + (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting + is moved to `ft_glyphslot_preset_bitmap'. - * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. +2017-09-28 Ewald Hew - Reported as + [psaux] Fix compiler warning. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 + * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing + code. -2017-03-15 Werner Lemberg +2017-09-27 Werner Lemberg - Remove clang compiler warnings (#50548). + * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. - * include/freetype/internal/tttypes.h (TT_FaceRec): Make - `var_postscript_prefix_len' unsigned. +2017-09-25 Werner Lemberg - * src/autofit/afwarp.c (af_warper_compute_line_best): Remove - redundant assignment. + [psaux] Fix compiler warnings. - * src/cff/cffload.c (cff_subfont_load): Add casts. + * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant + test. - * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. + * src/psaux/psintrp.c (cf2_interpT2CharString) + : Add casts. - * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' - keyword. - Add casts. - (fixed2float): Add cast. - (sfnt_get_var_ps_name): Make `p' always initialized. - Add casts. + * src/psaux/psobjs.c (ps_decoder_init): Add cast. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. +2017-09-25 Ewald Hew -2017-03-15 Werner Lemberg + [psaux] Minor fixes. - [ftfuzzer] Limit number of tested faces and instances. + * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}: + Rearrange `ps_builder_init' arguments to conventional order. - This is inspired by the discussion in and analysis of + * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and + notice for `SubFont' in Type 1 mode. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 +2017-09-25 Ewald Hew - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only - up to 20 face indices. - Use only up to 20 instance indices. + [psaux] Move `psdecode' into `psobjs'. -2017-03-15 Werner Lemberg + As the former only contains a single procedure, move it into + `psobjs' for simplicity. Also change the parameter order to the + conventional one. - * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. + * src/psaux/psdecode.c (ps_decoder_init): Moved to... + * src/psaux/psobjs.c: ...Here. + * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto. -2017-03-14 Werner Lemberg + * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update + `ps_decoder_init' function signature. - [sfnt] Implement PS names for font instances [3/3]. + * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c: + Update calls. - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes. - * include/freetype/internal/tttypes.h (TT_FaceRec): New fields - `var_postscript_prefix' and `var_postscript_prefix_len'. + * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC): + Update file references. - * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. - (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. - (get_win_string, get_apple_string): Remove `const' from return - value. - (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. - (hexdigits): New array. - (sfnt_get_var_ps_name): New function, implementing Adobe TechNote - 5902 to construct a PS name for a variation font instance. - (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. +2017-09-25 Ewald Hew - * src/sfnt/sfobjs.c (sfnt_done_face): Updated. + [psaux] Fix Type 1 hinting. - * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset - `face->postscript_name' to trigger recalculation for new instance - parameters. + Type 1 hinting breaks sometimes when mid-charstring hints should + have been in the initial hintmap. This fix adds a preprocessing + pass that reads all hints and builds the correct initial hintmap + first, before proceeding to build the glyph outline. -2017-03-14 Werner Lemberg + * src/psaux/psintrp.c (cf2_interpT2CharString): New + `initial_map_ready' boolean flag. + Ignore outline commands and hint changes on first pass. + : Add section to build hintmap and rewind. - [sfnt] Implement PS names for font instances [2/3]. +2017-09-25 Ewald Hew - * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: - New function to find the shortest representation of a 16.16 - fractional number. + [psaux] Add tracing for hints. -2017-03-14 Werner Lemberg + * src/psaux/pshints.c (cf2_hintmap_dump): New function. + (cf2_hintmap_insertHint): Trace incoming and inserted hints. + (cf2_hintmap_build): Dump hintmap before and after hint adjustment. - [sfnt] Implement PS names for font instances [1/3]. +2017-09-25 Ewald Hew - Add 128bit MurmurHash 3 function. + [psaux] Minor fixes. - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop + results. + s/font->decoder/decoder/ where necessary. + : Use + offset parameter in `cf2_doStems' instead of doing correction for + left-sidebearing. - * src/sfnt/sfdriver.c (ROTL32): New macro. - (fmix32, murmur_hash_3_128): New functions. +2017-09-25 Ewald Hew -2017-03-13 Werner Lemberg + [cid] Use the new engine. - [truetype] Ignore invalid MVAR tags. + * src/cid/cidgload.c: Update includes. + (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph + loading code as with `type1' module. - Reported as +2017-09-25 Ewald Hew - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 + [cid] Add Adobe engine configuration. - * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit - warning for invalid tags. - (tt_apply_mvar): Ignore invalid tags. + This is similar to what was done in the `type1' module. -2017-03-12 Werner Lemberg + * src/cid/cidriver.c (t1cid_driver_class): Update declaration. + * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H. + (cid_driver_init): Update code. - [truetype] Store and use design coordinates also. +2017-09-25 Ewald Hew - * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): - Add `normalizedcoords' argument. + [psaux] Change subfont synthesis for CID fonts. - * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store - the design coordinates of the current instance. - Updated. + Change `t1_make_subfont' to take in the Private dict record as an + argument. This is because Type 1 and CID font records in FreeType + have this in different places. - * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... - (tt_set_mm_blend): ... New function. - Convert data in `normalizedcoords' array to `coords' array on - demand. - (TT_Set_Var_Design): Store argument data in `coords' array. - (TT_Get_Var_Design): Get data from `coords' array. - (tt_get_var_blend): Updated. - (tt_done_blend): Updated. + * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to + `FT_Face' so that CID is also accepted. + Take `PS_Private' as an argument and let caller figure out where the + Private dict actually is. + Update references. - * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. + * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update + declaration. - * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. + * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update + call. - * src/cff/cffobjs.c (cff_face_init): Updated. +2017-09-25 Ewald Hew -2017-03-12 Werner Lemberg + [type1] Switch to Adobe engine. - src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. + * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine. -2017-03-08 Werner Lemberg +2017-09-25 Ewald Hew - [sfnt] Another fix for buggy variation fonts. + [psaux] Extend Adobe interpreter (seac). - Reported as + This concludes the changes needed to add Type 1 support. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 + * src/psaux/psintrp.c: Update includes. + (cf2_interpT2CharString) : Implement this similarly to + implied seac for CFF. - * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of - instances to zero for `CFF' fonts table, ensure that there is no - `CFF2' present also (which gets priority). + * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New + function to look up the glyph index. -2017-03-07 Werner Lemberg + * src/psaux/psft.c (cf2_getT1SeacComponent, + cf2_freeT1SeacComponent): New functions to get the charstrings for + seac components. - [sfnt] Improve handling for buggy variation fonts. + * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations. - Reported as +2017-09-25 Ewald Hew - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 + [psaux] Extend Adobe interpreter (flex in callothersubr). - * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of - instances to zero for `CFF' fonts table, ensure that there is no - `glyf' table present also (which gets priority). + * src/psaux/psintrp.c (cf2_interpT2CharString) + : Fix Flex feature handling (OtherSubrs 0, 1, + 2). + : Do not actually move the `glyphPath' while doing + flex. This is to avoid closing the current contour. -2017-03-06 Werner Lemberg +2017-09-25 Ewald Hew - [sfnt, truetype] Always provide default instance. + [psaux] Extend Adobe interpreter (callothersubr). - As documented in the OpenType specification, an entry for the - default instance may be omitted in the named instance table. In - particular this means that even if there is no named instance table - in the font we actually do have a named instance, namely the default - instance. + * src/psaux/psintrp.c (cf2_interpT2CharString) + : Copy code from + `t1_decoder_parse_charstrings' (in `t1decode.c'). + OtherSubr 3 (change hints) should reset the hintmask, so that the + new hints are applied. + Fix function calls and stack access. - For consistency, we always want the default instance in our list of - named instances. If it is missing, we try to synthesize it. +2017-09-25 Ewald Hew - * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default - instance is in the table of named instances. Otherwise adjust - number of instances. + [psaux] Extend Adobe interpreter (pop). - * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. - (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named - instances. - Sythesize a named instance entry if necessary. - (tt_done_blend): Free `normalized_stylecoords'. + * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled + OtherSubr results are stored. Implement the PostScript stack using + an array. + : Ensure that the stack is not cleared after getting + `OtherSubr' results. + Fix stack access. -2017-03-05 Werner Lemberg +2017-09-25 Ewald Hew - [sfnt] Remove redundant code. + [psaux] Extend Adobe interpreter (callsubr). - * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for - `num_instances', which will always succeed. + * src/psaux/psintrp.c (cf2_interpT2CharString) : + Type 1 mode. -2017-03-04 Werner Lemberg + * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode. - [sfnt] Add `get_name_id' service. +2017-09-25 Ewald Hew - * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New - typedef. - (SFNT_Interface): Add `get_name_id' field. - (FT_DEFINE_SFNT_INTERFACE): Updated. + [psaux] Extend Adobe interpreter (div, four-byte numbers). - * src/sfnt/sfdriver.c (search_name_id): Rename to... - (sfnt_get_name_id): ... this. - (sfnt_get_ps_name, sfnt_interface): Udpated. + * src/psaux/psintrp.c (cf2_interpT2CharString) : Add + Type 1 mode. Type 1 requires large integers to be followed by + `div'; cf. `Adobe Type 1 Font Format', section 6.2. + : Push Type 1 four-byte numbers as `Int' always. This is + to ensure `div' and `callsubr' get values they can use. -2017-03-04 Werner Lemberg +2017-09-25 Ewald Hew - [truetype] Make `TT_Set_MM_Blend' set named instance index. + [psaux] Extend Adobe interpreter (hints). - * src/truetype/ttgxvar.h (GX_Blend): New array - `normalized_stylecoords'. + * src/psaux/psintrp.c (cf2_interpT2CharString) : Add correction for left sidebearing in Type 1 mode. + Allow adding hints mid-charstring. + : Translate into equivalent commands + for three normal stem hints. This requires some recalculation of + stem positions. + Correction for left sidebearing. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill - `normalized_stylecoords'. - (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' - accordingly. +2017-09-25 Ewald Hew -2017-03-02 Werner Lemberg + [psaux] Extend Adobe interpreter (hsbw, sbw). - [truetype] Split off designer/normalized conversion routines. + * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the + first operation in a Type 1 charstring. + (cf2_interpT2CharString): Remove unused variables. + : `hsbw' or `sbw' + must be the first operation in a Type 1 charstring. + : Fix data access and add correction for + left sidebearing. - * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion - code designer->normalized coordinates to... - (ft_var_to_normalized): ... New function. - (TT_Get_Var_Design): Split off conversion code normalized->designer - coordinates to... - (ft_var_to_design): ... New function. +2017-09-25 Ewald Hew -2017-02-28 Werner Lemberg + [psaux] Extend Adobe interpreter (setcurrentpoint). - [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. + * src/psaux/psintrp.c (cf2_interpT2CharString) + : Fix stack access. - * src/sfnt/sfdriver.c (sfnt_ps_map): New array. - (sfnt_is_postscript): New function. - (char_type_func): New typedef. - (get_win_string, get_apple_string): Add argument to specify - character checking function. - Add argument whether argument checking failures should be reported. - Update callers. - (search_name_id): Fix return value. +2017-09-25 Ewald Hew -2017-02-23 Werner Lemberg + [psaux] Extend Adobe interpreter (closepath). - [sfnt] Split off another bit of `sfnt_get_ps_name'. + * src/psaux/psintrp.c (cf2_interpT2CharString) : + Use the right builder function. We can use the `haveWidth' boolean + already present, instead of implementing `parse_state'. - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some - functionality into... - (search_name_id): ... New function. +2017-09-25 Ewald Hew -2017-02-23 Werner Lemberg + [psaux] Add Type 1 operations to Adobe CFF interpreter. - [sfnt] Modularize `sfnt_get_ps_name'. + The following Type 1 specific ops have been added (copied from + `t1decode'): - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some - functionality into... - (IS_WIN, IS_APPLE): ... New macros. - (get_win_string, get_apple_string): ... New functions. + closepath + vstem3 + hstem3 + seac + sbw + callothersubr + pop + setcurrentpoint + hsbw -2017-02-23 Werner Lemberg + The following require a Type 1 mode, because of differences in + specification: - [truetype] Minor improvement. + hstem + vstem + vmoveto + callsubr + div + rmoveto + hmoveto + Numbers - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Remove unnecessary tests. + The subsequent commits will implement these changes and adapt + accesses of data and objects to the new interpreter. -2017-02-23 Werner Lemberg + NOTE: Will not compile in the meantime! - * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. + * src/psaux/psintrp.c: Add opcodes to enum. + (cf2_interpT2CharString): Copy relevant code over from + `t1_decoder_parse_charstrings' (in `t1decode.c'). - For orthogonality with other structure field names. +2017-09-25 Ewald Hew - Update all users. + [type1] Fixes for rendering. -2017-02-22 Alexei Podtelezhnikov + The Type 1 advance width calculation passes null for glyph slot, + etc, which can cause null pointer access in the new interpreter. + Fall back to the old one for now. - * src/smooth/ftgrays.c (gray_hline): Improve code. + Fix the large glyph retry code and ensure hinting and scaling flags + are set properly. -2017-02-20 Dominik Röttsches + * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a + check for metrics_only. + Set the `force_scaling' flag. + (T1_Parse_Glyph): Updated. + (T1_Load_Glyph): Add `hinting' and `scaled' flags. - Fix some `ttnameid.h' entries (#50313). +2017-09-25 Ewald Hew - * include/freetype/ttnameid.h: - s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, - s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. + [psaux] Add missing objects (2/2). -2017-02-20 Werner Lemberg + Synthesize a `SubFont' object for Type 1 fonts. This is used in the + interpreter to access Private dict data, which are stored in + different places for Type 1 and CFF. This allows the same data to + be used in either mode. - [cff] Finish support for `random' operator. + * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy + required values to a dummy `CFF_SubFont' object. This is similar to + `cff_make_private_dict'. + * src/psaux/psobjs.h: Add the new declaration. - * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. + * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto. + Add this to the PSAux Service for future use with CID fonts. - * src/cff/cffobjs.c: Updated. - (cff_driver_init): Initialize random seed value. + * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H. + (T1_Parse_Glyph_And_Get_Char_String): Add the call. - * src/cff/cffload.c (cff_random): New function. - (cff_subfont_load): Add `face' argument. - Update all callers. - Initialize random number generator with a proper seed value. - (cff_font_load): Add `face' argument. - Update all callers. +2017-09-25 Ewald Hew - * src/cff/cffload.h: Updated. + [psaux] Add missing objects for Type 1 (1/2). - * src/cff/cf2intrp.c (CF2_FIXME): Removed. - (cf2_interpT2CharString) : Implement opcode. + Move `CF2_Font' instance to `PS_Decoder'. This is the context for + the interpreter and since it is currently stored in `CFF_Font', is + unavailable in Type 1 mode. - * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't - initialize random seed value. - : Use new random seed framework. + * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New + `cf2_instance' field. -2017-02-20 Werner Lemberg + * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to + `PS_Decoder'. - [cff] Sanitize `initialRandomSeed'. + * src/psaux/t1decode.c (t1_decoder_done): Add finalization code. - * src/cff/cffload.c (cff_load_private_dict): Make - `initial_random_seed' value always positive. + * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses. -2017-02-20 Werner Lemberg +2017-09-25 Ewald Hew - [cff] Introduce `random-seed' property (2/2). + Allow `type1' module to use the Adobe engine. - * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. - (open_face): Initialize `face->internal->random_seed'. - (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. + Add the callback and some conditionals to switch between the two + engines. - * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' - property. + * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change + function declarations. + * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the + callbacks. -2017-02-20 Werner Lemberg + * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for + number conversion. - [cff] Introduce `random-seed' property (1/2). + * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code + to choose which renderer to use. - We need this for support of the `random' operator. + * src/cid/cidgload.c (cid_load_glyph): Update call. + * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update + includes. - * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. +2017-09-25 Ewald Hew - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New - field `random_seed'. + [type1] Add Adobe engine configuration. - * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'. + Use the previously changed PS_Driver in type1 module to store + hinting engine configuration. -2017-02-17 Werner Lemberg + * include/freetype/ftt1drv.h: New file. + Duplicate and rename config options from CFF. + * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro. - Remove clang warnings. + * src/type1/t1driver.c (t1_driver_class): Update declaration. + * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H. + (T1_Driver_Init): Update code. - * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' - keyword. +2017-09-25 Ewald Hew - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): - Initialize some variables. + [cff] Move and rename `CFF_Driver'. -2017-02-16 Nikolaus Waxweiler - Werner Lemberg + This is so that we can use the same hinting engine parameters for + Type 1. - Add face property for stem darkening. + * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and + move to... + * include/freetype/internal/psaux.h (PS_Driver): ...here. - * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New - macro. + * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c, + src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c, + src/psaux/psobjs.c: Update references. - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add - `no_stem_darkening' field. +2017-09-25 Ewald Hew - * src/autofit/afloader.c (af_loader_load_glyph), - src/autofit/afmodule.c (af_property_set): Updated. + [psaux, type1] Reorganize object fields. - * src/base/ftobjs.c: Include FT_AUTOHINTER_H. - (ft_open_face_internal): Updated. - (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. + Make some fields more generic, so that we can access them the same + way regardless of Type 1 or CFF. - * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. + * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face' + to `FT_Face'. + Remove unused fields. - * src/cff/cffdrivr.c (cff_property_set): Updated. + * src/psaux/psft.c: Update all accesses of `PS_Builder.face'. + Add some asserts to guard against casting `T1_Face' as `TT_Face'. -2017-02-16 Nikolaus Waxweiler - Werner Lemberg + * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow + `CFF_GlyphSlot', so that we can pretend they are the same in the + interpreter. - Add face property for LCD filter weights. + * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point): + Updated with above changes. - * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, - FT_LCD_FILTER_FIVE_TAPS): New macros. - (FT_LcdFiveTapFilter): New typedef. +2017-09-25 Ewald Hew - * include/freetype/ftobjs.h (FT_Face_InternalRec) - [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. - (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. - (ft_lcd_filter_fir): New prototype. - (FT_LibraryRec): Updated. + [psaux] Prepare for Type 1 mode. - * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... - (ft_lcd_filter_fir): ... this base function. - Updated. - (_ft_lcd_filter_legacy): Updated. - (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. + Add some checks for Type 1 data passing through. - * src/base/ftobjs.c (ft_open_face_internal): Updated. - (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. + * src/psaux/psfont.h (CF2_Font): Add `isT1' flag. + * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend + code which is not applicable for Type 1. - * src/smooth/ftsmooth.c (ft_smooth_render_generic) - [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from - `FT_Face_Internal'. + * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing + `decoder->cff' in Type 1 mode. + Copy `is_t1' flag to `CF2_Font'. -2017-02-14 Nikolaus Waxweiler - Werner Lemberg +2017-09-25 Ewald Hew - Add new function `FT_Face_Properties'. + [psaux, cff] Use the new objects. - This commit provides the framework, to be filled with something - useful in the next commits. + * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix + switching between new and old engines. - * include/freetype/freetype.h (FT_Face_Properties): Declare. + * src/cff/cffgload.c, src/cff/cffparse.c: Update calls. - * src/base/ftobjs.c (FT_Face_Properties): New function. + * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h, + src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all + to use new objects. -2017-02-13 Werner Lemberg +2017-09-24 Ewald Hew - [autofit] Prevent overlapping blue zones. + [psaux] Objects for new interpreter (part 2). - Problem reported as + Make the new objects copy over values. They are essentially wrapper + types for the different decoders/builders. - https://github.com/google/fonts/issues/632 + * include/freetype/internal/psaux.h: Update declarations. + (PS_Builder): Add `is_t1' flag. + (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to... + (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this. + (PS_Decoder): Updated. + Add `t1_parse_callback' member. + (PSAux_ServiceRec): Add `ps_decoder_init' member. - The font in question (Nunito) has values 705 and 713 for the - reference and overshoot values, respectively, of the first blue - zone. Blue zone 2, however, has value 710 for both the reference - and overshoot. At 12ppem, reference and overshoot of blue zone 0 - becomes 8px, while blue zone 2 becomes 9px. + * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations. - A peculiarity of this font is that the tops of isolated vertical - stems like `N' have a slight overshoot also. The auto-hinter tries - to find the nearest blue zone using the *original* coordinates. For - vertical stems, this is value 713. For normal horizontal tops like - in character `E', this is value 710. Since value 713 is mapped to - 8px but value 710 to 9px, `N' and similar characters are one pixel - higher than `E', which looks very bad. + * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two + modes. - This commit sanitizes blue zones to avoid such a behaviour. + * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux' + service. - * src/autofit/aflatin.c (af_latin_sort_blue): New function. - (af_latin_metrics_init_blues): Sort blue values and remove overlaps. +2017-09-24 Ewald Hew -2017-02-12 Alexei Podtelezhnikov + [psaux] Add objects for new interpreter. - * src/smooth/ftgrays.c (gray_sweep): Improve code. + Introduce `PS_Decoder' and `PS_Builder' which include all fields + from either Type 1 or CFF decoders/builders. -2017-02-06 Werner Lemberg + * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New + structs. - [truetype] Implement `VVAR' table support. + * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder' + functions. - * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... - (GX_HVVarTable): ...This. - (GX_Blend): Add fields for `VVAR' table handling. - Other minor updates. + * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold + `PS_Decoder' initialization functions. - * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... - (ft_var_load_hvvar): ...This. - Handle VVAR loading also (controlled by an additional parameter). - (tt_hadvance_adjust): Renamed to... - (tt_hvadvance_adjust): ...This. - Handle application of advance height also (controlled by an - additional parameter). - (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for - `tt_hvadvance_adjust'. + * src/psaux/psaux.c, src/psaux/Jamfile (_sources), + src/psaux/rules.mk (PSAUX_DRV_SRC): Updated. - * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. +2017-09-24 Ewald Hew -2017-02-05 Werner Lemberg + [psaux] Rename files. - [autofit] Use better blue zone characters for lowercase latin. + Replace the `cf2' file name prefix with `ps' as the Adobe engine + will be used for both PostScript Types 1 and 2 (CFF) instead of just + CFF. - The number of lowercase characters for computing the top flat blue - zone value was too small (in most cases only `x' and `z'). If one - of the two characters has a large serif, say, it can happen that - FreeType must select between two different values, having a 50% - chance to use the wrong one. As a result, rendering at larger PPEM - values could yield uneven lowercase glyph heights. + s/cf2/ps/ for all following. - Problem reported by Christoph Koeberlin . + * src/psaux/cf2*: Rename files. + * src/psaux/*: Update includes. - * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced - with... - (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): - ... New, extended sets. - (AF_BLUE_STRINGSET_LATN): Updated. + * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC, + PSAUX_DRV_H): Update file references. - * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. +2017-09-24 Ewald Hew -2017-02-04 Werner Lemberg + [psaux] Minor fix. - Make `freetype-config' a wrapper of `pkg-config' if possible. + Use `MultiMasters' service in `psaux' instead of a call to `cff'. + The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined. - Based on ideas taken from + * src/psaux/cf2ft.c: Update includes. + (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of + `cff_get_var_blend'. - http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch - http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch +2017-09-24 Ewald Hew - * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to - set output variables if program is available. + [psaux, cff] Move `cff_random' into `psaux' service. - * docs/CHANGES, docs/freetype-config.1: Updated. + NOTE: Does not compile! -2017-02-04 Werner Lemberg + Minor fix to allow both `cff' and `psaux' to use `cff_random'. - * builds/unix/unix-def.in (freetype-config): Fix permissions. + * src/cff/cffload.c (cff_random): Move to... + * src/psaux/psobjs.c: Here. + * src/cff/cffload.h: Move corresponding declaration to + `src/psaux/psobjs.h'. -2017-02-03 Werner Lemberg + * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the + function here... + * src/psaux/psauxmod.c: And here. - * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. + * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code. -2017-02-03 Werner Lemberg +2017-09-24 Ewald Hew - * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. + [cff] Move struct declarations to `freetype/internal'. - Reported by Behdad. + NOTE: Does not compile! -2017-02-02 Werner Lemberg + This is so that the CFF functions moved to `psaux' can access the + same structs that they need. - [truetype] Fix MVAR post-action handling. + * src/cff/cfftypes.h: Moved to... + * include/freetype/internal/cfftypes.h: ...Here. - Reported as + * src/cff/cffobjs.h: Moved the struct declarations to... + * include/freetype/internal/cffotypes.h: ... this new file. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 + * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H, + FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros. - * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This - is important to make `tt_size_reset_iterator' (called in - `tt_apply_mvar') always work. + * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c, + src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c, + src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h, + include/freetype/internal/psaux.h, + include/freetype/internal/services/svcfftl.h: Update includes. -2017-02-02 Werner Lemberg + * src/cff/rules.mk (CFF_DRV_H): Updated. - Make compilation with FT_CONFIG_OPTION_PIC work again. +2017-09-24 Ewald Hew - All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. + [psaux, cff] Add new service for inter-module calls. - * include/freetype/internal/services/svmetric.h - (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. + NOTE: Does not compile! - * src/autofit/aflatin.c (af_latin_hints_compute_edges, - af_latin_hint_edges): Provide `globals' variable. + This is to allow CFF functions moved to `psaux' to call functions + declared in `src/cff/cffload.h'. - * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing - variable. + * include/freetype/internal/services/svcfftl.h: New file, setting up + a `CFFLoad' service. - * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, - AF_STYLE_CLASSES_GET): Redefine. + * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10, + FT_DEFINE_SERVICEDESCREC): New macros. + (FT_SERVICE_CFF_TABLE_LOAD_H): New macro. - * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. + * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service. - * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. + * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h + (CF2_FontRec): Add service interface. - * src/cff/cffpic.h (CffModulePIC): Fix typo. + * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c, + src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service. -2017-01-31 Alexei Podtelezhnikov +2017-09-24 Ewald Hew - * src/smooth/ftgrays.c (gray_render_scanline): Improve code. + [psaux, cff] Add callbacks for inter-module calls. -2017-01-31 Werner Lemberg + NOTE: Does not compile! - [cff] Provide metrics variation service interface (#50196). + * include/freetype/internal/psaux.h: Add function pointer + declarations. - Only now I've got an OTF with an HVAR table for testing... + * src/psaux/cffdecode.c (cff_decoder_init): Update to take in + callbacks. + * src/psaux/cffdecode.h: Ditto. - The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the - metrics variations interface. However, this didn't work with - `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. + * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load): + Update calls to pass in callbacks. + * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them. - * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for - metric service functions from the `truetype' module. - (cff_service_metrics_variations): New service. - (cff_services): Updated. +2017-09-24 Ewald Hew - * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. - [FT_CONFIG_OPTION_PIC]: Synchronize code. + [psaux, cff] Create new `PSAux' service interface entries. - * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to - FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always - load the service from the `truetype' module. + NOTE: Does not compile! -2017-01-31 Werner Lemberg + * include/freetype/internal/psaux.h: Include + FT_INTERNAL_TRUETYPE_TYPES_H. + (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables. + (CFF_Builder): Updated. + Fix for forward declaration. + (PSAux_ServiceRec): New field `cff_decoder_funcs'. - Add framework to support services with 9 functions. + * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New + function tables. + (PSAux_Interface): Updated. - * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): - New macro. + * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux' + service interface. -2017-01-31 Werner Lemberg + * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update + function calls to use psaux service. - [base] Fix error handing in MM functions. +2017-09-24 Ewald Hew - * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, - FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): - Implement it. + [psaux, cff] Move CFF builder components into `psaux' module. -2017-01-31 Werner Lemberg + NOTE: Does not compile! - [truetype] Fix sanity check for `gvar' table (#50184). + * src/cff/cffgload.c + (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour}, + cff_check_points): Move to... + * src/psaux/psobjs.c: Here. - * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing - variation data for some glyphs. + * src/cff/cffgload.h: Move corresponding declarations to + `src/psaux/psobjs.h'. -2017-01-31 Werner Lemberg + * src/cff/cffgload.h (CFF_Builder): Move struct declaration to... + * include/freetype/internal/psaux.h: Here. - [autofit] Avoid uninitialized jumps (#50191). +2017-09-24 Ewald Hew - * src/autofit/afcjk.c (af_cjk_metrics_check_digits), - src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize - `advance'. + [psaux, cff] Move CFF decoder components into `psaux' module. -2017-01-27 Werner Lemberg + NOTE: Does not compile! - s/GB2312/PRC/. + * src/cff/cffgload.c (CFF_Operator, + CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts, + cff_operator_seac, cff_compute_bias, + cff_lookup_glyph_by_stdcharcode, + cff_decoder_{parse_charstrings,init,prepare}): Move to... + * src/psaux/cffdecode.c: This new file. - * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. - (FT_ENCODING_GB2312): Deprecated. + * src/cff/cffgload.h: Move corresponding declarations to... + * src/psaux/cffdecode.h: This new file. - * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. - (TT_MS_ID_GB2312): Deprecated. + * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS}, + CFF_Decoder_Zone, CFF_Decoder): Move declarations to... + * include/freetype/internal/psaux.h: Here. - * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. + * src/psaux/cf2ft.h: Update include. - * docs/CHANGES: Updated. + * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with + the new file. -2017-01-26 Werner Lemberg +2017-09-24 Ewald Hew - [base] Add `FT_Get_Sfnt_LangTag' function. + [psaux, cff] Move Adobe's engine components into `psaux' module. - * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. - (FT_Get_Sfnt_LangTag): New declaration. + This is the first patch of a sequence to move the Type 2 charstring + processing capability from the `cff' module to the `psaux' module. - * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New funtion. + NOTE: Does not compile! - * docs/CHANGES: Updated. + * src/cff/cf2*: Move these files to... + * src/psaux/cf2*: Here. -2017-01-26 Werner Lemberg + * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC, + CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file + references. - [sfnt] Support `name' table format 1. + * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c + (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references. - * include/freetype/internal/tttypes.h (TT_LangTagRec): New - structure. - (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. +2017-09-24 Alexei Podtelezhnikov - * src/sfnt/ttload.c (tt_face_load_name): Add support for language - tags. - Reduce array size of name strings in case of invalid entries. - (tt_face_free_name): Updated. + Tweak per-face LCD filtering controls. - * docs/CHANGES: Updated. + Thing are simpler with a NULL-function pointer. -2017-01-25 Werner Lemberg + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New + pointer to the filter function. + (FT_LibraryRec): Remove unused `lcd_filter'. + (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here... + * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc, + ft_lcd_filter_fir): ... to here. - [sfnt] s/TT_NameEntry/TT_Name/. + * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the + per-face filter. + (FT_Face_Properties): Set it. + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify. - * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed - to... - (TT_NameRec): This. - (TT_NameTableRec): Updated. + * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter): + Minor. - * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. +2017-09-24 Jonathan Kew - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. + [sfnt] Fix `premultiply_data' (#52092). - * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, - tt_name_entry_ascii_from_other): Renamed to... - (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, - respectively. - (TT_NameEntry_ConvertFunc): Renamed to... - (TT_Name_ConvertFunc): This. - (tt_face_get_name): Updated. + * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension + if we have less than 16 bytes of data. - * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): - Updated. +2017-09-24 Werner Lemberg -2017-01-24 Werner Lemberg + [otvalid] Fix handling of ValueRecords. - [sfnt] Fix Postscript name service for symbol fonts. + For GPOS pair positioning format 1 the description of ValueRecords + in the OpenType specification (1.8.2, from today) is wrong – the + offset has to be taken from the parent structure; in this case the + `PairSet' table. - * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 - entries also. + * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'. + (otv_PairPos_validate): Adjust. -2017-01-24 Werner Lemberg +2017-09-23 Werner Lemberg - [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. + [otvalid] Handle `GSUB' and `GPOS' v1.1 tables. - * include/freetype/ftsnames.h - (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, - FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. - (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, - FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. + * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c + (otv_GPOS_validate): Implement it. - * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, - TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. - (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): - Deprecated. +2017-09-23 Werner Lemberg - * src/sfnt/sfobjs.c (sfnt_load_face): Updated. + [otvalid] Update common table handling to OpenType 1.8.2. - * docs/CHANGES: Updated. + * src/otvalid/otvcommn.c (otv_Device_validate): Handle + VariationIndex subtable. + (otv_Lookup_validate): Handle MarkFilteringSet. -2017-01-23 Werner Lemberg +2017-09-23 Alexei Podtelezhnikov - [base] Add `FT_Set_Default_Properties' (#49187). + [build] Windows-style DLL versioning. - * include/freetype/ftmodapi.h: Add declaration. + * build/windows/ftver.rc: New VERSIONINFO resource. + * build/windows/vc2010/freetype.vcxproj: Further improvements. - * src/base/ftinit.c (ft_set_default_properties): Renamed to... - (FT_Set_Default_Properties): ... this. - (FT_Init_FreeType): Updated. +2017-09-23 Ben Wagner - * docs/CHANGES: Updated. + [truetype] Really fix #52082. -2017-01-23 Werner Lemberg + * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. - [truetype] Minor updates for OpenType 1.8.1. +2017-09-23 Werner Lemberg - * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been - removed from the specification; it is now reserved. + [otvalid] Handle `GDEF' v1.2 and v1.3 tables. - * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. - (GX_FVar_Head): Remove `countSizePairs'; the corresponding data - field in the `MVAR' table is now reserved. - (fvar_fields): Updated. + No validation of variation stuff yet. -2017-01-23 Werner Lemberg + * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function. + (otv_GDEF_validate): Implement it. - [truetype] Avoid segfault for invalid variation data. +2017-09-22 Werner Lemberg - * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure - `itemCount' is not zero. + [otvalid] Handle `BASE' v1.1 table. - Reported as + No validation of variation stuff yet. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 + * src/otvalid/otvbase.c (otv_BASE_validate): Implement it. -2017-01-20 Werner Lemberg +2017-09-22 Werner Lemberg - * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. + [otvalid] Macros for 32bit offset support. -2017-01-17 Werner Lemberg + * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32, + OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros. - * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. +2017-09-21 Alexei Podtelezhnikov - (TT_APPLE_ID_FULL_UNICODE): New macro. + [build] Simplify Visual C++ 2010 project. - (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, - TT_MS_LANGID_UPPER_SORBIAN_GERMANY, - TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, - TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, - TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, - TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, - TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, - TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, - TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, - TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, - TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New - macros. + * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded + configurations and tweak. - (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. +2017-09-21 Werner Lemberg - (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, - TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, - TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, - TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, - TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, - TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, - TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, - TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, - TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, - TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, - TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, - TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, - TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, - TT_MS_LANGID_UIGHUR_PRC): New aliases. + [truetype] Integer overflow (#52082). - Remove commented out code. + * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS. - (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, - TT_NAME_ID_VARIATIONS_PREFIX): New macros. +2017-09-21 Werner Lemberg - (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many - years), use guarded long macros by default and define short versions - as aliases for the long ones. + [sfnt] Fix postscript name for default instance of variation fonts. -2017-01-15 Werner Lemberg + Problem reported by Behdad. - * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters - also. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test + `is_default_instance'. -2017-01-11 Werner Lemberg +2017-09-21 Werner Lemberg - * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. + [truetype] Fix `mmvar' array pointers, part 2. -2017-01-11 Werner Lemberg + The previous commit was incomplete. - [truetype] Actually use metrics variation service. + * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for + `master' also. - * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (ft_face_get_mvar_service): New auxiliary function to look up - metrics variation service. - (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, - FT_Set_Var_Blend_Coordinates): Call metrics variation service. +2017-09-21 Werner Lemberg - * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for - named instances. + [truetype] Fix `mmvar' array pointers. -2017-01-11 Werner Lemberg + Without this change, clang's AddressSanitizer reports many runtime + errors due to misaligned addresses. - [truetype] Provide metrics variation service. + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer + size for sub-array offsets into `mmvar'. - * include/freetype/internal/services/svmetric.h - (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. +2017-09-20 Werner Lemberg - * src/truetype/ttgxvar.c: Include FT_LIST_H. - (tt_size_reset_iterator): New auxiliary function for... - (tt_apply_var): New function. + [truetype] Integer overflows. - * src/truetype/ttgxvar.h: Updated. + Changes triggered by - * src/truetype/ttdriver.c (tt_service_metrics_variations): Add - `tt_apply_mvar'. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429 - * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics - variation service. + * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG. + (Ins_MIAP): Use SUB_LONG. -2017-01-11 Werner Lemberg +2017-09-19 Alexei Podtelezhnikov - [truetype] Parse `MVAR' table. + [build] Fix DLL builds in Visual C++ project. - * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. - (GX_Value, GX_MVarTable): New structures. - (GX_Blend): Add it. + * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug + and Release configurations. + * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) + [_DLL]: Use Visual C++ extensions. - * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, - GX_GASP_CASE): New macros. - (ft_var_get_value_pointer): New auxiliary function to get a pointer - to a value from various SFNT tables already stored in `TT_Face'. - (ft_var_load_mvar): New function. - (TT_Get_MM_Var): Call it. - (tt_done_blend): Updated. +2017-09-19 John Tytgat -2017-01-11 Werner Lemberg + [cff] Fix family name logic of pure CFF fontdata (#52056). - [truetype] More preparations for MVAR support. + 1. If `FamilyName' is present in the CFF font, use this for + FT_Face's `family_name'. + 2. Otherwise, use the face name and chop off any subset prefix. + 3. If at this point FT_Face's `family_name' is set, use this + together with the full name to determine the style. + 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'. + 5. If we don't have a valid style, use "Regular". - * src/truetype/ttobjs.c (tt_size_reset): Add argument to make - function only recompute ascender, descender, and height. + Previously, FT_Face's `family_name' entry for pure CFF fontdata + nearly always was the fontname itself, instead of the `FamilyName' + entry in the CFF font (assuming there is one). - * src/truetype/ttobjs.h: Updated. + * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it. - * src/truetype/ttdriver.c (tt_size_select, tt_size_request): - Updated. +2017-09-18 Alexei Podtelezhnikov -2017-01-09 Werner Lemberg + [build] Declutter Visual C++ 2010-2017 project. - [pcf] Disable long family names by default. + * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02) + optimization for Release configuration throughout the project. - * include/freetype/config/ftoption.h - (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. +2017-09-16 Werner Lemberg -2017-01-09 Werner Lemberg + * Version 2.8.1 released. + ========================= - [pcf] Make long family names configurable. - The change from 2016-09-29 was too radical (except for people using - the openSuSE GNU/Linux distribution). To ameliorate the situation, - PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls - the feature; if set, a new PCF property option - `no-long-family-names' can be used to switch this feature off. + Tag sources with `VER-2-8-1'. - * include/freetype/config/ftoption.h, devel/ftoption.h - (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. + * docs/VERSION.TXT: Add entry for version 2.8.1. + * docs/CHANGES: Updated. - * include/freetype/ftpcfdrv.h: New header file (only containing - comments currently, used for building the documentation). + * 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.8/2.8.1/, s/28/281/. - * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. - * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. + * builds/unix/configure.raw (version_info): Set to 21:0:15. + * CMakeLists.txt (VERSION_PATCH): Set to 1. - * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and - FT_PCF_DRIVER_H. - (pcf_property_set, pcf_property_get): New functions. - (pcf_service_properties): New service. - (pcf_services): Updated. - (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle - `no_long_family_names'. +2017-09-13 suzuki toshiya - * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' - and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. + [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7. + + __builtin_shuffle() was introduced in gcc-4.7. The lowest + gcc to enable vector operation is delayed from 4.6 to 4.7. + + * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to + enable the vector operation, to change the lowest gcc version + from 4.6 to 4.7. + +2017-09-13 suzuki toshiya + + [cache] Fix a possible overflow by signed integer comparison. + + Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 , + issues are found by Behdad Esfahbod and Werner Lemberg. + + * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace + a subtraction to check higher bit by a bit operation, + and cpp-conditionalize for appropriate systems. Add better + documentation to the comment. + (FTC_ImageCache_LookupScaler): Ditto. + (FTC_SBitCache_Lookup): Ditto. + (FTC_SBitCache_LookupScaler): Ditto. + +2017-09-13 Werner Lemberg + + [autofit] Really fix #41334 (#52000). + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set + `segment->delta' everywhere. + +2017-09-12 suzuki toshiya + + [autofit, sfnt] Fix for `make multi'. + + * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use + FT_Get_Advance() in it. + * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H + to use PS_Unicodes in it, also include `ttpost.h' to use + tt_face_get_ps_name() in it. + +2017-09-11 Azzuro + + [build] Improve builds with different MS Visual Studio versions. + + * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset + according to the Visual Studio version. + +2017-09-11 Werner Lemberg + + * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables. + + Reported by Behdad. + +2017-09-09 Werner Lemberg + + [autofit] Improve communication with ftgrid. + + * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): + Provide values in font units. + +2017-09-08 suzuki toshiya + + [base] Remove a check for resource ID in the resource fork driver. + + LastResort.dfont has a marginal resource ID 0xFFFF for sfnt + resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs' + (1-46), tells that some IDs are reserved and should not be used. + FreeType2 just uses resource ID to sort the fragmented resource. + To accept the marginal fonts, the checking is removed. + + * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id + validity check, fix a trace message format. + +2017-09-08 suzuki toshiya + + [sfnt, truetype] Register the tags for marginal fonts. + + The first 32bit of standard TrueType variants is 0x00010000, + `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac + OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources + starting 0xA5 followed by `kbd' or `lst'. Considering the following + data could be parsed as conventional TrueType fonts, the header + checking is updated to allow these tags. It seems that recent Mac + OS X has already switched to normal TTF for these fonts. + + See the discussion at + http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0 + + * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header + tags for Keyboard.dfont and LastResort.dfont. + * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource + starts with TTAG_0xA5kbd or TTAG_0xA5lst. + * src/truetype/ttobjs.c (tt_face_init): Accept the face with the + format tag is TTAG_0xA5kbd or TTAG_0xA5lst. + +2017-09-05 Werner Lemberg + + Fix multiple calls of `FT_Bitmap_Convert'. + + The documentation of `FT_Bitmap_Convert' says that multiple calls do + proper reallocation of the target FT_Bitmap object. However, this + failed for the sequence + + non-empty bitmap + empty bitmap + non-empty bitmap + + Reason was that `FT_Bitmap_Convert' only reallocated the bitmap + buffer if it became too small; it didn't make the buffer smaller. + For an empty bitmap following a non-empty one, only the buffer + dimension got set to zero, without deallocation. If the next call + was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was + triggered. + + * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target + buffer to the correct size. + + * docs/CHANGES: Document it. + +2017-09-05 Werner Lemberg + + [bdf] Fix size and resolution handling. + + * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if + `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are + missing. + + * docs/CHANGES: Document it. + +2017-08-25 Alexei Podtelezhnikov + + Swap `ALLOC_MULT' arguments (#51833). + + * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated. + * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated. + * src/raster/ftrend1.c (ft_raster1_render): Updated. + +2017-08-23 Werner Lemberg + + [sfnt] Fix clang compilation (#51788). + + * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of + scalars. + (vector_shuffle): New macro to take care of a different built-in + function name on clang. + +2017-08-22 Werner Lemberg + + [base] Don't zero out allocated memory twice (#51816). + + Patch applied from bug report. + + * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to + avoid unnecessary overhead. + +2017-08-22 Werner Lemberg + + [truetype] Integer overflow. + + Changes triggered by + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107 + + * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use + NEG_LONG. + +2017-08-17 Alexei Podtelezhnikov + + [sfnt] Avoid synthetic unicode for symbol fonts with PUA. + + Reported as + + https://bugs.chromium.org/p/chromium/issues/detail?id=754574 + + * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL. + +2017-08-16 Werner Lemberg + + * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings. + +2017-08-15 Behdad Esfahbod + + [sfnt] Speed up PNG image loading. + + This reduces the overhead of `premultiply_data' by 60%. + + * src/sfnt/pngshim.c (premultiply_data): Provide code which uses + gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a + time. + +2017-08-11 Werner Lemberg + + [sfnt, truetype] Improve handling of missing sbits. + + Requested by Behdad. + + Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain + entries in the bitmap strike(s) for empty glyphs. Instead, they + rely that a space glyph gets created from the font's metrics data. + This commit makes FreeType behave accordingly. + + * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error + code. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes + to make a distinction between a missing bitmap in a composite and a + simple missing bitmap. + + * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a + bitmap-only font), synthesize an empty bitmap glyph if metrics are + available. + +2017-08-10 Werner Lemberg + + [base] Minor API improvement for default variation axis setting. + + * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, + FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0. * docs/CHANGES: Updated. -2017-01-09 Werner Lemberg +2017-08-08 Werner Lemberg - [pcf] Introduce a driver structure. + [psnames] Really fix issue #49949. - To be filled later on with something useful. + We now use a separate preprocessor macro to handle both definition + and declaration of the glyph name arrays. - * src/pcf/pcf.h (PCF_Driver): New structure. + * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro. - * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy - functions. - (pcf_driver_class): Updated. + * src/tools/glnames.py (StringTable::dump, + StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'. + (dump_encoding): Ditto. + (main): Use `wb' mode for writing the output file, which works on + Windows also. -2017-01-08 Werner Lemberg + * src/psnames/pstables.h: Regenerated. - [truetype] Again some GX code shuffling. +2017-08-08 Alexei Podtelezhnikov - We need this later on for MVAR also. + [smooth] Harmony LCD rendering. + + This is a new technology for LCD-optimized rendering. It capitalizes + on the fact that each color channel grid is shifted by a third of a + pixel. Therefore it is logical to render 3 separate monochrome + bitmaps shifting the outline by 1/3 pixel, and then combine them. + Importantly, the resulting output does not require additional LCD + filtering. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic) + [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized + rendering. + + * include/freetype/ftlcdfil.h, include/freetype/freetype.h, + include/freetype/config/ftoption.h, devel/ftoption.h: Updated + documentation. + +2017-08-08 Alexei Podtelezhnikov + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up. + +2017-08-08 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (format): Use otspec-compliant versions. + +2017-08-05 Werner Lemberg + + [truetype] Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868 + + * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG. + +2017-08-05 Werner Lemberg + + [base, truetype] New function `FT_Get_Var_Axis_Flags'. + + The reserved `flags' field got a value in OpenType version 1.8.2; + unfortunately, the public `FT_Var_Axis' structure misses the + corresponding element. Since we can't add a new field, we add an + access function. + + * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function. + + * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro. + Updated. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory + of `mmvar' to hold axis flags. + Fill the axis flags array. + + * docs/CHANGES: Updated. + +2017-08-03 Nikolaus Waxweiler + + [truetype] Fix metrics of B/W hinting in v40 mode. + + Phantom points are now saved outside v40 backwards compatibility + mode. This fixes the jumping glyphs when switching between v35 and + v40 monochrome mode. + + * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic. + +2017-08-03 Nikolaus Waxweiler + + [truetype] Do not set any ClearType flags in v40 monochrome mode. + + This fixes weird behavior of instructions that resulted in rendering + differences between v35 and v40 in monochrome mode, e.g., in + `timesbi.ttf'. + + * src/truetype/ttinterp.c (Ins_GETINFO) + [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check + `subpixel_hinting_lean'. + +2017-08-01 Werner Lemberg + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko. + +2017-08-01 Behdad Esfahbod + + [truetype] Fix loading of named instances. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position + while loading the `avar' table. + +2017-08-01 Werner Lemberg + + [sfnt, truetype] Minor adjustments for OpenType 1.8.2. + + * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now + (tighter) limits. + + * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType + version explicitly allows all negative values for the number of + contours if we have a composite glyph (this is for better backwards + compatibility I guess), but it still recommends value -1. + +2017-07-26 Werner Lemberg + + [cff] Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738 + + * src/cff/cf2hints.c (cf2_glyphpath_computeOffset, + cf2_glyphpath_curveTo): Use ADD_INT32. + +2017-07-13 Werner Lemberg + + [base] Fix memory leak. + + Reported as + + https://bugs.chromium.org/p/chromium/issues/detail?id=738362 + + * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case + of error. + +2017-07-12 Werner Lemberg + + [base] Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573 + + * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use + FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG. + +2017-07-12 Werner Lemberg + + * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo. + + Also improve tracing message. + + Problem reported as + + https://bugs.chromium.org/p/chromium/issues/detail?id=738919 + +2017-07-07 Werner Lemberg + + [cff] Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517 + + * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32. + +2017-07-05 Werner Lemberg + + * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning. + +2017-07-05 Werner Lemberg + + * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395). + +2017-07-04 Werner Lemberg + + [truetype] Prevent address overflow (#51365). + + * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard. + +2017-07-03 Alexei Podtelezhnikov + + * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code. + +2017-07-03 Werner Lemberg + + [truetype] Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455 + + * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG. + +2017-07-01 Alexei Podtelezhnikov + + * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name. + +2017-06-28 Ben Wagner + + Avoid Microsoft compiler warnings (#51331). + + While clang's sanitizer recommends a cast to unsigned for safe + negation (to handle -INT_MIN), both MSVC and Visualc emit warning + C4146 if an unsigned value gets negated. + + * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32), + src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a + subtraction. + +2017-06-27 Werner Lemberg + + * src/cff/cffparse.c (do_fixed): Fix typo. + + Spotted by chris . + +2017-06-27 Werner Lemberg + + [truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391 + + * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use + NEG_LONG. + + * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG. + +2017-06-24 Werner Lemberg + + [truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364 + + * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG. + +2017-06-22 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328 + + * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and + SUB_INT32. + + * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG. + +2017-06-21 Alexei Podtelezhnikov + + [sfnt] Synthesize a Unicode charmap if one is missing. + + * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it. + * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init, + tt_cmap_unicode_done, tt_cmap_unicode_char_index, + tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement + synthetic Unicode charmap class. + (tt_get_cmap_info): Make sure the callback is available. + + * src/sfnt/sfobjs.c (sfnt_load_face) + [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing, + synthesize one. + + * include/freetype/config/ftoption.h: Document it. + * devel/ftoption.h: Ditto. + +2017-06-20 Tony Theodore + + Fix pkg-config in freetype-config for cross-compiling (#51274). + + * builds/unix/unix-def.in (PKG_CONFIG): New variable. + (freetype-config): Use it in sed expression. + + * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/. + +2017-06-20 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313 + + * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32. + + * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS. + +2017-06-17 Alexei Podtelezhnikov + + [base, smooth] LCD filtering cleanups. + + * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): + Clean up, start filtering from the bottom-left origin. + + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated. + +2017-06-16 Werner Lemberg + + [truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276 + + * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use + ADD_LONG and SUB_LONG. + +2017-06-15 Werner Lemberg + + [bdf, cff] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261 + + * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with + direct code to avoid value negation. + + * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and + ADD_INT32. + +2017-06-13 Werner Lemberg + + * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding. + + FreeType only sets a default active encoding for Unicode. + +2017-06-13 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218 + + * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32. + + * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG. + +2017-06-11 Werner Lemberg + + [cff] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210 + + * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and + ADD_INT32. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Use + ADD_INT32. + +2017-06-10 Werner Lemberg + + [truetype] Fix TT_Set_Var_Design. + + Reported by Nikolaus Waxweiler . + + * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the + case where we have less input coordinates than axes. + +2017-06-10 Werner Lemberg + + * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo. + + Bug introduced 2017-05-28. + +2017-06-09 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186 + + * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32. + + * src/truetype/ttinterp.c (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): Use ADD_LONG, + SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG, + FT_PAD_ROUND_LONG + (Ins_SxVTL, Ins_MIRP): Use SUB_LONG. + (_iup_worker_shift): Use SUB_LONG and ADD_LONG. + +2017-06-09 Werner Lemberg + + Provide more macros for flooring, ceiling, and rounding. + + These versions don't produce run-time errors due to integer + overflow. + + * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H. + (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG, + FT_PIX_CEIL_LONG): New macros. + (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32, + FT_PIX_CEIL_INT32): New macros. + +2017-06-09 Werner Lemberg + + Remove unused macros. + + * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT, + NEG_INT): Deleted. + +2017-06-09 Werner Lemberg + + */*: Remove `OVERFLOW_' prefix. + + This increases readability. + +2017-06-07 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137 + + * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32. + + * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use + OVERFLOW_SUB_LONG. + +2017-06-06 Werner Lemberg + + [cff] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122 + + * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. + + * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else + branches. + +2017-06-05 Werner Lemberg + + [cff] Integer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089 + + * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32. + +2017-06-04 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088 + + * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32. + + * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG, + OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG. + +2017-06-03 Werner Lemberg + + [base, cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068 + + * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use + OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. + + * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c + (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32. + + * src/truetype/ttgload.c (compute_glyph_metrics): User + OVERFLOW_SUB_LONG. + + * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig, + Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X, + Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use + OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. + +2017-06-03 Werner Lemberg + + * builds/unix/freetype-config.in: Fix pkg-config test (#51162). + + Patch directly taken from bug report. + +2017-06-03 Werner Lemberg + + [bdf] Synchronize sanity checks with pcf driver. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058 + + * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent. + Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and + RESOLUTION_Y properties. + +2017-06-03 Werner Lemberg + + [cff, truetype] Integer overflows. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057 + + * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32. + + * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG. + (Ins_SUB): Use OVERFLOW_SUB_LONG. + (Ins_NEG): Use NEG_LONG. + +2017-06-03 Werner Lemberg + + ftcalc.h: Avoid left-shift of negative numbers. - * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing - an item store variation delta into... - (ft_var_get_item_delta): ...new function. + Reported as -2017-01-08 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055 - [truetype] Adjust font variation flags for MVAR. + * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6, + INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication. - * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): - Remove all flags related to MVAR; replace it with... - (TT_FACE_FLAG_VAR_MVAR): ...this new macro. - (TT_Face): Remove `mvar_support' field (which was still unused). +2017-06-02 Werner Lemberg -2017-01-06 Werner Lemberg + [cff] Even more integer overflows. - [truetype] More GX code shuffling. + Reported as - We need this later on for MVAR also. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046 - * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item - variation store into... - (ft_var_done_item_variation_store): ...new function. + * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use + OVERFLOW_ADD_INT32. -2017-01-06 Werner Lemberg +2017-06-02 Werner Lemberg - [truetype] More generalization of GX stuff. + [cff] More integer overflows. - We need this later on for MVAR also. + Reported as - * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add - parameters for delta-set index mapping and item variation store. - (ft_var_load_item_variation_store): Add parameter for item variation - store. - s/hvarData/varData/. - Move allocation of `hvar_table' to... - (ft_var_load_hvar): ...this function. - Updated. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032 -2017-01-06 Werner Lemberg + * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. - [truetype] Some GX structure renames for generalization. +2017-06-02 Werner Lemberg - We need this later on for MVAR also. + [bdf] Don't left-shift negative numbers. - * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... - (GX_ItemVarData): ...this. - (GX_HVarRegion): Renamed to... - (GX_VarRegion): ...this. - (GX_HVStore): Renamed to... - (GX_ItemVarStore): ...this. - (GX_WidthMap): Renamed to... - (GX_DeltaSetIdxMap): ...this. + Reported as - (GX_HVarTable): Updated. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031 - * src/truetype/ttgxvar.c: Updated. + * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication. -2017-01-06 Werner Lemberg +2017-06-02 Werner Lemberg - [truetype] Code shuffling. + [bdf] Fix integer scanning routines. - * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of - item variation store and delta set index mapping into... - (ft_var_load_item_variation_store, - ft_var_load_delta_set_index_mapping): ...new functions. + Reported as -2017-01-06 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029 - [truetype] Add HVAR access without advance width map. + * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos): + Stop scanning if result would overflow. - * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where - `offsetToAdvanceWidthMapping' is zero. - (tt_hadvance_adjust): Implement direct deltaSet access by glyph - index. +2017-06-02 Werner Lemberg -2017-01-06 Werner Lemberg + [cff] Fix integer overflows. - [pcf] Revise driver. + Reported as - This commit improves tracing and handling of malformed fonts. In - particular, the changes to `pcf_get_properties' fix + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 + * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c + (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32. - * src/pcf/pcfread.c (tableNames): Use long names for better - readability. - (pcf_read_TOC): Allow at most 9 tables. - (pcf_get_properties): Allow at most 256 properties. - Limit strings array length to 256 * (65536 + 1) bytes. - Better tracing. - (pcf_get_metric): Trace metric data. - (pcf_get_metrics): Allow at most 65536 metrics. - Fix comparison of `metrics->ascent' and `metrics->descent' to avoid - potential overflow. - Better tracing. - (pcf_get_bitmaps): Allow at most 65536 bitmaps. - Better tracing. - (pcf_get_encodings, pcf_get_accel): Better tracing. +2017-06-01 Werner Lemberg - * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. - These are now shown by `pcf_get_bitmaps'. + [smooth] Some 32bit integer overflow run-time errors. -2017-01-04 Werner Lemberg + * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG, + OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros. + [!STANDALONE]: Include FT_INTERNAL_CALC_H. + (gray_render_cubic): Use those macros where appropriate. - * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. +2017-06-01 Werner Lemberg -2017-01-04 Werner Lemberg + * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'. - [cff] More consistency checks for pure CFFs. +2017-06-01 Werner Lemberg - Reported as + [psaux] 32bit integer overflow tun-time errors (#46149). - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 + * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use + OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate. - * src/cff/cffload.c (cff_font_load): Check element number and size - of Name and Top DICT indices. +2017-06-01 Werner Lemberg -2017-01-04 Werner Lemberg + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again. - [cff, truetype] Minor tracing improvement. + Problem reported by Marek Kašík . - * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c - (tt_face_init): Indent first tracing message from SFNT driver. + The problematic font that exceeds the old limit is Padauk-Bold, + version 3.002, containing bytecode generated by a buggy version of + ttfautohint. -2017-01-03 Werner Lemberg +2017-05-31 Werner Lemberg - [truetype] Various minor fixes. + [cff] 32bit integer overflow run-time errors 2/2 (#46149). - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction - size only if we do native hinting. - (TT_Load_Glyph): Trace returned error code. + This commit handles the new engine. - * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace - returned error code. - (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is - invalid. + * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32, + OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG, + NEG_INT32): New macros. -2017-01-03 Werner Lemberg + * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32. - [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. + * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init, + cf2_hintmap_map, cf2_glyphpath_hintPoint, + cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset, + cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use + OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and + NEG_INT32 where appropriate. - These tables are optional. + * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend, + cf2_interpT2CharString): Ditto. + Also add some other code where needed to avoid overflow. - * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. +2017-05-30 Werner Lemberg -2017-01-03 Werner Lemberg + [cff] 32bit integer overflow run-time errors 1/2 (#46149). - * src/cff/cffparse.c (cff_parse_num): Simplify. + This commit handles the old engine. -2017-01-03 Werner Lemberg + * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H. + (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and + OVERFLOW_SUB_LONG where needed. - Various fixes for clang's undefined behaviour sanitizer. + * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H. + (power_ten_limits): New static array. + (do_fixed): Use it to prevent multiplication overflow. + (cff_parser_run): Use OVERFLOW_ADD_LONG. - * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. - (cff_blend_doBlend): Don't left-shift negative numbers. - Handle 5-byte numbers byte by byte to avoid alignment issues. +2017-05-30 Werner Lemberg - * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by - byte to avoid alignment issues. + [psaux] Correctly handle sequences of multiple number signs. - * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any - subrs. + * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero + if we encounter more than a single sign. - * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. +2017-05-29 Werner Lemberg - * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around - definition of `ft_get_adobe_glyph_index'. + [pcf] 32bit integer overflow run-time errors (#46149). - * src/psnames/pstables.h: Regenerated. + * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for + `fontAscent' and `fontDescent'. + (pcf_load_font): Add sanity checks for global height. + Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, + RESOLUTION_X, and RESOLUTION_Y properties. - * src/psnames/psmodule.c: Include `pstables.h' twice to get both - declaration and definition. +2017-05-29 Werner Lemberg - * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix - casting. + Handle some integer overflow run-time errors (#46149, #48979). -2017-01-01 Werner Lemberg + This commit (mainly for 32bit CPUs) is the first of a series of + similar commits to handle known integer overflows. Basically, all + of them are harmless, since they affect rendering of glyphs only, + not posing security threats. It is expected that fuzzying will show + up more overflows, to be fixed in due course. - [cff] Handle multiple `blend' operators in a row correctly. + The idea is to mark places where overflows can occur, using macros + that simply cast to unsigned integers, because overflow arithmetic + is well defined in this case. Doing so suppresses run-time errors + of sanitizers without adding computational overhead. - Reported as + * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT, + OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG, + OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 + * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply, + FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled, + ft_corner_orientation): Use new macros. - * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' - pointers into `subFont->blend_stack' after reallocation. + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros. -2017-01-01 Werner Lemberg +2017-05-28 Werner Lemberg - [sfnt] Return correct number of named instances for TTCs. + * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove. - Without this patch, requesting information for face index N returned - the data for face index N+1 (or index 0). + This macro is not used. - * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' - for negative `face_instance_index' values. +2017-05-28 Werner Lemberg -2016-12-31 Werner Lemberg + [cff] s/cf2_floatToFixed/cf2_doubleToFixed/. - */*: Use hex numbers for errors in tracing messages. + The new name better describes what the macro actually does; + additionally, we don't need a trailing `f' for literals (there was + only a single such instance in the code, but this caused a clang + warning because the macro itself uses `double' literals). -2016-12-31 Werner Lemberg + * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h, + src/cff/cf2font.c, src/cff/cf2hints.c: Updated. - [truetype] Check axis count in HVAR table. +2017-05-28 Werner Lemberg - Reported as + Fix negation of INT_MIN and LONG_MIN (#46149). - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 + * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned + value, to be used as the result. + (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix, + FT_Vector_NormLen): Updated. - * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. - (ft_var_load_avar): Fix tracing message. +2017-05-27 Werner Lemberg -2016-12-30 Werner Lemberg + [truetype] Fix handling of design coordinates (#51127). - * Version 2.7.1 released. - ========================= + * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design + coordinates if we have to create the `blends->coord' array. + (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance + coordinates if no instance is selected yet. +2017-05-24 Werner Lemberg - Tag sources with `VER-2-7-1'. + [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). - * docs/VERSION.TXT: Add entry for version 2.7.1. + Problem reported by Marek Kašík , cf. - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/. + https://bugzilla.redhat.com/show_bug.cgi?id=1451795 - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c + (PCF_Face_Init): Implement it. - * builds/unix/configure.raw (version_info): Set to 19:0:13. - * CMakeLists.txt (VERSION_PATCH): Set to 1. +2017-05-20 Nikolaus Waxweiler -2016-12-30 Werner Lemberg + [truetype] Always use interpreter v35 for B/W rendering (#51051). - [ftfuzzer] Replace `rand' with an xorshift algorithm. + * src/truetype/ttgload.c (tt_loader_init) + [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust + `subpixel_hinting_lean', `grayscale_cleartype', and + `vertical_lcd_lean' accordingly. - * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'. - (Random): Implement and use a 32bit `xorshift' algorithm. + * src/truetype/ttinterp.c (Ins_GETINFO): Updated. + (TT_RunIns): Update `backward_compatibility' flag. -2016-12-30 Werner Lemberg +2017-05-20 Alexei Podtelezhnikov - [ftfuzzer] Restrict number of tested bitmap strikes. + [smooth] Implement minimal dynamic padding for LCD filtering. - Malformed fonts often have large values for the number of bitmap - strikes, and FreeType doesn't check the validity of all bitmap - strikes in advance. + Extra bitmap padding for LCD filtering depends on the filter. The + default 5-tap filter needs 2 extra subpixels. The light 3-tap filter + needs only 1 extra subpixel. This space could be already available + due to rounding. In order to optimize the padding, we now expand + CBox for the given filter weights before rounding. - Reported as + This change breaks current Skia (and Firefox). - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353 + * include/freetype/internal/ftobjs.h (FT_LibraryRec) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field. - * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. - (Random): Small class to provide n randomly selected numbers - (without repetition) out of the value set [1,N]. - (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap - strikes. + * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights, + FT_Library_SetLcdFilter): Remove `lcd_extra' initializations. -2016-12-29 Werner Lemberg + * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic + LCD padding. - [truetype] Variation font API stability issues. +2017-05-15 Werner Lemberg - Make some functions work before a call to `TT_Set_MM_Blend'. + [sfnt] Return proper scaling values for SBIX bitmaps. - * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if - we don't blend. - (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we - don't blend. + Problem reported by Hin-Tak Leung . -2016-12-29 Werner Lemberg + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data. +2017-05-15 Werner Lemberg - Reported as + [truetype] Fix error handling for embedded bitmaps. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348 + Problem reported by Hin-Tak Leung . -2016-12-29 Werner Lemberg + * src/truetype/ttgload.c (TT_Load_Glyph) + [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not + scalable. - [truetype] Tracing fixes. +2017-05-15 Alexei Podtelezhnikov - * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct - information. - (TT_Set_Var_Design): Fix typo. - (TT_Get_Var_Design): Fix typos. + [autofit] Make autohint warping NORMAL option. -2016-12-29 Werner Lemberg + This moves warping option from LIGHT to NORMAL mode. This makes LIGHT + truly void of hinting in x-direction, with left side bearing never + changed and right side bearing only altered by advance rounding. + Therefore, LIGHT is now ready to return fractional advance. As a + NORMAL option, warping substitutes normal hinting. - */*: Use `0.5f' for tracing 16.16 numbers. + * src/autofit/afcjk.c (af_cjk_hints_apply): Updated. + * src/autofit/aflatin.c (af_latin_hints_apply): Updated. + * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated. -2016-12-29 Werner Lemberg + * src/autofit/afloader.c (af_loader_load_glyph): Handle warping + phantom points as normal. - [pcf] Protect against gzip bombs. +2017-05-14 Werner Lemberg - Fix suggested by Kostya; reported as + Remove remnants of raster pool. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345 + * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove + `raster_pool' and `raster_pool_size' fields. - * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to - 1024. + * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c + (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated. -2016-12-28 Werner Lemberg +2017-05-13 Werner Lemberg - [psnames] Only declare, not define, data in `pstables.h' (#49949). + * Version 2.8 released. + ======================= - Pdfium includes `pstables.h' a second time; moving the definition - from `pstables.h' to `psmodule.c' saves more than 60kByte data - segment space for this case. - * src/tools/glnames.py (StringTable::dump, - StringTable::dump_sublist, dump_encoding, dump_array): Emit - additional code to only define tables if `DEFINE_PS_TABLES' is set. + Tag sources with `VER-2-8'. - * src/psnames/pstables.h: Regenerated. - * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define. + * docs/VERSION.TXT: Add entry for version 2.8. + * docs/CHANGES: Updated. -2016-12-28 Werner Lemberg + * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, + builds/windows/vc2005/index.html, + builds/windows/vc2008/freetype.vcproj, + builds/windows/vc2008/index.html, + builds/windows/vc2010/freetype.vcxproj, + builds/windows/vc2010/index.html, + builds/windows/visualc/freetype.dsp, + builds/windows/visualc/freetype.vcproj, + builds/windows/visualc/index.html, + builds/windows/visualce/freetype.dsp, + builds/windows/visualce/freetype.vcproj, + builds/windows/visualce/index.html, + builds/wince/vc2005-ce/freetype.vcproj, + builds/wince/vc2005-ce/index.html, + builds/wince/vc2008-ce/freetype.vcproj, + builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/. - [cff] Catch `blend' op in non-variant fonts. + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. + (FREETYPE_PATCH): Set to 0. - Reported as + * builds/unix/configure.raw (version_info): Set to 20:0:14. + * CMakeLists.txt (VERSION_MINOR): Set to 8. + (VERSION_PATCH): Set to 0. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 +2017-05-12 Hin-Tak Leung - * src/cff/cf2intrp.c (cf2_interpT2CharString) : Don't - allow `blend' op for non-variant fonts. + Fix `FT_UINT_TO_POINTER' macro for Windows. -2016-12-28 Werner Lemberg + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: + Fix definition. - [cff] Better check of number of blends. +2017-05-11 Sascha Brawer + Werner Lemberg , - src/cff/cffparse.c (cff_parse_blend): Compare number of blends with - stack size. + [autofit] Add support for Chakma script. -2016-12-27 Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Chakma. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - Documentation updates. + * src/autofit/afscript.h: Add Chakma standard character. - * docs/CHANGES: Add missing information. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data. - * docs/formats.txt: Rewritten and updated. +2017-05-10 Sascha Brawer + Werner Lemberg + [autofit] Add support for Kayah Li script. - [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'. + * src/autofit/afblue.dat: Add blue zone data for Kayah Li. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement. - (TT_Set_Var_Design): Fix tracing. + * src/autofit/afscript.h: Add Kayah Li standard character. - * src/type1/t1load.c (T1_Get_Var_Design): Implement. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data. -2016-12-24 Werner Lemberg +2017-05-10 Sascha Brawer + Werner Lemberg . + * src/autofit/afblue.dat: Add blue zone data for Bamum. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. -2016-12-24 Werner Lemberg + * src/autofit/afscript.h: Add Bamum standard character. - * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data. - Some fonts seem to have the `version' field in the wrong byte order. +2017-05-10 Sascha Brawer + Werner Lemberg . + [autofit] Add support for Saurashtra script. -2016-12-24 Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Saurashtra. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length. + * src/autofit/afscript.h: Add Saurashtra standard character. - This trivial fix allows us to accept more fonts. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra + data. - Problem reported by 張俊芝 <418092625@qq.com>. +2017-05-10 Sascha Brawer + Werner Lemberg + [autofit] Add support for Buhid script. - * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing. + * src/autofit/afblue.dat: Add blue zone data for Buhid. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. -2016-12-22 Werner Lemberg + * src/autofit/afscript.h: Add Buhid standard character. - * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909). + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data. -2016-12-22 Werner Lemberg +2017-05-08 Sascha Brawer + Werner Lemberg + * src/autofit/afscript.h: Add Shavian standard character. - * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data. - Reported as +2017-05-08 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Vai. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [cff] Protect against invalid `vsindex' and `blend' values. + * src/autofit/afscript.h: Add Vai standard character. - Reported as + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 +2017-05-08 Sascha Brawer + Werner Lemberg : Implement it. + [autofit] Add support for Osmanya script. -2016-12-22 Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Osmanya. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [ftfuzzer] Always use Adobe CFF engine. + * src/autofit/afscript.h: Add Osmanya standard character. - * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement - it. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data. -2016-12-21 Werner Lemberg +2017-05-08 Sascha Brawer + Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data. - [autofit] Support variation fonts. +2017-05-08 Sascha Brawer + Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data. - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. +2017-05-07 Werner Lemberg - Don't apply deltas twice for non-phantom points. + [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). - Spotted by Ben Wagner. + Reported by Roy Tam . -2016-12-21 Werner Lemberg + * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. - [cff, truetype] Another try for #49829. +2017-05-07 Roy Tam + Werner Lemberg - * src/cff/cffdrivr.c: Don't include - `FT_SERVICE_METRICS_VARIATIONS_H'. - (cff_get_advances): Use `ttface->variation_support'. + [truetype] More tricky fonts (mainly from Dynalab). - * src/truetype/ttdriver.c (tt_get_advances): Use - `ttface->variation_support'. + * src/truetype/ttobjs.c (tt_check_trickyness_family, + tt_check_trickyness_sfnt_ids): Add them. - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Use `ttface->variation_support'. +2017-05-07 Werner Lemberg -2016-12-21 Werner Lemberg + [truetype] Add tricky font `DLCHayMedium' (from Dynalab). - [truetype, sfnt] Introduce font variation flags to `TT_Face'. + Reported by Roy Tam . - * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): - New macros describing available functionality of various OpenType - tables related to font variation. - (TT_Face): New fields `variation_support' and `mvar_support', - replacing and extending `use_fvar'. + * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. - * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use - `variation_support'. +2017-05-03 Werner Lemberg - * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support' - field. - (TT_Vary_Apply_Glyph_Deltas): Updated. + */*: s/backwards compatibility/backward compatibility/. -2016-12-21 Werner Lemberg +2017-05-03 Sascha Brawer + Werner Lemberg + * src/autofit/afscript.h: Add Unified Canadian Syllabics standard + character. - [base] More sanity checks for Mac resources. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified + Canadian Syllabics data. - We use +2017-05-03 Sascha Brawer + Werner Lemberg - https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format + [autofit] Add blue-zone support for Sundanese script. - and + This essentially moves the Sundanese script from the `Indic' hinter + to the `Latin' hinter. - https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 + * src/autofit/afblue.dat: Add blue zone data for Sundanese. - as references. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short - for `res_id'. + * src/autofit/afscript.h: Add Sundanese standard character and move + data out of AF_CONFIG_OPTION_INDIC block. - * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length - and use it to improve sanity checks. - Follow the specification more closely;in particular, all data types - are signed, not unsigned. - (FT_Raccess_Get_DataOffsets): Follow the specification more closely; - in particular, all data types are signed, not unsigned. - Add some sanity checks. + * src/autofit/afranges.c: Move Sundanese data out of + AF_CONFIG_OPTION_INDIC block. -2016-12-20 Werner Lemberg + * src/autofit/afstyles.h: Update Sundanese data; in particular, use + AF_WRITING_SYSTEM_LATIN. - [truetype] Improve logic for getting fast advance widths. +2017-05-03 Sascha Brawer + Werner Lemberg - Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Avestan. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [truetype] Fix linear metrics of GX variation fonts (#49829). + * src/autofit/afscript.h: Add Avestan standard character. - When asking for an unhinted non-default variations, - `linearVertAdvance' is currently the value from the `hmtx' table - instead of the actual value after applying the variation. `HVAR' - support fixes this, but fonts will exist without that table and will - need sane fallback. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data. - Problem also reported as +2017-05-02 Behdad Esfahbod - https://bugs.chromium.org/p/skia/issues/detail?id=5917 + [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Implement linear advance adjustments if `HVAR' - or `VVAR' tables are missing. + When points are not touched by gvar interpolation deltas, FreeType + gave a slightly different result than Apple's CoreText. -2016-12-20 Werner Lemberg + The OpenType working group will update the specification to document + the following behaviour: If the two points with deltas to the `left' + and `right' of the untouched point have the same coordinate, then + the inferred delta for the untouched point should be zero. - [cff, truetype] Fast advance width retrieval for fonts with HVAR. + * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new + behaviour. - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. +2017-05-02 Werner Lemberg - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. + [autofit] Remove `slight' auto-hint mode again. - * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (cff_get_advances): Test for HVAR and VVAR. + A poll on freetype-devel favoured changes directly applied to + `light'. - * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR. + * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, + FT_RENDER_MODE_SLIGHT): Removed. -2016-12-18 Werner Lemberg + * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c + (af_latin_hints_init), src/autofit/aflatin2.c + (af_latin2_hints_init): Revert change from 2017-04-22. - [base] Fix invalid mac font recursion. + * src/autofit/afloader.c (af_loader_load_glyph) Remove references to + FT_RENDER_MODE_SLIGHT. + [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics + unconditionally. - Reported as + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from + 2017-04-22. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304 + * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. - * src/base/ftobjs.c (FT_Open_Face): Code moved to... - (ft_open_face_internal): ... this function. - Add a parameter to control whether we try special Mac font handling - in case of failure. - (FT_Open_Face, FT_New_Face, FT_New_Memory_Face, - open_face_from_buffer): Use `ft_open_face_internal'. + * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from + 2017-04-22. -2016-12-18 Werner Lemberg + * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from + 2017-04-22. - * src/cff/cffobjs.c (cff_face_init): Make named instances work. + * docs/CHANGES: Updated. -2016-12-18 Werner Lemberg +2017-04-30 Werner Lemberg - [truetype, cff] Extend `get_var_blend' function of MM service. + [autofit] Fix metrics computation. - In particular, we need access to named instance data. + Problem reported by Markus Trippelsdorf and + Nikolaus Waxweiler . - * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): - Add argument for `FT_MM_Var'. + * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of + auto-hinter metrics. Without this change, multiple size changing + calls for a single face fail. - * src/cff/cffload.c (cff_get_var_blend): Updated. - * src/cff/cffload.h: Updated. +2017-04-29 Werner Lemberg - * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. + * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. - * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. - Accept value `NULL' for arguments. - * src/truetype/ttgxvar.h: Updated. + Reported by Earnestly in -2016-12-18 Werner Lemberg + https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html - [sfnt] Handle `fvar' with zero axes as a non-MM font. +2017-04-27 Werner Lemberg - This is better behaviour than exiting with an error. + Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. - * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar' - field. + * include/freetype/config/ftoption.h + (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by + default. - * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also - updating the validation code. - Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS. + * src/autofit/afloader.c (af_loader_load_glyph): Use + AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation - code. +2017-04-26 Werner Lemberg -2016-12-18 Werner Lemberg + * include/freetype/freetype.h (FT_Render_Mode): Fix order. - Minor GX code shuffling. + This retains backward compatibility. - * include/freetype/internal/tttypes.h (TT_Face): Move - `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT - block. + Noted by Alexei. - * src/sfnt/sfobjs.c (sfnt_init_face): Updated. - * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro. - (TT_Load_Glyph): Use it. +2017-04-22 Werner Lemberg -2016-12-18 Werner Lemberg + [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). - [cff] Better handling of non-CFF font formats. + * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to + hold hinted metrics. + Make `metrics' a pointer so that `tt_glyph_load' can easily switch + between metrics. - * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a - signature, so return `FT_Err_Unknown_File_Format' more often. + * src/truetype/ttdriver.c (tt_size_request): Updated. + (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is + used. -2016-12-17 Werner Lemberg + * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, + TT_Process_Composite_Component, load_truetype_glyph, + compute_glyph_metrics, TT_Load_Glyph): Updated. - * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code. + * src/truetype/ttinterp.c (TT_Load_Context): Updated. -2016-12-17 Werner Lemberg + * src/truetype/ttobjs.c (tt_size_reset): Updated. - * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code. + * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. -2016-12-17 Werner Lemberg +2017-04-22 Werner Lemberg - [sfnt, truetype] Various sanitizing fixes. + Add new `slight' auto-hinting mode. - * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is - zero, set `num_instances' to zero. + This mode uses fractional advance widths and doesn't scale glyphs + horizontally, only applying vertical scaling and hinting. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with - zero axes as invalid. + At the same time, the behaviour of the `light' auto-hinter gets + restored for backward compatibility: Both vertical and horizontal + scaling is again based on rounded metrics values (this was changed + in a commit from 2017-03-30 as a side effect). To be more precise, + the behaviour is restored for TrueType fonts only; for other font + formats like Type 1, this is a new feature of the `light' hinting + mode. - * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading - `loca', `cvt', `fpgm', and `prep' table. + * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. + (FT_RENDER_MODE_SLIGHT): New render mode. -2016-12-17 Werner Lemberg + * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add + `autohint_mode' and `autohint_metrics' fields. - Improve tracing of `FT_Open_Face'. + * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c + (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): + Updated. - * src/base/ftobjs.c (FT_Open_Face): Return info on number of - available faces and numbered instances, or the indices of the - requested face and numbered instance. + * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use + `autohint_metrics'. + (af_loader_load_glyph): s/internal/slot_internal/. + Initialize `autohint_metrics' and `autohint_mode' depending on + current auto-hint mode. + Use `autohint_metrics'. + Updated. - * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts. + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. -2016-12-17 Werner Lemberg + * src/base/ftobjs.c (FT_Load_Glyph): Updated. + (FT_New_Size): Allocate `internal' object. - * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. + * src/pshinter/pshalgo.c (ps_hints_apply): Updated. - Reported as + * src/smooth/ftsmooth.c (ft_smooth_render): Updated. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295 +2017-04-22 Werner Lemberg -2016-12-16 Werner Lemberg + Introduce `FT_Size_InternalRec' structure. - [truetype] Fix `cvar' sanity test. + We are going to extend this later on. - Reported by Dave Arnold. + * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New + structure with a single field `module_data'. - * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask. + * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of + `FT_Size' structure. -2016-12-16 Werner Lemberg + * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use + `size->internal->module_data' instead of `size->internal'. - [cff, truetype] Remove compiler warnings; fix `make multi'. + * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. + (cff_size_init, cff_size_select, cff_size_request): Use + `size->internal->module_data' instead of `size->internal'. - * src/cff/cf2font.h: Include `cffload.h'. + * src/cif/cidobjs.c (cid_size_done, cid_size_init, + cid_size_request): Use `size->internal->module_data' instead of + `size->internal'. - * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and - FT_SERVICE_MULTIPLE_MASTERS_H. - (cff_vstore_load): Eliminate `vsSize'. - (cff_load_private_dict): Tag as `FT_LOCAL_DEF'. + * src/psaux/psobjs.c (t1_builder_ini): Use + `size->internal->module_data' instead of `size->internal'. - * src/cff/cffload.h: Include `cffobjs.h'. - Provide declaration for `cff_load_private_dict'. + * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): + Use `size->internal->module_data' instead of `size->internal'. - * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate - `minorVersion' and `map_offset'. +2017-04-21 Alexei Podtelezhnikov -2016-12-16 Werner Lemberg + * src/smooth/ftsmooth.h: Remove unused guards and declaration. - [cff] Fix heap buffer overflow (#49858). +2017-04-16 Hin-Tak Leung - * src/cff/cffparse.c (cff_parser_run): Add one more stack size - check. + Fix tracing messages. -2016-12-15 Werner Lemberg + * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, + FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print + correct function name. - Fix clang warnings. +2017-04-08 Sascha Brawer + Werner Lemberg - Werner Lemberg + * src/autofit/afscript.h: Add Old Turkic standard characters. - [cff] Implement CFF2 support (2/2). - - The font variation code. All parts dependent on the GX code in the - `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - In other words, you can still compile the `cff' module without - defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2 - support without font variation). - - * src/cff/cf2font.c (cf2_font_setup): Add support for font - variation. - * src/cff/cf2font.h (CF2_Font): Add fields for variation data. - - * src/cff/cf2ft.c (cf2_free_instance): Free blend data. - (cf2_getVStore, cf2_getNormalizedVector): New functions. - * src/cff/cf2ft.h: Updated. - - * src/cff/cf2intrp.c: Include `cffload.h'. - (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with... - (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values. - (cf2_doBlend): New function. - (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes. - - * src/cff/cffload.c (FT_fdot14ToFixed): New macro. - (cff_vstore_done, cff_vstore_load): New functions. - (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector, - cff_blend_check_vector): New functions. - (cff_load_private_dict): Add arguments for blend vector. - Handle blend data. - (cff_subfont_load, cff_subfont_done): Updated. - (cff_font_load): Handle CFF2 variation store data. - (cff_font_done): Updated. - * src/cff/cffload.h: Include `cffparse.h'. - Updated. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data. - * src/cff/cffobjs.c (cff_face_done): Updated. +2017-04-08 Sascha Brawer + Werner Lemberg - Werner Lemberg +2017-04-08 Sascha Brawer + Werner Lemberg + Werner Lemberg - * src/cff/cffparse.c (cff_parse_maxstack): New function. - (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed - * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New - macros. - (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New - macros. + [autofit] Fix invalid character range description (#50745). - * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend - stuff). + Also reported as - * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field. - (CFF_FontRecDict): Add `maxstack' field. - (CFF_Private): Add `subfont' field. - (CFF_Font): Add `top_dict_length' and `cff2' fields. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 - * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table. + * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in + recent commit. -2016-12-15 Werner Lemberg - Dave Arnold +2017-04-07 Werner Lemberg - [truetype] Provide HVAR advance width variation as a service. + [ftfuzzer] Fix clang warnings. - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add + casts. - * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. +2017-04-06 Sascha Brawer + Werner Lemberg - Werner Lemberg + * src/autofit/afscript.h: Add Lisu standard characters. - [truetype] Provide function to apply `HVAR' advance width variation. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data. - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. +2017-04-06 Sascha Brawer + Werner Lemberg - Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Osage. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [truetype] Add `HVAR' table parsing. + * src/autofit/afscript.h: Add Osage standard characters. - Note that this is not complete yet; it only handles advance width - variation. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data. - Activation of the code follows in another commit. +2017-04-06 Sascha Brawer + Werner Lemberg +2017-04-06 Sascha Brawer + Werner Lemberg +2017-04-06 Sascha Brawer + Werner Lemberg + Werner Lemberg - Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data. - [cff] Code shuffling. +2017-04-06 Sascha Brawer - * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' - fields. + [autofit] Add support for Adlam script. - * src/cff/cffload.c (cff_subfont_load): Change last argument to - `CFF_Font' - Split off parsing of private dictionary into... - (cff_load_private_dict): ...this new function. - (cff_font_load): Updated. + * src/autofit/afblue.dat: Add blue zone data for Adlam. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. -2016-12-14 Werner Lemberg + * src/autofit/afscript.h: Add Adlam standard characters. - [sfnt, truetype] Add framework for Metrics Variations service. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. - No effect yet; service functions will be implemented later on. +2017-04-06 Sascha Brawer - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + [autofit] Add support for Ol Chiki script. - * include/freetype/internal/services/svmetric.h: New file. + * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * include/freetype/internal/ftserv.h - (FT_SERVICE_METRICS_VARIATIONS_H): New macro. + * src/autofit/afscript.h: Add Ol Chiki standard character. - * include/freetype/internal/tttypes.h (TT_Face): New field `var'. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. - * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (sfnt_init_face): Initialize `face->var'. +2017-04-03 Werner Lemberg - * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H. - (tt_service_metrics_variations): New service. - (tt_services): Updated. + [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. - * src/truetype/ttpic.h: Updated. + Reported as -2016-12-14 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 - [cff] Add Multiple Masters service. + * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New + error code. - The code simply uses the MM functions from the `truetype' module. + * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution + of these two opcodes in `glyf' bytecode. + (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode + in case of error since function tables can no longer be modified + (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can + enormously speed up handling of broken fonts. - Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. +2017-04-02 Alexei Podtelezhnikov - * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. + [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. - * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. - (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var, - cff_set_var_design, cff_get_var_design): New functions. - (cff_service_multi_masters): New service. - (cff_services): Updated. + * src/autofit/aflatin.c (af_latin_hints_init): Updated. + * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. - * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New - functions. - * src/cff/cffload.h: Updated. +2017-04-01 Werner Lemberg - * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. + * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. - * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. - (sfnt_init_face): Initialize `face->mm'. + Otherwise FT_UINT_TO_POINTER might not be defined. -2016-12-14 Werner Lemberg + Problem reported by Alexei. - Extend functionality of `ft_module_get_service'. +2017-03-31 Alexei Podtelezhnikov - It can now differentiate between local and global searches. + [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. - * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. - (FT_Get_TrueType_Engine_Type): Updated. + * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. + * src/autofit/afcjk.c (af_cjk_hints_init): Updated. + * src/autofit/aflatin.c (af_latin_hints_init): Ditto. + * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. - * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. +2017-03-31 Werner Lemberg - * include/freetype/internal/ftobjs.h: Updated. - * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): - Updated. + * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. -2016-12-14 Werner Lemberg + Allow CFFs containing a single font to have an empty font name. - * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning. + Problem reported by 張俊芝 <418092625@qq.com> in -2016-12-14 Dave Arnold - Werner Lemberg + https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html - [sfnt, cff] Minor preparations. +2017-03-30 Werner Lemberg - * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, - TTAG_VVAR): New SFNT table tags. + * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. - * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast. + Requested by Dave Arnold. -2016-12-10 Werner Lemberg +2017-03-30 Werner Lemberg - [truetype, type1] Add `get_var_blend' to MM service. + [truetype] Fix HVAR and VVAR handling (#50678). - For internal use; we want to share code between the forthcoming CFF2 - support and TrueType. + * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle + glyph indices larger than `mapCount' as described in the + specification. - * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): - New typedef. - (MultiMasters): Add `get_var_blend'. - (FT_Service_MultiMasters): Updated. +2017-03-30 Werner Lemberg - * src/truetype/ttgxvar.c (tt_get_var_blend): New function. - * src/truetype/ttgxvar.h: Updated. + [truetype] Allow linear scaling for unhinted rendering (#50470). - * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. - * src/type1/t1driver.c (t1_service_multi_masters): Updated. + * src/truetype/ttdriver.c (tt_size_request): Revert change from + 2011-07-16; the intended metrics fix seems now to be implemented in + a different way, making the patch unnecessary. Note that this + change was usually patched out by all major GNU/Linux distributions + due to heavy side effects. -2016-12-10 Werner Lemberg + * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): + Refer to the metrics of the `TT_Size' object. - [truetype, type1] Add `done_blend' to MM service. +2017-03-29 Werner Lemberg - For internal use; we want to share code between the forthcoming CFF2 - support and TrueType. + [truetype] Fix thinko related to PS name of default named instance. - * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): - New typedef. - (MultiMasters): Add `done_blend'. - (FT_Service_MultiMasters): Updated. + * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are + name ID values, not indices into the array of name entries. - * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. - * src/truetype/ttgxvar.h: Updated. +2017-03-27 Werner Lemberg - * src/truetype/ttobjs.c (TT_Face_Done): Updated. + [cid, truetype] Don't use `index' as a variable name. - * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. - * src/type1/t1driver.c (t1_service_multi_masters): Updated. + At least on FreeBSD there is a global declaration of `index' in file + `/usr/include/strings.h'. -2016-12-09 Werner Lemberg + * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where + appropriate. - [sfnt] Revert change from 2016-12-08. +2017-03-27 Wojciech Mamrak - I missed the functionality of `ft_module_get_service', which makes - the change unnecessary. + [sfnt] Minor improvement for handling kern tables. -2016-12-08 Werner Lemberg + * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for + cross-stream kerning tables since we reject format 2 tables later + on anyways. + Modify code for limit test... + (tt_face_get_kerning): ... to avoid a limit test here. - Add framework to support services with 8 functions. +2017-03-27 Werner Lemberg - We will need this for CFF variation font support. + [pcf] Fix compiler warnings. - * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8): - New macro. + Reported by Alexander Hedges . -2016-12-08 Werner Lemberg + * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag + `property_name' with `FT_UNUSED' where necessary. - [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface. +2017-03-26 Werner Lemberg - CFF2 fonts will need access to those two functions. + * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. - * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H. - (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members. - (FT_DEFINE_SFNT_INTERFACE): Updated. + Reported as - * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index): - Fix signatures to exactly correspond to the glyph dict service - function typedefs. - (sfnt_interface): Updated. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 -2016-12-06 Dave Arnold +2017-03-23 Werner Lemberg - Add `FT_Get_Var_Design_Coordinates' function. + [psaux] Better protect `flex' handling. - Note that the low-level functions aren't implemented yet. + Reported as - * include/freetype/ftmm.h: Declare. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 - * include/freetype/internal/services/svmm.h - (FT_Get_Var_Design_Func): New typedef. - (MultiMasters): New MM service function `get_var_design'. - (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. - Update all callers. + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Since there is not a single flex operator but a + series of subroutine calls, malformed fonts can call arbitrary other + operators after the start of a flex, possibly adding points. For + this reason we have to check the available number of points before + inserting a point. - * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. +2017-03-23 Werner Lemberg - * src/truetype/ttdriver.c: Updated. + [sfnt] Fix check for default named instance. - * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to - handle `get_var_design' service. - * src/truetype/ttgxvar.h: Updated. + * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four + bytes, not two... - * src/type1/t1driver.c: Updated. +2017-03-23 Werner Lemberg - * src/type1/t1load.c (T1_Get_Var_Design): New dump function to - handle `get_var_design' service. - * src/type1/t1load.h: Updated. + Make MM fonts work (again). -2016-12-06 Werner Lemberg + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore + return value of `ft_face_get_mvar_service'; instead, check whether a + service is actually returned. - * src/type1/t1load.c (parse_subrs): Fix memory leak. +2017-03-20 Werner Lemberg - The `subrs' keyword might erroneously occur multiple times. + [truetype] Some variable renamings. - Reported as + Too much local variables holding different structures were called + `metrics'. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231 + * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. -2016-12-01 Werner Lemberg + * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, + compute_glyph_metrics): s/metrics/incr_metrics/. + (load_sbit_image): s/metrics/sbit_metrics/. - [gzip] Improve building with external zlib (#49673). + * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. + (tt_size_init_bytecode): s/metrics/tt_metrics/. + (tt_size_reset): s/metrics/size_metrics/. - Building FreeType with external zlib 1.2.8 makes msvc 14 stop with - the following error. +2017-03-20 Werner Lemberg - ftgzip.c - zlib-1.2.8\zlib.h(86): error C2061: - syntax error: identifier 'z_const' - zlib-1.2.8\zlib.h(94): error C2054: - expected '(' to follow 'z_const' - zlib-1.2.8\zlib.h(94): error C2085: - 'msg': not in formal parameter list - ... - zlib-1.2.8\zlib.h(877): fatal error C1003: - error count exceeds 100; stopping compilation + [sfnt] Don't add instances to non-variation fonts. - The error happens because FreeType keeps an own copy of zlib-1.1.4 - under `src/gzip'. When building `src/gzip/ftgzip.c' with - FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses + * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. - #include +2017-03-20 Werner Lemberg - which correctly finds an external `zlib.h', but `zlib.h' itself has - a line + * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). - #include "zconf.h" +2017-03-18 Werner Lemberg - which makes Visual Studio 2015 find `src/gzip/zconf.h' while - compiling the files in `src/gzip'. + Introduce FT_UINT_TO_POINTER macro (#50560). - * src/gzip/zconf.h: Rename to... - * src/gzip/ftzconf.h: ... this. - * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. + We have to make a separate case for Windows 64's LLP64 data model. -2016-12-01 Oleksandr Chekhovskyi + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. - [autofit] Fix Emscripten crash (patch #9180). + * src/truetype/ttgload.c (load_truetype_glyph): Use it. - Function calls through pointers must use a matching signature to - work on Emscripten, since such calls are dispatched through lookup - tables grouped by signature. +2017-03-18 Werner Lemberg - * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix - typedef. + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). -2016-11-29 Werner Lemberg + The problematic font that exceeds the old limit is Lato-Regular, + version 2.007, containing bytecode generated by a buggy version of + ttfautohint. - [smooth] Revert previous commit. Already fixed with 6ca54c64. +2017-03-18 Werner Lemberg -2016-11-29 Werner Lemberg + [truetype] Another limitation for bytecode loop count maximum. - [smooth] Avoid conditional jump on uninitialized value (#49711). + Reported as - * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 -2016-11-27 Nikolaus Waxweiler + * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' + by number of glyphs also. - [autofit] Code shuffling. +2017-03-18 Werner Lemberg - Also improve some comments and remove unused code. + [ftfuzzer] Minor improvement. - No functional change. + * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if + bitmap strikes are active. - * src/autofit/afloader.c (af_loader_load_g): Merged with... - (af_loader_load_glyph): ...this function. - Split off emboldening code into... - (af_loader_embolden_glyph_in_slot): ... this function. +2017-03-18 Werner Lemberg -2016-11-17 Werner Lemberg + Improve `make multi'. - Better support of LLP64 systems with gcc (and clang). + * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. - * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'. + * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. - * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and - suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'. + * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. -2016-11-10 Werner Lemberg + * src/sfnt/pngshim.c: Guard file with + TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. - Fix `lcd_weights' array size. + * src/sfnt/ttbdf.c: Avoid empty source file. + * src/sfnt/ttpost.c: Guard file with + TT_CONFIG_OPTION_POSTSCRIPT_NAMES. + * src/sfnt/ttsbit.c: Guard file with + TT_CONFIG_OPTION_EMBEDDED_BITMAPS. - * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it. + * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty + source file. - Reported by Nikolaus. + * src/truetype/ttsubpix.c: Guard file with + TT_USE_BYTECODE_INTERPRETER also. -2016-11-06 Werner Lemberg + * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing. + * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, + src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, + src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, + src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, + src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, + src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort + entries. -2016-11-06 Werner Lemberg +2017-03-17 Werner Lemberg - [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format. + Fixes for conditional compilation. - It's unavoidable to call the PNG engine, but to get the metrics it - is sufficient to read the PNG image's header only. + * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' + earlier. - * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the - allocation of the glyph slot. - * src/sfnt/pngshim.h: Updated. - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png, - tt_face_load_sbix_image, tt_face_load_sbit_image): Updated. + * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into + TT_CONFIG_OPTION_GX_VAR_SUPPORT block. + (sfnt_done_face): Protect some code with + TT_CONFIG_OPTION_GX_VAR_SUPPORT. -2016-11-06 Werner Lemberg + * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler + warning. - [sfnt] Speed up `sbix' lookup. + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable + into TT_USE_BYTECODE_INTERPRETER block. - This also fixes a bug introduced in 2016-10-01 which prevents - display of embedded bitmap fonts that use the `sbix' format. + (tt_loader_init): Put `error' variable into + TT_USE_BYTECODE_INTERPRETER block. - * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and - offset also in `ebdt_size' and `ebdt_start', respectively. This - makes the test for an embedded bitmap data table succeed for this - format. +2017-03-17 Werner Lemberg - (tt_face_load_strike_metrics) : Use - `ebdt_size' and `ebdt_start' - (tt_face_load_sbix_image): Ditto. + Fix preprocessor warning. -2016-11-06 Seigo Nonaka - Werner Lemberg + * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether + TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its + value. - Introduce a way of quickly retrieving (embedded) bitmap metrics. +2017-03-17 Werner Lemberg - `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph - until the user calls `FT_Render_Glyph'. However, it always - allocates memory for bitmaps and copies or decodes the contents of a - bitmap glyph, which can be quite slow for PNG data. + `make multi' fixes; compiler warnings. - * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New - macro. + * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. - * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if - FT_LOAD_BITMAP_METRICS_ONLY is used. + * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include + FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. - * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap, - tt_sbit_decoder_load_bitmap): Add argument to control allocation of - the glyph slot. - (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound, - tt_face_load_sbit_image): Updated. + * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include + FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. + (get_win_string, get_apple_string): Initialize `result'. - * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if - `FT_LOAD_BITMAP_METRICS_ONLY' is set. +2017-03-17 Dave Arnold - * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add - argument to control allocation of the glyph slot. - * src/pfr/pfrobjs (pfr_slot_load): Updated. + [cff] Fix potential bugs in default NDV for CFF2. - * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. + * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend + vector when `lenNDV' is zero; don't rely on zero-init. + Save `lenNDV' as part of cache key even when `lenNDV' is zero. - * docs/CHANGES: Updated. +2017-03-17 Dave Arnold -2016-11-06 Werner Lemberg + [cff] Fix CFF2 stack allocation. - Synchronize with gnulib (#49448). + * src/cff/cffparse.c (cff_parser_init) add 1 for operator. - * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, - builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in - current version of `intprops.h'. - Other minor synchronization to reduce code differences between the - three files. +2017-03-16 Werner Lemberg -2016-11-03 Behdad Esfahbod + * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. - [truetype] Clamp variation requests to valid range. + Reported as - This is required by OpenType 1.8; it also avoids rounding surprises. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 - * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates - outside of the allowed range to always stay within the range instead - of producing an error. +2017-03-15 Werner Lemberg -2016-10-29 Werner Lemberg + Remove clang compiler warnings (#50548). - [truetype] Remove clang warnings. + * include/freetype/internal/tttypes.h (TT_FaceRec): Make + `var_postscript_prefix_len' unsigned. - * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for - loop counter handling. + * src/autofit/afwarp.c (af_warper_compute_line_best): Remove + redundant assignment. - * src/truetype/ttinterp.c: Updated. - (Ins_SCANTYPE): Use signed constant. - (TT_RunIns): Ensure `num_twilight_points' is 16bit. + * src/cff/cffload.c (cff_subfont_load): Add casts. -2016-10-27 Werner Lemberg + * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. - [truetype] Fix commit from 2014-11-24. + * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' + keyword. + Add casts. + (fixed2float): Add cast. + (sfnt_get_var_ps_name): Make `p' always initialized. + Add casts. - Problem reported by Hin-Tak Leung . + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. - * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking - logic. +2017-03-15 Werner Lemberg -2016-10-26 Werner Lemberg + [ftfuzzer] Limit number of tested faces and instances. - Add `FT_Get_{MM,Var}_Blend_Coordinates' functions. + This is inspired by the discussion in and analysis of - * include/freetype/ftmm.h: Declare. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 - * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): - New typedef. - (MultiMasters): New MM service function `get_mm_blend'. - (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. - Update all callers. + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only + up to 20 face indices. + Use only up to 20 instance indices. - * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, - FT_Get_Var_Blend_Coordinates): Implement. +2017-03-15 Werner Lemberg - * src/truetype/ttdriver.c: Updated. + * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. - * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle - `get_mm_blend' service. - * src/truetype/ttgxvar.h: Updated. +2017-03-14 Werner Lemberg - * src/type1/t1driver.c: Updated. + [sfnt] Implement PS names for font instances [3/3]. - * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle - `get_mm_blend' service. - * src/type1/t1load.h: Updated. + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - * docs/CHANGES: Document. + * include/freetype/internal/tttypes.h (TT_FaceRec): New fields + `var_postscript_prefix' and `var_postscript_prefix_len'. -2016-10-26 Werner Lemberg + * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. + (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. + (get_win_string, get_apple_string): Remove `const' from return + value. + (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. + (hexdigits): New array. + (sfnt_get_var_ps_name): New function, implementing Adobe TechNote + 5902 to construct a PS name for a variation font instance. + (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. - * src/type1/t1load.c (parse_subrs): Fix limit check. + * src/sfnt/sfobjs.c (sfnt_done_face): Updated. - Reported as + * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset + `face->postscript_name' to trigger recalculation for new instance + parameters. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81 +2017-03-14 Werner Lemberg -2016-10-25 Alexei Podtelezhnikov + [sfnt] Implement PS names for font instances [2/3]. - [cff] Correct cmap format reporting (#24819). + * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: + New function to find the shortest representation of a 16.16 + fractional number. - * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic - charmap instead of guessing its format and language. +2017-03-14 Werner Lemberg -2016-10-22 Werner Lemberg + [sfnt] Implement PS names for font instances [1/3]. - [truetype] Fix SCANTYPE instruction (#49394). + Add 128bit MurmurHash 3 function. - * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits. + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. -2016-10-22 Werner Lemberg + * src/sfnt/sfdriver.c (ROTL32): New macro. + (fmix32, murmur_hash_3_128): New functions. - [sfnt] Improve handling of invalid post 2.5 tables [#49393]. +2017-03-13 Werner Lemberg - * src/sfnt/ttpost.c (load_format_25): We need at least a single - table entry. + [truetype] Ignore invalid MVAR tags. -2016-10-14 Werner Lemberg + Reported as - [truetype] Fix handling of `cvar' table data. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 - Reported as + * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit + warning for invalid tags. + (tt_apply_mvar): Ignore invalid tags. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53 +2017-03-12 Werner Lemberg - * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT - indices. + [truetype] Store and use design coordinates also. -2016-10-11 Werner Lemberg + * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): + Add `normalizedcoords' argument. - [psaux] Fix handling of invalid flex subrs. + * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store + the design coordinates of the current instance. + Updated. - Problem reported as + * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... + (tt_set_mm_blend): ... New function. + Convert data in `normalizedcoords' array to `coords' array on + demand. + (TT_Set_Var_Design): Store argument data in `coords' array. + (TT_Get_Var_Design): Get data from `coords' array. + (tt_get_var_blend): Updated. + (tt_done_blend): Updated. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52 + * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) - : Set `flex_state' after error checking. + * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. -2016-10-11 Werner Lemberg + * src/cff/cffobjs.c (cff_face_init): Updated. - * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation. +2017-03-12 Werner Lemberg -2016-10-08 Werner Lemberg + src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. - * src/cid/cidload.c (cid_face_open): Properly propagate `error'. +2017-03-08 Werner Lemberg -2016-10-08 Werner Lemberg + [sfnt] Another fix for buggy variation fonts. - [cid] Fix parsing of subr offsets. + Reported as - Bug introduced 2016-05-16. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 - * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error. + * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of + instances to zero for `CFF' fonts table, ensure that there is no + `CFF2' present also (which gets priority). -2016-10-01 Werner Lemberg +2017-03-07 Werner Lemberg - [sfnt] Disable bitmap strikes if we don't have a bitmap data table. + [sfnt] Improve handling for buggy variation fonts. - * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have - a bitmap data table. + Reported as -2016-10-01 Alexei Podtelezhnikov + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 - [smooth] Remove impossibility. + * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of + instances to zero for `CFF' fonts table, ensure that there is no + `glyf' table present also (which gets priority). - * src/smooth/ftgrays.c (TWorker): Rearrange fields. - (gray_convert_glyph): Remove impossible condition and clean up. +2017-03-06 Werner Lemberg -2016-09-29 Werner Lemberg + [sfnt, truetype] Always provide default instance. - [pcf] Enrich family name with foundry name and glyph width info. + As documented in the OpenType specification, an entry for the + default instance may be omitted in the named instance table. In + particular this means that even if there is no named instance table + in the font we actually do have a named instance, namely the default + instance. - This is a very old patch from openSuSE (from 2006, submitted to - FreeType in 2011) that I forgot to apply. + For consistency, we always want the default instance in our list of + named instances. If it is missing, we try to synthesize it. - https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch + * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default + instance is in the table of named instances. Otherwise adjust + number of instances. - Prepend the foundry name plus a space to the family name. There are - many fonts just called `Fixed' which look completely different, and - which have nothing to do with each other. When selecting `Fixed' in - KDE or Gnome one gets results that appear rather random, the style - changes often if one changes the size and one cannot select some - fonts at all. + * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. + (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named + instances. + Sythesize a named instance entry if necessary. + (tt_done_blend): Free `normalized_stylecoords'. - We also check whether we have `wide' characters; all put together, - we get family names like `Sony Fixed' or `Misc Fixed Wide'. +2017-03-05 Werner Lemberg - * src/pcf/pcfread.c (pcf_load_font): Implement it. + [sfnt] Remove redundant code. - * docs/CHANGES: Document it. + * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for + `num_instances', which will always succeed. -2016-09-29 Werner Lemberg +2017-03-04 Werner Lemberg - [ftfuzzer] Speed up. + [sfnt] Add `get_name_id' service. - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't - check for embedded bitmaps if we have a non-default instance. + * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New + typedef. + (SFNT_Interface): Add `get_name_id' field. + (FT_DEFINE_SFNT_INTERFACE): Updated. -2016-09-29 Werner Lemberg + * src/sfnt/sfdriver.c (search_name_id): Rename to... + (sfnt_get_name_id): ... this. + (sfnt_get_ps_name, sfnt_interface): Updated. - [truetype] Disallow bitmap strikes for non-default instances. +2017-03-04 Werner Lemberg - Also speed up access of default instances if GX variations are - active. + [truetype] Make `TT_Set_MM_Blend' set named instance index. - * include/freetype/internal/tttypes.h (TT_FaceRec): Add - `is_default_instance' member. + * src/truetype/ttgxvar.h (GX_Blend): New array + `normalized_stylecoords'. - * src/sfnt/sfobjs.c (sfnt_init_face): Initialize - `is_default_instance'. + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill + `normalized_stylecoords'. + (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' + accordingly. - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Add test for default instance. - (TT_Load_Glyph): Load embedded bitmaps for default instance only. +2017-03-02 Werner Lemberg - * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute - `is_default_instance'. + [truetype] Split off designer/normalized conversion routines. -2016-09-29 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion + code designer->normalized coordinates to... + (ft_var_to_normalized): ... New function. + (TT_Get_Var_Design): Split off conversion code normalized->designer + coordinates to... + (ft_var_to_design): ... New function. - [truetype] Clean up `TT_Face' structure. +2017-02-28 Werner Lemberg - * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused - fields `horz_metrics' and `vert_metrics'. - Update documentation. + [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. - * src/sfnt/sfobjs.c (sfnt_done_face): Updated. + * src/sfnt/sfdriver.c (sfnt_ps_map): New array. + (sfnt_is_postscript): New function. + (char_type_func): New typedef. + (get_win_string, get_apple_string): Add argument to specify + character checking function. + Add argument whether argument checking failures should be reported. + Update callers. + (search_name_id): Fix return value. -2016-09-28 Werner Lemberg +2017-02-23 Werner Lemberg - More FT_ZERO usage. + [sfnt] Split off another bit of `sfnt_get_ps_name'. - * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): - s/ft_memset/FT_MEM_ZERO/. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some + functionality into... + (search_name_id): ... New function. - * src/psaux/t1decode.c (t1_decoder_parse_charstrings): - s/ft_memset/FT_ARRAY_ZERO/. +2017-02-23 Werner Lemberg - * src/raster/ftraster.c (FT_ZERO): Define. - (ft_black_new): Use it. - * src/raster/ftrend1.c (ft_raster1_get_cbox): - s/FT_MEM_ZERO/FT_ZERO/. + [sfnt] Modularize `sfnt_get_ps_name'. - * src/smooth/ftgrays.c (FT_ZERO): Define. - (gray_raster_new): Use it. - * src/smooth/ftsmooth.c (ft_smooth_get_cbox): - s/FT_MEM_ZERO/FT_ZERO/. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some + functionality into... + (IS_WIN, IS_APPLE): ... New macros. + (get_win_string, get_apple_string): ... New functions. -2016-09-28 Werner Lemberg +2017-02-23 Werner Lemberg - */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate. + [truetype] Minor improvement. -2016-09-27 Werner Lemberg + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Remove unnecessary tests. - [truetype] Trace number of executed opcodes. +2017-02-23 Werner Lemberg - * src/truetype/ttinterp.c (TT_RunIns): Implement it. + * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. -2016-09-27 Werner Lemberg + For orthogonality with other structure field names. - [truetype] Speed up `TT_Load_Glyph'. + Update all users. - This avoids additional calls to `tt_face_lookup_table' for the - `glyf' table, which can be expensive. +2017-02-22 Alexei Podtelezhnikov - * include/freetype/internal/tttypes.h (TT_LoaderRec): Move - `glyf_offset' field to ... - (TT_FaceRec): ... this structure. - * src/truetype/ttgload.c (load_truetype_glyph): Updated. - (tt_loader_init): Move initialization of `glyf_offset' to ... - * src/truetype/ttpload.c (tt_face_load_loca): ... this function. + * src/smooth/ftgrays.c (gray_hline): Improve code. -2016-09-27 Werner Lemberg +2017-02-20 Dominik Röttsches - [truetype] Introduce dynamic limits for some bytecode opcodes. + Fix some `ttnameid.h' entries (#50313). - This speeds up FreeType's handling of malformed fonts. + * include/freetype/ttnameid.h: + s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, + s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. - * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number - of twilight points, the total number of negative jumps, and the - total number of loops in LOOPCALL opcodes. The values are based on - the number of points and entries in the CVT table. - (Ins_JMPR): Test negative jump counter. - (Ins_LOOPCALL): Test loopcall counter. +2017-02-20 Werner Lemberg - * src/truetype/ttinterp.h (TT_ExecContext): Updated. + [cff] Finish support for `random' operator. - * docs/CHANGES: Updated. + * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. -2016-09-25 Werner Lemberg + * src/cff/cffobjs.c: Updated. + (cff_driver_init): Initialize random seed value. - [truetype] Sanitize only last entry of `loca' table. + * src/cff/cffload.c (cff_random): New function. + (cff_subfont_load): Add `face' argument. + Update all callers. + Initialize random number generator with a proper seed value. + (cff_font_load): Add `face' argument. + Update all callers. - Without this patch, a loca sequence like `0 100000 0 100000 ...', - where value 100000 is larger than the `glyf' table size, makes - FreeType handle the whole `glyf' table as a single glyph again and - again, which is certainly invalid (and can be very slow, too). + * src/cff/cffload.h: Updated. - * src/truetype/ttpload.c (tt_face_get_location): Implement. - Improve tracing messages. + * src/cff/cf2intrp.c (CF2_FIXME): Removed. + (cf2_interpT2CharString) : Implement opcode. -2016-09-25 Werner Lemberg + * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't + initialize random seed value. + : Use new random seed framework. - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo. +2017-02-20 Werner Lemberg -2016-09-24 Werner Lemberg + [cff] Sanitize `initialRandomSeed'. - [autofit] Tracing fixes. + * src/cff/cffload.c (cff_load_private_dict): Make + `initial_random_seed' value always positive. - * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping - functions only if we actually do tracing. +2017-02-20 Werner Lemberg -2016-09-22 Alexei Podtelezhnikov + [cff] Introduce `random-seed' property (2/2). - [smooth] Reduce divisions in the line renderer. + * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. + (open_face): Initialize `face->internal->random_seed'. + (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. - We don't need some divisions if a line segments stays within a single - row or a single column of pixels. + * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' + property. - * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions - conditional. +2017-02-20 Werner Lemberg -2016-09-15 Alexei Podtelezhnikov + [cff] Introduce `random-seed' property (1/2). - * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table. + We need this for support of the `random' operator. -2016-09-14 Alexei Podtelezhnikov + * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. - [smooth] Another tiny speed-up. + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New + field `random_seed'. - * src/smooth/ftgrays.c (gray_find_cell): Merge into... - (gray_record_cell): ... this function. + * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'. -2016-09-11 Alexei Podtelezhnikov +2017-02-17 Werner Lemberg - * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code. + Remove clang warnings. -2016-09-11 Alexei Podtelezhnikov + * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' + keyword. - [smooth] Fix valgrind warning and reoptimize. + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): + Initialize some variables. - The algorithm calls `gray_set_cell' at the start of each new contour - or when the contours cross the cell boundaries. Double-checking for - that is wasteful. +2017-02-16 Nikolaus Waxweiler + Werner Lemberg - * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. - (gray_convert_glyph): Remove initialization introduced by 44b172e88. + Add face property for stem darkening. -2016-09-10 Werner Lemberg + * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New + macro. - [sfnt] Fix previous commit. + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add + `no_stem_darkening' field. - Problems reported as + * src/autofit/afloader.c (af_loader_load_glyph), + src/autofit/afmodule.c (af_property_set): Updated. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40 + * src/base/ftobjs.c: Include FT_AUTOHINTER_H. + (ft_open_face_internal): Updated. + (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. - We now map the strike index right before accessing the physical - data, not earlier. + * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. - * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map' - after creating the map so that... + * src/cff/cffdrivr.c (cff_property_set): Updated. - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function - can be used before and after setting up `sbit_strike_map'. - (tt_face_set_sbit_strike): Revert change. - (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index. +2017-02-16 Nikolaus Waxweiler + Werner Lemberg - * src/truetype/ttdriver.c (tt_size_select): Revert change. + Add face property for LCD filter weights. -2016-09-09 Werner Lemberg + * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, + FT_LCD_FILTER_FIVE_TAPS): New macros. + (FT_LcdFiveTapFilter): New typedef. - [ftfuzzer] Minor improvements. + * include/freetype/ftobjs.h (FT_Face_InternalRec) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. + (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. + (ft_lcd_filter_fir): New prototype. + (FT_LibraryRec): Updated. - * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore - invalid strikes. - Use better values for call to `FT_Set_Char_Size'. + * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... + (ft_lcd_filter_fir): ... this base function. + Updated. + (_ft_lcd_filter_legacy): Updated. + (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. -2016-09-09 Werner Lemberg + * src/base/ftobjs.c (ft_open_face_internal): Updated. + (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. - [sfnt] Don't provide (completely) broken strike data. + * src/smooth/ftsmooth.c (ft_smooth_render_generic) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from + `FT_Face_Internal'. - FreeType tries to sanitize strike header data; we now reject - completely broken ones. +2017-02-14 Nikolaus Waxweiler + Werner Lemberg - * include/freetype/internal/tttypes.h (TT_FaceRec): New - `sbit_strike_map' array pointer. + Add new function `FT_Face_Properties'. - * src/base/ftobjs.c (FT_Match_Size): Reject matches where either - width or height would be zero. - Add tracing message in case of error. + This commit provides the framework, to be filled with something + useful in the next commits. - * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map', - only using (more or less) valid strike header data for - FT_Face's `available_sizes' array. - (sfnt_done_face): Updated. + * include/freetype/freetype.h (FT_Face_Properties): Declare. - * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use - `sbit_strike_map'. - (tt_face_load_strike_metrics): Improve tracing. + * src/base/ftobjs.c (FT_Face_Properties): New function. - * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'. +2017-02-13 Werner Lemberg -2016-09-08 Werner Lemberg + [autofit] Prevent overlapping blue zones. - * Version 2.7 released. - ======================= + Problem reported as + https://github.com/google/fonts/issues/632 - Tag sources with `VER-2-7'. + The font in question (Nunito) has values 705 and 713 for the + reference and overshoot values, respectively, of the first blue + zone. Blue zone 2, however, has value 710 for both the reference + and overshoot. At 12ppem, reference and overshoot of blue zone 0 + becomes 8px, while blue zone 2 becomes 9px. - * docs/VERSION.TXT: Add entry for version 2.7. + A peculiarity of this font is that the tops of isolated vertical + stems like `N' have a slight overshoot also. The auto-hinter tries + to find the nearest blue zone using the *original* coordinates. For + vertical stems, this is value 713. For normal horizontal tops like + in character `E', this is value 710. Since value 713 is mapped to + 8px but value 710 to 9px, `N' and similar characters are one pixel + higher than `E', which looks very bad. - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, - builds/windows/vc2005/index.html, - builds/windows/vc2008/freetype.vcproj, - builds/windows/vc2008/index.html, - builds/windows/vc2010/freetype.vcxproj, - builds/windows/vc2010/index.html, - builds/windows/visualc/freetype.dsp, - builds/windows/visualc/freetype.vcproj, - builds/windows/visualc/index.html, - builds/windows/visualce/freetype.dsp, - builds/windows/visualce/freetype.vcproj, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/freetype.vcproj, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/freetype.vcproj, - builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/. + This commit sanitizes blue zones to avoid such a behaviour. - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7. - (FREETYPE_PATCH): Set to 0. + * src/autofit/aflatin.c (af_latin_sort_blue): New function. + (af_latin_metrics_init_blues): Sort blue values and remove overlaps. - * builds/unix/configure.raw (version_info): Set to 18:6:12. - * CMakeLists.txt (VERSION_MINOR): Set to 7. - (VERSION_PATCH): Set to 0. +2017-02-12 Alexei Podtelezhnikov - * docs/CHANGES: Updated. + * src/smooth/ftgrays.c (gray_sweep): Improve code. -2016-09-08 Werner Lemberg +2017-02-06 Werner Lemberg - * src/truetype/ttinterp.c: Include `ttgxvar.h'. + [truetype] Implement `VVAR' table support. - This fixes the `multi' build. + * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... + (GX_HVVarTable): ...This. + (GX_Blend): Add fields for `VVAR' table handling. + Other minor updates. -2016-09-08 Werner Lemberg + * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... + (ft_var_load_hvvar): ...This. + Handle VVAR loading also (controlled by an additional parameter). + (tt_hadvance_adjust): Renamed to... + (tt_hvadvance_adjust): ...This. + Handle application of advance height also (controlled by an + additional parameter). + (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for + `tt_hvadvance_adjust'. - [autofit] Another improvement to Armenian support. + * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. - Suggested by Hrant H Papazian . +2017-02-05 Werner Lemberg - * src/autofit/afscript.h: Use better suited characters to derive - default stem widths. + [autofit] Use better blue zone characters for lowercase latin. -2016-09-07 Alexei Podtelezhnikov + The number of lowercase characters for computing the top flat blue + zone value was too small (in most cases only `x' and `z'). If one + of the two characters has a large serif, say, it can happen that + FreeType must select between two different values, having a 50% + chance to use the wrong one. As a result, rendering at larger PPEM + values could yield uneven lowercase glyph heights. - * src/smooth/ftgrays.c (gray_hline): Micro-optimize. + Problem reported by Christoph Koeberlin . -2016-09-06 Alexei Podtelezhnikov + * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced + with... + (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): + ... New, extended sets. + (AF_BLUE_STRINGSET_LATN): Updated. - [smooth] Operate in absolute bitmap coordinates. + * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. - Simpler bitmap addressing improves performance by 1.5%. +2017-02-04 Werner Lemberg - * src/smooth/ftgrays.c (gray_TWorker): Remove count fields. - (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline, - gray_sweep, gray_convert_glyph, gray_raster_render): Updated. + Make `freetype-config' a wrapper of `pkg-config' if possible. -2016-09-06 Alexei Podtelezhnikov + Based on ideas taken from - [smooth] Improve contour start (take 2). + http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch + http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch - * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly - instead of... - (gray_start_cell): ... this function, which is removed. - (gray_convert_glyph): Make initial y-coordinate invalid. + * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to + set output variables if program is available. -2016-09-06 Werner Lemberg + * docs/CHANGES, docs/freetype-config.1: Updated. - [type1] MM fonts support exactly zero named instances (#48748). +2017-02-04 Werner Lemberg - * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero. + * builds/unix/unix-def.in (freetype-config): Fix permissions. -2016-09-06 Jonathan Kew +2017-02-03 Werner Lemberg - [cff] Fix uninitialized memory. + * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. - Problem reported as +2017-02-03 Werner Lemberg - https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 + * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. - * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage' - array to handle a `get' opcode without a previous `put'. + Reported by Behdad. -2016-09-05 Alexei Podtelezhnikov +2017-02-02 Werner Lemberg - * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert. + [truetype] Fix MVAR post-action handling. -2016-09-05 Alexei Podtelezhnikov + Reported as - [smooth] Improve contour start. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 - * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly - instead of... - (gray_start_cell): ... this function, which is removed. + * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This + is important to make `tt_size_reset_iterator' (called in + `tt_apply_mvar') always work. -2016-09-05 Werner Lemberg +2017-02-02 Werner Lemberg - [cff] Fix memory initialization. + Make compilation with FT_CONFIG_OPTION_PIC work again. - * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' - variants of FreeType's memory allocation macros don't do zeroing. + All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. -2016-09-05 Werner Lemberg + * include/freetype/internal/services/svmetric.h + (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. - [ftrandom] Minor improvements. + * src/autofit/aflatin.c (af_latin_hints_compute_edges, + af_latin_hint_edges): Provide `globals' variable. - * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to - 500. + * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing + variable. - * src/tools/ftrandom/Makefile (CFLAGS): Split off include - directories to ... - (INCLUDES): ... this new variable. - (LDFLAGS): New variable. - (ftrandom.o, ftrandom): Updated. + * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, + AF_STYLE_CLASSES_GET): Redefine. -2016-09-05 Werner Lemberg + * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. - [autofit] Improve Armenian support. + * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. - Thanks to Hrant H Papazian for help. + * src/cff/cffpic.h (CffModulePIC): Fix typo. - * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve - selection of characters. +2017-01-31 Alexei Podtelezhnikov - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * src/smooth/ftgrays.c (gray_render_scanline): Improve code. -2016-09-04 Werner Lemberg +2017-01-31 Werner Lemberg - [ftrandom] Improve Makefile. + [cff] Provide metrics variation service interface (#50196). - It now supports both a normal build (`./configure && make') and a - development build (`make devel'). + Only now I've got an OTF with an HVAR table for testing... - * src/tools/ftrandom/Makefile (VPATH): Set it so that - `libfreetype.a' gets searched in both `objs' (for the development - build) and `objs/.libs' (for a normal build which uses libtool). - (LIBS): Add missing libraries. - (ftrandom.o): New rule. - (ftrandom): Use automatic variables. + The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the + metrics variations interface. However, this didn't work with + `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. -2016-09-03 Werner Lemberg + * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for + metric service functions from the `truetype' module. + (cff_service_metrics_variations): New service. + (cff_services): Updated. - [truetype] More fixes for handling of GX deltas. + * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. + [FT_CONFIG_OPTION_PIC]: Synchronize code. - Problems reported by Bob Taylor . + * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to + FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always + load the service from the `truetype' module. - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough - sanity test for glyph variation array header size. - Always set stream position before reading packed x and y deltas. - Fix thinko w.r.t. `localpoints' array. +2017-01-31 Werner Lemberg -2016-09-03 Werner Lemberg + Add framework to support services with 9 functions. - [ftrandom] Various fixes. + * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): + New macro. - * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better - default. - (error_fraction): Make it of type `double' to work as advertized – - this was completely broken. - Update all related code. - (error_count, fcnt): Make it unsigned to fix compiler warnings. - Update all related code. - (fontlist): Change `len' member to `long' to fix compiler warnings. - (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag - unused variables. - (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings. - (ExecuteTest): Ditto. - Call `FT_Done_FreeType'. - (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned - int'. - (usage): Improve output. - (main): Fix compiler warnings. +2017-01-31 Werner Lemberg - * src/tools/ftrandom/README: Updated. + [base] Fix error handing in MM functions. -2016-09-03 Werner Lemberg + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): + Implement it. - [base] Avoid negative bitmap strike dimensions (#48985). +2017-01-31 Werner Lemberg - * src/base/ftobjs.c (FT_Open_Face): Check whether negation was - actually successful. For example, this can fail for value - -32768 if the type is `signed short'. If there are problems, - disable the strike. + [truetype] Fix sanity check for `gvar' table (#50184). -2016-09-03 Werner Lemberg + * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing + variation data for some glyphs. - [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). +2017-01-31 Werner Lemberg - * src/cff/cffload.c (cff_index_get_name): Check `byte_len'. + [autofit] Avoid uninitialized jumps (#50191). -2016-09-02 Werner Lemberg + * src/autofit/afcjk.c (af_cjk_metrics_check_digits), + src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize + `advance'. - [unix] Enable 64bit support in file system access (#48962). +2017-01-27 Werner Lemberg - * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'. + s/GB2312/PRC/. -2016-09-02 Werner Lemberg + * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. + (FT_ENCODING_GB2312): Deprecated. - [sfnt] Avoid left shift of negative value (#48980). + * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. + (TT_MS_ID_GB2312): Deprecated. - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned - constant. + * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. -2016-09-02 Werner Lemberg + * docs/CHANGES: Updated. - * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings. +2017-01-26 Werner Lemberg -2016-09-02 Werner Lemberg + [base] Add `FT_Get_Sfnt_LangTag' function. - Some preparations for the next release. + * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. + (FT_Get_Sfnt_LangTag): New declaration. - * include/freetype/config/ftoption.h - (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable. + * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New function. * docs/CHANGES: Updated. -2016-09-01 Alexei Podtelezhnikov +2017-01-26 Werner Lemberg - [smooth] Simplify span rendering more. + [sfnt] Support `name' table format 1. - It turns out that there is significant cost associated with `FT_Span' - creation and calls to `gray_render_span' because it happens so - frequently. This removes these steps from our internal use but leaves - it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain - is about 5%. + * include/freetype/internal/tttypes.h (TT_LangTagRec): New + structure. + (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. - * src/smooth/ftgrays.c (gray_render_span): Removed. The code is - migrated to... - (gray_hline): ... here. + * src/sfnt/ttload.c (tt_face_load_name): Add support for language + tags. + Reduce array size of name strings in case of invalid entries. + (tt_face_free_name): Updated. -2016-08-30 Alexei Podtelezhnikov + * docs/CHANGES: Updated. - [smooth] Streamline pixmap drawing a bit more. +2017-01-25 Werner Lemberg - Zero coverage is unlikely (1 out of 256) to warrant checking. This - gives 0.5% speed improvement in rendering simple glyphs. + [sfnt] s/TT_NameEntry/TT_Name/. - * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks. + * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed + to... + (TT_NameRec): This. + (TT_NameTableRec): Updated. -2016-08-29 Alexei Podtelezhnikov + * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. - [smooth] Streamline pixmap drawing. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. - This gives 2% speed improvement in rendering simple glyphs. + * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, + tt_name_entry_ascii_from_other): Renamed to... + (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, + respectively. + (TT_NameEntry_ConvertFunc): Renamed to... + (TT_Name_ConvertFunc): This. + (tt_face_get_name): Updated. - * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a - pointer to its bottom-left and pitch to be used in... - (gray_TWorker): ... here. - (gray_render_span): Move pixmap flow check from here... - (gray_raster_render): .. to here. + * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): + Updated. -2016-08-27 Alexei Podtelezhnikov +2017-01-24 Werner Lemberg - [smooth] Reduce stack of band boundaries. + [sfnt] Fix Postscript name service for symbol fonts. - * src/smooth/ftgrays.c (gray_TBand): Removed. - (gray_convert_glyph): Updated to stack band boundaries concisely. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 + entries also. -2016-08-26 Werner Lemberg +2017-01-24 Werner Lemberg - * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'. + [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. -2016-08-26 Werner Lemberg + * include/freetype/ftsnames.h + (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. + (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, + FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. - [cid] Fix commit from 2016-05-16. + * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. + (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): + Deprecated. - * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors. + * src/sfnt/sfobjs.c (sfnt_load_face): Updated. -2016-08-26 Werner Lemberg + * docs/CHANGES: Updated. - [sfnt] Cache offset and size to bitmap data table. +2017-01-23 Werner Lemberg - This commit avoids `EBDT' and friends being looked up again and - again while loading a single embedded bitmap. + [base] Add `FT_Set_Default_Properties' (#49187). - * include/freetype/internal/tttypes.h (TT_FaceRec) - [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and - `ebdt_size'. + * include/freetype/ftmodapi.h: Add declaration. - * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ... - (tt_face_load_sbit): ... this function; also store the table size - and offset. + * src/base/ftinit.c (ft_set_default_properties): Renamed to... + (FT_Set_Default_Properties): ... this. + (FT_Init_FreeType): Updated. -2016-08-26 Alexei Podtelezhnikov + * docs/CHANGES: Updated. - * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks. +2017-01-23 Werner Lemberg -2016-08-26 Werner Lemberg + [truetype] Minor updates for OpenType 1.8.1. - [type1] Fix heap buffer overflow. + * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been + removed from the specification; it is now reserved. - Reported as + * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. + (GX_FVar_Head): Remove `countSizePairs'; the corresponding data + field in the `MVAR' table is now reserved. + (fvar_fields): Updated. - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 +2017-01-23 Werner Lemberg - * src/type1/t1load.c (parse_charstrings): Reject fonts that don't - contain glyph names. + [truetype] Avoid segfault for invalid variation data. -2016-08-25 Werner Lemberg + * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure + `itemCount' is not zero. - [sfnt] Fix previous commit (#48901). + Reported as - * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 -2016-08-25 Werner Lemberg +2017-01-20 Werner Lemberg - [sfnt] Speed up handling of invalid format 4 cmaps. + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. - * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add - tests for `num_glyph' from `tt_cmap4_char_map_linear'. +2017-01-17 Werner Lemberg -2016-08-25 Werner Lemberg + * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. - * include/freetype/internal/ftdriver.h: Remove unused typedefs. + (TT_APPLE_ID_FULL_UNICODE): New macro. -2016-08-22 Alexei Podtelezhnikov + (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, + TT_MS_LANGID_UPPER_SORBIAN_GERMANY, + TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, + TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, + TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, + TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, + TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, + TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, + TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, + TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, + TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New + macros. - [smooth] Simplify span rendering. + (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. - This removes unnecessary complexity of span merging and buffering. - Instead, the spans are rendered as they come, speeding up the - rendering by about 5% as a result. + (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, + TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, + TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, + TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, + TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, + TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, + TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, + TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, + TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, + TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, + TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, + TT_MS_LANGID_UIGHUR_PRC): New aliases. - * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed. - (gray_TWorker): Remove span buffer and related fields. - (gray_sweep, gray_hline): Updated. + Remove commented out code. - * include/freetype/ftimage.h: Remove documentation note about - `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone. + (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, + TT_NAME_ID_VARIATIONS_PREFIX): New macros. -2016-08-16 Werner Lemberg + (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many + years), use guarded long macros by default and define short versions + as aliases for the long ones. - [truetype] Fix `MPS' instruction. +2017-01-15 Werner Lemberg - According to Greg Hitchcock, MPS in DWrite really returns the point - size. + * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters + also. - * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member. +2017-01-11 Werner Lemberg - * src/truetype/ttdriver.c (tt_size_request): Set `point_size'. + * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. - * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize' - member. +2017-01-11 Werner Lemberg - * src/truetype/ttinterp.c (TT_Load_Context): Updated. - (Ins_MPS): Fix instruction. + [truetype] Actually use metrics variation service. -2016-08-16 Werner Lemberg + * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (ft_face_get_mvar_service): New auxiliary function to look up + metrics variation service. + (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Call metrics variation service. - [lzw] Optimize last commit. + * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for + named instances. - * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into - conditional clause. +2017-01-11 Werner Lemberg -2016-08-16 Werner Lemberg + [truetype] Provide metrics variation service. - [lzw] Avoid invalid left shift. + * include/freetype/internal/services/svmetric.h + (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. - Reported as + * src/truetype/ttgxvar.c: Include FT_LIST_H. + (tt_size_reset_iterator): New auxiliary function for... + (tt_apply_var): New function. - https://bugzilla.mozilla.org/show_bug.cgi?id=1295366 + * src/truetype/ttgxvar.h: Updated. - * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'. + * src/truetype/ttdriver.c (tt_service_metrics_variations): Add + `tt_apply_mvar'. -2016-08-16 Werner Lemberg + * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics + variation service. - [lzw] Avoid buffer overrun. +2017-01-11 Werner Lemberg - Reported as + [truetype] Parse `MVAR' table. - https://bugzilla.mozilla.org/show_bug.cgi?id=1273283 + * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. + (GX_Value, GX_MVarTable): New structures. + (GX_Blend): Add it. - * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't - underflow. + * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, + GX_GASP_CASE): New macros. + (ft_var_get_value_pointer): New auxiliary function to get a pointer + to a value from various SFNT tables already stored in `TT_Face'. + (ft_var_load_mvar): New function. + (TT_Get_MM_Var): Call it. + (tt_done_blend): Updated. -2016-08-16 Werner Lemberg +2017-01-11 Werner Lemberg - [truetype] Fix compiler warning. + [truetype] More preparations for MVAR support. - * src/truetype/ttgload.c (load_truetype_glyph): Add cast. + * src/truetype/ttobjs.c (tt_size_reset): Add argument to make + function only recompute ascender, descender, and height. -2016-08-13 Werner Lemberg + * src/truetype/ttobjs.h: Updated. - [winfonts] Avoid zero bitmap width and height. + * src/truetype/ttdriver.c (tt_size_select, tt_size_request): + Updated. - Reported as +2017-01-09 Werner Lemberg - https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 + [pcf] Disable long family names by default. - * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. - (FNT_Load_Glyph): Check for zero pitch. + * include/freetype/config/ftoption.h + (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. -2016-08-11 Alexei Podtelezhnikov +2017-01-09 Werner Lemberg - * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes. + [pcf] Make long family names configurable. -2016-08-11 Alexei Podtelezhnikov + The change from 2016-09-29 was too radical (except for people using + the openSuSE GNU/Linux distribution). To ameliorate the situation, + PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls + the feature; if set, a new PCF property option + `no-long-family-names' can be used to switch this feature off. - * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting. + * include/freetype/config/ftoption.h, devel/ftoption.h + (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. -2016-08-11 Alexei Podtelezhnikov + * include/freetype/ftpcfdrv.h: New header file (only containing + comments currently, used for building the documentation). - * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries. + * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. -2016-08-10 Peter Klotz + * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. - * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. + * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and + FT_PCF_DRIVER_H. + (pcf_property_set, pcf_property_get): New functions. + (pcf_service_properties): New service. + (pcf_services): Updated. + (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle + `no_long_family_names'. -2016-08-10 Werner Lemberg + * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' + and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. - [sfnt] Use correct type for `italicAngle' field (#48732). + * docs/CHANGES: Updated. - * src/sfnt/ttload.c (tt_face_load_post): Fix types. +2017-01-09 Werner Lemberg -2016-08-06 Jon Spencer + [pcf] Introduce a driver structure. - [sfnt] Fix `FT_Get_Advance' for bitmap strikes. + To be filled later on with something useful. - `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the - advance value from the font table and then scales it by the - `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't - set that value for bitmap fonts and the advance gets scaled to zero. + * src/pcf/pcf.h (PCF_Driver): New structure. - Taken from + * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy + functions. + (pcf_driver_class): Updated. - https://github.com/behdad/harfbuzz/issues/252 +2017-01-08 Werner Lemberg - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) - : Set scale values. + [truetype] Again some GX code shuffling. -2016-08-06 Behdad Esfahbod + We need this later on for MVAR also. - [truetype] Fix GX variation handling of composites. + * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing + an item store variation delta into... + (ft_var_get_item_delta): ...new function. - * src/truetype/ttgload.c (load_truetype_glyph) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag. +2017-01-08 Werner Lemberg -2016-08-05 Alexei Podtelezhnikov + [truetype] Adjust font variation flags for MVAR. - [smooth] Minor refactoring. + * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): + Remove all flags related to MVAR; replace it with... + (TT_FACE_FLAG_VAR_MVAR): ...this new macro. + (TT_Face): Remove `mvar_support' field (which was still unused). - * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line): - Updated. +2017-01-06 Werner Lemberg -2016-07-29 Werner Lemberg + [truetype] More GX code shuffling. - [sfnt, truetype] Don't abort on invalid `maxComponentDepth'. + We need this later on for MVAR also. - Since 2016-05-16 we detect infinite recursion directly. + * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item + variation store into... + (ft_var_done_item_variation_store): ...new function. - * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust - `maxComponentDepth'. - * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if - `maxComponentDepth' is not valid. Instead, simply adjust its value - and emit a tracing message. +2017-01-06 Werner Lemberg -2016-07-26 Werner Lemberg + [truetype] More generalization of GX stuff. - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor. + We need this later on for MVAR also. - No functional change. + * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add + parameters for delta-set index mapping and item variation store. + (ft_var_load_item_variation_store): Add parameter for item variation + store. + s/hvarData/varData/. + Move allocation of `hvar_table' to... + (ft_var_load_hvar): ...this function. + Updated. -2016-07-22 Hin-Tak Leung +2017-01-06 Werner Lemberg - [truetype] Record the end of IDEFs. + [truetype] Some GX structure renames for generalization. - To match the logic in FDEF. The value of the end is only used for - bound-checking in `Ins_JMPR', so it may not have been obvious that - it was not recorded. Tested (as part of Font Validator 2.0) all the - fonts on Fedora and did not see any change. + We need this later on for MVAR also. - * src/truetype/ttinterp.c (Ins_IDEF): Updated. + * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... + (GX_ItemVarData): ...this. + (GX_HVarRegion): Renamed to... + (GX_VarRegion): ...this. + (GX_HVStore): Renamed to... + (GX_ItemVarStore): ...this. + (GX_WidthMap): Renamed to... + (GX_DeltaSetIdxMap): ...this. -2016-07-19 Werner Lemberg + (GX_HVarTable): Updated. - [truetype] Sanitizer fix, second try. + * src/truetype/ttgxvar.c: Updated. - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary - tests and use only one slot more. +2017-01-06 Werner Lemberg -2016-07-19 Werner Lemberg + [truetype] Code shuffling. - [truetype] Sanitizer fix. + * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of + item variation store and delta set index mapping into... + (ft_var_load_item_variation_store, + ft_var_load_delta_set_index_mapping): ...new functions. - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array - to fix nested loops. +2017-01-06 Werner Lemberg -2016-07-18 Werner Lemberg + [truetype] Add HVAR access without advance width map. - [truetype] Make GETDATA work only for GX fonts. + * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where + `offsetToAdvanceWidthMapping' is zero. + (tt_hadvance_adjust): Implement direct deltaSet access by glyph + index. - * src/truetype/ttinterp.c (opcode_name): Updated. - (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. - (TT_RunIns): Updated. +2017-01-06 Werner Lemberg -2016-07-17 Werner Lemberg + [pcf] Revise driver. - [truetype] Add support for Apple's + This commit improves tracing and handling of malformed fonts. In + particular, the changes to `pcf_get_properties' fix - GETDATA[], opcode 0x92 + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 - bytecode instruction. It always returns 17, and we have absolutely - no idea what it is good for... + * src/pcf/pcfread.c (tableNames): Use long names for better + readability. + (pcf_read_TOC): Allow at most 9 tables. + (pcf_get_properties): Allow at most 256 properties. + Limit strings array length to 256 * (65536 + 1) bytes. + Better tracing. + (pcf_get_metric): Trace metric data. + (pcf_get_metrics): Allow at most 65536 metrics. + Fix comparison of `metrics->ascent' and `metrics->descent' to avoid + potential overflow. + Better tracing. + (pcf_get_bitmaps): Allow at most 65536 bitmaps. + Better tracing. + (pcf_get_encodings, pcf_get_accel): Better tracing. - * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. - (Ins_GETDATA): New function. - (TT_RunIns): Add it. + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. + These are now shown by `pcf_get_bitmaps'. -2016-07-16 Werner Lemberg +2017-01-04 Werner Lemberg - [truetype] Add bytecode support for GX variation fonts. + * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. - This commit implements undocumented (but confirmed) stuff from - Apple's old bytecode engine. +2017-01-04 Werner Lemberg - GETVARIATION[], opcode 0x91 - This opcode pushes normalized variation coordinates for all axes - onto the stack (in 2.14 format). Coordinate of first axis gets - pushed first. + [cff] More consistency checks for pure CFFs. - GETINFO[], selector bit 3 - If GX variation support is enabled, bit 10 of the result is set - to 1. + Reported as - * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H. - (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. - (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector - bit 3, checking support for variation glyph hinting. - (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function - to implement opcode 0x91. - (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 -2016-07-16 Werner Lemberg + * src/cff/cffload.c (cff_font_load): Check element number and size + of Name and Top DICT indices. - [truetype] Fix GETINFO bytecode instruction. +2017-01-04 Werner Lemberg - * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for - stretching information. + [cff, truetype] Minor tracing improvement. -2016-07-16 Behdad Esfahbod + * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c + (tt_face_init): Indent first tracing message from SFNT driver. - [truetype] Make all glyphs in `Zycon' GX font work. +2017-01-03 Werner Lemberg - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary - tests. + [truetype] Various minor fixes. -2016-07-16 Werner Lemberg + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction + size only if we do native hinting. + (TT_Load_Glyph): Trace returned error code. - [truetype] Fix GX delta tracing. + * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace + returned error code. + (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is + invalid. - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace - relative point movements. +2017-01-03 Werner Lemberg -2016-07-16 Behdad Esfahbod + [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. - [truetype] More fixes for GX. + These tables are optional. - This finally fixes the rendering of the cyclist and the lizard in - the `Zycon' font. + * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point - index is always cumulative. +2017-01-03 Werner Lemberg - (tt_handle_deltas): Rename to... - (tt_interpolate_deltas): ... This. - Add new parameter for output point array. - Update caller. + * src/cff/cffparse.c (cff_parse_num): Simplify. - (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds - the intermediate results of `tt_interpolate_deltas' that are to be - added to `outline->points'. +2017-01-03 Werner Lemberg -2016-07-15 Werner Lemberg + Various fixes for clang's undefined behaviour sanitizer. - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko. + * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. + (cff_blend_doBlend): Don't left-shift negative numbers. + Handle 5-byte numbers byte by byte to avoid alignment issues. - `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. + * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by + byte to avoid alignment issues. - Reported by Alexei. + * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any + subrs. -2016-07-16 Nikolaus Waxweiler + * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. - * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error. + * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around + definition of `ft_get_adobe_glyph_index'. - Problem reported by Hin-Tak Leung. + * src/psnames/pstables.h: Regenerated. -2016-07-15 Werner Lemberg + * src/psnames/psmodule.c: Include `pstables.h' twice to get both + declaration and definition. - [autofit] Update and improve segment and edge tracing. + * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix + casting. - * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace - `delta' also. - Don't show first point of segment as a replacement for `pos'; this - is (a) misleading, since the difference to `pos' can be almost - arbitrarily large in corner cases, and (b) it is better to have all - segment data in font units instead of a single value given in output - space coordinates. - Improve layout. - (af_glyph_hints_dump_edges): Show px->units and units->px conversion - values for convenience. - Improve layout. +2017-01-01 Werner Lemberg -2016-07-15 Werner Lemberg + [cff] Handle multiple `blend' operators in a row correctly. - [autofit] For edges, reject segments wider than 1px (#41334). + Reported as - * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute - `delta'. - (af_latin_hints_compute_edges): Reject segments with a delta larger - than 0.5px. + * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' + pointers into `subFont->blend_stack' after reallocation. -2016-07-14 Werner Lemberg +2017-01-01 Werner Lemberg - * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro. + [sfnt] Return correct number of named instances for TTCs. -2016-07-14 Werner Lemberg + Without this patch, requesting information for face index N returned + the data for face index N+1 (or index 0). - [sfnt] Fix `face_index' value in `FT_Face' for named instances. + * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' + for negative `face_instance_index' values. - * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. +2016-12-31 Werner Lemberg -2016-07-14 Werner Lemberg + */*: Use hex numbers for errors in tracing messages. - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing. +2016-12-31 Werner Lemberg -2016-07-14 Behdad Esfahbod + [truetype] Check axis count in HVAR table. - [truetype] Fix gxvar delta interpolation. + Reported as - The coordinates of the base font should be used for interpolation - purposes, NOT the current points (i.e., the result of accumulation - of previous deltas). + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize - `points_org' before looping over all tuples. + * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. + (ft_var_load_avar): Fix tracing message. ---------------------------------------------------------------------------- -Copyright 2016-2017 by +Copyright 2016-2018 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.20 b/ChangeLog.20 index 11376e8..63e3116 100644 --- a/ChangeLog.20 +++ b/ChangeLog.20 @@ -2597,7 +2597,7 @@ ---------------------------------------------------------------------------- -Copyright 2000-2017 by +Copyright 2000-2018 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 eff9f79..01883f1 100644 --- a/ChangeLog.21 +++ b/ChangeLog.21 @@ -9422,7 +9422,7 @@ ---------------------------------------------------------------------------- -Copyright 2002-2017 by +Copyright 2002-2018 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.22 b/ChangeLog.22 index e3aec74..4517c32 100644 --- a/ChangeLog.22 +++ b/ChangeLog.22 @@ -612,7 +612,7 @@ * src/base/ftobjs.c (ft_recompute_scaled_metrics): Re-enable conservative rounding of metrics to avoid breaking clients like - Pango (see http://bugzilla.gnome.org/show_bug.cgi?id=327852). + Pango (see https://bugzilla.gnome.org/show_bug.cgi?id=327852). 2006-02-25 Werner Lemberg @@ -2318,7 +2318,7 @@ Further information on the SING Glyphlet format can be found at: - http://www.adobe.com/products/indesign/sing_gaiji.html + https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf * include/freetype/tttags.h (TTAG_SING, TTAG_META): New macros for the OpenType tables `SING' and `META'. These two tables are used in @@ -2821,7 +2821,7 @@ ---------------------------------------------------------------------------- -Copyright 2005-2017 by +Copyright 2005-2018 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.23 b/ChangeLog.23 index 834f34d..85253f1 100644 --- a/ChangeLog.23 +++ b/ChangeLog.23 @@ -43,7 +43,7 @@ * src/base/ftoutln.c (FT_Outline_New_Internal): The length of FT_Outline->points[] should be numPoints, not 2 * numPoints. Found by Paul Messmer, see - http://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html + https://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html 2010-02-10 Ken Sharp @@ -108,7 +108,7 @@ Preferred family names should be used for legacy systems that can hold only a few faces (<= 4) for a family name. Suggested by Andreas Heinrich. - http://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html + https://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define. @@ -631,7 +631,7 @@ The issue of incompatible cast between unsigned long and void* on LLP64 platform is reported by NightStrike from MinGW-Win64 project. See - http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html + https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html * src/bdf/bdf.h: The type of hashnode->data is changed from void* to size_t. @@ -657,7 +657,7 @@ On LLP64 platform, the conversion from pointer to FT_Fixed need to drop higher 32-bit. Explicit casts are required. Reported by NightStrike from MinGW-w64 project. See - http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html + https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html * src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly. @@ -864,7 +864,7 @@ LP64 systems: Higher bits are not used. 16-bit systems: Drop can occur. See - http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html + https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html These functions will be refined to take FT_ULong flags in next bump with incompatible API change. @@ -1765,7 +1765,7 @@ ftgzip.c by FT2 are enabled by default. To use zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC. See discussion: - http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html + https://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html 2009-07-31 suzuki toshiya @@ -1904,7 +1904,7 @@ 2009-07-15 suzuki toshiya Borland C++ compiler patch proposed by Mirco Babin. - http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html. + https://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html. * builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}. Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform @@ -1929,7 +1929,7 @@ * src/tools/chktrcmp.py: A script to check trace_XXXX macros that are used in C source but undefined in fttrace.h, or defined in fttrace.h but unused in C sources. See - http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html. + https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html. * docs/DEBUG: Mention on chktrcmp.py. * docs/release: Ditto. @@ -1961,7 +1961,7 @@ * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm ) and FT_TRACE_DEF( ttbdf ). See - http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html + https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html 2009-07-09 suzuki toshiya @@ -1975,8 +1975,8 @@ Prevent the overflows by a glyph with too many points or contours. The bug is reported by Boris Letocha . See - http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html - http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html + https://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html + https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html * include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX, FT_OUTLINE_POINTS_MAX): New macros to declare the maximum @@ -2001,7 +2001,7 @@ 2009-06-28 suzuki toshiya ftpatent: Fix a bug by wrong usage of service->table_info(). - http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html + https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html * include/freetype/internal/services/svsfnt.h: Extend FT_SFNT_TableInfoFunc() to take new argument to obtain the offset @@ -2069,7 +2069,7 @@ * builds/unix/configure.raw: Fix a bug in sed script to extract native suffix for binary executables, patch by Peter Breitenlohner. - http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html + https://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html 2009-06-26 Werner Lemberg @@ -3469,8 +3469,8 @@ faces includes broken face which FT_Done_Face() cannot free, FT_Done_Library() retries FT_Done_Face() and it can fall into an endless loop. See the discussion: - http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html - http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html + https://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html + https://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html 2009-01-07 Werner Lemberg @@ -3492,7 +3492,7 @@ * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and AC_CANONICAL_TARGET and use $host_os only. A nice explanation for this change can be found at - http://blog.flameeyes.eu/s/canonical-target. + https://blog.flameeyes.eu/s/canonical-target. From Savannah patch #6712. @@ -4516,7 +4516,7 @@ recommends to add the option only to CFLAGS, LDFLAGS should include it because libfreetype.la is built with -no-undefined. This fixes a bug reported by Ryan Schmidt in MacPorts, - http://trac.macports.org/ticket/15331. + https://trac.macports.org/ticket/15331. 2008-06-21 Werner Lemberg @@ -6187,13 +6187,13 @@ * builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent 32bit unsigned long overflow by 64bit filesize on LP64 platform, as proposed by Sean McBride: - http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html + https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html 2007-03-22 suzuki toshiya * builds/unix/ftconfig.in: Suppress SGI compiler's warning against setjmp, proposed by Sean McBride: - http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html + https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html 2007-03-19 suzuki toshiya @@ -6852,7 +6852,7 @@ * include/freetype/internal/services/svotval.h: Add `volatile' to sync with the modification by Jens Claudius on 2006-08-22; cf. - http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5 + https://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5 2006-12-15 suzuki toshiya @@ -6876,7 +6876,7 @@ * src/base/ftobjs.c: Improvement of resource fork handler for POSIX, cf. - http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html + https://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html (Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font format or .dfont, to simulate the face index number counted by ftmac.c. (IsMacResource): Return the number of scalable faces correctly. @@ -7524,7 +7524,7 @@ `ft_validator_run' wrapping `setjmp' can cause a crash, as found by Jens: - http://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm. + https://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm. * src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'. It reverts the change introduced on 2005-08-20. @@ -7721,7 +7721,7 @@ 2006-06-24 Eugeniy Meshcheryakov Fix two hinting bugs as reported in - http://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html. + https://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html. * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add `first_point' member. @@ -7761,7 +7761,7 @@ should return `FT_Err_Unimplemented_Feature' if validation service is unavailable (disabled in `modules.cfg'). It is originally suggested by David Turner, cf. - http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html + https://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html * src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return FT_Err_Unimplemented_Feature if TrueTypeGX validation service is @@ -7932,7 +7932,7 @@ ---------------------------------------------------------------------------- -Copyright 2006-2017 by +Copyright 2006-2018 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.24 b/ChangeLog.24 index 796763c..7661aee 100644 --- a/ChangeLog.24 +++ b/ChangeLog.24 @@ -1860,10 +1860,10 @@ Fix `checking if gcc static flag -static works' test. On my linux build tree, I receive yes answer in every package I - build except freetype for this test checking if gcc static flag + 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 + In FreeType, no is received, unless bzip2 and zlib are disabled using ./configure --without-bzip2 --without-zlib @@ -1977,7 +1977,7 @@ Most of the code is based on the ClearType whitepaper written by Greg Hitchcock - http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx + https://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 @@ -2103,7 +2103,7 @@ 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 + https://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, @@ -2117,7 +2117,7 @@ Problem reported by jola ; see - http://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html + https://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html * src/raster/ftraster.c (SMulDiv_No_Round): New macro. (Line_Up): Use it. @@ -2603,7 +2603,7 @@ See discussion starting at - http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html + https://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/. @@ -2616,7 +2616,7 @@ `outline.flags' so that this information is preserved. See discussion starting at - http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html + https://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html 2012-02-11 Werner Lemberg @@ -2677,7 +2677,7 @@ [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 + https://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. @@ -3127,7 +3127,7 @@ According to - http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html + https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html this should be mentioned explicitly. @@ -3456,7 +3456,7 @@ See - http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html + https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html for some comparison images. @@ -3556,7 +3556,7 @@ See - http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html + https://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 @@ -4005,9 +4005,9 @@ 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 + https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html + https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html + https://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 @@ -4075,8 +4075,8 @@ 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 + https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html + https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html 2011-04-30 suzuki toshiya @@ -4109,7 +4109,7 @@ 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 + https://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, @@ -4146,8 +4146,8 @@ 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 + https://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html + https://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 @@ -4343,7 +4343,7 @@ [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 + https://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. @@ -4464,7 +4464,7 @@ Johnson Y. Yan. The bug report by Qt developers is considered too. - http://bugreports.qt.nokia.com/browse/QTBUG-6521 + https://bugreports.qt.io/browse/QTBUG-6521 2011-01-15 Werner Lemberg @@ -4923,7 +4923,7 @@ 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 + https://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html and later mails in this thread. @@ -4943,7 +4943,7 @@ Problem reported by Tom Bishop ; see thread starting with - http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html + https://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. @@ -5007,7 +5007,7 @@ normal clients. For the history of these macros, see the investigation: - http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html + https://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html 2010-10-24 suzuki toshiya @@ -5054,7 +5054,7 @@ 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 + https://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 @@ -5182,7 +5182,7 @@ [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. + https://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html. * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko. @@ -5349,7 +5349,7 @@ 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 + https://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) @@ -5406,8 +5406,8 @@ 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 + https://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html + https://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. @@ -5968,7 +5968,7 @@ * 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. + https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html. 2010-06-24 Werner Lemberg @@ -6065,7 +6065,7 @@ 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 + https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html 2010-06-09 Werner Lemberg @@ -6220,7 +6220,7 @@ Add new function `FT_Library_SetLcdFilterWeights'. This is based on code written by Lifter - . It fixes + . It fixes FreeDesktop bug #27386. * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New @@ -6344,7 +6344,7 @@ ---------------------------------------------------------------------------- -Copyright 2010-2017 by +Copyright 2010-2018 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.25 b/ChangeLog.25 index d7fed71..59cf2bf 100644 --- a/ChangeLog.25 +++ b/ChangeLog.25 @@ -112,8 +112,8 @@ 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 + https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html + https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_(). * src/gxvalid/gxvcommn.h: Ditto. @@ -144,7 +144,7 @@ for Borland's bug tracker entry. Reported by Yuliana Zigangirova , - http://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html. + https://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html. * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c (gray_TWorker_): Move `ft_jmp_buf' field to be the first element. @@ -2116,7 +2116,7 @@ builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle HarfBuzz. - * docs/INSTALL.UNIX: Document interdependency of Freetype with + * docs/INSTALL.UNIX: Document interdependency of FreeType with HarfBuzz. 2014-02-28 Alexei Podtelezhnikov @@ -2669,8 +2669,8 @@ with Carbon framework is incompatible with that by FreeType 2 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung. - http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html - http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html + https://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html + https://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch `sort_by_res_id' to control the fragmented resource ordering. @@ -3181,7 +3181,7 @@ Problem reported by Hin-Tak Leung ; see - http://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html + https://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html for details. @@ -3556,7 +3556,7 @@ Suggested by Akira Tagoh, see - http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html + https://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 @@ -5145,7 +5145,7 @@ ---------------------------------------------------------------------------- -Copyright 2013-2017 by +Copyright 2013-2018 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.26 b/ChangeLog.26 index c174b6d..ea89e91 100644 --- a/ChangeLog.26 +++ b/ChangeLog.26 @@ -663,7 +663,7 @@ The previous fix for #46372 misunderstood a composite glyph referring same component twice as a recursive reference. See the discussion - http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html + https://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html Thanks to Khaled Hosny for finding this issue. @@ -788,7 +788,7 @@ proper blue zones can't be defined. However, there is already a proposal submitted to Unicode; see - http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf + https://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf Additionally, due to historical reasons, Unicode treats Khutsuri as the same script as Mkhedruli, and so does OpenType. However, since @@ -2478,7 +2478,7 @@ Problem reported by David Capello ; see - http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html + https://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html for details. @@ -3813,7 +3813,7 @@ See - http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html + https://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html for a rationale. @@ -3932,7 +3932,7 @@ This change is a result of a discussion thread on freetype-devel - http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html + https://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html Re-introduce the `freetype2' subdirectory for all FreeType header files after installation, and rename the `freetype2' subdirectory in @@ -4114,7 +4114,7 @@ Problem reported by Grissiom ; in - http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html + https://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html there is an example code to trigger the bug. @@ -4292,7 +4292,7 @@ This follows the OpenType 1.7 specification. See - http://tug.org/pipermail/tex-live/2015-April/036634.html + https://tug.org/pipermail/tex-live/2015-April/036634.html for a discussion. @@ -5695,7 +5695,7 @@ ---------------------------------------------------------------------------- -Copyright 2015-2017 by +Copyright 2015-2018 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.27 b/ChangeLog.27 new file mode 100644 index 0000000..0e82b2f --- /dev/null +++ b/ChangeLog.27 @@ -0,0 +1,2106 @@ +2016-12-30 Werner Lemberg + + * Version 2.7.1 released. + ========================= + + + Tag sources with `VER-2-7-1'. + + * docs/VERSION.TXT: Add entry for version 2.7.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.7/2.7.1/, s/27/271/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + + * builds/unix/configure.raw (version_info): Set to 19:0:13. + * CMakeLists.txt (VERSION_PATCH): Set to 1. + +2016-12-30 Werner Lemberg + + [ftfuzzer] Replace `rand' with an xorshift algorithm. + + * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'. + (Random): Implement and use a 32bit `xorshift' algorithm. + +2016-12-30 Werner Lemberg + + [ftfuzzer] Restrict number of tested bitmap strikes. + + Malformed fonts often have large values for the number of bitmap + strikes, and FreeType doesn't check the validity of all bitmap + strikes in advance. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353 + + * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. + (Random): Small class to provide n randomly selected numbers + (without repetition) out of the value set [1,N]. + (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap + strikes. + +2016-12-29 Werner Lemberg + + [truetype] Variation font API stability issues. + + Make some functions work before a call to `TT_Set_MM_Blend'. + + * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if + we don't blend. + (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we + don't blend. + +2016-12-29 Werner Lemberg + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348 + +2016-12-29 Werner Lemberg + + [truetype] Tracing fixes. + + * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct + information. + (TT_Set_Var_Design): Fix typo. + (TT_Get_Var_Design): Fix typos. + +2016-12-29 Werner Lemberg + + */*: Use `0.5f' for tracing 16.16 numbers. + +2016-12-29 Werner Lemberg + + [pcf] Protect against gzip bombs. + + Fix suggested by Kostya; reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345 + + * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to + 1024. + +2016-12-28 Werner Lemberg + + [psnames] Only declare, not define, data in `pstables.h' (#49949). + + Pdfium includes `pstables.h' a second time; moving the definition + from `pstables.h' to `psmodule.c' saves more than 60kByte data + segment space for this case. + + * src/tools/glnames.py (StringTable::dump, + StringTable::dump_sublist, dump_encoding, dump_array): Emit + additional code to only define tables if `DEFINE_PS_TABLES' is set. + + * src/psnames/pstables.h: Regenerated. + * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define. + +2016-12-28 Werner Lemberg + + [cff] Catch `blend' op in non-variant fonts. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Don't + allow `blend' op for non-variant fonts. + +2016-12-28 Werner Lemberg + + [cff] Better check of number of blends. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) , + src/cff/cffparse.c (cff_parse_blend): Compare number of blends with + stack size. + +2016-12-27 Werner Lemberg + + Documentation updates. + + * docs/CHANGES: Add missing information. + + * docs/formats.txt: Rewritten and updated. + +2016-12-27 Werner Lemberg + + [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'. + + * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement. + (TT_Set_Var_Design): Fix tracing. + + * src/type1/t1load.c (T1_Get_Var_Design): Implement. + +2016-12-24 Werner Lemberg + + * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'. + + Problem reported by 張俊芝 <418092625@qq.com>. + +2016-12-24 Werner Lemberg + + * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values. + + Some fonts seem to have the `version' field in the wrong byte order. + + Problem reported by 張俊芝 <418092625@qq.com>. + +2016-12-24 Werner Lemberg + + * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length. + + This trivial fix allows us to accept more fonts. + + Problem reported by 張俊芝 <418092625@qq.com>. + +2016-12-24 Werner Lemberg + + * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing. + +2016-12-22 Werner Lemberg + + * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909). + +2016-12-22 Werner Lemberg + + Ensure used preprocessor symbols are defined (#49790). + + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__', + and `__SUNPRO_C' correctly. + +2016-12-22 Werner Lemberg + + * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308 + +2016-12-22 Werner Lemberg + + [cff] Protect against invalid `vsindex' and `blend' values. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Implement it. + +2016-12-22 Werner Lemberg + + [ftfuzzer] Always use Adobe CFF engine. + + * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement + it. + +2016-12-21 Werner Lemberg + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. + + I should really stop coding late in the evening... + + Thanks again to Ben for checking. + +2016-12-21 Werner Lemberg + + [autofit] Support variation fonts. + + (This ChangeLog entry was added later on.) + + * src/autofit/afglobal.c (af_face_globals_free): Remove useless + code. + + * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, + * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Finalize + auto-hinter data to enforce recomputation. Note that this is a + brute-force method which should be improved. + +2016-12-21 Werner Lemberg + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. + + Don't apply deltas twice for non-phantom points. + + Spotted by Ben Wagner. + +2016-12-21 Werner Lemberg + + [cff, truetype] Another try for #49829. + + * src/cff/cffdrivr.c: Don't include + `FT_SERVICE_METRICS_VARIATIONS_H'. + (cff_get_advances): Use `ttface->variation_support'. + + * src/truetype/ttdriver.c (tt_get_advances): Use + `ttface->variation_support'. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Use `ttface->variation_support'. + +2016-12-21 Werner Lemberg + + [truetype, sfnt] Introduce font variation flags to `TT_Face'. + + * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): + New macros describing available functionality of various OpenType + tables related to font variation. + (TT_Face): New fields `variation_support' and `mvar_support', + replacing and extending `use_fvar'. + + * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use + `variation_support'. + + * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support' + field. + (TT_Vary_Apply_Glyph_Deltas): Updated. + +2016-12-21 Werner Lemberg + + [base] Improve sanity check for Mac resources (#49888). + + * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not + positive. + +2016-12-20 Werner Lemberg + + [base] More sanity checks for Mac resources. + + We use + + https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format + + and + + https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 + + as references. + + * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short + for `res_id'. + + * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length + and use it to improve sanity checks. + Follow the specification more closely;in particular, all data types + are signed, not unsigned. + (FT_Raccess_Get_DataOffsets): Follow the specification more closely; + in particular, all data types are signed, not unsigned. + Add some sanity checks. + +2016-12-20 Werner Lemberg + + [truetype] Improve logic for getting fast advance widths. + + * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c + (tt_get_advances): Use `is_default_instance' for test; this gets + recomputed after changing blend coordinates. + +2016-12-20 Ben Wagner + Werner Lemberg + + [truetype] Fix linear metrics of GX variation fonts (#49829). + + When asking for an unhinted non-default variations, + `linearVertAdvance' is currently the value from the `hmtx' table + instead of the actual value after applying the variation. `HVAR' + support fixes this, but fonts will exist without that table and will + need sane fallback. + + Problem also reported as + + https://bugs.chromium.org/p/skia/issues/detail?id=5917 + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Implement linear advance adjustments if `HVAR' + or `VVAR' tables are missing. + +2016-12-20 Werner Lemberg + + [cff, truetype] Fast advance width retrieval for fonts with HVAR. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. + + * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (cff_get_advances): Test for HVAR and VVAR. + + * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR. + +2016-12-18 Werner Lemberg + + [base] Fix invalid mac font recursion. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304 + + * src/base/ftobjs.c (FT_Open_Face): Code moved to... + (ft_open_face_internal): ... this function. + Add a parameter to control whether we try special Mac font handling + in case of failure. + (FT_Open_Face, FT_New_Face, FT_New_Memory_Face, + open_face_from_buffer): Use `ft_open_face_internal'. + +2016-12-18 Werner Lemberg + + * src/cff/cffobjs.c (cff_face_init): Make named instances work. + +2016-12-18 Werner Lemberg + + [truetype, cff] Extend `get_var_blend' function of MM service. + + In particular, we need access to named instance data. + + * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): + Add argument for `FT_MM_Var'. + + * src/cff/cffload.c (cff_get_var_blend): Updated. + * src/cff/cffload.h: Updated. + + * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. + + * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. + Accept value `NULL' for arguments. + * src/truetype/ttgxvar.h: Updated. + +2016-12-18 Werner Lemberg + + [sfnt] Handle `fvar' with zero axes as a non-MM font. + + This is better behaviour than exiting with an error. + + * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar' + field. + + * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also + updating the validation code. + Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation + code. + +2016-12-18 Werner Lemberg + + Minor GX code shuffling. + + * include/freetype/internal/tttypes.h (TT_Face): Move + `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT + block. + + * src/sfnt/sfobjs.c (sfnt_init_face): Updated. + * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro. + (TT_Load_Glyph): Use it. + +2016-12-18 Werner Lemberg + + [cff] Better handling of non-CFF font formats. + + * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a + signature, so return `FT_Err_Unknown_File_Format' more often. + +2016-12-17 Werner Lemberg + + * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code. + +2016-12-17 Werner Lemberg + + * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code. + +2016-12-17 Werner Lemberg + + [sfnt, truetype] Various sanitizing fixes. + + * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is + zero, set `num_instances' to zero. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with + zero axes as invalid. + + * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading + `loca', `cvt', `fpgm', and `prep' table. + +2016-12-17 Werner Lemberg + + Improve tracing of `FT_Open_Face'. + + * src/base/ftobjs.c (FT_Open_Face): Return info on number of + available faces and numbered instances, or the indices of the + requested face and numbered instance. + + * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts. + +2016-12-17 Werner Lemberg + + * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295 + +2016-12-16 Werner Lemberg + + [truetype] Fix `cvar' sanity test. + + Reported by Dave Arnold. + + * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask. + +2016-12-16 Werner Lemberg + + [cff, truetype] Remove compiler warnings; fix `make multi'. + + * src/cff/cf2font.h: Include `cffload.h'. + + * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and + FT_SERVICE_MULTIPLE_MASTERS_H. + (cff_vstore_load): Eliminate `vsSize'. + (cff_load_private_dict): Tag as `FT_LOCAL_DEF'. + + * src/cff/cffload.h: Include `cffobjs.h'. + Provide declaration for `cff_load_private_dict'. + + * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate + `minorVersion' and `map_offset'. + +2016-12-16 Werner Lemberg + + [cff] Fix heap buffer overflow (#49858). + + * src/cff/cffparse.c (cff_parser_run): Add one more stack size + check. + +2016-12-15 Werner Lemberg + + Fix clang warnings. + + * src/cff/cffload.c (cff_blend_doBlend): Add cast. + (cff_subfont_load): Set `error' correctly. + + * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo. + +2016-12-15 Dave Arnold + Werner Lemberg + + [cff] Implement CFF2 support (2/2). + + The font variation code. All parts dependent on the GX code in the + `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + In other words, you can still compile the `cff' module without + defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2 + support without font variation). + + * src/cff/cf2font.c (cf2_font_setup): Add support for font + variation. + * src/cff/cf2font.h (CF2_Font): Add fields for variation data. + + * src/cff/cf2ft.c (cf2_free_instance): Free blend data. + (cf2_getVStore, cf2_getNormalizedVector): New functions. + * src/cff/cf2ft.h: Updated. + + * src/cff/cf2intrp.c: Include `cffload.h'. + (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with... + (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values. + (cf2_doBlend): New function. + (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes. + + * src/cff/cffload.c (FT_fdot14ToFixed): New macro. + (cff_vstore_done, cff_vstore_load): New functions. + (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector, + cff_blend_check_vector): New functions. + (cff_load_private_dict): Add arguments for blend vector. + Handle blend data. + (cff_subfont_load, cff_subfont_done): Updated. + (cff_font_load): Handle CFF2 variation store data. + (cff_font_done): Updated. + * src/cff/cffload.h: Include `cffparse.h'. + Updated. + + * src/cff/cffobjs.c (cff_face_done): Updated. + + * src/cff/cffparse.c: Include `cffload.h'. + (cff_parse_num): Handle internal value 255. + (cff_parse_vsindex, cff_parse_blend): New functions. + (CFF_FIELD_BLEND): New macro. + (cff_parser_run): Updated. + * src/cff/cffparse.h (cff_kind_blend): New enum value. + + * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend' + dictionary values. + + * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion, + CFF_VStore, CFF_Blend): New structures. + (CFF_FontRecDict): Add `vstore_offset' field. + (CFF_Private): Add `vsindex' field. + (CFF_SubFont): Add fields for blend data. + (CFF_Font): Add `vstore' field. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar', + since glyph variation data is directly embedded. + (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts. + +2016-12-15 Dave Arnold + Werner Lemberg + + [cff] Implement CFF2 support (1/2). + + This commit does not contain the blend code for font variation + support, which follows in another commit. + + You should ignore whitespace while inspecting this commit. + + * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2' + member. + + * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member. + + * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2' + flag. + (cf2_getMaxstack): New function. + * src/cff/cf2ft.h: Updated. + + * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum. + (cf2_interpT2CharString): Handle CFF2 differences. + Add tracing message for errors. + + * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index): + Update for CFF2. + + * src/cff/cffload.c (FT_FIXED_ONE): New macro. + (cff_index_init, cff_index_load_offsets, cff_index_access_element, + cff_index_get_name, cff_ft_select_get, cff_load_private_dict, + cff_subfont_load, cff_font_load): Handle CFF2. + * src/cff/cffload.h: Updated. + + * src/cff/cffobjs.c (cff_face_init): Handle CFF2. + + * src/cff/cffparse.c (cff_parse_maxstack): New function. + (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed + * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New + macros. + (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New + macros. + + * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend + stuff). + + * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field. + (CFF_FontRecDict): Add `maxstack' field. + (CFF_Private): Add `subfont' field. + (CFF_Font): Add `top_dict_length' and `cff2' fields. + + * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table. + +2016-12-15 Werner Lemberg + Dave Arnold + + [truetype] Provide HVAR advance width variation as a service. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent + double adjustment of advance width. + + * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (tt_face_get_metrics): Apply metrics variations. + +2016-12-15 Dave Arnold + Werner Lemberg + + [truetype] Provide function to apply `HVAR' advance width variation. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function. + * src/truetype/ttgxvar.h: Updated. + +2016-12-15 Dave Arnold + Werner Lemberg + + [truetype] Add `HVAR' table parsing. + + Note that this is not complete yet; it only handles advance width + variation. + + Activation of the code follows in another commit. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member. + + * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion, + GX_HVStore, GX_WidthMap): New auxiliary structures for... + (GX_HVarTable): ... HVAR main structure. + (GX_BlendRec): Add data for HVAR loading. + + * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed, + FT_intToFixed, FT_fixedToInt): New macros. + (ft_var_load_hvar): New function. + (TT_Get_MM_Var): Updated. + (tt_done_blend): Deallocate HVAR data. + +2016-12-15 Dave Arnold + + [cff] Extend number parsing. + + The forthcoming CFF2 support needs a dynamic parsing limit. + + * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed, + cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for + parser. + (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict, + cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated. + + * src/cff/cffparse.h (cff_parse_num): Export locally. + +2016-12-15 Dave Arnold + + [cff] Implement dynamic stack size for Adobe engine. + + This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for + the forthcoming CFF2 support. + + * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size. + (cf2_stack_free): Deallocate stack. + (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed, + cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal, + cf2_stack_clear): Updated. + (cf2_stack_setReal, cf2_stack_pop): New functions. + + * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member. + Update function declarations. + + * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated. + + * src/cff/cffparse.c (cff_parser_init): Add parameter for stack + size; return error code. + (cff_parser_done): New function. + (cff_parser_run): Updated. + + * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make + `stack' a pointer. + Update function declarations. + + * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load): + Updated. + +2016-12-15 Dave Arnold + Werner Lemberg + + [cff] Code shuffling. + + * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' + fields. + + * src/cff/cffload.c (cff_subfont_load): Change last argument to + `CFF_Font' + Split off parsing of private dictionary into... + (cff_load_private_dict): ...this new function. + (cff_font_load): Updated. + +2016-12-14 Werner Lemberg + + [sfnt, truetype] Add framework for Metrics Variations service. + + No effect yet; service functions will be implemented later on. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * include/freetype/internal/services/svmetric.h: New file. + + * include/freetype/internal/ftserv.h + (FT_SERVICE_METRICS_VARIATIONS_H): New macro. + + * include/freetype/internal/tttypes.h (TT_Face): New field `var'. + + * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (sfnt_init_face): Initialize `face->var'. + + * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (tt_service_metrics_variations): New service. + (tt_services): Updated. + + * src/truetype/ttpic.h: Updated. + +2016-12-14 Werner Lemberg + + [cff] Add Multiple Masters service. + + The code simply uses the MM functions from the `truetype' module. + + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. + + * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. + + * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. + (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var, + cff_set_var_design, cff_get_var_design): New functions. + (cff_service_multi_masters): New service. + (cff_services): Updated. + + * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New + functions. + * src/cff/cffload.h: Updated. + + * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. + + * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. + (sfnt_init_face): Initialize `face->mm'. + +2016-12-14 Werner Lemberg + + Extend functionality of `ft_module_get_service'. + + It can now differentiate between local and global searches. + + * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. + (FT_Get_TrueType_Engine_Type): Updated. + + * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. + + * include/freetype/internal/ftobjs.h: Updated. + * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): + Updated. + +2016-12-14 Werner Lemberg + + * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning. + +2016-12-14 Dave Arnold + Werner Lemberg + + [sfnt, cff] Minor preparations. + + * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, + TTAG_VVAR): New SFNT table tags. + + * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast. + +2016-12-10 Werner Lemberg + + [truetype, type1] Add `get_var_blend' to MM service. + + For internal use; we want to share code between the forthcoming CFF2 + support and TrueType. + + * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): + New typedef. + (MultiMasters): Add `get_var_blend'. + (FT_Service_MultiMasters): Updated. + + * src/truetype/ttgxvar.c (tt_get_var_blend): New function. + * src/truetype/ttgxvar.h: Updated. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + +2016-12-10 Werner Lemberg + + [truetype, type1] Add `done_blend' to MM service. + + For internal use; we want to share code between the forthcoming CFF2 + support and TrueType. + + * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): + New typedef. + (MultiMasters): Add `done_blend'. + (FT_Service_MultiMasters): Updated. + + * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. + * src/truetype/ttgxvar.h: Updated. + + * src/truetype/ttobjs.c (TT_Face_Done): Updated. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + +2016-12-09 Werner Lemberg + + [sfnt] Revert change from 2016-12-08. + + I missed the functionality of `ft_module_get_service', which makes + the change unnecessary. + +2016-12-08 Werner Lemberg + + Add framework to support services with 8 functions. + + We will need this for CFF variation font support. + + * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8): + New macro. + +2016-12-08 Werner Lemberg + + [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface. + + CFF2 fonts will need access to those two functions. + + * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H. + (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members. + (FT_DEFINE_SFNT_INTERFACE): Updated. + + * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index): + Fix signatures to exactly correspond to the glyph dict service + function typedefs. + (sfnt_interface): Updated. + +2016-12-06 Dave Arnold + + Add `FT_Get_Var_Design_Coordinates' function. + + Note that the low-level functions aren't implemented yet. + + * include/freetype/ftmm.h: Declare. + + * include/freetype/internal/services/svmm.h + (FT_Get_Var_Design_Func): New typedef. + (MultiMasters): New MM service function `get_var_design'. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + Update all callers. + + * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. + + * src/truetype/ttdriver.c: Updated. + + * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to + handle `get_var_design' service. + * src/truetype/ttgxvar.h: Updated. + + * src/type1/t1driver.c: Updated. + + * src/type1/t1load.c (T1_Get_Var_Design): New dump function to + handle `get_var_design' service. + * src/type1/t1load.h: Updated. + +2016-12-06 Werner Lemberg + + * src/type1/t1load.c (parse_subrs): Fix memory leak. + + The `subrs' keyword might erroneously occur multiple times. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231 + +2016-12-01 Werner Lemberg + + [gzip] Improve building with external zlib (#49673). + + Building FreeType with external zlib 1.2.8 makes msvc 14 stop with + the following error. + + ftgzip.c + zlib-1.2.8\zlib.h(86): error C2061: + syntax error: identifier 'z_const' + zlib-1.2.8\zlib.h(94): error C2054: + expected '(' to follow 'z_const' + zlib-1.2.8\zlib.h(94): error C2085: + 'msg': not in formal parameter list + ... + zlib-1.2.8\zlib.h(877): fatal error C1003: + error count exceeds 100; stopping compilation + + The error happens because FreeType keeps an own copy of zlib-1.1.4 + under `src/gzip'. When building `src/gzip/ftgzip.c' with + FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses + + #include + + which correctly finds an external `zlib.h', but `zlib.h' itself has + a line + + #include "zconf.h" + + which makes Visual Studio 2015 find `src/gzip/zconf.h' while + compiling the files in `src/gzip'. + + * src/gzip/zconf.h: Rename to... + * src/gzip/ftzconf.h: ... this. + * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. + +2016-12-01 Oleksandr Chekhovskyi + + [autofit] Fix Emscripten crash (patch #9180). + + Function calls through pointers must use a matching signature to + work on Emscripten, since such calls are dispatched through lookup + tables grouped by signature. + + * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix + typedef. + +2016-11-29 Werner Lemberg + + [smooth] Revert previous commit. Already fixed with 6ca54c64. + +2016-11-29 Werner Lemberg + + [smooth] Avoid conditional jump on uninitialized value (#49711). + + * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'. + +2016-11-27 Nikolaus Waxweiler + + [autofit] Code shuffling. + + Also improve some comments and remove unused code. + + No functional change. + + * src/autofit/afloader.c (af_loader_load_g): Merged with... + (af_loader_load_glyph): ...this function. + Split off emboldening code into... + (af_loader_embolden_glyph_in_slot): ... this function. + +2016-11-17 Werner Lemberg + + Better support of LLP64 systems with gcc (and clang). + + * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'. + + * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and + suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'. + +2016-11-10 Werner Lemberg + + Fix `lcd_weights' array size. + + * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it. + + Reported by Nikolaus. + +2016-11-06 Werner Lemberg + + * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing. + +2016-11-06 Werner Lemberg + + [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format. + + It's unavoidable to call the PNG engine, but to get the metrics it + is sufficient to read the PNG image's header only. + + * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the + allocation of the glyph slot. + * src/sfnt/pngshim.h: Updated. + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png, + tt_face_load_sbix_image, tt_face_load_sbit_image): Updated. + +2016-11-06 Werner Lemberg + + [sfnt] Speed up `sbix' lookup. + + This also fixes a bug introduced in 2016-10-01 which prevents + display of embedded bitmap fonts that use the `sbix' format. + + * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and + offset also in `ebdt_size' and `ebdt_start', respectively. This + makes the test for an embedded bitmap data table succeed for this + format. + + (tt_face_load_strike_metrics) : Use + `ebdt_size' and `ebdt_start' + (tt_face_load_sbix_image): Ditto. + +2016-11-06 Seigo Nonaka + Werner Lemberg + + Introduce a way of quickly retrieving (embedded) bitmap metrics. + + `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph + until the user calls `FT_Render_Glyph'. However, it always + allocates memory for bitmaps and copies or decodes the contents of a + bitmap glyph, which can be quite slow for PNG data. + + * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New + macro. + + * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if + FT_LOAD_BITMAP_METRICS_ONLY is used. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap, + tt_sbit_decoder_load_bitmap): Add argument to control allocation of + the glyph slot. + (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound, + tt_face_load_sbit_image): Updated. + + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if + `FT_LOAD_BITMAP_METRICS_ONLY' is set. + + * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add + argument to control allocation of the glyph slot. + * src/pfr/pfrobjs (pfr_slot_load): Updated. + + * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. + + * docs/CHANGES: Updated. + +2016-11-06 Werner Lemberg + + Synchronize with gnulib (#49448). + + * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, + builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in + current version of `intprops.h'. + Other minor synchronization to reduce code differences between the + three files. + +2016-11-03 Behdad Esfahbod + + [truetype] Clamp variation requests to valid range. + + This is required by OpenType 1.8; it also avoids rounding surprises. + + * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates + outside of the allowed range to always stay within the range instead + of producing an error. + +2016-10-29 Werner Lemberg + + [truetype] Remove clang warnings. + + * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for + loop counter handling. + + * src/truetype/ttinterp.c: Updated. + (Ins_SCANTYPE): Use signed constant. + (TT_RunIns): Ensure `num_twilight_points' is 16bit. + +2016-10-27 Werner Lemberg + + [truetype] Fix commit from 2014-11-24. + + Problem reported by Hin-Tak Leung . + + * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking + logic. + +2016-10-26 Werner Lemberg + + Add `FT_Get_{MM,Var}_Blend_Coordinates' functions. + + * include/freetype/ftmm.h: Declare. + + * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): + New typedef. + (MultiMasters): New MM service function `get_mm_blend'. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + Update all callers. + + * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, + FT_Get_Var_Blend_Coordinates): Implement. + + * src/truetype/ttdriver.c: Updated. + + * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle + `get_mm_blend' service. + * src/truetype/ttgxvar.h: Updated. + + * src/type1/t1driver.c: Updated. + + * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle + `get_mm_blend' service. + * src/type1/t1load.h: Updated. + + * docs/CHANGES: Document. + +2016-10-26 Werner Lemberg + + * src/type1/t1load.c (parse_subrs): Fix limit check. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81 + +2016-10-25 Alexei Podtelezhnikov + + [cff] Correct cmap format reporting (#24819). + + * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic + charmap instead of guessing its format and language. + +2016-10-22 Werner Lemberg + + [truetype] Fix SCANTYPE instruction (#49394). + + * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits. + +2016-10-22 Werner Lemberg + + [sfnt] Improve handling of invalid post 2.5 tables [#49393]. + + * src/sfnt/ttpost.c (load_format_25): We need at least a single + table entry. + +2016-10-14 Werner Lemberg + + [truetype] Fix handling of `cvar' table data. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53 + + * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT + indices. + +2016-10-11 Werner Lemberg + + [psaux] Fix handling of invalid flex subrs. + + Problem reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52 + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Set `flex_state' after error checking. + +2016-10-11 Werner Lemberg + + * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation. + +2016-10-08 Werner Lemberg + + * src/cid/cidload.c (cid_face_open): Properly propagate `error'. + +2016-10-08 Werner Lemberg + + [cid] Fix parsing of subr offsets. + + Bug introduced 2016-05-16. + + * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error. + +2016-10-01 Werner Lemberg + + [sfnt] Disable bitmap strikes if we don't have a bitmap data table. + + * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have + a bitmap data table. + +2016-10-01 Alexei Podtelezhnikov + + [smooth] Remove impossibility. + + * src/smooth/ftgrays.c (TWorker): Rearrange fields. + (gray_convert_glyph): Remove impossible condition and clean up. + +2016-09-29 Werner Lemberg + + [pcf] Enrich family name with foundry name and glyph width info. + + This is a very old patch from openSuSE (from 2006, submitted to + FreeType in 2011) that I forgot to apply. + + https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch + + Prepend the foundry name plus a space to the family name. There are + many fonts just called `Fixed' which look completely different, and + which have nothing to do with each other. When selecting `Fixed' in + KDE or Gnome one gets results that appear rather random, the style + changes often if one changes the size and one cannot select some + fonts at all. + + We also check whether we have `wide' characters; all put together, + we get family names like `Sony Fixed' or `Misc Fixed Wide'. + + * src/pcf/pcfread.c (pcf_load_font): Implement it. + + * docs/CHANGES: Document it. + +2016-09-29 Werner Lemberg + + [ftfuzzer] Speed up. + + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't + check for embedded bitmaps if we have a non-default instance. + +2016-09-29 Werner Lemberg + + [truetype] Disallow bitmap strikes for non-default instances. + + Also speed up access of default instances if GX variations are + active. + + * include/freetype/internal/tttypes.h (TT_FaceRec): Add + `is_default_instance' member. + + * src/sfnt/sfobjs.c (sfnt_init_face): Initialize + `is_default_instance'. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Add test for default instance. + (TT_Load_Glyph): Load embedded bitmaps for default instance only. + + * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute + `is_default_instance'. + +2016-09-29 Werner Lemberg + + [truetype] Clean up `TT_Face' structure. + + * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused + fields `horz_metrics' and `vert_metrics'. + Update documentation. + + * src/sfnt/sfobjs.c (sfnt_done_face): Updated. + +2016-09-28 Werner Lemberg + + More FT_ZERO usage. + + * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): + s/ft_memset/FT_MEM_ZERO/. + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings): + s/ft_memset/FT_ARRAY_ZERO/. + + * src/raster/ftraster.c (FT_ZERO): Define. + (ft_black_new): Use it. + * src/raster/ftrend1.c (ft_raster1_get_cbox): + s/FT_MEM_ZERO/FT_ZERO/. + + * src/smooth/ftgrays.c (FT_ZERO): Define. + (gray_raster_new): Use it. + * src/smooth/ftsmooth.c (ft_smooth_get_cbox): + s/FT_MEM_ZERO/FT_ZERO/. + +2016-09-28 Werner Lemberg + + */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate. + +2016-09-27 Werner Lemberg + + [truetype] Trace number of executed opcodes. + + * src/truetype/ttinterp.c (TT_RunIns): Implement it. + +2016-09-27 Werner Lemberg + + [truetype] Speed up `TT_Load_Glyph'. + + This avoids additional calls to `tt_face_lookup_table' for the + `glyf' table, which can be expensive. + + * include/freetype/internal/tttypes.h (TT_LoaderRec): Move + `glyf_offset' field to ... + (TT_FaceRec): ... this structure. + * src/truetype/ttgload.c (load_truetype_glyph): Updated. + (tt_loader_init): Move initialization of `glyf_offset' to ... + * src/truetype/ttpload.c (tt_face_load_loca): ... this function. + +2016-09-27 Werner Lemberg + + [truetype] Introduce dynamic limits for some bytecode opcodes. + + This speeds up FreeType's handling of malformed fonts. + + * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number + of twilight points, the total number of negative jumps, and the + total number of loops in LOOPCALL opcodes. The values are based on + the number of points and entries in the CVT table. + (Ins_JMPR): Test negative jump counter. + (Ins_LOOPCALL): Test loopcall counter. + + * src/truetype/ttinterp.h (TT_ExecContext): Updated. + + * docs/CHANGES: Updated. + +2016-09-25 Werner Lemberg + + [truetype] Sanitize only last entry of `loca' table. + + Without this patch, a loca sequence like `0 100000 0 100000 ...', + where value 100000 is larger than the `glyf' table size, makes + FreeType handle the whole `glyf' table as a single glyph again and + again, which is certainly invalid (and can be very slow, too). + + * src/truetype/ttpload.c (tt_face_get_location): Implement. + Improve tracing messages. + +2016-09-25 Werner Lemberg + + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo. + +2016-09-24 Werner Lemberg + + [autofit] Tracing fixes. + + * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping + functions only if we actually do tracing. + +2016-09-22 Alexei Podtelezhnikov + + [smooth] Reduce divisions in the line renderer. + + We don't need some divisions if a line segments stays within a single + row or a single column of pixels. + + * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions + conditional. + +2016-09-15 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table. + +2016-09-14 Alexei Podtelezhnikov + + [smooth] Another tiny speed-up. + + * src/smooth/ftgrays.c (gray_find_cell): Merge into... + (gray_record_cell): ... this function. + +2016-09-11 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code. + +2016-09-11 Alexei Podtelezhnikov + + [smooth] Fix valgrind warning and reoptimize. + + The algorithm calls `gray_set_cell' at the start of each new contour + or when the contours cross the cell boundaries. Double-checking for + that is wasteful. + + * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. + (gray_convert_glyph): Remove initialization introduced by 44b172e88. + +2016-09-10 Werner Lemberg + + [sfnt] Fix previous commit. + + Problems reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40 + + We now map the strike index right before accessing the physical + data, not earlier. + + * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map' + after creating the map so that... + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function + can be used before and after setting up `sbit_strike_map'. + (tt_face_set_sbit_strike): Revert change. + (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index. + + * src/truetype/ttdriver.c (tt_size_select): Revert change. + +2016-09-09 Werner Lemberg + + [ftfuzzer] Minor improvements. + + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore + invalid strikes. + Use better values for call to `FT_Set_Char_Size'. + +2016-09-09 Werner Lemberg + + [sfnt] Don't provide (completely) broken strike data. + + FreeType tries to sanitize strike header data; we now reject + completely broken ones. + + * include/freetype/internal/tttypes.h (TT_FaceRec): New + `sbit_strike_map' array pointer. + + * src/base/ftobjs.c (FT_Match_Size): Reject matches where either + width or height would be zero. + Add tracing message in case of error. + + * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map', + only using (more or less) valid strike header data for + FT_Face's `available_sizes' array. + (sfnt_done_face): Updated. + + * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use + `sbit_strike_map'. + (tt_face_load_strike_metrics): Improve tracing. + + * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'. + +2016-09-08 Werner Lemberg + + * Version 2.7 released. + ======================= + + + Tag sources with `VER-2-7'. + + * docs/VERSION.TXT: Add entry for version 2.7. + + * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, + builds/windows/vc2005/index.html, + builds/windows/vc2008/freetype.vcproj, + builds/windows/vc2008/index.html, + builds/windows/vc2010/freetype.vcxproj, + builds/windows/vc2010/index.html, + builds/windows/visualc/freetype.dsp, + builds/windows/visualc/freetype.vcproj, + builds/windows/visualc/index.html, + builds/windows/visualce/freetype.dsp, + builds/windows/visualce/freetype.vcproj, + builds/windows/visualce/index.html, + builds/wince/vc2005-ce/freetype.vcproj, + builds/wince/vc2005-ce/index.html, + builds/wince/vc2008-ce/freetype.vcproj, + builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/. + + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7. + (FREETYPE_PATCH): Set to 0. + + * builds/unix/configure.raw (version_info): Set to 18:6:12. + * CMakeLists.txt (VERSION_MINOR): Set to 7. + (VERSION_PATCH): Set to 0. + + * docs/CHANGES: Updated. + +2016-09-08 Werner Lemberg + + * src/truetype/ttinterp.c: Include `ttgxvar.h'. + + This fixes the `multi' build. + +2016-09-08 Werner Lemberg + + [autofit] Another improvement to Armenian support. + + Suggested by Hrant H Papazian . + + * src/autofit/afscript.h: Use better suited characters to derive + default stem widths. + +2016-09-07 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_hline): Micro-optimize. + +2016-09-06 Alexei Podtelezhnikov + + [smooth] Operate in absolute bitmap coordinates. + + Simpler bitmap addressing improves performance by 1.5%. + + * src/smooth/ftgrays.c (gray_TWorker): Remove count fields. + (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline, + gray_sweep, gray_convert_glyph, gray_raster_render): Updated. + +2016-09-06 Alexei Podtelezhnikov + + [smooth] Improve contour start (take 2). + + * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly + instead of... + (gray_start_cell): ... this function, which is removed. + (gray_convert_glyph): Make initial y-coordinate invalid. + +2016-09-06 Werner Lemberg + + [type1] MM fonts support exactly zero named instances (#48748). + + * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero. + +2016-09-06 Jonathan Kew + + [cff] Fix uninitialized memory. + + Problem reported as + + https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 + + * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage' + array to handle a `get' opcode without a previous `put'. + +2016-09-05 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert. + +2016-09-05 Alexei Podtelezhnikov + + [smooth] Improve contour start. + + * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly + instead of... + (gray_start_cell): ... this function, which is removed. + +2016-09-05 Werner Lemberg + + [cff] Fix memory initialization. + + * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' + variants of FreeType's memory allocation macros don't do zeroing. + +2016-09-05 Werner Lemberg + + [ftrandom] Minor improvements. + + * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to + 500. + + * src/tools/ftrandom/Makefile (CFLAGS): Split off include + directories to ... + (INCLUDES): ... this new variable. + (LDFLAGS): New variable. + (ftrandom.o, ftrandom): Updated. + +2016-09-05 Werner Lemberg + + [autofit] Improve Armenian support. + + Thanks to Hrant H Papazian for help. + + * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve + selection of characters. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + +2016-09-04 Werner Lemberg + + [ftrandom] Improve Makefile. + + It now supports both a normal build (`./configure && make') and a + development build (`make devel'). + + * src/tools/ftrandom/Makefile (VPATH): Set it so that + `libfreetype.a' gets searched in both `objs' (for the development + build) and `objs/.libs' (for a normal build which uses libtool). + (LIBS): Add missing libraries. + (ftrandom.o): New rule. + (ftrandom): Use automatic variables. + +2016-09-03 Werner Lemberg + + [truetype] More fixes for handling of GX deltas. + + Problems reported by Bob Taylor . + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough + sanity test for glyph variation array header size. + Always set stream position before reading packed x and y deltas. + Fix thinko w.r.t. `localpoints' array. + +2016-09-03 Werner Lemberg + + [ftrandom] Various fixes. + + * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better + default. + (error_fraction): Make it of type `double' to work as advertized – + this was completely broken. + Update all related code. + (error_count, fcnt): Make it unsigned to fix compiler warnings. + Update all related code. + (fontlist): Change `len' member to `long' to fix compiler warnings. + (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag + unused variables. + (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings. + (ExecuteTest): Ditto. + Call `FT_Done_FreeType'. + (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned + int'. + (usage): Improve output. + (main): Fix compiler warnings. + + * src/tools/ftrandom/README: Updated. + +2016-09-03 Werner Lemberg + + [base] Avoid negative bitmap strike dimensions (#48985). + + * src/base/ftobjs.c (FT_Open_Face): Check whether negation was + actually successful. For example, this can fail for value + -32768 if the type is `signed short'. If there are problems, + disable the strike. + +2016-09-03 Werner Lemberg + + [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). + + * src/cff/cffload.c (cff_index_get_name): Check `byte_len'. + +2016-09-02 Werner Lemberg + + [unix] Enable 64bit support in file system access (#48962). + + * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'. + +2016-09-02 Werner Lemberg + + [sfnt] Avoid left shift of negative value (#48980). + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned + constant. + +2016-09-02 Werner Lemberg + + * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings. + +2016-09-02 Werner Lemberg + + Some preparations for the next release. + + * include/freetype/config/ftoption.h + (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable. + + * docs/CHANGES: Updated. + +2016-09-01 Alexei Podtelezhnikov + + [smooth] Simplify span rendering more. + + It turns out that there is significant cost associated with `FT_Span' + creation and calls to `gray_render_span' because it happens so + frequently. This removes these steps from our internal use but leaves + it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain + is about 5%. + + * src/smooth/ftgrays.c (gray_render_span): Removed. The code is + migrated to... + (gray_hline): ... here. + +2016-08-30 Alexei Podtelezhnikov + + [smooth] Streamline pixmap drawing a bit more. + + Zero coverage is unlikely (1 out of 256) to warrant checking. This + gives 0.5% speed improvement in rendering simple glyphs. + + * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks. + +2016-08-29 Alexei Podtelezhnikov + + [smooth] Streamline pixmap drawing. + + This gives 2% speed improvement in rendering simple glyphs. + + * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a + pointer to its bottom-left and pitch to be used in... + (gray_TWorker): ... here. + (gray_render_span): Move pixmap flow check from here... + (gray_raster_render): .. to here. + +2016-08-27 Alexei Podtelezhnikov + + [smooth] Reduce stack of band boundaries. + + * src/smooth/ftgrays.c (gray_TBand): Removed. + (gray_convert_glyph): Updated to stack band boundaries concisely. + +2016-08-26 Werner Lemberg + + * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'. + +2016-08-26 Werner Lemberg + + [cid] Fix commit from 2016-05-16. + + * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors. + +2016-08-26 Werner Lemberg + + [sfnt] Cache offset and size to bitmap data table. + + This commit avoids `EBDT' and friends being looked up again and + again while loading a single embedded bitmap. + + * include/freetype/internal/tttypes.h (TT_FaceRec) + [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and + `ebdt_size'. + + * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ... + (tt_face_load_sbit): ... this function; also store the table size + and offset. + +2016-08-26 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks. + +2016-08-26 Werner Lemberg + + [type1] Fix heap buffer overflow. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 + + * src/type1/t1load.c (parse_charstrings): Reject fonts that don't + contain glyph names. + +2016-08-25 Werner Lemberg + + [sfnt] Fix previous commit (#48901). + + * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos. + +2016-08-25 Werner Lemberg + + [sfnt] Speed up handling of invalid format 4 cmaps. + + * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add + tests for `num_glyph' from `tt_cmap4_char_map_linear'. + +2016-08-25 Werner Lemberg + + * include/freetype/internal/ftdriver.h: Remove unused typedefs. + +2016-08-22 Alexei Podtelezhnikov + + [smooth] Simplify span rendering. + + This removes unnecessary complexity of span merging and buffering. + Instead, the spans are rendered as they come, speeding up the + rendering by about 5% as a result. + + * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed. + (gray_TWorker): Remove span buffer and related fields. + (gray_sweep, gray_hline): Updated. + + * include/freetype/ftimage.h: Remove documentation note about + `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone. + +2016-08-16 Werner Lemberg + + [truetype] Fix `MPS' instruction. + + According to Greg Hitchcock, MPS in DWrite really returns the point + size. + + * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member. + + * src/truetype/ttdriver.c (tt_size_request): Set `point_size'. + + * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize' + member. + + * src/truetype/ttinterp.c (TT_Load_Context): Updated. + (Ins_MPS): Fix instruction. + +2016-08-16 Werner Lemberg + + [lzw] Optimize last commit. + + * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into + conditional clause. + +2016-08-16 Werner Lemberg + + [lzw] Avoid invalid left shift. + + Reported as + + https://bugzilla.mozilla.org/show_bug.cgi?id=1295366 + + * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'. + +2016-08-16 Werner Lemberg + + [lzw] Avoid buffer overrun. + + Reported as + + https://bugzilla.mozilla.org/show_bug.cgi?id=1273283 + + * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't + underflow. + +2016-08-16 Werner Lemberg + + [truetype] Fix compiler warning. + + * src/truetype/ttgload.c (load_truetype_glyph): Add cast. + +2016-08-13 Werner Lemberg + + [winfonts] Avoid zero bitmap width and height. + + Reported as + + https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 + + * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. + (FNT_Load_Glyph): Check for zero pitch. + +2016-08-11 Alexei Podtelezhnikov + + * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes. + +2016-08-11 Alexei Podtelezhnikov + + * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting. + +2016-08-11 Alexei Podtelezhnikov + + * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries. + +2016-08-10 Peter Klotz + + * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. + +2016-08-10 Werner Lemberg + + [sfnt] Use correct type for `italicAngle' field (#48732). + + * src/sfnt/ttload.c (tt_face_load_post): Fix types. + +2016-08-06 Jon Spencer + + [sfnt] Fix `FT_Get_Advance' for bitmap strikes. + + `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the + advance value from the font table and then scales it by the + `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't + set that value for bitmap fonts and the advance gets scaled to zero. + + Taken from + + https://github.com/behdad/harfbuzz/issues/252 + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + : Set scale values. + +2016-08-06 Behdad Esfahbod + + [truetype] Fix GX variation handling of composites. + + * src/truetype/ttgload.c (load_truetype_glyph) + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag. + +2016-08-05 Alexei Podtelezhnikov + + [smooth] Minor refactoring. + + * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line): + Updated. + +2016-07-29 Werner Lemberg + + [sfnt, truetype] Don't abort on invalid `maxComponentDepth'. + + Since 2016-05-16 we detect infinite recursion directly. + + * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust + `maxComponentDepth'. + * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if + `maxComponentDepth' is not valid. Instead, simply adjust its value + and emit a tracing message. + +2016-07-26 Werner Lemberg + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor. + + No functional change. + +2016-07-22 Hin-Tak Leung + + [truetype] Record the end of IDEFs. + + To match the logic in FDEF. The value of the end is only used for + bound-checking in `Ins_JMPR', so it may not have been obvious that + it was not recorded. Tested (as part of Font Validator 2.0) all the + fonts on Fedora and did not see any change. + + * src/truetype/ttinterp.c (Ins_IDEF): Updated. + +2016-07-19 Werner Lemberg + + [truetype] Sanitizer fix, second try. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary + tests and use only one slot more. + +2016-07-19 Werner Lemberg + + [truetype] Sanitizer fix. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array + to fix nested loops. + +2016-07-18 Werner Lemberg + + [truetype] Make GETDATA work only for GX fonts. + + * src/truetype/ttinterp.c (opcode_name): Updated. + (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. + (TT_RunIns): Updated. + +2016-07-17 Werner Lemberg + + [truetype] Add support for Apple's + + GETDATA[], opcode 0x92 + + bytecode instruction. It always returns 17, and we have absolutely + no idea what it is good for... + + * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. + (Ins_GETDATA): New function. + (TT_RunIns): Add it. + +2016-07-16 Werner Lemberg + + [truetype] Add bytecode support for GX variation fonts. + + This commit implements undocumented (but confirmed) stuff from + Apple's old bytecode engine. + + GETVARIATION[], opcode 0x91 + This opcode pushes normalized variation coordinates for all axes + onto the stack (in 2.14 format). Coordinate of first axis gets + pushed first. + + GETINFO[], selector bit 3 + If GX variation support is enabled, bit 10 of the result is set + to 1. + + * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H. + (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. + (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector + bit 3, checking support for variation glyph hinting. + (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function + to implement opcode 0x91. + (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91. + +2016-07-16 Werner Lemberg + + [truetype] Fix GETINFO bytecode instruction. + + * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for + stretching information. + +2016-07-16 Behdad Esfahbod + + [truetype] Make all glyphs in `Zycon' GX font work. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary + tests. + +2016-07-16 Werner Lemberg + + [truetype] Fix GX delta tracing. + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace + relative point movements. + +2016-07-16 Behdad Esfahbod + + [truetype] More fixes for GX. + + This finally fixes the rendering of the cyclist and the lizard in + the `Zycon' font. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point + index is always cumulative. + + (tt_handle_deltas): Rename to... + (tt_interpolate_deltas): ... This. + Add new parameter for output point array. + Update caller. + + (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds + the intermediate results of `tt_interpolate_deltas' that are to be + added to `outline->points'. + +2016-07-15 Werner Lemberg + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko. + + `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. + + Reported by Alexei. + +2016-07-16 Nikolaus Waxweiler + + * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error. + + Problem reported by Hin-Tak Leung. + +2016-07-15 Werner Lemberg + + [autofit] Update and improve segment and edge tracing. + + * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace + `delta' also. + Don't show first point of segment as a replacement for `pos'; this + is (a) misleading, since the difference to `pos' can be almost + arbitrarily large in corner cases, and (b) it is better to have all + segment data in font units instead of a single value given in output + space coordinates. + Improve layout. + (af_glyph_hints_dump_edges): Show px->units and units->px conversion + values for convenience. + Improve layout. + +2016-07-15 Werner Lemberg + + [autofit] For edges, reject segments wider than 1px (#41334). + + * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute + `delta'. + (af_latin_hints_compute_edges): Reject segments with a delta larger + than 0.5px. + +2016-07-14 Werner Lemberg + + * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro. + +2016-07-14 Werner Lemberg + + [sfnt] Fix `face_index' value in `FT_Face' for named instances. + + * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. + +2016-07-14 Werner Lemberg + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing. + +2016-07-14 Behdad Esfahbod + + [truetype] Fix gxvar delta interpolation. + + The coordinates of the base font should be used for interpolation + purposes, NOT the current points (i.e., the result of accumulation + of previous deltas). + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize + `points_org' before looping over all tuples. + + +---------------------------------------------------------------------------- + +Copyright 2016-2018 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 5df9b8f..a9eb396 100644 --- a/Jamfile +++ b/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 top Jamfile. # -# Copyright 2001-2017 by +# Copyright 2001-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -210,7 +210,7 @@ actions RefDoc { python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 - --title=FreeType-2.8 + --title=FreeType-2.9 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h diff --git a/Jamrules b/Jamrules index 0047e53..bdd04bc 100644 --- a/Jamrules +++ b/Jamrules @@ -1,6 +1,6 @@ # FreeType 2 JamRules. # -# Copyright 2001-2017 by +# Copyright 2001-2018 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/Makefile b/Makefile index 1c41458..0c7ee0e 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/README b/README index 926e9dc..1e7ea97 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ - FreeType 2.8 + FreeType 2.9 ============ - Homepage: http://www.freetype.org + Homepage: https://www.freetype.org FreeType is a freely available software library to render fonts. @@ -20,17 +20,17 @@ documentation is available as a separate package from our sites. Go to - http://download.savannah.gnu.org/releases/freetype/ + https://download.savannah.gnu.org/releases/freetype/ and download one of the following files. - freetype-doc-2.8.tar.bz2 - freetype-doc-2.8.tar.gz - ftdoc28.zip + freetype-doc-2.9.tar.bz2 + freetype-doc-2.9.tar.gz + ftdoc29.zip To view the documentation online, go to - http://www.freetype.org/freetype2/documentation.html + https://www.freetype.org/freetype2/documentation.html Mailing Lists @@ -46,7 +46,7 @@ The lists are moderated; see - http://www.freetype.org/contact.html + https://www.freetype.org/contact.html how to subscribe. @@ -71,7 +71,7 @@ ---------------------------------------------------------------------- -Copyright 2006-2017 by +Copyright 2006-2018 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 06f778b..a3d7fc0 100644 --- a/README.git +++ b/README.git @@ -37,7 +37,7 @@ repository. ---------------------------------------------------------------------- -Copyright 2005-2017 by +Copyright 2005-2018 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/autogen.sh b/autogen.sh index 31c1534..ab90e64 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2017 by +# Copyright 2005-2018 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/builds/amiga/README b/builds/amiga/README index fb44116..29e97d6 100644 --- a/builds/amiga/README +++ b/builds/amiga/README @@ -1,7 +1,7 @@ README for the builds/amiga subdirectory. -Copyright 2005-2017 by +Copyright 2005-2018 by Werner Lemberg and Detlef Würkner. This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/include/config/ftconfig.h b/builds/amiga/include/config/ftconfig.h index 9434841..0217e0e 100644 --- a/builds/amiga/include/config/ftconfig.h +++ b/builds/amiga/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific configuration file (specification only). */ /* */ -/* Copyright 2005-2017 by */ +/* Copyright 2005-2018 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/include/config/ftmodule.h b/builds/amiga/include/config/ftmodule.h index 38ea4c9..f8baab5 100644 --- a/builds/amiga/include/config/ftmodule.h +++ b/builds/amiga/include/config/ftmodule.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType module selection. */ /* */ -/* Copyright 2005-2017 by */ +/* Copyright 2005-2018 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/makefile b/builds/amiga/makefile index e467f9a..6367438 100644 --- a/builds/amiga/makefile +++ b/builds/amiga/makefile @@ -5,7 +5,7 @@ # -# Copyright 2005-2017 by +# Copyright 2005-2018 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/makefile.os4 b/builds/amiga/makefile.os4 index 82ee864..c07e181 100644 --- a/builds/amiga/makefile.os4 +++ b/builds/amiga/makefile.os4 @@ -4,7 +4,7 @@ # -# Copyright 2005-2017 by +# Copyright 2005-2018 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile index 08e0a38..29a31e4 100644 --- a/builds/amiga/smakefile +++ b/builds/amiga/smakefile @@ -3,7 +3,7 @@ # -# Copyright 2005-2017 by +# Copyright 2005-2018 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c index 1a897cf..f3ba48c 100644 --- a/builds/amiga/src/base/ftdebug.c +++ b/builds/amiga/src/base/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for amiga (body). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c index c3960d9..babaeeb 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-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/ansi/ansi-def.mk b/builds/ansi/ansi-def.mk index d3c0f28..1484f96 100644 --- a/builds/ansi/ansi-def.mk +++ b/builds/ansi/ansi-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/ansi/ansi.mk b/builds/ansi/ansi.mk index b33e8ce..c06732c 100644 --- a/builds/ansi/ansi.mk +++ b/builds/ansi/ansi.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/beos/beos-def.mk b/builds/beos/beos-def.mk index fa6f236..89c54dd 100644 --- a/builds/beos/beos-def.mk +++ b/builds/beos/beos-def.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/beos/beos.mk b/builds/beos/beos.mk index 181efe4..619ceaf 100644 --- a/builds/beos/beos.mk +++ b/builds/beos/beos.mk @@ -2,7 +2,7 @@ # FreeType 2 configuration rules for a BeOS system # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/beos/detect.mk b/builds/beos/detect.mk index 30f6d10..82f6205 100644 --- a/builds/beos/detect.mk +++ b/builds/beos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/cmake/iOS.cmake b/builds/cmake/iOS.cmake index 5717e6a..c6da70c 100644 --- a/builds/cmake/iOS.cmake +++ b/builds/cmake/iOS.cmake @@ -1,6 +1,6 @@ # iOS.cmake # -# Copyright 2014-2017 by +# Copyright 2014-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by David Wimsey diff --git a/builds/cmake/testbuild.sh b/builds/cmake/testbuild.sh index 34aded7..1fa3a18 100755 --- a/builds/cmake/testbuild.sh +++ b/builds/cmake/testbuild.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -# Copyright 2015-2017 by +# Copyright 2015-2018 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/builds/compiler/ansi-cc.mk b/builds/compiler/ansi-cc.mk index d619641..99fe8cb 100644 --- a/builds/compiler/ansi-cc.mk +++ b/builds/compiler/ansi-cc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/bcc-dev.mk b/builds/compiler/bcc-dev.mk index 9b43fd1..8d67fa1 100644 --- a/builds/compiler/bcc-dev.mk +++ b/builds/compiler/bcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/bcc.mk b/builds/compiler/bcc.mk index 82e3829..02d4833 100644 --- a/builds/compiler/bcc.mk +++ b/builds/compiler/bcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/emx.mk b/builds/compiler/emx.mk index a25e4bc..2926b11 100644 --- a/builds/compiler/emx.mk +++ b/builds/compiler/emx.mk @@ -3,7 +3,7 @@ # -# Copyright 2003-2017 by +# Copyright 2003-2018 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/builds/compiler/gcc-dev.mk b/builds/compiler/gcc-dev.mk index 8994fa2..48d2848 100644 --- a/builds/compiler/gcc-dev.mk +++ b/builds/compiler/gcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/gcc.mk b/builds/compiler/gcc.mk index 3465038..9c77239 100644 --- a/builds/compiler/gcc.mk +++ b/builds/compiler/gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/intelc.mk b/builds/compiler/intelc.mk index 287db44..e9236d3 100644 --- a/builds/compiler/intelc.mk +++ b/builds/compiler/intelc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/unix-lcc.mk b/builds/compiler/unix-lcc.mk index 560c61b..09fffeb 100644 --- a/builds/compiler/unix-lcc.mk +++ b/builds/compiler/unix-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/visualage.mk b/builds/compiler/visualage.mk index 2aa4fbe..10299da 100644 --- a/builds/compiler/visualage.mk +++ b/builds/compiler/visualage.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/visualc.mk b/builds/compiler/visualc.mk index e86ecc5..74f498b 100644 --- a/builds/compiler/visualc.mk +++ b/builds/compiler/visualc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/watcom.mk b/builds/compiler/watcom.mk index 62a4811..e455922 100644 --- a/builds/compiler/watcom.mk +++ b/builds/compiler/watcom.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/compiler/win-lcc.mk b/builds/compiler/win-lcc.mk index 91b429e..1356c1c 100644 --- a/builds/compiler/win-lcc.mk +++ b/builds/compiler/win-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/detect.mk b/builds/detect.mk index 4ed478e..771fc31 100644 --- a/builds/detect.mk +++ b/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -131,6 +131,9 @@ std_setup: # Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly! # +# For `cmd.exe', we use 0xFF as a replacement character for a protected +# space. +# dos_setup: @type builds$(SEP)newline @echo $(PROJECT_TITLE) build system -- automatic system detection @@ -146,7 +149,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 (this needs python >= 2.6). + @echo or 'make refdoc' to build the API reference (this needs at least 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 85c48df..55b0e76 100644 --- a/builds/dos/detect.mk +++ b/builds/dos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/dos/dos-def.mk b/builds/dos/dos-def.mk index a6c2f22..cb1154d 100644 --- a/builds/dos/dos-def.mk +++ b/builds/dos/dos-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/dos/dos-emx.mk b/builds/dos/dos-emx.mk index 85de037..dedcc3f 100644 --- a/builds/dos/dos-emx.mk +++ b/builds/dos/dos-emx.mk @@ -3,7 +3,7 @@ # -# Copyright 2003-2017 by +# Copyright 2003-2018 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/builds/dos/dos-gcc.mk b/builds/dos/dos-gcc.mk index e38acfb..53099ab 100644 --- a/builds/dos/dos-gcc.mk +++ b/builds/dos/dos-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/dos/dos-wat.mk b/builds/dos/dos-wat.mk index ddb4876..1bd00e7 100644 --- a/builds/dos/dos-wat.mk +++ b/builds/dos/dos-wat.mk @@ -3,7 +3,7 @@ # -# Copyright 2003-2017 by +# Copyright 2003-2018 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/builds/exports.mk b/builds/exports.mk index 10b79d3..59fe31a 100644 --- a/builds/exports.mk +++ b/builds/exports.mk @@ -3,7 +3,7 @@ # -# Copyright 2005-2017 by +# Copyright 2005-2018 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/builds/freetype.mk b/builds/freetype.mk index f8cfd41..f2e7e60 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -153,6 +153,9 @@ endif ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),) FTOPTION_H := $(OBJ_DIR)/ftoption.h FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="" +else ifneq ($(wildcard $(BUILD_DIR)/ftoption.h),) + FTOPTION_H := $(BUILD_DIR)/ftoption.h + FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="" endif # `CPPFLAGS' might be specified by the user in the environment. diff --git a/builds/link_dos.mk b/builds/link_dos.mk index 3854e70..3b0e8da 100644 --- a/builds/link_dos.mk +++ b/builds/link_dos.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/link_std.mk b/builds/link_std.mk index 4cc2dc9..8ba5e64 100644 --- a/builds/link_std.mk +++ b/builds/link_std.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/mac/ftmac.c b/builds/mac/ftmac.c index 60cf73e..c45546c 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-2017 by */ +/* Copyright 1996-2018 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1423,7 +1423,7 @@ typedef short ResourceIndex; /* accepts an FSRef instead of a path. */ /* */ /* This function is deprecated because Carbon data types (FSRef) */ - /* are not cross-platform, and thus not suitable for the freetype API. */ + /* are not cross-platform, and thus not suitable for the FreeType API. */ FT_EXPORT_DEF( FT_Error ) FT_New_Face_From_FSRef( FT_Library library, const FSRef* ref, @@ -1481,7 +1481,7 @@ typedef short ResourceIndex; /* accepts an FSSpec instead of a path. */ /* */ /* This function is deprecated because Carbon data types (FSSpec) */ - /* are not cross-platform, and thus not suitable for the freetype API. */ + /* are not cross-platform, and thus not suitable for the FreeType API. */ FT_EXPORT_DEF( FT_Error ) FT_New_Face_From_FSSpec( FT_Library library, const FSSpec* spec, diff --git a/builds/modules.mk b/builds/modules.mk index a89d579..e1edb17 100644 --- a/builds/modules.mk +++ b/builds/modules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/os2/detect.mk b/builds/os2/detect.mk index 3ea68fb..2edb8d4 100644 --- a/builds/os2/detect.mk +++ b/builds/os2/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/os2/os2-def.mk b/builds/os2/os2-def.mk index 2fe6263..7ad1ffb 100644 --- a/builds/os2/os2-def.mk +++ b/builds/os2/os2-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/os2/os2-dev.mk b/builds/os2/os2-dev.mk index 842a289..505a754 100644 --- a/builds/os2/os2-dev.mk +++ b/builds/os2/os2-dev.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/os2/os2-gcc.mk b/builds/os2/os2-gcc.mk index 4cdffba..65026b1 100644 --- a/builds/os2/os2-gcc.mk +++ b/builds/os2/os2-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/symbian/bld.inf b/builds/symbian/bld.inf index 8087202..9c6d8dc 100644 --- a/builds/symbian/bld.inf +++ b/builds/symbian/bld.inf @@ -2,7 +2,7 @@ // FreeType 2 project for the symbian platform // -// Copyright 2008-2017 by +// Copyright 2008-2018 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, @@ -25,10 +25,14 @@ PRJ_EXPORTS ../../include/freetype/config/ftoption.h config/ftoption.h ../../include/freetype/config/ftstdlib.h config/ftstdlib.h ../../include/freetype/freetype.h freetype.h +../../include/freetype/ftadvanc.h ftadvanc.h +../../include/freetype/ftautoh.h ftautoh.h ../../include/freetype/ftbbox.h ftbbox.h ../../include/freetype/ftbdf.h ftbdf.h ../../include/freetype/ftbitmap.h ftbitmap.h +../../include/freetype/ftbzip2.h ftbzip2.h ../../include/freetype/ftcache.h ftcache.h +../../include/freetype/ftcffdrv.h ftcffdrv.h ../../include/freetype/ftcid.h ftcid.h ../../include/freetype/fterrdef.h fterrdef.h ../../include/freetype/fterrors.h fterrors.h @@ -37,7 +41,6 @@ PRJ_EXPORTS ../../include/freetype/ftglyph.h ftglyph.h ../../include/freetype/ftgxval.h ftgxval.h ../../include/freetype/ftgzip.h ftgzip.h -../../include/freetype/ftbzip2.h ftbzip2.h ../../include/freetype/ftimage.h ftimage.h ../../include/freetype/ftincrem.h ftincrem.h ../../include/freetype/ftlcdfil.h ftlcdfil.h @@ -49,6 +52,8 @@ PRJ_EXPORTS ../../include/freetype/ftmoderr.h ftmoderr.h ../../include/freetype/ftotval.h ftotval.h ../../include/freetype/ftoutln.h ftoutln.h +../../include/freetype/ftparams.h ftparams.h +../../include/freetype/ftpcfdrv.h ftpcfdrv.h ../../include/freetype/ftpfr.h ftpfr.h ../../include/freetype/ftrender.h ftrender.h ../../include/freetype/ftsizes.h ftsizes.h @@ -56,11 +61,12 @@ PRJ_EXPORTS ../../include/freetype/ftstroke.h ftstroke.h ../../include/freetype/ftsynth.h ftsynth.h ../../include/freetype/ftsystem.h ftsystem.h +../../include/freetype/ftt1drv.h ftt1drv.h ../../include/freetype/fttrigon.h fttrigon.h +../../include/freetype/ftttdrv.h ftttdrv.h ../../include/freetype/fttypes.h fttypes.h ../../include/freetype/ftwinfnt.h ftwinfnt.h ../../include/freetype/t1tables.h t1tables.h ../../include/freetype/ttnameid.h ttnameid.h ../../include/freetype/tttables.h tttables.h ../../include/freetype/tttags.h tttags.h -../../include/freetype/ttunpat.h ttunpat.h diff --git a/builds/symbian/freetype.mmp b/builds/symbian/freetype.mmp index 6fe7333..d3b95ef 100644 --- a/builds/symbian/freetype.mmp +++ b/builds/symbian/freetype.mmp @@ -2,7 +2,7 @@ // FreeType 2 makefile for the symbian platform // -// Copyright 2008-2017 by +// Copyright 2008-2018 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, @@ -49,6 +49,10 @@ sourcepath ..\..\src\bdf source bdf.c +sourcepath ..\..\src\bzip2 + +source ftbzip2.c + sourcepath ..\..\src\cache source ftcache.c @@ -65,10 +69,6 @@ sourcepath ..\..\src\gzip source ftgzip.c -sourcepath ..\..\src\bzip2 - -source ftbzip2.c - sourcepath ..\..\src\lzw source ftlzw.c @@ -126,12 +126,12 @@ systeminclude ..\..\include systeminclude \epoc32\include\stdapis userinclude ..\..\src\autofit userinclude ..\..\src\bdf +userinclude ..\..\src\bzip2 userinclude ..\..\src\cache userinclude ..\..\src\cff userinclude ..\..\src\cid userinclude ..\..\src\gxvalid userinclude ..\..\src\gzip -userinclude ..\..\src\bzip2 userinclude ..\..\src\lzw userinclude ..\..\src\otvalid userinclude ..\..\src\pcf diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 7b1d03b..f51ad16 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/unix/config.guess b/builds/unix/config.guess index 69ed3e5..588fe82 100755 --- a/builds/unix/config.guess +++ b/builds/unix/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2017 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-03-05' +timestamp='2018-01-01' # 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 @@ -15,7 +15,7 @@ timestamp='2017-03-05' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2017-03-05' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 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." @@ -244,6 +244,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} exit ;; + *:MidnightBSD:*:*) + echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -259,6 +262,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; + *:Redox:*:*) + echo ${UNAME_MACHINE}-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -315,15 +324,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; @@ -485,13 +485,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); @@ -614,7 +614,7 @@ EOF *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and @@ -635,8 +635,8 @@ EOF 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` @@ -749,7 +749,7 @@ EOF { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -758,7 +758,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -855,10 +855,6 @@ EOF *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; @@ -874,27 +870,12 @@ EOF echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; @@ -1097,7 +1078,7 @@ EOF i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + i*86:*:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} @@ -1304,14 +1285,21 @@ EOF if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (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 + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1335,16 +1323,16 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; - NSX-?:NONSTOP_KERNEL:*:*) + NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) @@ -1418,16 +1406,28 @@ EOF exit ;; esac +echo "$0: unable to guess system type" >&2 + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +33,7 @@ timestamp='2017-04-02' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 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." @@ -229,9 +229,6 @@ case $os in -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; -psos*) os=-psos ;; @@ -316,7 +313,6 @@ case $basic_machine in | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ - | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -643,7 +639,7 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; @@ -905,7 +901,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -1259,6 +1255,9 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1366,8 +1365,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1387,9 +1386,9 @@ case $os in -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ @@ -1417,7 +1416,7 @@ case $os in | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1492,7 +1491,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1547,6 +1546,19 @@ case $os in -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; -ios) @@ -1694,7 +1706,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1829,7 +1841,7 @@ echo $basic_machine$os exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/builds/unix/configure b/builds/unix/configure index a4c66eb..97a01e5 100755 --- a/builds/unix/configure +++ b/builds/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FreeType 2.8. +# Generated by GNU Autoconf 2.69 for FreeType 2.9. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FreeType' PACKAGE_TARNAME='freetype' -PACKAGE_VERSION='2.8' -PACKAGE_STRING='FreeType 2.8' +PACKAGE_VERSION='2.9' +PACKAGE_STRING='FreeType 2.9' PACKAGE_BUGREPORT='freetype@nongnu.org' PACKAGE_URL='' @@ -642,6 +642,7 @@ LIBSSTATIC_CONFIG LIBS_PRIVATE REQUIRES_PRIVATE ftmac_c +LIB_CLOCK_GETTIME HARFBUZZ_LIBS HARFBUZZ_CFLAGS LIBPNG_LIBS @@ -1329,7 +1330,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.8 to adapt to many kinds of systems. +\`configure' configures FreeType 2.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1394,7 +1395,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeType 2.8:";; + short | recursive ) echo "Configuration of FreeType 2.9:";; esac cat <<\_ACEOF @@ -1541,7 +1542,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeType configure 2.8 +FreeType configure 2.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2139,7 +2140,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeType $as_me 2.8, which was +It was created by FreeType $as_me 2.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2495,7 +2496,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Don't forget to update `docs/VERSIONS.TXT'! -version_info='20:0:14' +version_info='22:0:16' ft_version=`echo $version_info | tr : .` @@ -12566,15 +12567,13 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h { $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}" +CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}" ac_clean_files= -for f in ft2build.h ftoption.h ftstdlib.h; do - if test ! -f $f; then - ac_clean_files="$ac_clean_files $f" - touch $f - fi -done +if test ! -f ft2build.h; then + ac_clean_files=ft2build.h + touch ft2build.h +fi cat > conftest.c <<\_ACEOF #include @@ -13193,8 +13192,8 @@ main () } _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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, adding to XX_ANSIFLAGS" >&5 +$as_echo "ok, adding to XX_ANSIFLAGS" >&6; } XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" else @@ -13839,6 +13838,74 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then fi +# check for librt +# +# We need `clock_gettime' for the `ftbench' demo program. +# +# The code is modeled after gnulib's file `clock_time.m4', ignoring +# very old Solaris systems. + +LIB_CLOCK_GETTIME= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +$as_echo_n "checking for library containing clock_gettime... " >&6; } +if ${ac_cv_search_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_clock_gettime=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_clock_gettime+:} false; then : + break +fi +done +if ${ac_cv_search_clock_gettime+:} false; then : + +else + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +$as_echo "$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_clock_gettime" = "none required" \ + || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime +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. @@ -14472,27 +14539,60 @@ LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \ # changing LDFLAGS value should only be done after # lt_cv_prog_compiler_static_works test +ftoption_set() +{ + regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\"" + FTOPTION_H_SED="$FTOPTION_H_SED $regexp" +} + +ftoption_unset() +{ + regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\"" + FTOPTION_H_SED="$FTOPTION_H_SED $regexp" +} + if test "$have_zlib" != no; then - CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + CFLAGS="$CFLAGS $ZLIB_CFLAGS" LDFLAGS="$LDFLAGS $ZLIB_LIBS" + ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB +else + ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB fi - if test "$have_bzip2" != no; then - CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + CFLAGS="$CFLAGS $BZIP2_CFLAGS" LDFLAGS="$LDFLAGS $BZIP2_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_BZIP2 +else + ftoption_unset FT_CONFIG_OPTION_USE_BZIP2 fi if test "$have_libpng" != no; then - CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" + CFLAGS="$CFLAGS $LIBPNG_CFLAGS" LDFLAGS="$LDFLAGS $LIBPNG_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_PNG +else + ftoption_unset FT_CONFIG_OPTION_USE_PNG fi if test "$have_harfbuzz" != no; then - CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ" + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS" LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ +else + ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ fi +# We don't want to use a template file for `ftoption.h', since compilation +# should work without calling a configure script also. For this reason, we +# copy the `include/freetype/config/ftoption.h' file to the `unix/builds' +# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just +# constructed $FTOPTION_H_SED regexp (using the post-action of +# `AC_CONFIG_FILES'); this is also the version that gets installed later on. +# +ac_config_files="$ac_config_files ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h" + + # configuration file -- stay in 8.3 limit # # since #undef doesn't survive in configuration header files we replace @@ -15017,7 +15117,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeType $as_me 2.8, which was +This file was extended by FreeType $as_me 2.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15083,7 +15183,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeType config.status 2.8 +FreeType config.status 2.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -15487,6 +15587,7 @@ fi +FTOPTION_H_SED="$FTOPTION_H_SED" _ACEOF @@ -15497,6 +15598,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "ftoption.h") CONFIG_FILES="$CONFIG_FILES ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h" ;; "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" ;; @@ -16607,6 +16709,9 @@ ltmain=$ac_aux_dir/ltmain.sh chmod +x "$ofile" ;; + "ftoption.h":F) mv ftoption.h ftoption.tmp + eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h" + rm ftoption.tmp ;; "ftconfig.h":H) mv ftconfig.h ftconfig.tmp sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h rm ftconfig.tmp ;; diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac index 7cdafcc..b980278 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-2017 by +# Copyright 2001-2018 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.8], [freetype@nongnu.org], [freetype]) +AC_INIT([FreeType], [2.9], [freetype@nongnu.org], [freetype]) AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='20:0:14' +version_info='22:0:16' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -112,15 +112,13 @@ AC_TYPE_LONG_LONG_INT AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works]) orig_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}" +CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}" ac_clean_files= -for f in ft2build.h ftoption.h ftstdlib.h; do - if test ! -f $f; then - ac_clean_files="$ac_clean_files $f" - touch $f - fi -done +if test ! -f ft2build.h; then + ac_clean_files=ft2build.h + touch ft2build.h +fi cat > conftest.c <<\_ACEOF #include @@ -275,7 +273,7 @@ if test "x$GCC" = xyes; then } ])], - [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS]) + [AC_MSG_RESULT([ok, adding to XX_ANSIFLAGS]) XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" ], [AC_MSG_RESULT([no])]) @@ -511,6 +509,21 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then fi +# check for librt +# +# We need `clock_gettime' for the `ftbench' demo program. +# +# The code is modeled after gnulib's file `clock_time.m4', ignoring +# very old Solaris systems. + +LIB_CLOCK_GETTIME= +AC_SEARCH_LIBS([clock_gettime], + [rt], + [test "$ac_cv_search_clock_gettime" = "none required" \ + || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) +AC_SUBST([LIB_CLOCK_GETTIME]) + + # 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. @@ -977,27 +990,63 @@ AC_SUBST([build_libtool_libs]) # changing LDFLAGS value should only be done after # lt_cv_prog_compiler_static_works test +ftoption_set() +{ + regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\"" + FTOPTION_H_SED="$FTOPTION_H_SED $regexp" +} + +ftoption_unset() +{ + regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\"" + FTOPTION_H_SED="$FTOPTION_H_SED $regexp" +} + if test "$have_zlib" != no; then - CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + CFLAGS="$CFLAGS $ZLIB_CFLAGS" LDFLAGS="$LDFLAGS $ZLIB_LIBS" + ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB +else + ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB fi - if test "$have_bzip2" != no; then - CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + CFLAGS="$CFLAGS $BZIP2_CFLAGS" LDFLAGS="$LDFLAGS $BZIP2_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_BZIP2 +else + ftoption_unset FT_CONFIG_OPTION_USE_BZIP2 fi if test "$have_libpng" != no; then - CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" + CFLAGS="$CFLAGS $LIBPNG_CFLAGS" LDFLAGS="$LDFLAGS $LIBPNG_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_PNG +else + ftoption_unset FT_CONFIG_OPTION_USE_PNG fi if test "$have_harfbuzz" != no; then - CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ" + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS" LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ +else + ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ fi AC_SUBST([CFLAGS]) AC_SUBST([LDFLAGS]) +# We don't want to use a template file for `ftoption.h', since compilation +# should work without calling a configure script also. For this reason, we +# copy the `include/freetype/config/ftoption.h' file to the `unix/builds' +# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just +# constructed $FTOPTION_H_SED regexp (using the post-action of +# `AC_CONFIG_FILES'); this is also the version that gets installed later on. +# +AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h], + [mv ftoption.h ftoption.tmp + eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h" + rm ftoption.tmp], + [FTOPTION_H_SED="$FTOPTION_H_SED"]) + # configuration file -- stay in 8.3 limit # # since #undef doesn't survive in configuration header files we replace diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index ef6debe..20157b9 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-2017 by +# Copyright 2001-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='20:0:14' +version_info='22:0:16' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -112,15 +112,13 @@ AC_TYPE_LONG_LONG_INT AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works]) orig_CPPFLAGS="${CPPFLAGS}" -CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}" +CPPFLAGS="-I${srcdir} -I. -I${srcdir}/../../include/freetype/config ${CPPFLAGS}" ac_clean_files= -for f in ft2build.h ftoption.h ftstdlib.h; do - if test ! -f $f; then - ac_clean_files="$ac_clean_files $f" - touch $f - fi -done +if test ! -f ft2build.h; then + ac_clean_files=ft2build.h + touch ft2build.h +fi cat > conftest.c <<\_ACEOF #include @@ -275,7 +273,7 @@ if test "x$GCC" = xyes; then } ])], - [AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS]) + [AC_MSG_RESULT([ok, adding to XX_ANSIFLAGS]) XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" ], [AC_MSG_RESULT([no])]) @@ -511,6 +509,21 @@ if test x"$with_harfbuzz" = xyes -a "$have_harfbuzz" = no; then fi +# check for librt +# +# We need `clock_gettime' for the `ftbench' demo program. +# +# The code is modeled after gnulib's file `clock_time.m4', ignoring +# very old Solaris systems. + +LIB_CLOCK_GETTIME= +AC_SEARCH_LIBS([clock_gettime], + [rt], + [test "$ac_cv_search_clock_gettime" = "none required" \ + || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) +AC_SUBST([LIB_CLOCK_GETTIME]) + + # 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. @@ -977,27 +990,63 @@ AC_SUBST([build_libtool_libs]) # changing LDFLAGS value should only be done after # lt_cv_prog_compiler_static_works test +ftoption_set() +{ + regexp="-e \\\"s|.*#.*def.*$1.*|#define $1|\\\"" + FTOPTION_H_SED="$FTOPTION_H_SED $regexp" +} + +ftoption_unset() +{ + regexp="-e \\\"s|.*#.*def.*$1.*|/* #undef $1 */|\\\"" + FTOPTION_H_SED="$FTOPTION_H_SED $regexp" +} + if test "$have_zlib" != no; then - CFLAGS="$CFLAGS $ZLIB_CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB" + CFLAGS="$CFLAGS $ZLIB_CFLAGS" LDFLAGS="$LDFLAGS $ZLIB_LIBS" + ftoption_set FT_CONFIG_OPTION_SYSTEM_ZLIB +else + ftoption_unset FT_CONFIG_OPTION_SYSTEM_ZLIB fi - if test "$have_bzip2" != no; then - CFLAGS="$CFLAGS $BZIP2_CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2" + CFLAGS="$CFLAGS $BZIP2_CFLAGS" LDFLAGS="$LDFLAGS $BZIP2_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_BZIP2 +else + ftoption_unset FT_CONFIG_OPTION_USE_BZIP2 fi if test "$have_libpng" != no; then - CFLAGS="$CFLAGS $LIBPNG_CFLAGS -DFT_CONFIG_OPTION_USE_PNG" + CFLAGS="$CFLAGS $LIBPNG_CFLAGS" LDFLAGS="$LDFLAGS $LIBPNG_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_PNG +else + ftoption_unset FT_CONFIG_OPTION_USE_PNG fi if test "$have_harfbuzz" != no; then - CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS -DFT_CONFIG_OPTION_USE_HARFBUZZ" + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS" LDFLAGS="$LDFLAGS $HARFBUZZ_LIBS" + ftoption_set FT_CONFIG_OPTION_USE_HARFBUZZ +else + ftoption_unset FT_CONFIG_OPTION_USE_HARFBUZZ fi AC_SUBST([CFLAGS]) AC_SUBST([LDFLAGS]) +# We don't want to use a template file for `ftoption.h', since compilation +# should work without calling a configure script also. For this reason, we +# copy the `include/freetype/config/ftoption.h' file to the `unix/builds' +# directory (using a dummy `AC_CONFIG_FILES' call) and apply the just +# constructed $FTOPTION_H_SED regexp (using the post-action of +# `AC_CONFIG_FILES'); this is also the version that gets installed later on. +# +AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h], + [mv ftoption.h ftoption.tmp + eval "sed $FTOPTION_H_SED < ftoption.tmp > ftoption.h" + rm ftoption.tmp], + [FTOPTION_H_SED="$FTOPTION_H_SED"]) + # configuration file -- stay in 8.3 limit # # since #undef doesn't survive in configuration header files we replace diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk index a2cf0a7..54daa07 100644 --- a/builds/unix/detect.mk +++ b/builds/unix/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/unix/freetype-config.in b/builds/unix/freetype-config.in index 97de134..2d5b90d 100644 --- a/builds/unix/freetype-config.in +++ b/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright 2000-2017 by +# Copyright 2000-2018 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 @@ export LC_ALL # if `pkg-config' is available, use values from `freetype2.pc' -pkg-config --version >/dev/null 2>&1 +%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1 if test $? -eq 0 ; then # note that option `--variable' is not affected by the # PKG_CONFIG_SYSROOT_DIR environment variable @@ -23,17 +23,17 @@ if test $? -eq 0 ; then export PKG_CONFIG_SYSROOT_DIR fi - prefix=`pkg-config --variable prefix freetype2` - exec_prefix=`pkg-config --variable exec_prefix freetype2` + prefix=`%PKG_CONFIG% --variable prefix freetype2` + exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2` - includedir=`pkg-config --variable includedir freetype2` - libdir=`pkg-config --variable libdir freetype2` + includedir=`%PKG_CONFIG% --variable includedir freetype2` + libdir=`%PKG_CONFIG% --variable libdir freetype2` - version=`pkg-config --modversion freetype2` + version=`%PKG_CONFIG% --modversion freetype2` - cflags=`pkg-config --cflags freetype2` - dynamic_libs=`pkg-config --libs freetype2` - static_libs=`pkg-config --static --libs freetype2` + cflags=`%PKG_CONFIG% --cflags freetype2` + dynamic_libs=`%PKG_CONFIG% --libs freetype2` + static_libs=`%PKG_CONFIG% --static --libs freetype2` else prefix="%prefix%" exec_prefix="%exec_prefix%" diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in index c4dfda4..2d759ec 100644 --- a/builds/unix/freetype2.in +++ b/builds/unix/freetype2.in @@ -4,7 +4,7 @@ libdir=%libdir% includedir=%includedir% Name: FreeType 2 -URL: http://freetype.org +URL: https://freetype.org Description: A free, high-quality, and portable font engine. Version: %ft_version% Requires: diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4 index 172212f..af2e659 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-2017 by +# Copyright 2001-2018 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/builds/unix/ft-munmap.m4 b/builds/unix/ft-munmap.m4 index 27dd7d5..00eda49 100644 --- a/builds/unix/ft-munmap.m4 +++ b/builds/unix/ft-munmap.m4 @@ -1,6 +1,6 @@ ## FreeType specific autoconf tests # -# Copyright 2002-2017 by +# Copyright 2002-2018 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/builds/unix/ftconfig.in b/builds/unix/ftconfig.in index abd101d..5159693 100644 --- a/builds/unix/ftconfig.in +++ b/builds/unix/ftconfig.in @@ -4,7 +4,7 @@ /* */ /* UNIX-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -397,6 +397,14 @@ FT_BEGIN_HEADER #endif + /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */ + /* a function that gets used only within the scope of a module. */ + /* Normally, both the header and source code files for such a */ + /* function are within a single module directory. */ + /* */ + /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */ + /* FT_LOCAL_ARRAY_DEF. */ + /* */ #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x @@ -418,6 +426,12 @@ FT_BEGIN_HEADER #define FT_LOCAL_ARRAY_DEF( x ) const x + /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */ + /* functions that are used in more than a single module. In the */ + /* current setup this implies that the declaration is in a header */ + /* file in the `include/freetype/internal' directory, and the */ + /* function body is in a file in `src/base'. */ + /* */ #ifndef FT_BASE #ifdef __cplusplus @@ -440,6 +454,37 @@ FT_BEGIN_HEADER #endif /* !FT_BASE_DEF */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special attribute in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. */ + /* */ + /* To export a variable, use FT_EXPORT_VAR. */ + /* */ #ifndef FT_EXPORT #ifdef __cplusplus @@ -483,7 +528,13 @@ FT_BEGIN_HEADER /* functions which are accessed by (global) function pointers. */ /* */ /* */ - /* FT_CALLBACK_DEF is used to _define_ a callback function. */ + /* FT_CALLBACK_DEF is used to _define_ a callback function, */ + /* located in the same source code file as the structure that uses */ + /* it. */ + /* */ + /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */ + /* and define a callback function, respectively, in a similar way */ + /* as FT_BASE and FT_BASE_DEF work. */ /* */ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ /* contains pointers to callback functions. */ @@ -503,6 +554,16 @@ FT_BEGIN_HEADER #endif #endif /* FT_CALLBACK_DEF */ +#ifndef FT_BASE_CALLBACK +#ifdef __cplusplus +#define FT_BASE_CALLBACK( x ) extern "C" x +#define FT_BASE_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_BASE_CALLBACK( x ) extern x +#define FT_BASE_CALLBACK_DEF( x ) x +#endif +#endif /* FT_BASE_CALLBACK */ + #ifndef FT_CALLBACK_TABLE #ifdef __cplusplus #define FT_CALLBACK_TABLE extern "C" diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index 48a235b..8fdbeb0 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-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/unix/install.mk b/builds/unix/install.mk index fae486c..50325ca 100644 --- a/builds/unix/install.mk +++ b/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -30,6 +30,9 @@ # # We also remove `$(includedir)/ft2build.h' for the same reason. # +# Note that some header files get handled twice for simplicity; a special, +# configured version overwrites the generic one. +# install: $(PROJECT_LIBRARY) -$(DELDIR) $(DESTDIR)$(includedir)/freetype2 -$(DELETE) $(DESTDIR)$(includedir)/ft2build.h @@ -55,6 +58,8 @@ install: $(PROJECT_LIBRARY) $(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h $(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \ $(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h + $(INSTALL_DATA) $(OBJ_BUILD)/ftoption.h \ + $(DESTDIR)$(includedir)/freetype2/freetype/config/ftoption.h $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \ $(DESTDIR)$(bindir)/freetype-config $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \ diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in index a967cee..a06246d 100644 --- a/builds/unix/unix-cc.in +++ b/builds/unix/unix-cc.in @@ -2,7 +2,7 @@ # FreeType 2 template for Unix-specific compiler definitions # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -93,7 +93,8 @@ CC := $(LIBTOOL) --mode=compile $(CCraw) # Linker flags. # -LDFLAGS := @LDFLAGS@ +LDFLAGS := @LDFLAGS@ +LIB_CLOCK_GETTIME := @LIB_CLOCK_GETTIME@ # for ftbench # export symbols diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in index feae99b..059a061 100644 --- a/builds/unix/unix-def.in +++ b/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -43,6 +43,7 @@ DISTCLEAN += $(OBJ_BUILD)/config.cache \ $(OBJ_BUILD)/unix-def.mk \ $(OBJ_BUILD)/unix-cc.mk \ $(OBJ_BUILD)/ftconfig.h \ + $(OBJ_BUILD)/ftoption.h \ $(LIBTOOL) \ $(OBJ_BUILD)/Makefile @@ -62,6 +63,7 @@ version_info := @version_info@ # Variables needed for `freetype-config' and `freetype.pc'. # +PKG_CONFIG := @PKG_CONFIG@ REQUIRES_PRIVATE := @REQUIRES_PRIVATE@ LIBS_PRIVATE := @LIBS_PRIVATE@ LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@ @@ -102,6 +104,7 @@ NO_OUTPUT := 2> /dev/null $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in rm -f $@ $@.tmp sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \ + -e 's|%PKG_CONFIG%|$(PKG_CONFIG)|' \ -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \ -e 's|%exec_prefix%|$(exec_prefix)|' \ -e 's|%ft_version%|$(ft_version)|' \ diff --git a/builds/unix/unix-dev.mk b/builds/unix/unix-dev.mk index 92c0600..5a516ad 100644 --- a/builds/unix/unix-dev.mk +++ b/builds/unix/unix-dev.mk @@ -6,7 +6,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/unix/unix-lcc.mk b/builds/unix/unix-lcc.mk index 5122fde..73a02d4 100644 --- a/builds/unix/unix-lcc.mk +++ b/builds/unix/unix-lcc.mk @@ -6,7 +6,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/unix/unix.mk b/builds/unix/unix.mk index 14d5c0c..acd54d3 100644 --- a/builds/unix/unix.mk +++ b/builds/unix/unix.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/unix/unixddef.mk b/builds/unix/unixddef.mk index 30f2307..a8da63a 100644 --- a/builds/unix/unixddef.mk +++ b/builds/unix/unixddef.mk @@ -4,7 +4,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/vms/ftconfig.h b/builds/vms/ftconfig.h index f8ac2ec..fa4aa11 100644 --- a/builds/vms/ftconfig.h +++ b/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* VMS-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 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 @@ /* */ /*************************************************************************/ + #ifndef FTCONFIG_H_ #define FTCONFIG_H_ @@ -209,12 +210,12 @@ FT_BEGIN_HEADER #endif -#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT) +#if FT_SIZEOF_INT == 4 typedef signed int FT_Int32; typedef unsigned int FT_UInt32; -#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT) +#elif FT_SIZEOF_LONG == 4 typedef signed long FT_Int32; typedef unsigned long FT_UInt32; @@ -225,12 +226,12 @@ FT_BEGIN_HEADER /* look up an integer type that is at least 32 bits */ -#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT) +#if FT_SIZEOF_INT >= 4 typedef int FT_Fast; typedef unsigned int FT_UFast; -#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT) +#elif FT_SIZEOF_LONG >= 4 typedef long FT_Fast; typedef unsigned long FT_UFast; @@ -238,15 +239,25 @@ FT_BEGIN_HEADER #endif - /* determine whether we have a 64-bit int type for platforms without */ - /* Autoconf */ -#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) + /* determine whether we have a 64-bit int type */ + /* (mostly for environments without `autoconf') */ +#if FT_SIZEOF_LONG == 8 /* FT_LONG64 must be defined if a 64-bit type is available */ #define FT_LONG64 #define FT_INT64 long #define FT_UINT64 unsigned long + /* we handle the LLP64 scheme separately for GCC and clang, */ + /* suppressing the `long long' warning */ +#elif ( FT_SIZEOF_LONG == 4 ) && \ + defined( HAVE_LONG_LONG_INT ) && \ + defined( __GNUC__ ) +#pragma GCC diagnostic ignored "-Wlong-long" +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + /*************************************************************************/ /* */ /* A 64-bit data type may create compilation problems if you compile */ @@ -298,7 +309,7 @@ FT_BEGIN_HEADER #endif /* __STDC_VERSION__ >= 199901L */ -#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ +#endif /* FT_SIZEOF_LONG == 8 */ #ifdef FT_LONG64 typedef FT_INT64 FT_Int64; @@ -338,6 +349,14 @@ FT_BEGIN_HEADER #endif + /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */ + /* a function that gets used only within the scope of a module. */ + /* Normally, both the header and source code files for such a */ + /* function are within a single module directory. */ + /* */ + /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */ + /* FT_LOCAL_ARRAY_DEF. */ + /* */ #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x @@ -359,6 +378,12 @@ FT_BEGIN_HEADER #define FT_LOCAL_ARRAY_DEF( x ) const x + /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */ + /* functions that are used in more than a single module. In the */ + /* current setup this implies that the declaration is in a header */ + /* file in the `include/freetype/internal' directory, and the */ + /* function body is in a file in `src/base'. */ + /* */ #ifndef FT_BASE #ifdef __cplusplus @@ -381,6 +406,37 @@ FT_BEGIN_HEADER #endif /* !FT_BASE_DEF */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special attribute in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. */ + /* */ + /* To export a variable, use FT_EXPORT_VAR. */ + /* */ #ifndef FT_EXPORT #ifdef __cplusplus @@ -424,7 +480,13 @@ FT_BEGIN_HEADER /* functions which are accessed by (global) function pointers. */ /* */ /* */ - /* FT_CALLBACK_DEF is used to _define_ a callback function. */ + /* FT_CALLBACK_DEF is used to _define_ a callback function, */ + /* located in the same source code file as the structure that uses */ + /* it. */ + /* */ + /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */ + /* and define a callback function, respectively, in a similar way */ + /* as FT_BASE and FT_BASE_DEF work. */ /* */ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ /* contains pointers to callback functions. */ @@ -444,6 +506,16 @@ FT_BEGIN_HEADER #endif #endif /* FT_CALLBACK_DEF */ +#ifndef FT_BASE_CALLBACK +#ifdef __cplusplus +#define FT_BASE_CALLBACK( x ) extern "C" x +#define FT_BASE_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_BASE_CALLBACK( x ) extern x +#define FT_BASE_CALLBACK_DEF( x ) x +#endif +#endif /* FT_BASE_CALLBACK */ + #ifndef FT_CALLBACK_TABLE #ifdef __cplusplus #define FT_CALLBACK_TABLE extern "C" diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c index d83e8ec..7d79f9a 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-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/wince/ftdebug.c b/builds/wince/ftdebug.c index 7a20e2f..83c5f44 100644 --- a/builds/wince/ftdebug.c +++ b/builds/wince/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for WinCE (body). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -79,7 +79,7 @@ va_start( ap, fmt ); - vprintf( fmt, ap ); + vfprintf( stderr, fmt, ap ); /* send the string to the debugger as well */ vsprintf( buf, fmt, ap ); OutputDebugStringEx( buf ); diff --git a/builds/wince/vc2005-ce/freetype.vcproj b/builds/wince/vc2005-ce/freetype.vcproj index a1c0e37..215028a 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 @@ - + diff --git a/builds/wince/vc2005-ce/index.html b/builds/wince/vc2005-ce/index.html index fcb52bc..2672415 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.8 sources:

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

      -    freetype28.lib     - release build; single threaded
      -    freetype28_D.lib   - debug build;   single threaded
      -    freetype28MT.lib   - release build; multi-threaded
      -    freetype28MT_D.lib - debug build;   multi-threaded
      + freetype29.lib - release build; single threaded + freetype29_D.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MT_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 273aa53..9be8588 100644 --- a/builds/wince/vc2008-ce/freetype.vcproj +++ b/builds/wince/vc2008-ce/freetype.vcproj @@ -88,7 +88,7 @@ /> PPC/SP WM6 (Windows Mobile 6) -It compiles the following libraries from the FreeType 2.8 sources:

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

      -    freetype28.lib     - release build; single threaded
      -    freetype28_D.lib   - debug build;   single threaded
      -    freetype28MT.lib   - release build; multi-threaded
      -    freetype28MT_D.lib - debug build;   multi-threaded
      + freetype29.lib - release build; single threaded + freetype29_D.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MT_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/detect.mk b/builds/windows/detect.mk index 350d156..b047e02 100644 --- a/builds/windows/detect.mk +++ b/builds/windows/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -77,7 +77,7 @@ ifeq ($(PLATFORM),windows) # So we need to hack. # # Kudos to Eli Zaretskii (DJGPP guru) that helped debug it. - # Details are available in threads of the freetype mailing list + # Details are available in threads of the FreeType mailing list # (2004-11-11), and then in the devel mailing list (2004-11-20 to -23). # ifeq ($(OS),Windows_NT) diff --git a/builds/windows/ftdebug.c b/builds/windows/ftdebug.c index cadfcea..ec70a0e 100644 --- a/builds/windows/ftdebug.c +++ b/builds/windows/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for Win32 (body). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -65,7 +65,7 @@ va_start( ap, fmt ); - vprintf( fmt, ap ); + vfprintf( stderr, fmt, ap ); /* send the string to the debugger as well */ vsprintf( buf, fmt, ap ); OutputDebugStringA( buf ); diff --git a/builds/windows/ftver.rc b/builds/windows/ftver.rc new file mode 100644 index 0000000..1093109 --- /dev/null +++ b/builds/windows/ftver.rc @@ -0,0 +1,43 @@ +#include + +#define FT_VERSION 2,9,0,0 +#define FT_VERSION_STR "2.9.0" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION FT_VERSION +PRODUCTVERSION FT_VERSION +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#endif +#ifdef _DLL +FILETYPE VFT_DLL +#define FT_FILENAME "freetype.dll" +#else +FILETYPE VFT_STATIC_LIB +#define FT_FILENAME "freetype.lib" +#endif +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "The FreeType Project" + VALUE "FileDescription", "Font Rendering Library" + VALUE "FileVersion", FT_VERSION_STR + VALUE "ProductName", "FreeType" + VALUE "ProductVersion", FT_VERSION_STR + VALUE "LegalCopyright", "© 2017 The FreeType Project www.freetype.org. All rights reserved." + VALUE "InternalName", "freetype" + VALUE "OriginalFilename", FT_FILENAME + END + END + + BLOCK "VarFileInfo" + BEGIN + /* The following line should only be modified for localized versions. */ + /* It consists of any number of WORD,WORD pairs, with each pair */ + /* describing a "language,codepage" combination supported by the file. */ + VALUE "Translation", 0x409, 1252 + END +END diff --git a/builds/windows/vc2005/freetype.vcproj b/builds/windows/vc2005/freetype.vcproj index e5e67d5..386d79d 100644 --- a/builds/windows/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 @@ - + @@ -344,8 +344,12 @@ + + + + diff --git a/builds/windows/vc2005/index.html b/builds/windows/vc2005/index.html index 4bd9b75..a25e674 100644 --- a/builds/windows/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.8 sources:

    +compiles the following libraries from the FreeType 2.9 sources:

      -    freetype28.lib     - release build; single threaded
      -    freetype28_D.lib   - debug build;   single threaded
      -    freetype28MT.lib   - release build; multi-threaded
      -    freetype28MT_D.lib - debug build;   multi-threaded
      + freetype29.lib - release build; single threaded + freetype29_D.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MT_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/vc2008/freetype.vcproj b/builds/windows/vc2008/freetype.vcproj index a8bc672..f2d1fe7 100644 --- a/builds/windows/vc2008/freetype.vcproj +++ b/builds/windows/vc2008/freetype.vcproj @@ -70,7 +70,7 @@ /> + + + + diff --git a/builds/windows/vc2008/index.html b/builds/windows/vc2008/index.html index fa5909d..e0fdf2d 100644 --- a/builds/windows/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.8 sources:

    +compiles the following libraries from the FreeType 2.9 sources:

      -    freetype28.lib     - release build; single threaded
      -    freetype28_D.lib   - debug build;   single threaded
      -    freetype28MT.lib   - release build; multi-threaded
      -    freetype28MT_D.lib - debug build;   multi-threaded
      + freetype29.lib - release build; single threaded + freetype29_D.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MT_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/vc2010/freetype.vcxproj b/builds/windows/vc2010/freetype.vcxproj index e4f11fc..8eb5b9a 100644 --- a/builds/windows/vc2010/freetype.vcxproj +++ b/builds/windows/vc2010/freetype.vcxproj @@ -9,20 +9,12 @@ Debug x64 - - Debug Multithreaded + + Debug Static Win32 - - Debug Multithreaded - x64 - - - Debug Singlethreaded - Win32 - - - Debug Singlethreaded + + Debug Static x64 @@ -33,183 +25,103 @@ Release x64 - - Release Multithreaded + + Release Static Win32 - - Release Multithreaded - x64 - - - Release Singlethreaded - Win32 - - - Release Singlethreaded + + Release Static x64 + + + + 4.0 + + + + v100 + + + + v120 + + + + v140 + + + + v141 + + - {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} + {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} + FreeType - StaticLibrary + DynamicLibrary false - MultiByte - v100 + Unicode - StaticLibrary - false - MultiByte - v100 - - - StaticLibrary + DynamicLibrary false - MultiByte - v100 + Unicode - + StaticLibrary false - MultiByte - v100 + Unicode - + StaticLibrary false - MultiByte - v100 - - - StaticLibrary - false - MultiByte - v100 + Unicode - StaticLibrary + DynamicLibrary false - MultiByte - v100 + Unicode - StaticLibrary + DynamicLibrary false - MultiByte - v100 + Unicode - + StaticLibrary false - MultiByte - v100 + Unicode - + StaticLibrary false - MultiByte - v100 - - - StaticLibrary - false - MultiByte - v100 - - - StaticLibrary - false - MultiByte - v100 + Unicode - <_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 - - - - - freetype28d - freetype28d - freetype28MTd - freetype28MTd - freetype28STd - freetype28STd - freetype28 - freetype28 - freetype28MT - freetype28MT - freetype28ST - freetype28ST + ..\..\..\objs\$(Platform)\$(Configuration)\ + ..\..\..\objs\$(Platform)\$(Configuration)\ + AllRules.ruleset + + + freetype 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) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true @@ -223,7 +135,7 @@ Disabled - _DEBUG;$(UserDefines);%(PreprocessorDefinitions) + _DEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) 0x0409 @@ -237,7 +149,7 @@ 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) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true @@ -251,7 +163,7 @@ Disabled - _DEBUG;$(UserDefines);%(PreprocessorDefinitions) + _DEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) 0x0409 @@ -261,13 +173,11 @@ $(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 + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug true @@ -291,69 +201,11 @@ $(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) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug true @@ -379,10 +231,10 @@ - Full + MaxSpeed AnySuitable $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -406,7 +258,7 @@ true - NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + NDEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) 0x0409 @@ -419,10 +271,10 @@ - Full + MaxSpeed AnySuitable $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -446,7 +298,7 @@ true - NDEBUG;$(UserDefines);%(PreprocessorDefinitions) + NDEBUG;_DLL;$(UserDefines);%(PreprocessorDefinitions) 0x0409 @@ -457,12 +309,12 @@ $(UserDependencies);%(AdditionalDependencies) - + - Full + MaxSpeed AnySuitable $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) true MultiThreaded true @@ -498,12 +350,12 @@ $(UserDependencies);%(AdditionalDependencies) - + - Full + MaxSpeed AnySuitable $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions) true MultiThreaded true @@ -539,1180 +391,56 @@ $(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) + + + + + + + + + + + + + + + + + + + + false - - - - - - - - + - \ No newline at end of file + + + + diff --git a/builds/windows/vc2010/freetype.vcxproj.filters b/builds/windows/vc2010/freetype.vcxproj.filters index 0e947f4..0be176b 100644 --- a/builds/windows/vc2010/freetype.vcxproj.filters +++ b/builds/windows/vc2010/freetype.vcxproj.filters @@ -17,118 +17,124 @@ Source Files - + Source Files - + Source Files - + Source Files - + Source Files Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + + Source Files + + + Source Files + + Source Files Source Files - - Source Files\FT_MODULES + + Source Files - - Source Files\FT_MODULES + + Source Files - - Source Files\FT_MODULES + + Source Files - - Source Files\FT_MODULES + + Source Files - - Source Files\FT_MODULES + + Source Files - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES - + Source Files\FT_MODULES diff --git a/builds/windows/vc2010/index.html b/builds/windows/vc2010/index.html index c2b5800..7433ce8 100644 --- a/builds/windows/vc2010/index.html +++ b/builds/windows/vc2010/index.html @@ -12,16 +12,16 @@

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

    +FreeType 2.9 sources:

      -    freetype28.lib    - release build
      -    freetype28d.lib   - debug build
      -    freetype28ST.lib  - release build; single threaded
      -    freetype28STd.lib - debug build;   single threaded
      -    freetype28MT.lib  - release build; multi-threaded
      -    freetype28MTd.lib - debug build;   multi-threaded
      + freetype29.lib - release build + freetype29d.lib - debug build + freetype29ST.lib - release build; single threaded + freetype29STd.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MTd.lib - debug build; multi-threaded

    Both Win32 and x64 builds are supported.

    diff --git a/builds/windows/visualc/freetype.dsp b/builds/windows/visualc/freetype.dsp index fc14b48..76d6e91 100644 --- a/builds/windows/visualc/freetype.dsp +++ b/builds/windows/visualc/freetype.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29.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\freetype28_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype28_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT_D.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype29_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29MT_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype28.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype29.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29MT.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\freetype28.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype28ST.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype29.lib" +# ADD LIB32 /out:"..\..\..\objs\freetype29ST.lib" # SUBTRACT LIB32 /nologo !ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded" @@ -177,8 +177,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype29_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29ST_D.lib" !ENDIF @@ -226,10 +226,22 @@ SOURCE=..\..\..\src\base\ftbitmap.c # End Source File # Begin Source File +SOURCE=..\..\..\src\base\ftcid.c +# End Source File +# Begin Source File + SOURCE=..\..\..\src\base\ftfntfmt.c # End Source File # Begin Source File +SOURCE=..\..\..\src\base\ftlcdfil.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\base\ftpatent.c +# End Source File +# Begin Source File + SOURCE=..\..\..\src\base\ftfstype.c # End Source File # Begin Source File diff --git a/builds/windows/visualc/freetype.vcproj b/builds/windows/visualc/freetype.vcproj index 968f2ee..6c0b761 100644 --- a/builds/windows/visualc/freetype.vcproj +++ b/builds/windows/visualc/freetype.vcproj @@ -69,7 +69,7 @@ /> + + + + diff --git a/builds/windows/visualc/index.html b/builds/windows/visualc/index.html index e2f868c..32cebc6 100644 --- a/builds/windows/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.8 sources:

    +compiles the following libraries from the FreeType 2.9 sources:

      -    freetype28.lib     - release build; single threaded
      -    freetype28_D.lib   - debug build;   single threaded
      -    freetype28MT.lib   - release build; multi-threaded
      -    freetype28MT_D.lib - debug build;   multi-threaded
      + freetype29.lib - release build; single threaded + freetype29_D.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MT_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/visualce/freetype.dsp b/builds/windows/visualce/freetype.dsp index fc14b48..19d7c45 100644 --- a/builds/windows/visualce/freetype.dsp +++ b/builds/windows/visualce/freetype.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29.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\freetype28_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype28_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT_D.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype29_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29MT_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype28.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype29.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29MT.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\freetype28.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype28ST.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype29.lib" +# ADD LIB32 /out:"..\..\..\objs\freetype29ST.lib" # SUBTRACT LIB32 /nologo !ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded" @@ -177,8 +177,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype29_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype29ST_D.lib" !ENDIF @@ -226,6 +226,10 @@ SOURCE=..\..\..\src\base\ftbitmap.c # End Source File # Begin Source File +SOURCE=..\..\..\src\base\ftcid.c +# End Source File +# Begin Source File + SOURCE=..\..\..\src\base\ftfntfmt.c # End Source File # Begin Source File @@ -267,6 +271,10 @@ SOURCE=..\..\..\src\base\ftinit.c # End Source File # Begin Source File +SOURCE=..\..\..\src\base\ftlcdfil.c +# End Source File +# Begin Source File + SOURCE=..\..\..\src\lzw\ftlzw.c # End Source File # Begin Source File @@ -280,6 +288,10 @@ SOURCE=..\..\..\src\base\ftotval.c # End Source File # Begin Source File +SOURCE=..\..\..\src\base\ftpatent.c +# End Source File +# Begin Source File + SOURCE=..\..\..\src\base\ftpfr.c # End Source File # Begin Source File diff --git a/builds/windows/visualce/freetype.vcproj b/builds/windows/visualce/freetype.vcproj index f28b3c1..d08cd8e 100644 --- a/builds/windows/visualce/freetype.vcproj +++ b/builds/windows/visualce/freetype.vcproj @@ -87,7 +87,7 @@ /> + + + + diff --git a/builds/windows/visualce/index.html b/builds/windows/visualce/index.html index 06107ae..3b3390a 100644 --- a/builds/windows/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.8 sources:

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

      -    freetype28.lib     - release build; single threaded
      -    freetype28_D.lib   - debug build;   single threaded
      -    freetype28MT.lib   - release build; multi-threaded
      -    freetype28MT_D.lib - debug build;   multi-threaded
      + freetype29.lib - release build; single threaded + freetype29_D.lib - debug build; single threaded + freetype29MT.lib - release build; multi-threaded + freetype29MT_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/w32-bcc.mk b/builds/windows/w32-bcc.mk index d8d33b1..01aab1c 100644 --- a/builds/windows/w32-bcc.mk +++ b/builds/windows/w32-bcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-bccd.mk b/builds/windows/w32-bccd.mk index ea634e5..2c14d6c 100644 --- a/builds/windows/w32-bccd.mk +++ b/builds/windows/w32-bccd.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-dev.mk b/builds/windows/w32-dev.mk index c9b96e9..279d5f9 100644 --- a/builds/windows/w32-dev.mk +++ b/builds/windows/w32-dev.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-gcc.mk b/builds/windows/w32-gcc.mk index 27a0a8f..9e3476b 100644 --- a/builds/windows/w32-gcc.mk +++ b/builds/windows/w32-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-icc.mk b/builds/windows/w32-icc.mk index c4f3dbf..e695c12 100644 --- a/builds/windows/w32-icc.mk +++ b/builds/windows/w32-icc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-intl.mk b/builds/windows/w32-intl.mk index 4442bd3..1e36662 100644 --- a/builds/windows/w32-intl.mk +++ b/builds/windows/w32-intl.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-lcc.mk b/builds/windows/w32-lcc.mk index 0508fbb..5729d36 100644 --- a/builds/windows/w32-lcc.mk +++ b/builds/windows/w32-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-mingw32.mk b/builds/windows/w32-mingw32.mk index ae40823..b3a210d 100644 --- a/builds/windows/w32-mingw32.mk +++ b/builds/windows/w32-mingw32.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-vcc.mk b/builds/windows/w32-vcc.mk index 922fc60..342c8aa 100644 --- a/builds/windows/w32-vcc.mk +++ b/builds/windows/w32-vcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/w32-wat.mk b/builds/windows/w32-wat.mk index 4d6138e..37ecc88 100644 --- a/builds/windows/w32-wat.mk +++ b/builds/windows/w32-wat.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/builds/windows/win32-def.mk b/builds/windows/win32-def.mk index c9bebdb..f83d444 100644 --- a/builds/windows/win32-def.mk +++ b/builds/windows/win32-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2017 by +# Copyright 1996-2018 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/configure b/configure index 68dbd99..8ee0d40 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2002-2017 by +# Copyright 2002-2018 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/devel/ft2build.h b/devel/ft2build.h index c805cf9..1d17141 100644 --- a/devel/ft2build.h +++ b/devel/ft2build.h @@ -4,7 +4,7 @@ /* */ /* FreeType 2 build and setup macros (development version). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/devel/ftoption.h b/devel/ftoption.h index db661e7..1b4619e 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2017 by */ +/* Copyright 1996-2018 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -107,22 +107,19 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* Uncomment the line below if you want to activate sub-pixel rendering */ - /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ + /* Uncomment the line below if you want to activate LCD rendering */ + /* technology similar to ClearType in this build of the library. This */ + /* technology triples the resolution in the direction color subpixels. */ + /* To mitigate color fringes inherent to this technology, you also need */ + /* to explicitly set up LCD filtering. */ /* */ /* Note that this feature is covered by several Microsoft patents */ /* and should not be activated in any default build of the library. */ + /* When this macro is not defined, FreeType offers alternative LCD */ + /* rendering technology that produces excellent output without LCD */ + /* filtering. */ /* */ - /* This macro has no impact on the FreeType API, only on its */ - /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ - /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ - /* the original size in case this macro isn't defined; however, each */ - /* triplet of subpixels has R=G=B. */ - /* */ - /* This is done to allow FreeType clients to run unmodified, forcing */ - /* them to display normal gray-level anti-aliased glyphs. */ - /* */ -#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING +/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ /*************************************************************************/ @@ -273,48 +270,6 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* DLL export compilation */ - /* */ - /* When compiling FreeType as a DLL, some systems/compilers need a */ - /* special keyword in front OR after the return type of function */ - /* declarations. */ - /* */ - /* Two macros are used within the FreeType source code to define */ - /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ - /* */ - /* FT_EXPORT( return_type ) */ - /* */ - /* is used in a function declaration, as in */ - /* */ - /* FT_EXPORT( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ); */ - /* */ - /* */ - /* FT_EXPORT_DEF( return_type ) */ - /* */ - /* is used in a function definition, as in */ - /* */ - /* FT_EXPORT_DEF( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ) */ - /* { */ - /* ... some code ... */ - /* return FT_Err_Ok; */ - /* } */ - /* */ - /* You can provide your own implementation of FT_EXPORT and */ - /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ - /* will be later automatically defined as `extern return_type' to */ - /* allow normal compilation. */ - /* */ - /* Do not #undef these macros here since the build system might define */ - /* them for certain configurations only. */ - /* */ -/* #define FT_EXPORT(x) extern x */ -/* #define FT_EXPORT_DEF(x) x */ - - - /*************************************************************************/ - /* */ /* Glyph Postscript Names handling */ /* */ /* By default, FreeType 2 is compiled with the `psnames' module. This */ @@ -327,7 +282,7 @@ FT_BEGIN_HEADER /* */ /* - The TrueType driver will provide its own set of glyph names, */ /* if you build it to support postscript names in the TrueType */ - /* `post' table. */ + /* `post' table, but will not synthesize a missing Unicode charmap. */ /* */ /* - The Type 1 driver will not be able to synthesize a Unicode */ /* charmap out of the glyphs found in the fonts. */ @@ -672,7 +627,7 @@ FT_BEGIN_HEADER /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ /* */ - /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ + /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ /* */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ @@ -692,7 +647,7 @@ FT_BEGIN_HEADER /* composite flags array which can be used to disambiguate, but old */ /* fonts will not have them. */ /* */ - /* http://www.microsoft.com/typography/otspec/glyf.htm */ + /* https://www.microsoft.com/typography/otspec/glyf.htm */ /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ /* */ #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED @@ -790,6 +745,16 @@ FT_BEGIN_HEADER /*************************************************************************/ + /* */ + /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */ + /* engine gets compiled into FreeType. If defined, it is possible to */ + /* switch between the two engines using the `hinting-engine' property of */ + /* the type1 driver module. */ + /* */ +#define T1_CONFIG_OPTION_OLD_ENGINE + + + /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** C F F D R I V E R C O N F I G U R A T I O N ****/ diff --git a/docs/CHANGES b/docs/CHANGES index 3ee9510..9901e10 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,4 +1,176 @@ +CHANGES BETWEEN 2.8.1 and 2.9 + + I. IMPORTANT BUG FIXES + + - Advance width values of variation fonts were often wrong. + + - More fixes for variation font support; you should update to this + version if you want to support them. + + + II. IMPORTANT CHANGES + + - As a GSoC project, Ewald Hew extended the new (Adobe) CFF engine + to handle Type 1 fonts also, thus greatly improving the + rendering of this format. This is the new default. The old + engine is still available if the configuration macro + `T1_CONFIG_OPTION_OLD_ENGINE' gets defined; using the + `hinting-engine' property of the `type1' driver module you can + then switch between the two engines. + + - A new function, `FT_Set_Named_Instance', can be used to set or + change the current named instance. + + - Starting with this FreeType version, resetting variation + coordinates will return to the currently selected named + instance. Previously, FreeType returned to the base font (i.e., + no instance set). + + + III. MISCELLANEOUS + + - The `face_flags' field of the `FT_Face' structure has a new bit, + `FT_FACE_FLAG_VARIATION', which is set if a variation font has + been altered with `FT_Set_MM_Design_Coordinates', + `FT_Set_Var_Design_Coordinates', or + `FT_Set_Var_Blend_Coordinates'. + + - If the current face is a named instance, the new macro + `FT_IS_NAMED_INSTANCE' returns true. + + - `FT_IS_VARIATION' is a new macro that returns true whenever a + face object has been altered by `FT_Set_MM_Design_Coordinates', + `FT_Set_Var_Design_Coordinates', or + `FT_Set_Var_Blend_Coordinates'. + + - Changing the design coordinates of a variation font with + `FT_Set_Var_Design_Coordinates' or + `FT_Set_Var_Blend_Coordinates' does not influence the named + instance index value (only `FT_Set_Named_Instance' does that). + + - Special PostScript names for named instances are only returned + if the named instance is set with `FT_Set_Named_Instance' (and + the font has corresponding entries in its `fvar' table). If + `FT_IS_VARIATION' returns true, the algorithmically derived + PostScript name is provided, not looking up special entries for + named instances. + + - A new function `FT_Done_MM_Var' is provided to free the memory + returned in a call to `FT_Get_MM_Var'. + + - On platforms using the `configure' script, the installed + `ftoption.h' file now correctly reflects configuration options + like `--with-harfbuzz'. + + - Better support to build FreeType as a DLL on Windows using + Visual C. + + - All data specific to driver modules is now collected in a single + file, `FT_DRIVER_H'. Consequently, the macros + `FT_AUTOHINTER_H', `FT_CFF_DRIVER_H', `FT_TRUETYPE_DRIVER_H', + and `FT_PCF_DRIVER_H' still work but are deprecated. + + - Some fuzzer fixes to better reject malformed fonts. + + - The `ftbench' demo program has a new test for opening a new face + and loading some glyphs. + + - The `ftbench' demo program has a new option `-j' to specify the + last glyph index to be used in the tests. + + - The `ftgrid' demo program has a new option `-n' to suppress + display of named instances of variation fonts. + + - The `ttdebug' demo program can now show a stack trace (key `K') + and switch between hexadecimal and decimal display of integers + (key `I'). + +====================================================================== + +CHANGES BETWEEN 2.8 and 2.8.1 + + I. IMPORTANT BUG FIXES + + - B/W hinting of TrueType fonts didn't work properly if + interpreter version 38 or 40 was selected. + + - Some severe problems within the handling of TrueType Variation + Fonts were found and fixed. + + - Function `FT_Set_Var_Design_Coordinates' didn't correctly handle + the case with less input coordinates than axes. + + + II. IMPORTANT CHANGES + + - By default, FreeType now offers high quality LCD-optimized + output without resorting to ClearType techniques of resolution + tripling and filtering. In this method, called Harmony, each + color channel is generated separately after shifting the glyph + outline, capitalizing on the fact that the color grids on LCD + panels are shifted by a third of a pixel. This output is + indistinguishable from ClearType with a light 3-tap filter. + + + III. MISCELLANEOUS + + - Using the new function `FT_Get_Var_Axis_Flags', an application + can access the `flags' field of a variation axis (introduced in + OpenType version 1.8.2) + + - More sanity checks. + + - The internal representation of buffers for LCD rendering has + changed (to be more precise, the amount of padding gets computed + differently). Applications that use the FreeType API are not + affected. + + - To reset all design axis values of a variation font to its + default values you can now say + + error = FT_Set_Var_Design_Coordinates( face, 0, NULL ); + + This also works with functions `FT_Set_MM_Design_Coordinates' + and `FT_Set_MM_Blend_Coordinates'. + + - FreeType now synthesizes a missing Unicode cmap for (older) + TrueType fonts also if glyph names are available. + + - FreeType has improved handling of BDF fonts without the + `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties; the + library now uses the values of the `SIZE' keyword if they are + missing. Previously, `SIZE' was completely ignored, and + FreeType used heuristic values instead. + + - Multiple calls to `FT_Bitmap_Convert' do work now as advertised. + Previously, they failed with an assertion error if there was an + empty bitmap between non-empty ones. + + - The warping option has moved from `light' to `normal' hinting + where it replaces the original hinting algorithm. The `light' + mode is now always void of any hinting in x-direction. + + - 16bit compiler support is now officially ended. We didn't + provide any maintenance since many years, and given that there + were no error or problem reports either it seems that it is no + longer needed. + + - The `ftgrid' demo program can now toggle the display of grid + lines with the `G' key. + + - The `ftgrid' demo program can toggle a different set of colors + (suitable to color-blind people) with the `C' key. + + - The `ftgrid' demo program now supports the `-e' command line + option to select a cmap. + + - The `ftdump' demo program has a new command line option `-t' to + output the SFNT table list. + + +====================================================================== + CHANGES BETWEEN 2.7.1 and 2.8 I. IMPORTANT CHANGES @@ -44,6 +216,20 @@ CHANGES BETWEEN 2.7.1 and 2.8 configuration option. However, it is strongly recommended to avoid that, adjusting font sizes instead. + - Global size metrics values in the `FT_Size_Metrics' structure + can be different for TrueType fonts. Reason is that in older + FreeType versions the metrics were rounded differently to + integer pixels compared to all other font formats, yielding an + inconsistent behaviour if you used non-native hinting. Starting + with this version, global size metrics for TrueType fonts are + handled the same as other font formats: `ascender' gets rounded + up, `descender' gets rounded down, `height' gets normally + rounded, and `max_advance' gets normally rounded, too. + + If you need more precise values of (global) ascender, descender, + height, or `max_advance', please take the corresponding values + from the `FT_Face' structure and scale them manually. + - If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType now scales the font linearly again (bug introduced in version 2.4.6). @@ -129,7 +315,7 @@ CHANGES BETWEEN 2.7 and 2.7.1 write caused by a heap-based buffer overflow related to the CFF fonts. - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328 III. MISCELLANEOUS @@ -644,7 +830,7 @@ 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 + (cf. https://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 @@ -715,7 +901,7 @@ 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). + new CFF driver (cf. https://savannah.nongnu.org/bugs/?41697). All users should upgrade. - More bug fixes related to correct positioning of composite @@ -748,7 +934,7 @@ CHANGES BETWEEN 2.5.2 and 2.5.3 and install FreeType again. With FreeType's `configure' script the procedure boils down to - configure, build, and install Freetype, then configure, compile, + configure, build, and install FreeType, then configure, compile, and install HarfBuzz, then configure, compile, and install FreeType again (after executing `make distclean'). @@ -1087,7 +1273,7 @@ CHANGES BETWEEN 2.4.10 and 2.4.11 - Subpixel hinting support has been contributed by Infinality, based on Greg Hitchcock's whitepaper at - http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx + https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx Originally, it was a separate patch available from @@ -1957,7 +2143,7 @@ CHANGES BETWEEN 2.3.0 and 2.2.1 of the library, mainly due to patent issues. For more information see: - http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html + https://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html A new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has been introduced in `ftoption.h'; manually define it in this @@ -2060,7 +2246,7 @@ CHANGES BETWEEN 2.2 and 2.1.10 We provide patches for most of those rogue clients. See the following page for more information: - http://www.freetype.org/freetype2/patches/rogue-patches.html + https://www.freetype.org/freetype2/patches/rogue-patches.html Note that, as a convenience to our Unix desktop users, version 2.2 is *binary* compatible with FreeType 2.1.7, which means that @@ -2172,7 +2358,7 @@ CHANGES BETWEEN 2.2 and 2.1.10 - Rudimentary support for Adobe's new `SING Glyphlet' format. See - http://www.adobe.com/products/indesign/sing_gaiji.html + https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf for more information. @@ -2849,7 +3035,7 @@ CHANGES BETWEEN 2.1.3 and 2.1.2 quality since many nasty defaults have been suppressed. Please visit the web page: - http://www.freetype.org/hinting/smooth-hinting.html + https://www.freetype.org/hinting/smooth-hinting.html for additional details on this topic. @@ -3108,7 +3294,7 @@ CHANGES BETWEEN 2.1.0 and 2.0.9 - The FreeType 2 redesign has begun. More information can be found at this URL: - http://www.freetype.org/freetype2/redesign.html + https://www.freetype.org/freetype2/redesign.html The following internal changes have been performed within the sources of this release: @@ -3699,13 +3885,7 @@ CHANGES BETWEEN 2.0.2 and 2.0.1 For more information, see section I of the following document: - http://www.freetype.org/ - freetype2/docs/tutorial/step1.html - - or - - http://freetype.sourceforge.net/ - freetype2/docs/tutorial/step1.html + https://www.freetype.org/freetype2/docs/tutorial/step1.html - Many, many comments have been added to the public source file in order to automatically generate the API Reference through the @@ -3714,7 +3894,7 @@ CHANGES BETWEEN 2.0.2 and 2.0.1 The latter has been updated to support the grouping of sections in chapters and better index sort. See: - http://www.freetype.org/freetype2/docs/reference/ft2-toc.html + https://www.freetype.org/freetype2/docs/reference/ft2-toc.html III. CHANGES TO THE BUILD PROCESS @@ -4789,7 +4969,7 @@ Extensions support: ------------------------------------------------------------------------ -Copyright 2000-2017 by +Copyright 2000-2018 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/CUSTOMIZE b/docs/CUSTOMIZE index 6d1587e..916be32 100644 --- a/docs/CUSTOMIZE +++ b/docs/CUSTOMIZE @@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers ---------------------------------------------------------------------- -Copyright 2003-2017 by +Copyright 2003-2018 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 e5e9390..751eaf0 100644 --- a/docs/DEBUG +++ b/docs/DEBUG @@ -191,7 +191,7 @@ behaviour of FreeType at runtime. ------------------------------------------------------------------------ -Copyright 2002-2017 by +Copyright 2002-2018 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/FTL.TXT b/docs/FTL.TXT index 433ab06..c406d15 100644 --- a/docs/FTL.TXT +++ b/docs/FTL.TXT @@ -163,7 +163,7 @@ Legal Terms Our home page can be found at - http://www.freetype.org + https://www.freetype.org --- end of FTL.TXT --- diff --git a/docs/INSTALL b/docs/INSTALL index d6ec0d8..fc24ea1 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -77,7 +77,7 @@ II. Custom builds of the library ---------------------------------------------------------------------- -Copyright 2000-2017 by +Copyright 2000-2018 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 30b9578..47d080f 100644 --- a/docs/INSTALL.ANY +++ b/docs/INSTALL.ANY @@ -143,7 +143,7 @@ II. Support for flat-directory compilation ---------------------------------------------------------------------- -Copyright 2003-2017 by +Copyright 2003-2018 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 1a837ae..e8977a1 100644 --- a/docs/INSTALL.CROSS +++ b/docs/INSTALL.CROSS @@ -163,7 +163,7 @@ procedure. ---------------------------------------------------------------------- -Copyright 2006-2017 by +Copyright 2006-2018 by suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg. diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU index 79b53d8..52645f1 100644 --- a/docs/INSTALL.GNU +++ b/docs/INSTALL.GNU @@ -148,7 +148,7 @@ instructions in the file `INSTALL.UNIX' instead. ---------------------------------------------------------------------- -Copyright 2003-2017 by +Copyright 2003-2018 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 8b620da..bb57836 100644 --- a/docs/INSTALL.UNIX +++ b/docs/INSTALL.UNIX @@ -105,7 +105,7 @@ or MSys on Win32: ---------------------------------------------------------------------- -Copyright 2003-2017 by +Copyright 2003-2018 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.VMS b/docs/INSTALL.VMS index 7a5174d..c1d30e0 100644 --- a/docs/INSTALL.VMS +++ b/docs/INSTALL.VMS @@ -1,7 +1,7 @@ -How to build the freetype2 library on VMS +How to build the FreeType 2 library on VMS ----------------------------------------- -It is actually very straightforward to install the Freetype2 library. +It is actually very straightforward to install the FreeType 2 library. Just execute vms_make.com from the toplevel directory to build the library. This procedure currently accepts the following options: @@ -15,10 +15,10 @@ ccopt= Options to pass to the C compiler e.g. ccopt=/float=ieee In case you did download the demos, place them in a separate directory -sharing the same toplevel as the directory of Freetype2 and follow the -same instructions as above for the demos from there. The build -process relies on this to figure the location of the Freetype2 include -files. +sharing the same top level as the directory of FreeType 2 and follow +the same instructions as above for the demos from there. The build +process relies on this to figure out the location of the FreeType 2 +include files. To rebuild the sources it is necessary to have MMS/MMK installed on @@ -49,7 +49,7 @@ V7.2-1. ------------------------------------------------------------------------ -Copyright 2000-2017 by +Copyright 2000-2018 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/TODO b/docs/TODO index c4304b3..1a443a2 100644 --- a/docs/TODO +++ b/docs/TODO @@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType. ------------------------------------------------------------------------ -Copyright 2001-2017 by +Copyright 2001-2018 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/VERSIONS.TXT b/docs/VERSIONS.TXT index e116d34..b0d25b5 100644 --- a/docs/VERSIONS.TXT +++ b/docs/VERSIONS.TXT @@ -52,6 +52,8 @@ on _most_ systems, but not all of them: release libtool so ------------------------------- + 2.9.0 22.0.16 6.16.0 + 2.8.1 21.0.15 6.15.0 2.8.0 20.0.14 6.14.0 2.7.1 19.0.13 6.13.0 2.7.0 18.6.12 6.12.6 @@ -99,7 +101,7 @@ other release numbers. #include #include FT_FREETYPE_H #if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009 -#error Freetype version too low. +#error FreeType version too low. #endif ], [AC_MSG_RESULT(yes) @@ -111,7 +113,7 @@ other release numbers. ------------------------------------------------------------------------ -Copyright 2002-2017 by +Copyright 2002-2018 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 1c494f0..75aba92 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -155,10 +155,11 @@ which isn't supported yet please send a mail too. [1] Support should be rather simple since this is identical to `CFF' but in a PS wrapper. -[2] Official PFR specification: +[2] The official PFR specification is no longer available, but + archive.org has archived it: - http://www.bitstream.com/categories/developer/truedoc/pfrspec.html - http://www.bitstream.com/categories/developer/truedoc/pfrspec1.2.pdf + https://web.archive.org/web/20091014062300/http://www.bitstream.com/font_rendering/products/truedoc/pfrspec.html + https://web.archive.org/web/20081115152605/http://www.bitstream.com/font_rendering/pdfs/pfrspec1.3.pdf The syntax of the auxiliary data is not defined there, but is partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1) @@ -167,8 +168,6 @@ which isn't supported yet please send a mail too. http://www.etsi.org/ http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799 - (free registration required). - [3] Support is rudimentary currently; some tables or data are not loaded yet. @@ -184,15 +183,15 @@ which isn't supported yet please send a mail too. George Williams deduced the font format from the X11 sources and documented it for his FontForge font editor: - http://fontforge.github.io/pcf-format.html + https://fontforge.github.io/pcf-format.html [5] This is from MS Windows 3; see Microsoft's Knowledge Base article at - http://support.microsoft.com/kb/65123 + https://support.microsoft.com/kb/65123 ------------------------------------------------------------------------ -Copyright 2004-2017 by +Copyright 2004-2018 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/freetype-config.1 b/docs/freetype-config.1 index eaaa1b9..e060dcb 100644 --- a/docs/freetype-config.1 +++ b/docs/freetype-config.1 @@ -1,4 +1,4 @@ -.TH FREETYPE-CONFIG 1 "May 2017" "FreeType 2.8" +.TH FREETYPE-CONFIG 1 "January 2018" "FreeType 2.9" . . .SH NAME diff --git a/docs/raster.txt b/docs/raster.txt index bd3fd00..8ef466e 100644 --- a/docs/raster.txt +++ b/docs/raster.txt @@ -618,7 +618,7 @@ II. Rendering Technology ------------------------------------------------------------------------ -Copyright 2003-2017 by +Copyright 2003-2018 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/reference/ft2-auto_hinter.html b/docs/reference/ft2-auto_hinter.html index f1770f8..5e0eada 100644 --- a/docs/reference/ft2-auto_hinter.html +++ b/docs/reference/ft2-auto_hinter.html @@ -1,9 +1,9 @@ +"https://www.w3.org/TR/html4/loose.dtd"> -FreeType-2.8 API Reference +FreeType-2.9 API Reference + + + + +

    FreeType-2.9 API Reference

    + +

    Parameter Tags

    +

    Synopsis

    + + + + + + + + +
    FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
    FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
    FT_PARAM_TAG_INCREMENTAL
    FT_PARAM_TAG_LCD_FILTER_WEIGHTS
    FT_PARAM_TAG_RANDOM_SEED
    FT_PARAM_TAG_STEM_DARKENING
    FT_PARAM_TAG_UNPATENTED_HINTING
    + + +

    This section contains macros for the FT_Parameter structure that are used with various functions to activate some special functionality or different behaviour of various components of FreeType.

    + +
    +

    FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY

    +
    +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
    +          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
    +
    +
    +  /* this constant is deprecated */
    +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
    +          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
    +
    + +

    A tag for FT_Parameter to make FT_Open_Face ignore typographic family names in the ‘name’ table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.

    + +

    since

    +

    2.8

    + +
    +
    + +
    +

    FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY

    +
    +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
    +          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
    +
    +
    +  /* this constant is deprecated */
    +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
    +          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
    +
    + +

    A tag for FT_Parameter to make FT_Open_Face ignore typographic subfamily names in the ‘name’ table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.

    + +

    since

    +

    2.8

    + +
    +
    + +
    +

    FT_PARAM_TAG_INCREMENTAL

    +
    +#define FT_PARAM_TAG_INCREMENTAL \
    +          FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
    +
    + +

    An FT_Parameter tag to be used with FT_Open_Face to indicate incremental glyph loading.

    + +
    +
    + +
    +

    FT_PARAM_TAG_LCD_FILTER_WEIGHTS

    +
    +#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
    +          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
    +
    + +

    An FT_Parameter tag to be used with FT_Face_Properties. The corresponding argument specifies the five LCD filter weights for a given face (if using FT_LOAD_TARGET_LCD, for example), overriding the global default values or the values set up with FT_Library_SetLcdFilterWeights.

    + +

    since

    +

    2.8

    + +
    +
    + +
    +

    FT_PARAM_TAG_RANDOM_SEED

    +
    +#define FT_PARAM_TAG_RANDOM_SEED \
    +          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
    +
    + +

    An FT_Parameter tag to be used with FT_Face_Properties. The corresponding 32bit signed integer argument overrides the font driver's random seed value with a face-specific one; see random-seed.

    + +

    since

    +

    2.8

    + +
    +
    + +
    +

    FT_PARAM_TAG_STEM_DARKENING

    +
    +#define FT_PARAM_TAG_STEM_DARKENING \
    +          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
    +
    + +

    An FT_Parameter tag to be used with FT_Face_Properties. The corresponding Boolean argument specifies whether to apply stem darkening, overriding the global default values or the values set up with FT_Property_Set (see no-stem-darkening).

    +

    This is a passive setting that only takes effect if the font driver or autohinter honors it, which the CFF, Type 1, and CID drivers always do, but the autohinter only in ‘light’ hinting mode (as of version 2.9).

    + +

    since

    +

    2.8

    + +
    +
    + +
    +

    FT_PARAM_TAG_UNPATENTED_HINTING

    +
    +#define FT_PARAM_TAG_UNPATENTED_HINTING \
    +          FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
    +
    + +

    Deprecated, no effect.

    +

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

    + +
    +
    + + + diff --git a/docs/reference/ft2-pcf_driver.html b/docs/reference/ft2-pcf_driver.html index 31008bc..75d6d2a 100644 --- a/docs/reference/ft2-pcf_driver.html +++ b/docs/reference/ft2-pcf_driver.html @@ -1,9 +1,9 @@ +"https://www.w3.org/TR/html4/loose.dtd"> -FreeType-2.8 API Reference +FreeType-2.9 API Reference + + + + +

    FreeType-2.9 API Reference

    + +

    Driver properties

    +

    Synopsis

    + + + + + + + + + +
    FT_HINTING_XXXglyph-to-script-map
    hinting-engineFT_AUTOHINTER_SCRIPT_XXX
    no-stem-darkeningFT_Prop_GlyphToScriptMap
    darkening-parametersfallback-script
    random-seeddefault-script
    no-long-family-namesincrease-x-height
    TT_INTERPRETER_VERSION_XXXFT_Prop_IncreaseXHeight
    interpreter-versionwarping
    + + +

    Driver modules can be controlled by setting and unsetting properties, using the functions FT_Property_Set and FT_Property_Get. This section documents the available properties, together with auxiliary macros and structures.

    + +
    +

    FT_HINTING_XXX

    +

    Defined in FT_DRIVER_H (freetype/ftdriver.h).

    +
    +#define FT_HINTING_FREETYPE  0
    +#define FT_HINTING_ADOBE     1
    +
    +  /* these constants (introduced in 2.4.12) are deprecated */
    +#define FT_CFF_HINTING_FREETYPE  FT_HINTING_FREETYPE
    +#define FT_CFF_HINTING_ADOBE     FT_HINTING_ADOBE
    +
    + +

    A list of constants used for the hinting-engine property to select the hinting engine for CFF, Type 1, and CID fonts.

    + +

    values

    + + + +
    FT_HINTING_FREETYPE +

    Use the old FreeType hinting engine.

    +
    FT_HINTING_ADOBE +

    Use the hinting engine contributed by Adobe.

    +
    + +

    since

    +

    2.9

    + +
    +
    + +
    +

    hinting-engine

    + +

    Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between ‘freetype’ and ‘adobe’ if compiled with CFF_CONFIG_OPTION_OLD_ENGINE. If this configuration macro isn't defined, ‘hinting-engine’ does nothing.

    +

    The same holds for the Type 1 and CID modules if compiled with T1_CONFIG_OPTION_OLD_ENGINE.

    +

    For the ‘cff’ module, the default engine is ‘freetype’ if CFF_CONFIG_OPTION_OLD_ENGINE is defined, and ‘adobe’ otherwise.

    +

    For both the ‘type1’ and ‘t1cid’ modules, the default engine is ‘freetype’ if T1_CONFIG_OPTION_OLD_ENGINE is defined, and ‘adobe’ otherwise.

    +

    The following example code demonstrates how to select Adobe's hinting engine for the ‘cff’ module (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.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values ‘adobe’ or ‘freetype’).

    + +

    since

    +

    2.4.12 (for ‘cff’ module)

    +

    2.9 (for ‘type1’ and ‘t1cid’ modules)

    + +
    +
    + +
    +

    no-stem-darkening

    + +

    All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type 1, and CID font modules if the ‘Adobe’ engine is selected (which is the default).

    +

    Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see FT_Render_Glyph. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!

    +

    Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (= higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs ‘thin out’. Mac OS X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore ‘blacker’. This counteracts the ‘thinning out’ of glyphs, making text remain readable at smaller sizes.

    +

    By default, the Adobe engines for CFF, Type 1, and CID fonts darken stems at smaller sizes, regardless of hinting, to enhance contrast. Setting this property, stem darkening gets switched off.

    +

    For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (this is, ‘no-stem-darkening’ is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.

    +

    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.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively). It can also be set per face using FT_Face_Properties with FT_PARAM_TAG_STEM_DARKENING.

    + +

    since

    +

    2.4.12 (for ‘cff’ module)

    +

    2.6.2 (for ‘autofitter’ module)

    +

    2.9 (for ‘type1’ and ‘t1cid’ modules)

    + +
    +
    + +
    +

    darkening-parameters

    + +

    By default, the Adobe hinting engine, as used by the CFF, Type 1, and CID font drivers, 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’; the CFF, Type 1, and CID drivers share these values. At runtime, the control points can be changed using the ‘darkening-parameters’ property, as the following example demonstrates for the Type 1 driver.

    +
    +  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, "type1",
    +                            "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).

    +

    The auto-hinter provides this property, too, as an experimental feature. See no-stem-darkening for more.

    + +

    note

    +

    This property can be used with FT_Property_Get also.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable, using eight comma-separated integers without spaces. Here the above example, using ‘\’ to break the line for readability.

    +
    +  FREETYPE_PROPERTIES=\
    +  type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
    +
    + +

    since

    +

    2.5.1 (for ‘cff’ module)

    +

    2.6.2 (for ‘autofitter’ module)

    +

    2.9 (for ‘type1’ and ‘t1cid’ modules)

    + +
    +
    + +
    +

    random-seed

    + +

    By default, the seed value for the CFF ‘random’ operator and the similar ‘0 28 callothersubr pop’ command for the Type 1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by ‘random’ are repeatable.

    +

    The ‘random-seed’ property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the ‘intitialRandomSeed’ private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of ‘initialRandomSeed’, which is consequently ignored.

    + +

    note

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable. It can also be set per face using FT_Face_Properties with FT_PARAM_TAG_RANDOM_SEED.

    + +

    since

    +

    2.8 (for ‘cff’ module)

    +

    2.9 (for ‘type1’ and ‘t1cid’ modules)

    + +
    +
    + +
    +

    no-long-family-names

    + +

    If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling FreeType, the PCF driver constructs long family names.

    +

    There are many PCF fonts just called ‘Fixed’ which look completely different, and which have nothing to do with each other. When selecting ‘Fixed’ in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are ‘wide’ characters; all put together, family names like ‘Sony Fixed’ or ‘Misc Fixed Wide’ are constructed.

    +

    If ‘no-long-family-names’ is set, this feature gets switched off.

    +
    +  FT_Library  library;
    +  FT_Bool     no_long_family_names = TRUE;
    +
    +
    +  FT_Init_FreeType( &library );
    +
    +  FT_Property_Set( library, "pcf",
    +                            "no-long-family-names",
    +                            &no_long_family_names );
    +
    + +

    note

    +

    This property can be used with FT_Property_Get also.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively).

    + +

    since

    +

    2.8

    + +
    +
    + +
    +

    TT_INTERPRETER_VERSION_XXX

    +

    Defined in FT_DRIVER_H (freetype/ftdriver.h).

    +
    +#define TT_INTERPRETER_VERSION_35  35
    +#define TT_INTERPRETER_VERSION_38  38
    +#define TT_INTERPRETER_VERSION_40  40
    +
    + +

    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). It is used in FreeType to select the ‘Infinality’ subpixel hinting code. The code may be removed in a future version.

    +
    TT_INTERPRETER_VERSION_40 +

    Version 40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows 10). It is used in FreeType to select the ‘minimal’ subpixel hinting code, a stripped-down and higher performance version of the ‘Infinality’ code.

    +
    + +

    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 the configuration option TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version 38 or 40 causes an ‘FT_Err_Unimplemented_Feature’ error.

    +

    Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the ‘GETINFO’ bytecode instruction are more convoluted than desired.

    +

    Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.

    +
    +  GETINFO framework               version feature
    +  -------------------------------------------------------------------
    +      3   GDI (Win 3.1),            v1.0  16-bit, first version
    +          TrueImage
    +     33   GDI (Win NT 3.1),         v1.5  32-bit
    +          HP Laserjet
    +     34   GDI (Win 95)              v1.6  font smoothing,
    +                                          new SCANTYPE opcode
    +     35   GDI (Win 98/2000)         v1.7  (UN)SCALED_COMPONENT_OFFSET
    +                                            bits in composite glyphs
    +     36   MGDI (Win CE 2)           v1.6+ classic ClearType
    +     37   GDI (XP and later),       v1.8  ClearType
    +          GDI+ old (before Vista)
    +     38   GDI+ old (Vista, Win 7),  v1.9  subpixel ClearType,
    +          WPF                             Y-direction ClearType,
    +                                          additional error checking
    +     39   DWrite (before Win 8)     v2.0  subpixel ClearType flags
    +                                            in GETINFO opcode,
    +                                          bug fixes
    +     40   GDI+ (after Win 7),       v2.1  Y-direction ClearType flag
    +          DWrite (Win 8)                    in GETINFO opcode,
    +                                          Gray ClearType
    +
    +

    The ‘version’ field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.

    +
    +   version   sampling          rendering        comment
    +            x        y       x           y
    +  --------------------------------------------------------------
    +    v1.0   normal  normal  B/W           B/W    bi-level
    +    v1.6   high    high    gray          gray   grayscale
    +    v1.8   high    normal  color-filter  B/W    (GDI) ClearType
    +    v1.9   high    high    color-filter  gray   Color ClearType
    +    v2.1   high    normal  gray          B/W    Gray ClearType
    +    v2.1   high    high    gray          gray   Gray ClearType
    +
    +

    Color and Gray ClearType are the two available variants of ‘Y-direction ClearType’, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is ‘symmetric smoothing’. ‘Classic ClearType’ is the original algorithm used before introducing a modified version in Win XP. Another name for v1.6's grayscale rendering is ‘font smoothing’, and ‘Color ClearType’ is sometimes also called ‘DWrite ClearType’. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called ‘GDI ClearType’.

    +

    ‘Normal’ and ‘high’ sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. ‘Normal’ means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, ‘high’ means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like ‘MIRP’. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.

    +

    Note that ‘Gray ClearType’ is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit 12 (hinting for grayscale), while v2.1 returns bits 13 (hinting for ClearType), 18 (symmetrical smoothing), and 19 (Gray ClearType). Also, this mode respects bits 2 and 3 for the version 1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version 0 (bits 0 and 1).

    +

    Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.

    + +
    +
    + +
    +

    interpreter-version

    + +

    Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old ‘Infinality’ code and new stripped-down and higher performance ‘minimal’ code) and one without, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).

    +

    If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if ‘native ClearType’ is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.

    +

    Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at ‘https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx’. Note that FreeType currently doesn't really ‘subpixel hint’ (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.

    +

    The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).

    +
    +  FT_Library  library;
    +  FT_Face     face;
    +  FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;
    +
    +
    +  FT_Init_FreeType( &library );
    +
    +  FT_Property_Set( library, "truetype",
    +                            "interpreter-version",
    +                            &interpreter_version );
    +
    + +

    note

    +

    This property can be used with FT_Property_Get also.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values ‘35’, ‘38’, or ‘40’).

    + +

    since

    +

    2.5

    + +
    +
    + +
    +

    glyph-to-script-map

    + +

    Experimental only

    +

    The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.

    +

    OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called ‘features’. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.

    +

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

    since

    +

    2.4.11

    + +
    +
    + +
    +

    FT_AUTOHINTER_SCRIPT_XXX

    +

    Defined in FT_DRIVER_H (freetype/ftdriver.h).

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

    Experimental only

    +

    A list of constants used for the glyph-to-script-map property to specify the script submodule the auto-hinter should use for hinting a particular glyph.

    + +

    values

    + + + + + +
    FT_AUTOHINTER_SCRIPT_NONE +

    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+A800 - U+A82F  // Syloti Nagri
    +  U+ABC0 - U+ABFF  // Meetei Mayek
    + U+11800 - U+118DF // Sharada
    +
    +

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

    +
    + +

    since

    +

    2.4.11

    + +
    +
    + +
    +

    FT_Prop_GlyphToScriptMap

    +

    Defined in FT_DRIVER_H (freetype/ftdriver.h).

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

    Experimental only

    +

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

    + +

    since

    +

    2.4.11

    + +
    +
    + +
    +

    fallback-script

    + +

    Experimental only

    +

    If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the glyph-to-script-map property). By default, this is FT_AUTOHINTER_SCRIPT_CJK. Using the ‘fallback-script’ property, this fallback value can be changed.

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

    + +

    since

    +

    2.4.11

    + +
    +
    + +
    +

    default-script

    + +

    Experimental only

    +

    If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a ‘dlig’ feature, containing the combination of the characters ‘T’, ‘E’, and ‘L’ to form a ‘TEL’ ligature.

    +

    By default, this is FT_AUTOHINTER_SCRIPT_LATIN. Using the ‘default-script’ property, this default value can be changed.

    +
    +  FT_Library  library;
    +  FT_UInt     default_script = FT_AUTOHINTER_SCRIPT_NONE;
    +
    +
    +  FT_Init_FreeType( &library );
    +
    +  FT_Property_Set( library, "autofitter",
    +                            "default-script", &default_script );
    +
    + +

    note

    +

    This property can be used with FT_Property_Get also.

    +

    It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like glyph-to-script-map, or by auto-hinting any glyph from that face. In particular, if you have already created an FT_Face structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.

    + +

    since

    +

    2.5.3

    + +
    +
    + +
    +

    increase-x-height

    + +

    For ppem values in the range 6 <= ppem <= ‘increase-x-height’, round up the font's x height much more often than normally. If the value is set to 0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.

    +
    +  FT_Library               library;
    +  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).

    + +

    since

    +

    2.4.11

    + +
    +
    + +
    +

    FT_Prop_IncreaseXHeight

    +

    Defined in FT_DRIVER_H (freetype/ftdriver.h).

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

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

    + +
    +
    + +
    +

    warping

    + +

    Experimental only

    +

    If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to activate the warp hinting code in the auto-hinter, this property switches warping on and off.

    +

    Warping only works in ‘normal’ auto-hinting mode replacing it. The idea of the code is to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments are aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations are tried and scored.

    +

    By default, warping is off. The example below shows how to switch on warping (omitting the error handling).

    +
    +  FT_Library  library;
    +  FT_Bool     warping = 1;
    +
    +
    +  FT_Init_FreeType( &library );
    +
    +  FT_Property_Set( library, "autofitter",
    +                            "warping", &warping );
    +
    + +

    note

    +

    This property can be used with FT_Property_Get also.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively).

    +

    The warping code can also change advance widths. Have a look at the ‘lsb_delta’ and ‘rsb_delta’ fields in the FT_GlyphSlotRec structure for details on improving inter-glyph distances while rendering.

    +

    Since warping is a global property of the auto-hinter it is best to change its value before rendering any face. Otherwise, you should reload all faces that get auto-hinted in ‘normal’ hinting mode.

    + +

    since

    +

    2.6

    + +
    +
    + + + diff --git a/docs/reference/ft2-quick_advance.html b/docs/reference/ft2-quick_advance.html index 81b051d..e62710a 100644 --- a/docs/reference/ft2-quick_advance.html +++ b/docs/reference/ft2-quick_advance.html @@ -1,9 +1,9 @@ +"https://www.w3.org/TR/html4/loose.dtd"> -FreeType-2.8 API Reference +FreeType-2.9 API Reference + + + + +

    FreeType-2.9 API Reference

    + +

    The Type 1 and CID drivers

    + +

    It is possible to control the behaviour of FreeType's Type 1 and Type 1 CID drivers with FT_Property_Set and FT_Property_Get.

    +

    Behind the scenes, both drivers use the Adobe CFF engine for hinting; however, the used properties must be specified separately.

    +

    The Type 1 driver's module name is ‘type1’; the CID driver's module name is ‘t1cid’.

    +

    Available properties are hinting-engine, no-stem-darkening, darkening-parameters, and random-seed, as documented in the ‘Driver properties’ section.

    +

    Please see the ‘The CFF driver’ section for more details on the new hinting engine.

    + + + diff --git a/docs/reference/ft2-toc.html b/docs/reference/ft2-toc.html index ace5445..b169b31 100644 --- a/docs/reference/ft2-toc.html +++ b/docs/reference/ft2-toc.html @@ -1,9 +1,9 @@ +"https://www.w3.org/TR/html4/loose.dtd"> -FreeType-2.8 API Reference +FreeType-2.9 API Reference