From 52012049a329789695cb7e6601303f2049175e06 Mon Sep 17 00:00:00 2001 From: "C. J. Howard" Date: Sun, 5 Jun 2022 21:31:34 +0800 Subject: [PATCH] Update FreeType --- modules/freetype/CMakeLists.txt | 223 +- modules/freetype/ChangeLog | 8576 ++++----------- modules/freetype/Makefile | 2 +- modules/freetype/README | 11 +- modules/freetype/README.git | 27 +- modules/freetype/autogen.sh | 27 +- modules/freetype/builds/amiga/README | 2 +- .../builds/amiga/include/config/ftconfig.h | 2 +- .../builds/amiga/include/config/ftmodule.h | 2 +- modules/freetype/builds/amiga/makefile | 2 +- modules/freetype/builds/amiga/makefile.os4 | 2 +- modules/freetype/builds/amiga/smakefile | 2 +- .../freetype/builds/amiga/src/base/ftdebug.c | 2 +- .../freetype/builds/amiga/src/base/ftsystem.c | 4 +- modules/freetype/builds/ansi/ansi-def.mk | 2 +- modules/freetype/builds/ansi/ansi.mk | 2 +- modules/freetype/builds/beos/beos-def.mk | 2 +- modules/freetype/builds/beos/beos.mk | 2 +- modules/freetype/builds/beos/detect.mk | 2 +- .../freetype/builds/cmake/FindBrotliDec.cmake | 2 +- modules/freetype/builds/cmake/iOS.cmake | 2 +- modules/freetype/builds/cmake/testbuild.sh | 2 +- modules/freetype/builds/compiler/ansi-cc.mk | 2 +- modules/freetype/builds/compiler/bcc-dev.mk | 2 +- modules/freetype/builds/compiler/bcc.mk | 2 +- modules/freetype/builds/compiler/emx.mk | 2 +- modules/freetype/builds/compiler/gcc-dev.mk | 2 +- modules/freetype/builds/compiler/gcc.mk | 2 +- modules/freetype/builds/compiler/intelc.mk | 2 +- modules/freetype/builds/compiler/unix-lcc.mk | 2 +- modules/freetype/builds/compiler/visualage.mk | 2 +- modules/freetype/builds/compiler/visualc.mk | 2 +- modules/freetype/builds/compiler/watcom.mk | 2 +- modules/freetype/builds/compiler/win-lcc.mk | 2 +- modules/freetype/builds/detect.mk | 2 +- modules/freetype/builds/dos/detect.mk | 2 +- modules/freetype/builds/dos/dos-def.mk | 2 +- modules/freetype/builds/dos/dos-emx.mk | 2 +- modules/freetype/builds/dos/dos-gcc.mk | 2 +- modules/freetype/builds/dos/dos-wat.mk | 2 +- modules/freetype/builds/exports.mk | 2 +- modules/freetype/builds/freetype.mk | 2 +- modules/freetype/builds/link_dos.mk | 2 +- modules/freetype/builds/link_std.mk | 2 +- .../freetype/builds/mac/freetype-Info.plist | 2 +- modules/freetype/builds/mac/ftmac.c | 8 +- .../builds/meson/extract_freetype_version.py | 4 +- .../builds/meson/extract_libtool_version.py | 4 +- .../builds/meson/generate_reference_docs.py | 4 +- .../builds/meson/parse_modules_cfg.py | 5 +- .../builds/meson/process_ftoption_h.py | 4 +- modules/freetype/builds/modules.mk | 2 +- modules/freetype/builds/os2/detect.mk | 2 +- modules/freetype/builds/os2/os2-def.mk | 2 +- modules/freetype/builds/os2/os2-dev.mk | 2 +- modules/freetype/builds/os2/os2-gcc.mk | 2 +- modules/freetype/builds/symbian/bld.inf | 2 +- modules/freetype/builds/symbian/freetype.mmp | 2 +- modules/freetype/builds/toplevel.mk | 15 +- modules/freetype/builds/unix/aclocal.m4 | 368 +- modules/freetype/builds/unix/config.guess | 16 +- modules/freetype/builds/unix/config.sub | 37 +- modules/freetype/builds/unix/configure | 7213 +++++++------ modules/freetype/builds/unix/configure.ac | 193 +- modules/freetype/builds/unix/configure.raw | 191 +- modules/freetype/builds/unix/detect.mk | 2 +- .../freetype/builds/unix/freetype-config.in | 2 +- modules/freetype/builds/unix/freetype2.in | 8 +- modules/freetype/builds/unix/freetype2.m4 | 2 +- modules/freetype/builds/unix/ft-munmap.m4 | 2 +- modules/freetype/builds/unix/ftconfig.h.in | 12 +- modules/freetype/builds/unix/ftsystem.c | 19 +- modules/freetype/builds/unix/install-sh | 174 +- modules/freetype/builds/unix/install.mk | 2 +- modules/freetype/builds/unix/ltmain.sh | 855 +- modules/freetype/builds/unix/unix-cc.in | 12 +- modules/freetype/builds/unix/unix-def.in | 36 +- modules/freetype/builds/unix/unix-dev.mk | 2 +- modules/freetype/builds/unix/unix-lcc.mk | 2 +- modules/freetype/builds/unix/unix.mk | 2 +- modules/freetype/builds/unix/unixddef.mk | 2 +- modules/freetype/builds/vms/ftconfig.h | 2 +- modules/freetype/builds/vms/ftsystem.c | 10 +- modules/freetype/builds/wince/ftdebug.c | 4 +- .../builds/wince/vc2005-ce/index.html | 2 +- .../builds/wince/vc2008-ce/index.html | 2 +- modules/freetype/builds/windows/detect.mk | 2 +- modules/freetype/builds/windows/ftdebug.c | 71 +- modules/freetype/builds/windows/ftsystem.c | 165 +- .../builds/windows/vc2010/freetype.sln | 39 +- .../builds/windows/vc2010/freetype.vcxproj | 232 +- .../windows/vc2010/freetype.vcxproj.filters | 9 +- .../freetype/builds/windows/vc2010/index.html | 2 +- .../freetype/builds/windows/vc2010/script.bat | 11 - .../builds/windows/visualc/freetype.dsp | 2 +- .../builds/windows/visualc/freetype.vcproj | 20 +- .../builds/windows/visualc/index.html | 2 +- .../builds/windows/visualce/index.html | 2 +- modules/freetype/builds/windows/w32-bcc.mk | 2 +- modules/freetype/builds/windows/w32-bccd.mk | 2 +- modules/freetype/builds/windows/w32-dev.mk | 2 +- modules/freetype/builds/windows/w32-gcc.mk | 2 +- modules/freetype/builds/windows/w32-icc.mk | 2 +- modules/freetype/builds/windows/w32-intl.mk | 2 +- modules/freetype/builds/windows/w32-lcc.mk | 2 +- .../freetype/builds/windows/w32-mingw32.mk | 2 +- modules/freetype/builds/windows/w32-vcc.mk | 2 +- modules/freetype/builds/windows/w32-wat.mk | 2 +- modules/freetype/builds/windows/win32-def.mk | 2 +- modules/freetype/configure | 4 +- modules/freetype/devel/ft2build.h | 2 +- modules/freetype/devel/ftoption.h | 22 +- modules/freetype/docs/CHANGES | 115 +- modules/freetype/docs/CUSTOMIZE | 2 +- modules/freetype/docs/DEBUG | 2 +- modules/freetype/docs/DOCGUIDE | 6 +- modules/freetype/docs/INSTALL | 55 +- modules/freetype/docs/INSTALL.ANY | 2 +- modules/freetype/docs/INSTALL.CROSS | 2 +- modules/freetype/docs/INSTALL.GNU | 2 +- modules/freetype/docs/INSTALL.UNIX | 2 +- modules/freetype/docs/INSTALL.VMS | 2 +- modules/freetype/docs/TODO | 2 +- modules/freetype/docs/VERSIONS.TXT | 5 +- modules/freetype/docs/formats.txt | 17 +- modules/freetype/docs/freetype-config.1 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.20 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.21 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.210 | 7815 ++++++++++++++ modules/freetype/docs/oldlogs/ChangeLog.22 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.23 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.24 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.25 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.26 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.27 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.28 | 2 +- modules/freetype/docs/oldlogs/ChangeLog.29 | 2 +- modules/freetype/docs/raster.txt | 2 +- modules/freetype/docs/reference/404.html | 38 +- .../docs/reference/ft2-auto_hinter.html | 38 +- .../docs/reference/ft2-base_interface.html | 272 +- .../docs/reference/ft2-basic_types.html | 71 +- .../docs/reference/ft2-bdf_fonts.html | 38 +- .../docs/reference/ft2-bitmap_handling.html | 38 +- .../freetype/docs/reference/ft2-bzip2.html | 38 +- .../docs/reference/ft2-cache_subsystem.html | 38 +- .../docs/reference/ft2-cff_driver.html | 38 +- .../docs/reference/ft2-cid_fonts.html | 38 +- .../docs/reference/ft2-color_management.html | 38 +- .../docs/reference/ft2-computations.html | 38 +- .../docs/reference/ft2-debugging_apis.html | 38 +- .../docs/reference/ft2-error_code_values.html | 42 +- .../reference/ft2-error_enumerations.html | 38 +- .../docs/reference/ft2-font_formats.html | 42 +- .../docs/reference/ft2-gasp_table.html | 38 +- .../docs/reference/ft2-glyph_management.html | 166 +- .../docs/reference/ft2-glyph_stroker.html | 38 +- .../docs/reference/ft2-glyph_variants.html | 38 +- .../docs/reference/ft2-gx_validation.html | 38 +- modules/freetype/docs/reference/ft2-gzip.html | 38 +- .../reference/ft2-header_file_macros.html | 59 +- .../docs/reference/ft2-header_inclusion.html | 38 +- .../docs/reference/ft2-incremental.html | 38 +- .../freetype/docs/reference/ft2-index.html | 81 +- .../docs/reference/ft2-layer_management.html | 226 +- .../docs/reference/ft2-lcd_rendering.html | 38 +- .../docs/reference/ft2-list_processing.html | 38 +- modules/freetype/docs/reference/ft2-lzw.html | 38 +- .../docs/reference/ft2-mac_specific.html | 38 +- .../docs/reference/ft2-module_management.html | 43 +- .../docs/reference/ft2-multiple_masters.html | 39 +- .../docs/reference/ft2-ot_svg_driver.html | 1256 +++ .../docs/reference/ft2-ot_validation.html | 38 +- .../reference/ft2-outline_processing.html | 42 +- .../docs/reference/ft2-parameter_tags.html | 60 +- .../docs/reference/ft2-pcf_driver.html | 42 +- .../docs/reference/ft2-pfr_fonts.html | 38 +- .../freetype/docs/reference/ft2-preamble.html | 38 +- .../docs/reference/ft2-properties.html | 79 +- .../docs/reference/ft2-quick_advance.html | 38 +- .../freetype/docs/reference/ft2-raster.html | 38 +- .../docs/reference/ft2-sfnt_names.html | 38 +- .../docs/reference/ft2-sizes_management.html | 38 +- .../docs/reference/ft2-svg_fonts.html | 1582 +++ .../docs/reference/ft2-system_interface.html | 38 +- .../docs/reference/ft2-t1_cid_driver.html | 38 +- .../docs/reference/ft2-truetype_engine.html | 38 +- .../docs/reference/ft2-truetype_tables.html | 40 +- .../docs/reference/ft2-tt_driver.html | 45 +- .../docs/reference/ft2-type1_tables.html | 68 +- .../docs/reference/ft2-user_allocation.html | 38 +- .../freetype/docs/reference/ft2-version.html | 42 +- .../docs/reference/ft2-winfnt_fonts.html | 42 +- modules/freetype/docs/reference/index.html | 50 +- .../docs/reference/search/search_index.json | 2 +- modules/freetype/docs/reference/sitemap.xml | 116 +- .../freetype/docs/reference/sitemap.xml.gz | Bin 226 -> 229 bytes modules/freetype/docs/release | 34 +- .../include/freetype/config/ftconfig.h | 2 +- .../include/freetype/config/ftheader.h | 14 +- .../include/freetype/config/ftmodule.h | 1 + .../include/freetype/config/ftoption.h | 22 +- .../include/freetype/config/ftstdlib.h | 14 +- .../include/freetype/config/integer-types.h | 45 +- .../include/freetype/config/mac-support.h | 2 +- .../include/freetype/config/public-macros.h | 20 +- modules/freetype/include/freetype/freetype.h | 321 +- modules/freetype/include/freetype/ftadvanc.h | 2 +- modules/freetype/include/freetype/ftbbox.h | 2 +- modules/freetype/include/freetype/ftbdf.h | 2 +- modules/freetype/include/freetype/ftbitmap.h | 2 +- modules/freetype/include/freetype/ftbzip2.h | 2 +- modules/freetype/include/freetype/ftcache.h | 2 +- .../freetype/include/freetype/ftchapters.h | 2 + modules/freetype/include/freetype/ftcid.h | 2 +- modules/freetype/include/freetype/ftcolor.h | 219 +- modules/freetype/include/freetype/ftdriver.h | 75 +- modules/freetype/include/freetype/fterrdef.h | 6 +- modules/freetype/include/freetype/fterrors.h | 2 +- modules/freetype/include/freetype/ftfntfmt.h | 2 +- modules/freetype/include/freetype/ftgasp.h | 2 +- modules/freetype/include/freetype/ftglyph.h | 116 +- modules/freetype/include/freetype/ftgxval.h | 2 +- modules/freetype/include/freetype/ftgzip.h | 2 +- modules/freetype/include/freetype/ftimage.h | 36 +- modules/freetype/include/freetype/ftincrem.h | 2 +- modules/freetype/include/freetype/ftlcdfil.h | 4 +- modules/freetype/include/freetype/ftlist.h | 2 +- modules/freetype/include/freetype/ftlogging.h | 2 +- modules/freetype/include/freetype/ftlzw.h | 2 +- modules/freetype/include/freetype/ftmac.h | 2 +- modules/freetype/include/freetype/ftmm.h | 5 +- modules/freetype/include/freetype/ftmodapi.h | 7 +- modules/freetype/include/freetype/ftmoderr.h | 2 +- modules/freetype/include/freetype/ftotval.h | 2 +- modules/freetype/include/freetype/ftoutln.h | 14 +- modules/freetype/include/freetype/ftparams.h | 17 +- modules/freetype/include/freetype/ftpfr.h | 2 +- modules/freetype/include/freetype/ftrender.h | 2 +- modules/freetype/include/freetype/ftsizes.h | 2 +- modules/freetype/include/freetype/ftsnames.h | 2 +- modules/freetype/include/freetype/ftstroke.h | 2 +- modules/freetype/include/freetype/ftsynth.h | 2 +- modules/freetype/include/freetype/ftsystem.h | 2 +- modules/freetype/include/freetype/fttrigon.h | 2 +- modules/freetype/include/freetype/fttypes.h | 19 +- modules/freetype/include/freetype/ftwinfnt.h | 4 +- .../include/freetype/internal/autohint.h | 2 +- .../include/freetype/internal/cffotypes.h | 2 +- .../include/freetype/internal/cfftypes.h | 2 +- .../freetype/internal/compiler-macros.h | 8 +- .../include/freetype/internal/ftcalc.h | 58 +- .../include/freetype/internal/ftdebug.h | 3 +- .../include/freetype/internal/ftdrv.h | 2 +- .../include/freetype/internal/ftgloadr.h | 3 +- .../include/freetype/internal/ftmemory.h | 13 +- .../include/freetype/internal/ftobjs.h | 7 +- .../include/freetype/internal/ftpsprop.h | 2 +- .../include/freetype/internal/ftrfork.h | 2 +- .../include/freetype/internal/ftserv.h | 2 +- .../include/freetype/internal/ftstream.h | 32 +- .../include/freetype/internal/fttrace.h | 6 +- .../include/freetype/internal/ftvalid.h | 2 +- .../include/freetype/internal/psaux.h | 2 +- .../include/freetype/internal/pshints.h | 2 +- .../freetype/internal/services/svbdf.h | 2 +- .../freetype/internal/services/svcfftl.h | 2 +- .../freetype/internal/services/svcid.h | 2 +- .../freetype/internal/services/svfntfmt.h | 2 +- .../freetype/internal/services/svgldict.h | 2 +- .../freetype/internal/services/svgxval.h | 2 +- .../freetype/internal/services/svkern.h | 2 +- .../freetype/internal/services/svmetric.h | 2 +- .../include/freetype/internal/services/svmm.h | 2 +- .../freetype/internal/services/svotval.h | 2 +- .../freetype/internal/services/svpfr.h | 2 +- .../freetype/internal/services/svpostnm.h | 2 +- .../freetype/internal/services/svprop.h | 2 +- .../freetype/internal/services/svpscmap.h | 2 +- .../freetype/internal/services/svpsinfo.h | 2 +- .../freetype/internal/services/svsfnt.h | 2 +- .../freetype/internal/services/svttcmap.h | 2 +- .../freetype/internal/services/svtteng.h | 2 +- .../freetype/internal/services/svttglyf.h | 2 +- .../freetype/internal/services/svwinfnt.h | 2 +- .../freetype/include/freetype/internal/sfnt.h | 107 +- .../include/freetype/internal/svginterface.h | 46 + .../include/freetype/internal/t1types.h | 2 +- .../include/freetype/internal/tttypes.h | 20 +- .../include/freetype/internal/wofftypes.h | 6 +- modules/freetype/include/freetype/otsvg.h | 336 + modules/freetype/include/freetype/t1tables.h | 176 +- modules/freetype/include/freetype/ttnameid.h | 4 +- modules/freetype/include/freetype/tttables.h | 2 +- modules/freetype/include/freetype/tttags.h | 3 +- modules/freetype/include/ft2build.h | 2 +- modules/freetype/meson.build | 113 +- modules/freetype/meson_options.txt | 8 +- modules/freetype/modules.cfg | 5 +- modules/freetype/src/autofit/afblue.c | 2 +- modules/freetype/src/autofit/afblue.cin | 2 +- modules/freetype/src/autofit/afblue.dat | 2 +- modules/freetype/src/autofit/afblue.h | 2 +- modules/freetype/src/autofit/afblue.hin | 2 +- modules/freetype/src/autofit/afcjk.c | 14 +- modules/freetype/src/autofit/afcjk.h | 2 +- modules/freetype/src/autofit/afcover.h | 2 +- modules/freetype/src/autofit/afdummy.c | 2 +- modules/freetype/src/autofit/afdummy.h | 2 +- modules/freetype/src/autofit/aferrors.h | 2 +- modules/freetype/src/autofit/afglobal.c | 20 +- modules/freetype/src/autofit/afglobal.h | 2 +- modules/freetype/src/autofit/afhints.c | 24 +- modules/freetype/src/autofit/afhints.h | 2 +- modules/freetype/src/autofit/afindic.c | 2 +- modules/freetype/src/autofit/afindic.h | 2 +- modules/freetype/src/autofit/aflatin.c | 14 +- modules/freetype/src/autofit/aflatin.h | 2 +- modules/freetype/src/autofit/afloader.c | 2 +- modules/freetype/src/autofit/afloader.h | 2 +- modules/freetype/src/autofit/afmodule.c | 2 +- modules/freetype/src/autofit/afmodule.h | 2 +- modules/freetype/src/autofit/afranges.c | 2 +- modules/freetype/src/autofit/afranges.h | 2 +- modules/freetype/src/autofit/afscript.h | 2 +- modules/freetype/src/autofit/afshaper.c | 2 +- modules/freetype/src/autofit/afshaper.h | 2 +- modules/freetype/src/autofit/afstyles.h | 2 +- modules/freetype/src/autofit/aftypes.h | 7 +- .../src/autofit/{afwrtsys.h => afws-decl.h} | 24 +- modules/freetype/src/autofit/afws-iter.h | 31 + modules/freetype/src/autofit/autofit.c | 2 +- modules/freetype/src/autofit/module.mk | 2 +- modules/freetype/src/autofit/rules.mk | 17 +- modules/freetype/src/base/ftadvanc.c | 2 +- modules/freetype/src/base/ftbase.c | 2 +- modules/freetype/src/base/ftbase.h | 3 +- modules/freetype/src/base/ftbbox.c | 2 +- modules/freetype/src/base/ftbdf.c | 2 +- modules/freetype/src/base/ftbitmap.c | 14 +- modules/freetype/src/base/ftcalc.c | 16 +- modules/freetype/src/base/ftcid.c | 2 +- modules/freetype/src/base/ftcolor.c | 2 +- modules/freetype/src/base/ftdbgmem.c | 94 +- modules/freetype/src/base/ftdebug.c | 4 +- modules/freetype/src/base/fterrors.c | 2 +- modules/freetype/src/base/ftfntfmt.c | 2 +- modules/freetype/src/base/ftfstype.c | 2 +- modules/freetype/src/base/ftgasp.c | 2 +- modules/freetype/src/base/ftgloadr.c | 2 +- modules/freetype/src/base/ftglyph.c | 271 +- modules/freetype/src/base/ftgxval.c | 2 +- modules/freetype/src/base/fthash.c | 2 +- modules/freetype/src/base/ftinit.c | 2 +- modules/freetype/src/base/ftlcdfil.c | 2 +- modules/freetype/src/base/ftmac.c | 10 +- modules/freetype/src/base/ftmm.c | 2 +- modules/freetype/src/base/ftobjs.c | 216 +- modules/freetype/src/base/ftotval.c | 2 +- modules/freetype/src/base/ftoutln.c | 2 +- modules/freetype/src/base/ftpatent.c | 2 +- modules/freetype/src/base/ftpfr.c | 2 +- modules/freetype/src/base/ftpsprop.c | 2 +- modules/freetype/src/base/ftrfork.c | 28 +- modules/freetype/src/base/ftsnames.c | 2 +- modules/freetype/src/base/ftstream.c | 85 +- modules/freetype/src/base/ftstroke.c | 2 +- modules/freetype/src/base/ftsynth.c | 2 +- modules/freetype/src/base/ftsystem.c | 2 +- modules/freetype/src/base/fttrigon.c | 8 +- modules/freetype/src/base/fttype1.c | 2 +- modules/freetype/src/base/ftutil.c | 2 +- modules/freetype/src/base/ftver.rc | 8 +- modules/freetype/src/base/ftwinfnt.c | 2 +- modules/freetype/src/base/rules.mk | 2 +- modules/freetype/src/bdf/README | 6 +- modules/freetype/src/bdf/bdfdrivr.c | 4 +- modules/freetype/src/bdf/bdflib.c | 146 +- modules/freetype/src/bzip2/ftbzip2.c | 56 +- modules/freetype/src/bzip2/rules.mk | 2 +- modules/freetype/src/cache/ftcache.c | 2 +- modules/freetype/src/cache/ftcbasic.c | 6 +- modules/freetype/src/cache/ftccache.c | 24 +- modules/freetype/src/cache/ftccache.h | 6 +- modules/freetype/src/cache/ftccback.h | 2 +- modules/freetype/src/cache/ftccmap.c | 11 +- modules/freetype/src/cache/ftcerror.h | 2 +- modules/freetype/src/cache/ftcglyph.c | 2 +- modules/freetype/src/cache/ftcglyph.h | 8 +- modules/freetype/src/cache/ftcimage.c | 5 +- modules/freetype/src/cache/ftcimage.h | 8 +- modules/freetype/src/cache/ftcmanag.c | 12 +- modules/freetype/src/cache/ftcmanag.h | 2 +- modules/freetype/src/cache/ftcmru.c | 4 +- modules/freetype/src/cache/ftcmru.h | 2 +- modules/freetype/src/cache/ftcsbits.c | 16 +- modules/freetype/src/cache/ftcsbits.h | 4 +- modules/freetype/src/cache/rules.mk | 2 +- modules/freetype/src/cff/cff.c | 2 +- modules/freetype/src/cff/cffcmap.c | 4 +- modules/freetype/src/cff/cffcmap.h | 2 +- modules/freetype/src/cff/cffdrivr.c | 12 +- modules/freetype/src/cff/cffdrivr.h | 2 +- modules/freetype/src/cff/cfferrs.h | 2 +- modules/freetype/src/cff/cffgload.c | 92 +- modules/freetype/src/cff/cffgload.h | 2 +- modules/freetype/src/cff/cffload.c | 48 +- modules/freetype/src/cff/cffload.h | 2 +- modules/freetype/src/cff/cffobjs.c | 27 +- modules/freetype/src/cff/cffobjs.h | 2 +- modules/freetype/src/cff/cffparse.c | 2 +- modules/freetype/src/cff/cffparse.h | 2 +- modules/freetype/src/cff/cfftoken.h | 2 +- modules/freetype/src/cff/module.mk | 2 +- modules/freetype/src/cff/rules.mk | 2 +- modules/freetype/src/cid/ciderrs.h | 2 +- modules/freetype/src/cid/cidgload.c | 33 +- modules/freetype/src/cid/cidgload.h | 2 +- modules/freetype/src/cid/cidload.c | 94 +- modules/freetype/src/cid/cidload.h | 4 +- modules/freetype/src/cid/cidobjs.c | 13 +- modules/freetype/src/cid/cidobjs.h | 2 +- modules/freetype/src/cid/cidparse.c | 8 +- modules/freetype/src/cid/cidparse.h | 4 +- modules/freetype/src/cid/cidriver.c | 2 +- modules/freetype/src/cid/cidriver.h | 2 +- modules/freetype/src/cid/cidtoken.h | 2 +- modules/freetype/src/cid/module.mk | 2 +- modules/freetype/src/cid/rules.mk | 2 +- modules/freetype/src/cid/type1cid.c | 2 +- modules/freetype/src/dlg/dlg.c | 2 +- modules/freetype/src/dlg/dlgwrap.c | 11 +- modules/freetype/src/dlg/rules.mk | 2 +- modules/freetype/src/gxvalid/README | 2 +- modules/freetype/src/gxvalid/gxvalid.c | 2 +- modules/freetype/src/gxvalid/gxvalid.h | 2 +- modules/freetype/src/gxvalid/gxvbsln.c | 2 +- modules/freetype/src/gxvalid/gxvcommn.c | 22 +- modules/freetype/src/gxvalid/gxvcommn.h | 37 +- modules/freetype/src/gxvalid/gxverror.h | 2 +- modules/freetype/src/gxvalid/gxvfeat.c | 4 +- modules/freetype/src/gxvalid/gxvfeat.h | 2 +- modules/freetype/src/gxvalid/gxvfgen.c | 2 +- modules/freetype/src/gxvalid/gxvjust.c | 23 +- modules/freetype/src/gxvalid/gxvkern.c | 14 +- modules/freetype/src/gxvalid/gxvlcar.c | 2 +- modules/freetype/src/gxvalid/gxvmod.c | 48 +- modules/freetype/src/gxvalid/gxvmod.h | 2 +- modules/freetype/src/gxvalid/gxvmort.c | 4 +- modules/freetype/src/gxvalid/gxvmort.h | 2 +- modules/freetype/src/gxvalid/gxvmort0.c | 2 +- modules/freetype/src/gxvalid/gxvmort1.c | 2 +- modules/freetype/src/gxvalid/gxvmort2.c | 14 +- modules/freetype/src/gxvalid/gxvmort4.c | 2 +- modules/freetype/src/gxvalid/gxvmort5.c | 4 +- modules/freetype/src/gxvalid/gxvmorx.c | 8 +- modules/freetype/src/gxvalid/gxvmorx.h | 2 +- modules/freetype/src/gxvalid/gxvmorx0.c | 2 +- modules/freetype/src/gxvalid/gxvmorx1.c | 2 +- modules/freetype/src/gxvalid/gxvmorx2.c | 30 +- modules/freetype/src/gxvalid/gxvmorx4.c | 2 +- modules/freetype/src/gxvalid/gxvmorx5.c | 2 +- modules/freetype/src/gxvalid/gxvopbd.c | 4 +- modules/freetype/src/gxvalid/gxvprop.c | 6 +- modules/freetype/src/gxvalid/gxvtrak.c | 6 +- modules/freetype/src/gxvalid/module.mk | 2 +- modules/freetype/src/gxvalid/rules.mk | 2 +- modules/freetype/src/gzip/README.freetype | 22 + modules/freetype/src/gzip/adler32.c | 188 +- modules/freetype/src/gzip/crc32.c | 1116 ++ modules/freetype/src/gzip/crc32.h | 9446 +++++++++++++++++ modules/freetype/src/gzip/ftgzip.c | 69 +- modules/freetype/src/gzip/ftzconf.h | 530 +- modules/freetype/src/gzip/gzguts.h | 219 + modules/freetype/src/gzip/infback.c | 641 ++ modules/freetype/src/gzip/infblock.c | 392 - modules/freetype/src/gzip/infblock.h | 36 - modules/freetype/src/gzip/infcodes.c | 254 - modules/freetype/src/gzip/infcodes.h | 31 - modules/freetype/src/gzip/inffast.c | 323 + modules/freetype/src/gzip/inffast.h | 11 + modules/freetype/src/gzip/inffixed.h | 241 +- modules/freetype/src/gzip/inflate.c | 1843 +++- modules/freetype/src/gzip/inflate.h | 131 + modules/freetype/src/gzip/inftrees.c | 710 +- modules/freetype/src/gzip/inftrees.h | 112 +- modules/freetype/src/gzip/infutil.c | 86 - modules/freetype/src/gzip/infutil.h | 98 - .../src/gzip/patches/freetype-zlib.diff | 372 + modules/freetype/src/gzip/rules.mk | 14 +- modules/freetype/src/gzip/zlib.h | 1962 +++- modules/freetype/src/gzip/zutil.c | 232 +- modules/freetype/src/gzip/zutil.h | 197 +- modules/freetype/src/lzw/ftlzw.c | 6 +- modules/freetype/src/lzw/ftzopen.c | 2 +- modules/freetype/src/lzw/ftzopen.h | 2 +- modules/freetype/src/lzw/rules.mk | 2 +- modules/freetype/src/otvalid/module.mk | 2 +- modules/freetype/src/otvalid/otvalid.c | 2 +- modules/freetype/src/otvalid/otvalid.h | 2 +- modules/freetype/src/otvalid/otvbase.c | 2 +- modules/freetype/src/otvalid/otvcommn.c | 2 +- modules/freetype/src/otvalid/otvcommn.h | 22 +- modules/freetype/src/otvalid/otverror.h | 2 +- modules/freetype/src/otvalid/otvgdef.c | 2 +- modules/freetype/src/otvalid/otvgpos.c | 2 +- modules/freetype/src/otvalid/otvgpos.h | 2 +- modules/freetype/src/otvalid/otvgsub.c | 2 +- modules/freetype/src/otvalid/otvjstf.c | 2 +- modules/freetype/src/otvalid/otvmath.c | 4 +- modules/freetype/src/otvalid/otvmod.c | 4 +- modules/freetype/src/otvalid/otvmod.h | 2 +- modules/freetype/src/otvalid/rules.mk | 2 +- modules/freetype/src/pcf/pcfread.c | 32 +- modules/freetype/src/pfr/module.mk | 2 +- modules/freetype/src/pfr/pfr.c | 2 +- modules/freetype/src/pfr/pfrcmap.c | 2 +- modules/freetype/src/pfr/pfrcmap.h | 2 +- modules/freetype/src/pfr/pfrdrivr.c | 2 +- modules/freetype/src/pfr/pfrdrivr.h | 2 +- modules/freetype/src/pfr/pfrerror.h | 2 +- modules/freetype/src/pfr/pfrgload.c | 2 +- modules/freetype/src/pfr/pfrgload.h | 2 +- modules/freetype/src/pfr/pfrload.c | 4 +- modules/freetype/src/pfr/pfrload.h | 2 +- modules/freetype/src/pfr/pfrobjs.c | 8 +- modules/freetype/src/pfr/pfrobjs.h | 2 +- modules/freetype/src/pfr/pfrsbit.c | 2 +- modules/freetype/src/pfr/pfrsbit.h | 2 +- modules/freetype/src/pfr/pfrtypes.h | 4 +- modules/freetype/src/pfr/rules.mk | 2 +- modules/freetype/src/psaux/afmparse.c | 2 +- modules/freetype/src/psaux/afmparse.h | 2 +- modules/freetype/src/psaux/cffdecode.c | 26 +- modules/freetype/src/psaux/cffdecode.h | 2 +- modules/freetype/src/psaux/module.mk | 2 +- modules/freetype/src/psaux/psaux.c | 2 +- modules/freetype/src/psaux/psauxerr.h | 2 +- modules/freetype/src/psaux/psauxmod.c | 2 +- modules/freetype/src/psaux/psauxmod.h | 2 +- modules/freetype/src/psaux/psconv.c | 10 +- modules/freetype/src/psaux/psconv.h | 2 +- modules/freetype/src/psaux/psft.c | 6 +- modules/freetype/src/psaux/psintrp.c | 49 +- modules/freetype/src/psaux/psintrp.h | 2 +- modules/freetype/src/psaux/psobjs.c | 81 +- modules/freetype/src/psaux/psobjs.h | 2 +- modules/freetype/src/psaux/psstack.c | 3 +- modules/freetype/src/psaux/rules.mk | 2 +- modules/freetype/src/psaux/t1cmap.c | 2 +- modules/freetype/src/psaux/t1cmap.h | 2 +- modules/freetype/src/psaux/t1decode.c | 19 +- modules/freetype/src/psaux/t1decode.h | 2 +- modules/freetype/src/pshinter/module.mk | 2 +- modules/freetype/src/pshinter/pshalgo.c | 139 +- modules/freetype/src/pshinter/pshalgo.h | 32 +- modules/freetype/src/pshinter/pshglob.c | 4 +- modules/freetype/src/pshinter/pshglob.h | 2 +- modules/freetype/src/pshinter/pshinter.c | 2 +- modules/freetype/src/pshinter/pshmod.c | 2 +- modules/freetype/src/pshinter/pshmod.h | 2 +- modules/freetype/src/pshinter/pshnterr.h | 2 +- modules/freetype/src/pshinter/pshrec.c | 122 +- modules/freetype/src/pshinter/pshrec.h | 2 +- modules/freetype/src/pshinter/rules.mk | 2 +- modules/freetype/src/psnames/module.mk | 2 +- modules/freetype/src/psnames/psmodule.c | 9 +- modules/freetype/src/psnames/psmodule.h | 2 +- modules/freetype/src/psnames/psnamerr.h | 2 +- modules/freetype/src/psnames/psnames.c | 2 +- modules/freetype/src/psnames/pstables.h | 2 +- modules/freetype/src/psnames/rules.mk | 2 +- modules/freetype/src/raster/ftmisc.h | 9 +- modules/freetype/src/raster/ftraster.c | 33 +- modules/freetype/src/raster/ftraster.h | 2 +- modules/freetype/src/raster/ftrend1.c | 2 +- modules/freetype/src/raster/ftrend1.h | 2 +- modules/freetype/src/raster/module.mk | 2 +- modules/freetype/src/raster/raster.c | 2 +- modules/freetype/src/raster/rasterrs.h | 2 +- modules/freetype/src/raster/rules.mk | 2 +- modules/freetype/src/sdf/ftbsdf.c | 58 +- modules/freetype/src/sdf/ftsdf.c | 131 +- modules/freetype/src/sdf/ftsdf.h | 2 +- modules/freetype/src/sdf/ftsdfcommon.c | 2 +- modules/freetype/src/sdf/ftsdfcommon.h | 4 +- modules/freetype/src/sdf/ftsdferrs.h | 2 +- modules/freetype/src/sdf/ftsdfrend.c | 26 +- modules/freetype/src/sdf/ftsdfrend.h | 2 +- modules/freetype/src/sdf/module.mk | 2 +- modules/freetype/src/sdf/rules.mk | 2 +- modules/freetype/src/sdf/sdf.c | 2 +- modules/freetype/src/sfnt/module.mk | 2 +- modules/freetype/src/sfnt/pngshim.c | 6 +- modules/freetype/src/sfnt/pngshim.h | 2 +- modules/freetype/src/sfnt/rules.mk | 3 +- modules/freetype/src/sfnt/sfdriver.c | 39 +- modules/freetype/src/sfnt/sfdriver.h | 2 +- modules/freetype/src/sfnt/sferrors.h | 2 +- modules/freetype/src/sfnt/sfnt.c | 3 +- modules/freetype/src/sfnt/sfobjs.c | 100 +- modules/freetype/src/sfnt/sfobjs.h | 2 +- modules/freetype/src/sfnt/sfwoff.c | 24 +- modules/freetype/src/sfnt/sfwoff.h | 5 +- modules/freetype/src/sfnt/sfwoff2.c | 101 +- modules/freetype/src/sfnt/sfwoff2.h | 5 +- modules/freetype/src/sfnt/ttbdf.c | 2 +- modules/freetype/src/sfnt/ttbdf.h | 2 +- modules/freetype/src/sfnt/ttcmap.c | 4 +- modules/freetype/src/sfnt/ttcmap.h | 2 +- modules/freetype/src/sfnt/ttcmapc.h | 2 +- modules/freetype/src/sfnt/ttcolr.c | 268 +- modules/freetype/src/sfnt/ttcolr.h | 7 +- modules/freetype/src/sfnt/ttcpal.c | 2 +- modules/freetype/src/sfnt/ttcpal.h | 2 +- modules/freetype/src/sfnt/ttkern.c | 21 +- modules/freetype/src/sfnt/ttkern.h | 2 +- modules/freetype/src/sfnt/ttload.c | 71 +- modules/freetype/src/sfnt/ttload.h | 2 +- modules/freetype/src/sfnt/ttmtx.c | 2 +- modules/freetype/src/sfnt/ttmtx.h | 2 +- modules/freetype/src/sfnt/ttpost.c | 2 +- modules/freetype/src/sfnt/ttpost.h | 2 +- modules/freetype/src/sfnt/ttsbit.c | 37 +- modules/freetype/src/sfnt/ttsbit.h | 2 +- modules/freetype/src/sfnt/ttsvg.c | 403 + modules/freetype/src/sfnt/ttsvg.h | 43 + modules/freetype/src/sfnt/woff2tags.c | 16 +- modules/freetype/src/sfnt/woff2tags.h | 8 +- modules/freetype/src/smooth/ftgrays.c | 243 +- modules/freetype/src/smooth/ftgrays.h | 2 +- modules/freetype/src/smooth/ftsmerrs.h | 2 +- modules/freetype/src/smooth/ftsmooth.c | 2 +- modules/freetype/src/smooth/ftsmooth.h | 2 +- modules/freetype/src/smooth/module.mk | 2 +- modules/freetype/src/smooth/rules.mk | 2 +- modules/freetype/src/smooth/smooth.c | 2 +- modules/freetype/src/svg/ftsvg.c | 350 + modules/freetype/src/svg/ftsvg.h | 35 + modules/freetype/src/svg/module.mk | 23 + modules/freetype/src/svg/rules.mk | 70 + modules/freetype/src/svg/svg.c | 24 + modules/freetype/src/svg/svgtypes.h | 42 + modules/freetype/src/tools/afblue.pl | 2 +- modules/freetype/src/tools/apinames.c | 22 +- .../freetype/src/tools/ftrandom/ftrandom.c | 2 +- modules/freetype/src/tools/glnames.py | 2 +- .../freetype/src/tools/update-copyright-year | 2 +- modules/freetype/src/truetype/module.mk | 2 +- modules/freetype/src/truetype/rules.mk | 2 +- modules/freetype/src/truetype/truetype.c | 2 +- modules/freetype/src/truetype/ttdriver.c | 14 +- modules/freetype/src/truetype/ttdriver.h | 2 +- modules/freetype/src/truetype/tterrors.h | 2 +- modules/freetype/src/truetype/ttgload.c | 251 +- modules/freetype/src/truetype/ttgload.h | 2 +- modules/freetype/src/truetype/ttgxvar.c | 252 +- modules/freetype/src/truetype/ttgxvar.h | 8 +- modules/freetype/src/truetype/ttinterp.c | 137 +- modules/freetype/src/truetype/ttinterp.h | 79 +- modules/freetype/src/truetype/ttobjs.c | 93 +- modules/freetype/src/truetype/ttobjs.h | 4 +- modules/freetype/src/truetype/ttpload.c | 104 +- modules/freetype/src/truetype/ttpload.h | 2 +- modules/freetype/src/truetype/ttsubpix.c | 4 +- modules/freetype/src/truetype/ttsubpix.h | 2 +- modules/freetype/src/type1/module.mk | 2 +- modules/freetype/src/type1/rules.mk | 2 +- modules/freetype/src/type1/t1afm.c | 4 +- modules/freetype/src/type1/t1afm.h | 2 +- modules/freetype/src/type1/t1driver.c | 2 +- modules/freetype/src/type1/t1driver.h | 2 +- modules/freetype/src/type1/t1errors.h | 2 +- modules/freetype/src/type1/t1gload.c | 4 +- modules/freetype/src/type1/t1gload.h | 2 +- modules/freetype/src/type1/t1load.c | 114 +- modules/freetype/src/type1/t1load.h | 2 +- modules/freetype/src/type1/t1objs.c | 11 +- modules/freetype/src/type1/t1objs.h | 2 +- modules/freetype/src/type1/t1parse.c | 2 +- modules/freetype/src/type1/t1parse.h | 2 +- modules/freetype/src/type1/t1tokens.h | 2 +- modules/freetype/src/type1/type1.c | 2 +- modules/freetype/src/type42/module.mk | 2 +- modules/freetype/src/type42/rules.mk | 2 +- modules/freetype/src/type42/t42drivr.c | 15 +- modules/freetype/src/type42/t42drivr.h | 2 +- modules/freetype/src/type42/t42error.h | 2 +- modules/freetype/src/type42/t42objs.c | 17 +- modules/freetype/src/type42/t42objs.h | 2 +- modules/freetype/src/type42/t42parse.c | 69 +- modules/freetype/src/type42/t42parse.h | 2 +- modules/freetype/src/type42/t42types.h | 2 +- modules/freetype/src/type42/type42.c | 2 +- modules/freetype/src/winfonts/fnterrs.h | 2 +- modules/freetype/src/winfonts/module.mk | 2 +- modules/freetype/src/winfonts/rules.mk | 2 +- modules/freetype/src/winfonts/winfnt.c | 26 +- modules/freetype/src/winfonts/winfnt.h | 2 +- modules/freetype/tests/issue-1063/main.c | 3 +- modules/freetype/vms_make.com | 2 +- 701 files changed, 43564 insertions(+), 16731 deletions(-) delete mode 100644 modules/freetype/builds/windows/vc2010/script.bat create mode 100644 modules/freetype/docs/oldlogs/ChangeLog.210 create mode 100644 modules/freetype/docs/reference/ft2-ot_svg_driver.html create mode 100644 modules/freetype/docs/reference/ft2-svg_fonts.html create mode 100644 modules/freetype/include/freetype/internal/svginterface.h create mode 100644 modules/freetype/include/freetype/otsvg.h rename modules/freetype/src/autofit/{afwrtsys.h => afws-decl.h} (54%) create mode 100644 modules/freetype/src/autofit/afws-iter.h create mode 100644 modules/freetype/src/gzip/README.freetype create mode 100644 modules/freetype/src/gzip/crc32.c create mode 100644 modules/freetype/src/gzip/crc32.h create mode 100644 modules/freetype/src/gzip/gzguts.h create mode 100644 modules/freetype/src/gzip/infback.c delete mode 100644 modules/freetype/src/gzip/infblock.c delete mode 100644 modules/freetype/src/gzip/infblock.h delete mode 100644 modules/freetype/src/gzip/infcodes.c delete mode 100644 modules/freetype/src/gzip/infcodes.h create mode 100644 modules/freetype/src/gzip/inffast.c create mode 100644 modules/freetype/src/gzip/inffast.h create mode 100644 modules/freetype/src/gzip/inflate.h delete mode 100644 modules/freetype/src/gzip/infutil.c delete mode 100644 modules/freetype/src/gzip/infutil.h create mode 100644 modules/freetype/src/gzip/patches/freetype-zlib.diff create mode 100644 modules/freetype/src/sfnt/ttsvg.c create mode 100644 modules/freetype/src/sfnt/ttsvg.h create mode 100644 modules/freetype/src/svg/ftsvg.c create mode 100644 modules/freetype/src/svg/ftsvg.h create mode 100644 modules/freetype/src/svg/module.mk create mode 100644 modules/freetype/src/svg/rules.mk create mode 100644 modules/freetype/src/svg/svg.c create mode 100644 modules/freetype/src/svg/svgtypes.h diff --git a/modules/freetype/CMakeLists.txt b/modules/freetype/CMakeLists.txt index 0935c15..cd04b97 100644 --- a/modules/freetype/CMakeLists.txt +++ b/modules/freetype/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright (C) 2013-2021 by +# Copyright (C) 2013-2022 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written originally by John Cary @@ -12,13 +12,17 @@ # fully. # # -# The following will 1. create a build directory and 2. change into it and +# The following will (1) create a build directory, and (2) change into it and # call cmake to configure the build with default parameters as a static -# library. See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html -# for information about Debug, Release, etc. builds. +# library. See +# +# https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html +# +# for information about debug or release builds, for example # # cmake -B build -D CMAKE_BUILD_TYPE=Release # +# # For a dynamic library, use # # cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release @@ -39,7 +43,8 @@ # # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR64 .. # -# Finally, build the project with: +# +# Finally, build the project with # # cmake --build build # @@ -56,48 +61,54 @@ # # Some notes. # -# . `cmake' creates configuration files in +# - `cmake' creates configuration files in # # /include/freetype/config # # which should be further modified if necessary. # -# . You can use `cmake' directly on a freshly cloned FreeType git +# - You can use `cmake' directly on a freshly cloned FreeType git # repository. # -# . `CMakeLists.txt' is provided as-is since it is normally not used by the +# - `CMakeLists.txt' is provided as-is since it is normally not used by the # developer team. # -# . Set the `FT_WITH_ZLIB', `FT_WITH_BZIP2', `FT_WITH_PNG', -# `FT_WITH_HARFBUZZ', and `FT_WITH_BROTLI' CMake variables to `ON' to -# force using a dependency. Leave a variable undefined (which is the -# default) to use the dependency only if it is available. Example: +# - Set the `FT_REQUIRE_ZLIB', `FT_REQUIRE_BZIP2', `FT_REQUIRE_PNG', +# `FT_REQUIRE_HARFBUZZ', and `FT_REQUIRE_BROTLI' CMake variables to `ON' +# or `TRUE' to force using a dependency. Leave a variable undefined +# (which is the default) to use the dependency only if it is available. +# Example: # -# cmake -B build -D FT_WITH_ZLIB=ON \ -# -D FT_WITH_BZIP2=ON \ -# -D FT_WITH_PNG=ON \ -# -D FT_WITH_HARFBUZZ=ON \ -# -D FT_WITH_BROTLI=ON [...] +# cmake -B build -D FT_REQUIRE_ZLIB=TRUE \ +# -D FT_REQUIRE_BZIP2=TRUE \ +# -D FT_REQUIRE_PNG=TRUE \ +# -D FT_REQUIRE_HARFBUZZ=TRUE \ +# -D FT_REQUIRE_BROTLI=TRUE [...] # -# Set `CMAKE_DISABLE_FIND_PACKAGE_XXX=TRUE' to disable a dependency completely -# (where `XXX' is a CMake package name like `BZip2'). Example for disabling all +# - Set `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where +# `XXX' is a CMake package name like `BZip2'). Example for disabling all # dependencies: # -# cmake -B build -D CMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE \ -# -D CMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \ -# -D CMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE \ -# -D CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE \ -# -D CMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE [...] +# cmake -B build -D FT_DISABLE_ZLIB=TRUE \ +# -D FT_DISABLE_BZIP2=TRUE \ +# -D FT_DISABLE_PNG=TRUE \ +# -D FT_DISABLE_HARFBUZZ=TRUE \ +# -D FT_DISABLE_BROTLI=TRUE [...] # -# . Installation of FreeType can be controlled with the CMake variables +# - NOTE: If a package is set as DISABLED, it cannot be set as REQUIRED +# without unsetting the DISABLED value first. For example, if +# `FT_DISABLE_HARFBUZZ=TRUE' has been set (Cache is present), you need to +# call `FT_DISABLE_HARFBUZZ=FALSE' before calling +# `FT_REQUIRE_HARFBUZZ=TRUE'. +# +# - Installation of FreeType can be controlled with the CMake variables # `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' # (this is compatible with the same CMake variables in zlib's CMake # support). -# FreeType explicitly marks the API to be exported and relies on the compiler -# to hide all other symbols. CMake supports a C_VISBILITY_PRESET property -# starting with 2.8.12. -cmake_minimum_required(VERSION 2.8.12) +# To minimize the number of cmake_policy() workarounds, +# CMake >= 3 is requested. +cmake_minimum_required(VERSION 3.0) if (NOT CMAKE_VERSION VERSION_LESS 3.3) # Allow symbol visibility settings also on static libraries. CMake < 3.3 @@ -109,6 +120,8 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.3) endif () include(CheckIncludeFile) +include(CMakeDependentOption) +include(FindPkgConfig) # CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which # configures the base build environment and references the toolchain file @@ -149,8 +162,8 @@ endif () project(freetype C) set(VERSION_MAJOR "2") -set(VERSION_MINOR "11") -set(VERSION_PATCH "0") +set(VERSION_MINOR "12") +set(VERSION_PATCH "1") # Generate LIBRARY_VERSION and LIBRARY_SOVERSION. set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'") @@ -171,13 +184,37 @@ string(REGEX REPLACE math(EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}") set(LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}") -# External dependency library detection is automatic. See the notes at the top -# of this file, for how to force or disable dependencies completely. -option(FT_WITH_ZLIB "Use system zlib instead of internal library." OFF) -option(FT_WITH_BZIP2 "Support bzip2 compressed fonts." OFF) -option(FT_WITH_PNG "Support PNG compressed OpenType embedded bitmaps." OFF) -option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." OFF) -option(FT_WITH_BROTLI "Support compressed WOFF2 fonts." OFF) +# External dependency library detection is automatic. See the notes at the +# top of this file, for how to force or disable dependencies completely. +option(FT_DISABLE_ZLIB + "Disable use of system zlib and use internal zlib library instead." OFF) +cmake_dependent_option(FT_REQUIRE_ZLIB + "Require system zlib instead of internal zlib library." OFF + "NOT FT_DISABLE_ZLIB" OFF) + +option(FT_DISABLE_BZIP2 + "Disable support of bzip2 compressed fonts." OFF) +cmake_dependent_option(FT_REQUIRE_BZIP2 + "Require support of bzip2 compressed fonts." OFF + "NOT FT_DISABLE_BZIP2" OFF) + +option(FT_DISABLE_PNG + "Disable support of PNG compressed OpenType embedded bitmaps." OFF) +cmake_dependent_option(FT_REQUIRE_PNG + "Require support of PNG compressed OpenType embedded bitmaps." OFF + "NOT FT_DISABLE_PNG" OFF) + +option(FT_DISABLE_HARFBUZZ + "Disable HarfBuzz (used for improving auto-hinting of OpenType fonts)." OFF) +cmake_dependent_option(FT_REQUIRE_HARFBUZZ + "Require HarfBuzz for improving auto-hinting of OpenType fonts." OFF + "NOT FT_DISABLE_HARFBUZZ" OFF) + +option(FT_DISABLE_BROTLI + "Disable support of compressed WOFF2 fonts." OFF) +cmake_dependent_option(FT_REQUIRE_BROTLI + "Require support of compressed WOFF2 fonts." OFF + "NOT FT_DISABLE_BROTLI" OFF) # Disallow in-source builds @@ -202,41 +239,56 @@ if (BUILD_FRAMEWORK) message(FATAL_ERROR "You should use Xcode generator with BUILD_FRAMEWORK enabled") endif () - set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)") + set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)") set(BUILD_SHARED_LIBS ON) endif () # Find dependencies -set(HARFBUZZ_MIN_VERSION "2.0.0") -if (FT_WITH_HARFBUZZ) - find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED) -else () - find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION}) +if (NOT FT_DISABLE_HARFBUZZ) + set(HARFBUZZ_MIN_VERSION "2.0.0") + if (FT_REQUIRE_HARFBUZZ) + find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED) + else () + find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION}) + endif () endif () -if (FT_WITH_PNG) - find_package(PNG REQUIRED) -else () - find_package(PNG) +if (NOT FT_DISABLE_PNG) + if (FT_REQUIRE_PNG) + find_package(PNG REQUIRED) + else () + find_package(PNG) + endif () endif () -if (FT_WITH_ZLIB) - find_package(ZLIB REQUIRED) -else () - find_package(ZLIB) +if (NOT FT_DISABLE_ZLIB) + if (FT_REQUIRE_ZLIB) + find_package(ZLIB REQUIRED) + else () + find_package(ZLIB) + endif () endif () -if (FT_WITH_BZIP2) - find_package(BZip2 REQUIRED) -else () - find_package(BZip2) +if (NOT FT_DISABLE_BZIP2) + # Genuine BZip2 does not provide bzip2.pc, but some platforms have it. + # For better dependency in freetype2.pc, bzip2.pc is searched + # regardless of the availability of libbz2. If bzip2.pc is found, + # Requires.private is used instead of Libs.private. + if (FT_REQUIRE_BZIP2) + find_package(BZip2 REQUIRED) + else () + find_package(BZip2) + endif () + pkg_check_modules(PC_BZIP2 bzip2) endif () -if (FT_WITH_BROTLI) - find_package(BrotliDec REQUIRED) -else () - find_package(BrotliDec) +if (NOT FT_DISABLE_BROTLI) + if (FT_REQUIRE_BROTLI) + find_package(BrotliDec REQUIRED) + else () + find_package(BrotliDec) + endif () endif () # Create the configuration file @@ -353,6 +405,7 @@ set(BASE_SRCS src/sdf/sdf.c src/sfnt/sfnt.c src/smooth/smooth.c + src/svg/svg.c src/truetype/truetype.c src/type1/type1.c src/type42/type42.c @@ -426,7 +479,7 @@ target_include_directories( PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include - + # Make available for builds/unix/ftsystem.c. ${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config ) @@ -438,42 +491,48 @@ if (BUILD_FRAMEWORK) ) set_target_properties(freetype PROPERTIES FRAMEWORK TRUE - MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist + MACOSX_FRAMEWORK_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/builds/mac/freetype-Info.plist PUBLIC_HEADER "${PUBLIC_HEADERS}" XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" ) endif () -set(PKG_CONFIG_REQUIRED_PRIVATE "") -set(PKG_CONFIG_LIBS_PRIVATE "") +set(PKGCONFIG_REQUIRES "") +set(PKGCONFIG_REQUIRES_PRIVATE "") +set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype") +set(PKGCONFIG_LIBS_PRIVATE "") if (ZLIB_FOUND) target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "zlib") endif () if (BZIP2_FOUND) target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS - list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2") + if (PC_BZIP2_FOUND) + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "bzip2") + else () + list(APPEND PKGCONFIG_LIBS_PRIVATE "-lbz2") + endif () endif () if (PNG_FOUND) target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS}) target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libpng") endif () if (HarfBuzz_FOUND) target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY}) target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") endif () if (BROTLIDEC_FOUND) target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS}) target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS}) - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libbrotlidec") + list(APPEND PKGCONFIG_REQUIRES_PRIVATE "libbrotlidec") endif () @@ -500,7 +559,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) # Generate the pkg-config file file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN) - string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}") + string(REPLACE ";" ", " PKGCONFIG_REQUIRES_PRIVATE "${PKGCONFIG_REQUIRES_PRIVATE}") string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX} FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) @@ -512,10 +571,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}" - FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + + if (BUILD_SHARED_LIBS) + string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + else () + string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "" + FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) + endif () set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc") if (EXISTS "${FREETYPE2_PC_IN_NAME}") diff --git a/modules/freetype/ChangeLog b/modules/freetype/ChangeLog index e649d31..5de13a6 100644 --- a/modules/freetype/ChangeLog +++ b/modules/freetype/ChangeLog @@ -1,7815 +1,3211 @@ -2021-07-18 Werner Lemberg +2022-05-01 Werner Lemberg - * Version 2.11.0 released. + * Version 2.12.1 released. ========================== + Tag sources with `VER-2-12-1'. - Tag sources with `VER-2-11-0'. + * docs/VERSION.TXT: Add entry for version 2.12.1. + * docs/CHANGES, docs/release: Updated. - * docs/VERSION.TXT: Add entry for version 2.11.0. - * docs/CHANGES: Updated. - - * README, src/base/ftver.rc, builds/windows/vc2010/index.html, - builds/windows/visualc/index.html, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/index.html, docs/freetype-config.1: - s/2.10.4/2.11.0/, s/2104/2110/. - - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 11. - (FREETYPE_PATCH): Set to 0. - - * builds/unix/configure.raw (version_info): Set to 24:0:18. - * CMakeLists.txt (VERSION_MINOR): Set to 11. - (VERSION_PATCH): Set to 0. - - * builds/toplevel.mk (dist): Ignore more git-related files. - -2021-07-17 David Turner - - * src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined. - - The code assumed that if `__SSE2__` is defined, then 64-bit integer - types are available. This is not the case apparently for certain - multilib compiler targets like 'x86_32.x86' used by Gentoo. - - This patch fixes the issue by disabling the special code path when - 64-bit integer types are not available. - - Fixes #1071. - -2021-07-16 Alex Richardson - - [tests] Allow arbitrary build directories. - - * tests/issue-1063/main.c (main): I am building with a build - directory that is not directly inside the source tree, so the path - `../tests/data/As.I.Lay.Dying.ttf` does not resolve to the test - input file. This change passes the test data directory as an - environment variable to allow arbitrary build directories. - - * tests/meson.build: Updated. - -2021-07-16 Alex Richardson - - * tests/issue-1063/main.c (main): Fix uninitialized variable. - - I tried running `meson test` but the test just crashed and gdb - reported that the face argument to `FT_Get_Char_Index` was nonsense. - With this change the test prints 'Could not open file: ' as it - should. - -2021-07-16 Werner Lemberg - - [smooth] Minor fixes. - - * src/smooth/ftgrays.c (gray_render_conic): Move variable and - structure declarations to beginning of function. Inspite of C99 - compliance we still do this for the sake of backward compatibility. - This also avoids a shadowing declaration of `count`. - (gray_convert_glyph_inner): Fix typo. - -2021-07-15 Ben Wagner - - * src/smooth/ftgrays.c: Guard inclusion of `emmintrin.h`. - - Guard inclusion of `emmintrin.h` with `#ifdef __SSE2__`. The gcc - version of this header, `xmmintrin.h`, and `mmintrin.h` check that - the appropriate defines are set before defining anything (are - internally guarded). However, the clang versions of these includes - are not internally guarded. As a result of this, externally guard - the inclusion of these headers. - -2021-07-15 David Turner - - [smooth] Implement Bézier quadratic arc flattening with DDA. - - Benchmarking shows that this provides a very slighty performance - boost when rendering fonts with lots of quadratic Bézier arcs, - compared to the recursive arc splitting, but only when SSE2 is - available, or on 64-bit CPUs. - - On a 2017 Core i5-7300U CPU on Linux/x86_64: - - ftbench -p -s10 -t5 -cb DroidSansFallbackFull.ttf - - Before: 4.033 us/op (best of 5 runs for all numbers) - After: 3.876 us/op - - ftbench -p -s60 -t5 -cb DroidSansFallbackFull.ttf - - Before: 13.467 us/op - After: 13.385 us/op - - * src/smooth/ftgrays.c (gray_render_conic): New implementation - based on DDA and optionally SSE2. - -2021-07-15 David Turner - - [smooth] Minor speedup to smooth rasterizer. - - This speeds up the smooth rasterizer by avoiding conditional - branches in the hot path. - - - Define a fixed 'null cell', which will be pointed to whenever the - current cell is outside of the current target region. This avoids - a `ras.cell != NULL` check in the `FT_INTEGRATE` macro. - - - Also use the null cell as a sentinel at the end of all `ycells` - linked-lists, by setting its x coordinate to `INT_MAX`. This - avoids a `if (!cell)` check in `gray_set_cell` as well. - - - Slightly change the worker struct fields to perform a little less - operations during rendering. - - Example results (on a 2013 Corei5-3337U CPU) - - out/ftbench -p -s10 -t5 -bc DroidSansFallbackFull.ttf - - Before: 5.472 us/op - After: 5.275 us/op - - out/ftbench -p -s60 -t5 -bc DroidSansFallbackFull.ttf - - Before: 17.988 us/op - After: 17.389 us/op - - * src/smooth/ftgrays.c (grat_TWorker): Replace `num_cells` field with - `cell_free` and `cell_limit`. - (NULL_CELL_PTR, CELL_MAX_X_VALUE, CELL_IS_NULL): New macros. - (gray_dump_cells, gray_set_cell, gray_sweep, gray_sweep_direct, - gray_convert_glyph_inner, gray_convert_glyph): Updated. - -2021-07-15 David Turner - - [tests] Rewrite download script in Python3. - - This commit replaces the bash script with a Python script that does - the same work, plus avoiding to download anything if the files are - already installed with the right content. - - We now use the first 8 bytes of each file's sha256 hash for the - digest. - - * tests/scripts/download-test-fonts.sh: Removed. - * tests/scripts/download-test-fonts.py: New script. - * tests/README.md: Updated. - -2021-07-15 Alex Richardson - - Support architectures where `long` is smaller than pointers. - - I am currently trying to compile FreeType for CHERI-extended ISAs - (CHERI-RISC-V and Arm's Morello), but I am getting compiler warnings - from the `FT_UINT_TO_POINTER` macro. When compiling with the CHERI - Clang compiler, not using `uinptr_t` for casts between integers an - pointers results in the following `-Werror` build failures: - - ``` - In file included from .../src/truetype/truetype.c:22: - .../src/truetype/ttgload.c:1925:22: error: - cast from provenance-free integer type to pointer type will - give pointer that can not be dereferenced - [-Werror,-Wcheri-capability-misuse] - node->data = FT_UINT_TO_POINTER( glyph_index ); - ^ - .../include/freetype/internal/compiler-macros.h:79:34: note: - expanded from macro 'FT_UINT_TO_POINTER' - ``` - - * include/freetype/internal/compiler-macros.h (FT_UINT_TO_POINTER): - The ISO C standard compliant fix for this would be to use - `uintptr_t` from `stdint.h`, but I am not sure if this is supported - by the minimum compiler version. Therefore, use the - compiler-defined `__UINTPTR_TYPE__` macro (supported in GCC 4.6+ and - Clang since about 3.0) before checking for `_WIN64` and falling back - to `unsigned long`. - -2021-07-13 Oleg Oshmyan - - [base] Fix `FT_Open_Face`'s handling of user-supplied streams. - - This was already true (though undocumented) most of the time, but - not if `FT_NEW` inside `FT_Stream_New` failed or if the - `FT_OPEN_XXX` flags were bad. - - Normally, `FT_Open_Face` calls `FT_Stream_New`, which returns the - user-supplied stream unchanged, and in case of any subsequent error - in `FT_Open_Face`, the stream is closed via `FT_Stream_Free`. - - Up to now, however, `FT_Stream_New` allocates a new stream even if - it is already given one by the user. If this allocation fails, the - user-supplied stream is not returned to `FT_Open_Face` and never - closed. Moreover, the user cannot detect this situation: all they - see is that `FT_Open_Face` returns `FT_Err_Out_Of_Memory`, but that - can also happen after a different allocation fails within the main - body of `FT_Open_Face`, when the user's stream has already been - closed by `FT_Open_Face`. It is plausible that the user stream's - `close` method frees memory allocated for the stream object itself, - so the user cannot defensively free it upon `FT_Open_Face` failure - lest it ends up doubly freed. All in all, this ends up leaking the - memory/resources used by user's stream. - - Furthermore, `FT_Stream_New` simply returns an error if the - `FT_OPEN_XXX` flags are unsupported, which can mean either an - invalid combination of flags or a perfectly innocent - `FT_OPEN_STREAM` on a FreeType build that lacks stream support. - With this patch, the user-supplied stream is closed even in these - cases, so the user can be sure that if `FT_Open_Face` failed, the - stream is definitely closed. - - * src/base/ftobjs.c (FT_Stream_New): Don't allocate a buffer - unnecessarily. - Move error-handling code to make the control flow more obvious. - Close user-supplied stream if the flags are unsupported. - `FT_Stream_Open` always sets `pathname.pointer`, so remove the - redundant (re)assignment. None of the `FT_Stream_Open...` functions - uses `stream->memory`, so keep just one assignment at the end, - shared among all possible control flow paths. - ('Unsupported flags' that may need a stream closure can be either an - invalid combination of multiple `FT_OPEN_XXX` mode flags or a clean - `FT_OPEN_STREAM` flag on a FreeType build that lacks stream - support.) - -2021-07-13 Oleg Oshmyan - - [base] Reject combinations of incompatible `FT_OPEN_XXX` flags. - - The three modes are mutually exclusive, and the documentation of the - `FT_OPEN_XXX` constants notes this. However, there was no check to - validate this in the code, and the documentation on `FT_Open_Args` - claimed that the corresponding bits were checked in a well-defined - order, implying it was valid (if useless) to specify more than one. - Ironically, this documented order did not agree with the actual - code, so it could not be relied upon; hopefully, nobody did this and - nobody will be hurt by the new validation. - - Even if multiple mode bits were allowed, they could cause memory - leaks: if both `FT_OPEN_STREAM` and `stream` are set along with - either `FT_OPEN_MEMORY` or `FT_OPEN_PATHNAME`, then `FT_Stream_New` - allocated a new stream but `FT_Open_Face` marked it as an 'external' - stream, so the stream object was never released. - - * src/base/ftobjs.c (FT_Stream_New): Reject incompatible - `FT_OPEN_XXX` flags. - -2021-07-12 Alex Richardson - - * meson.build: Fix build for other UNIX systems (e.g., FreeBSD). - - Without this change the build of `unix/ftsystem.c` fails because the - `ftconfig.h` header that defines macros such as `HAVE_UNISTD_H` and - `HAVE_FCNTL_H` is only being generated for Linux, macOS, and Cygwin - systems: - - ``` - .../builds/unix/ftsystem.c:258:32: error: - use of undeclared identifier 'O_RDONLY' - file = open( filepathname, O_RDONLY ); - ``` - - Instead of hardcoding a list of operating systems for this check, - update the logic that decides whether to build the file and set a - boolean flag that can be checked instead. - -2021-07-12 Werner Lemberg - - [autofit] More clean-ups. - - * src/autofit/afhints.h (AF_GlyphHintsRec): Remove the no longer - needed fields `xmin_delta` and `xmax_delta`. - - * src/autofit/afhints.c (af_glyph_hints_reload), - src/autofit/afloader.c (af_loader_load_glyph): Updated. - -2021-07-12 Werner Lemberg - - Small clean-ups for the last few commits. - - * include/freetype/fttrace.h (afwarp): Removed. - -2021-07-12 David Turner - - Remove obsolete `AF_Angle` type and related sources. - - * src/autofit/afangles.c: File removed. Functions related to - sorting moved to... - * src/autofit/afhints.c (af_sort_pos, af_sort_and_quantize_widths): - This file. - * src/autofit/afangles.h: File removed. - * src/autofit/aftypes.h: Updated. - * src/autofit/autofit.c: Updated. - - * src/autofit/rules.mk (AUTOF_DRV_SRC): Updated. - -2021-07-12 David Turner - - Remove experimental auto-hinting 'warp' mode. - - This feature was always experimental, and probably never worked - properly. This patch completely removes it from the source code, - except for a documentation block describing it for historical - purposes. - - * devel/ftoption.h, include/freetype/config/ftoption.h: Remove - `AF_CONFIG_OPTION_USE_WARPER`. - - * include/freetype/ftdriver.h: Document 'warping' property as - obsolete. - - * src/autofit/afwarp.c, src/autofit/afwarp.h: Files removed. - * src/autofit/*: Remove any code related to warp mode. - -2021-07-12 David Turner - - Remove experimental 'Latin2' writing system (`FT_OPTION_AUTOFIT2`). - - This code has always been experimental and was never compiled anyway - (`FT_OPTION_AUTOFIT2` does not appear in `ftoption.h` or even any of - our build files). - - * include/freetype/internal/fttrace.h (aflatin2): Removed. - * src/autofit/aflatin2.h, src/autofit/aflatin2.c: Files removed. - * src/autofit/afloader.c: Remove undocumented hook to activate - Latin2 system. - * src/autofit/afstyles.h: Remove `ltn2_dflt` style definition. - * src/autofit/afwrtsys.h: Remove `LATIN2` writing system definition. - * src/autofit/autofit.c: Updated. - -2021-07-05 Werner Lemberg - - * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix argument. - - Reported by Hin-Tak. - -2021-07-03 Werner Lemberg - - * meson_options.txt: Sort alphabetically; no final full stops. - -2021-07-01 Ben Wagner - - * src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`. - - It is undefined behavior to pass `NULL` to `memcpy`. `coords' is - passed to `memcpy` but `TT_Get_MM_Blend` and `TT_Get_Var_Design` - explictly call `tt_set_mm_blend` with `coords` as `NULL`. In - addition, `TT_Set_MM_Blend` has a similar possible issue. - -2021-06-30 Dominik Röttsches - - [sfnt] Support PaintScale in 'COLR' v1 parsing. - - * include/freetype/ftcolor.h (FT_PaintFormat): Renumber values, add - `FT_COLR_PAINTFORMAT_SCALE`. - (FT_PaintScale): New structure to represent 'PaintScale*' tables. - (FT_COLR_Paint): Updated. - - * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration. - (read_paint): Parse 'PaintScale' and friends. - -2021-06-30 Dominik Röttsches - - [sfnt] Handle fonts without layer list in 'COLR' v1. - - 'COLR' v1 fonts do not necessarily need to have a layer list; for - this reason, 'fontTools' recently started generating fonts in a way - that drops the layer list if there are no layers in it. This - results in the layer list offset becoming zero, which FreeType - treated as an invalid table. Fix that and handle the case for layer - list offset being 0. This slightly changes how we need to calculate - the starting offset for paints. - - * src/sfnt/ttcolr.c (tt_face_load_colr): Handle case of layer list - offset being zero without outright rejecting table. - -2021-06-30 Alexei Podtelezhnikov - - * src/raster/ftraster.c (Render_Single_Pass): Simplify `band_stack'. - -2021-06-29 Alexei Podtelezhnikov - - [raster] Do not skip the second pass without dropout control. - - The second pass also fixes horizontal lines through the pixel centers. - - * src/raster/ftraster.c (black_TWorker): Do not use `second_pass'. - (Render_Glyph): Skip the second pass only with the appropriate flag. - -2021-06-29 Alexei Podtelezhnikov - - [raster] Handle sub-band stack locally. - - * src/raster/ftraster.c (black_TWorker): Move `band_stack' from here.. - (Render_Single_Pass): ... to here and accept limit arguments. - (Render_Glyph): Updated. - -2021-06-25 Anurag Thakur - - [CI] Introduce linux CI and refactor job names. - - * .gitlab-ci.yml: Added jobs for building freetype on linux. - -2021-06-28 Alexei Podtelezhnikov - - [raster] Handle Bézier stack locally. - - * src/raster/ftraster.c (black_TWorker): Move `arcs' from here... - (Conic_To, Cubic_To): ... to here to tighten their scope. - (Bezier_Up, Bezier_Down): ... Take the current `arc' argument. - -2021-06-28 Dominik Röttsches - - [sfnt] Improve paint limit checks - - Paint tables can appear before the `base_glyphs_v1` offset if the - font is produced with the layer list before the base glyph list. In - this case paint tables can occur after the layer list but before the - base glyph list. Checks in the 'COLR' v1 code were rejecting fonts - with this layout. Improve these checks by calculating a minimum - offset after which paint tables can occur and use that in safety - checks. - - * src/sfnt/ttcolr.c (Colr, tt_face_load_colr): Declare - `paint_start_v1` and calculate that as the minimum of the end of - layer list and base glyph list. - (get_child_table_pointer, read_paint, tt_face_get_paint_layers): - Use that in safety checks. - -2021-06-28 Alexei Podtelezhnikov - - [raster] Clean up vertical sweep. - - * src/raster/ftraster.c (black_TWorker): Replace the current line - offset with the pointer and drop the increment. - (Function_Sweep_Init): Take values as arguments instead of pointers. - (Vertical_Sweep_*, Horizontal_Sweep_Init, Draw_Sweep): Updated. - -2021-06-25 Alexei Podtelezhnikov - - [raster] Make `band_top' local variable. - - * src/raster/ftraster.c (black_TWorker): Move `band_top' from here... - (Render_Single_Pass): ... to here, and refactor. - (Render_Glyph): Updated. - -2021-06-25 Alexei Podtelezhnikov - - [raster] Adjust sub-band bisecting limits. - - We can bisect a band until it is just a single scan line. This might - be slow and cause time-outs but if we need to impose limits it should - be elsewhere. - - * src/raster/ftraster.c (Render_Single_Pass): Tweak sub-banding. - -2021-06-25 Alexei Podtelezhnikov - - * src/raster/ftraster.c (Render_Single_Pass): Remove dead code. - -2021-06-25 Werner Lemberg - - [base] Add trace level to logging output. - - Some practical debugging work has shown that displaying level X of - an `FT_TRACEX` macro in the output of `FT2_DEBUG="... -v"` would be - very helpful to find out which trace level should be selected. As - an example, we now get output like - - ``` - [ttobjs:2] TTF driver - [ttobjs:2] SFNT driver - [sfobjs:2] not a font using the SFNT container format - [t1objs:2] Type 1 driver - [stream:7] FT_Stream_EnterFrame: 14 bytes - ``` - - * include/freetype/internal/ftdebug.h (FT_LOGGING_TAGX): New macro. - (FT_LOG): Use it to add the trace level to the logging tag. - - * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH): - Adjust. - - * docs/DEBUG: Updated. - -2021-06-24 Alexei Podtelezhnikov - - [smooth, raster] Fix up and align error codes. - - FT_Render_Glyph picked up FAILURE or 1 returned from the raster - function, which became a confusing error code. Instead, return - Raster_Overflow in the unlikely event that banding does not help or - another meaningful error. - - * src/smooth/ftgrays.c (gray_convert_glyph_inner, gray_convert_glyph): - Use Raster_Overflow when the rendering pool is exhausted and return it - if banding does not help. - (gray_raster_render): Use Smooth_Err_Ok. - - * src/raster/ftraster.c (Render_Single_Pass): Return Raster_Overflow - if banding does not help or another error code. - -2021-06-23 Alexei Podtelezhnikov - - [smooth, raster] Remove synonymous error macros. - - * src/smooth/ftgays.c [STANDALONE_]: s/ErrRaster_/Smooth_Err_/. - (gray_convert_glyph_inner): Updated accordingly. - - * src/raster/ftraster.c [STANDALONE_]: Do not abbreviate error macros. - (New_Profile, End_Profile, Insert_Y_Turn, Line_Up, Bezier_Up, - Decompose_Curve, Draw_Sweep, Render_Single_Pass, ft_black_render): - Updated accordingly. - -2021-06-22 Dominik Röttsches - - [sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/. - - * include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat, - FT_COLR_Paint): Do it to make it harmonize with other names such as - 'PaintTranslate'. - - * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto. - -2021-06-22 Dominik Röttsches - - Move 'COLR' API to `ftcolor.h`. - - * include/freetype/freetype.h: Cut section layer managament - containing 'COLR' v0 and v1 API and move it to `ftcolor.h` as - requested by Werner on freetype-devel. - * include/freetype/ftcolor.h: Paste that section. - -2021-06-19 Werner Lemberg - - [truetype] Fix integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35312 - - * src/truetype/ttinterp.c (Ins_JMPR): Use `ADD_LONG`. - -2021-06-19 Werner Lemberg - - [autofit] Prevent hinting if there are too many segments. - - This speeds up handling of broken glyphs. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35309 - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Implement - it. - -2021-06-18 Alexei Podtelezhnikov - - * src/sdf/ftsdfrend.c (ft_(b)sdf_render): Do not FT_ERROR routinely. - -2021-06-16 David Turner - - [autofit] Fix return value of `FT_Load_Glyph`. - - * src/autofit/afglobal.c (af_face_globals_get_metrics): The issue is - that `style_metrics_init` sometimes returns -1 without clearing - `error`. While looping to `Again`, the next operation is - successful, but -1 is still returned by the function. The fix is to - set `error` to 0 appropriately. - - Fixes #1063. - -2021-06-15 David Turner - - [meson] Add first regression test to FreeType. - - * tests/README.md: New file that explains how to build and run the - tests with the Meson build. - - * tests/scripts/download-test-fonts.sh: New bash script to download - test font files to the `tests/data` folder. - - * meson.build, meson_options.txt: Add 'tests' option to enable - building and running the test programs (disabled by default). - - * tests/meson.build: New file. - - * tests/issue-1063/main.c: Simple regression test to exhibit issue - 1063. - - * .gitignore: Ignore the content of the `tests/data` folder for - now. - -2021-06-12 Alexei Podtelezhnikov - - [type42] Fix new memory leak. - - We need to inverse inheritance of FT_GlyphSlot_Internal so that we - have a chance to free the rendered bitmap from the parent slot. - - * src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts - of the child `ttslot' and replace it with the parent structure. - (T42_GlyphSlot_Done): Updated accordingly. - -2021-06-12 Werner Lemberg - - [psaux] Fix another assertion. - - * src/psaux/psintrp.c (cf2_interpT2CharString) - : Convert assertion into error, since the - problem can happen with invalid user input. - - Test case is file - - fuzzing/corpora/legacy/oss-fuzz/5754332360212480-unknown-read - - in the `freetype2-testing` repository. - -2021-06-12 Werner Lemberg - - [psaux] Fix assertions. - - * src/psaux/pshints.c (cf2_hintmap_adjustHints): Check for overflow - before emitting an assertion error. - - Test case is file - - fuzzing/corpora/legacy/oss-fuzz/4594115297673216-integer-overflow - - in the `freetype2-testing` repository. - -2021-06-09 Alexei Podtelezhnikov - - * src/truetype/ttinterp.c (TT_RunIns): Optimize tracing. - -2021-06-09 Alexei Podtelezhnikov - - [sdf] Fix SDF positioning. - - * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Add padding to - `bitmap_top' and `bitmap_left'. - - * sdf/sdf/ftsdf.c (sdf_generate_with_overlaps): Fix VC++ warning. - -2021-06-08 Werner Lemberg - - Fix 'devel' build for 'COLR' v1. - - * devel/ftoption.h: Synchronize with - `include/freetype/config/ftoption.h`. - -2021-06-08 Werner Lemberg - - [sfnt] Sanitize cmap4 table better. - - Fixes #1062. - - * src/sfnt/ttcmap.c (tt_cmap4_validate): Handle a too-small value of - `length` gracefully. - -2021-06-08 Dominik Röttsches - - [sfnt] Pointer validity check when reading 'COLR' v1 layers - - * src/sfnt/ttcolr.c (tt_face_get_paint_layers): In addition to the - existing sanity checks, ensure that the pointer to the layer to be - read is within the 'COLR' v1 table. - -2021-06-08 Werner Lemberg - - * src/sdf/ftsdfcommon.c: Fix inclusion of header files. - -2021-06-08 Werner Lemberg - - [sdf] Make `make multi` work. - - * src/sdf/ftsdf.c: Include `ftbitmap.h`. - - * src/sdf/ftsdfcommon.h: Move function bodies to `ftsdfcommon.c`. - Include `ftobjs.h` to get definitions of `FT_LOCAL` and friends. - - * src/sdf/ftsdfcommon.c: New file. - - * src/sdf/rules.mk, src/sdf/sdf.c: Updated. - -2021-06-08 Anuj Verma - - [sdf] Use 8 bits for final SDF output instead of 16bits. - - Since 8-bits is enough to represent SDF data we no longer require - 16-bits for this purpose. Also, we now normalize the output data - to use the entire 8-bit range efficiently. For example: if we use - 3.5 format with a spread of 1 we basically only use the starting - 5-bits. By normalizing we can use the entire 8-bit range. - - * include/freetype/freetype.h (FT_Render_Mode): Updated description - for `FT_RENDER_MODE_SDF` regarding this change. - - * include/freetype/ftimage.h (FT_Pixel_Mode): Removed - `FT_PIXEL_MODE_GRAY16` since no longer required. - - * include/freetype/fttypes.h (FT_F6Dot10): Removed since no longer - required. - - * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Allocate 8-bit - bitmap instead of 16-bit buffer. - - * src/sdf/ftsdfcommon.h (map_fixed_to_sdf): Added function to convert - 16.16 distance value to our desired format. - - * src/sdf/ftsdf.c (sdf_generate_with_overlaps, - sdf_generate_bounding_box): Use the new `map_fixed_to_sdf` function - and also use 8-bit output buffer. - - * src/sdf/ftbsdf.c (finalize_sdf): Output to a 8-bit buffer instead - of 16-bit buffer. - -2021-06-02 Ben Wagner - Werner Lemberg - - [sfnt] Fix fallout from 2021-05-29 change. - - * src/sfnt/ttcolr.c (find_base_glyph_record, - find_base_glyph_v1_record): Adjust binary search. - - Needs to be updated with change to unsigned. - -2021-06-02 Werner Lemberg - - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix tracing. - - Problem reported by Alexei. - -2021-06-02 Werner Lemberg - - [psaux] Fix MSVC compiler warnings. - - * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): - Add cast. - -2021-05-29 Werner Lemberg - - Fix compilation errors and (some) warnings for clang++. - - * src/autofit/afmodule.c (AF_GlyphHintsRec): Make it static. - - * src/cache/ftcache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c - (ftc_snode_compare): Remove semicolon. - - * src/cff/cffparse.c (cff_parser_run): Add `break` statement. - - * src/cid/cidload.c (cid_hex_to_binary): Add cast. - - * src/sdf/ftbsdf.c (CHECK_NEIGHBOR): Use `do {} while(0)` loop. - (bsdf_init_distance_map, finalize_sdf, bsdf_raster_render): Add - casts. - * src/sdf/ftsdf.c (sdf_generate_bounding_box, - sdf_generate_with_overlaps): Ditto. - * src/sdf/ftsdfcommon.h (square_root): Ditto. - * src/sdf/ftsdfrend.c (sdf_property_get, ft_sdf_render, - ft_bsdf_render): Ditto. - - * src/sfnt/ttcolr.c (find_base_glyph_record, - find_base_glyph_v1_record): Fix variable signedness. - (read_color_line): Add cast. - (read_paint): Add casts. - Fix signedness issue. - (tt_face_get_colorline_stops) Fix signedness issues. - - * src/sfnt/ttpost.c (load_format_20): Add casts. - - * src/truetype/ttsubpix.c (TWEAK_RULES, TWEAK_RULES_EXCEPTIONS): - Remove final semicolons. - -2021-05-29 Werner Lemberg - - [build] Allow overriding of `ANSIFLAGS` for GNU make build. - - * builds/*: Implement it. - -2021-05-27 Alexei Podtelezhnikov - - [type42] Fix auto-hinting. - - The autohinter could not access the base (unscaled) outline in the - child TrueType glyph slot. We now share the internal parts between - the parent and child glyph slots. Fixes #1057. - - * src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts - of `T42_GlyphSlot' and replace it with the child TrueType structure. - (T42_GlyphSlot_Done): Updated accordingly. - -2021-05-25 Werner Lemberg - - [psaux] Guard and trace AFM kern data allocation. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31543 - - * include/freetype/internal/fttrace.h: Add 'afmparse' trace - component. - - * src/psaux/afmparse.c (FT_COMPONENT): Define. - (afm_parse_track_kern, afm_parse_kern_pairs): Protect against - allocations bombs. - Add tracing. - (afm_parse_kern_data): Don't allow multiple kern data sections. - -2021-05-23 Alexei Podtelezhnikov - - * meson.build (ft2_public_headers): Add missing `ftcid.h'. - - Fixes #1058. - -2021-05-20 Alexei Podtelezhnikov - - [type42] Avoid some memory zeroing. - - * src/type42/t42objs.c (T42_Open_Face): Tweak allocation macro. - * src/type42/t42parse.c (t42_parse_sfnts): Ditto. - -2021-05-19 Nikolaus Waxweiler - - [CMake] Update dependency finders. - - 1. Fixes CMake using any found HarfBuzz version lower than the minimum - required. This is based on HALX99's merge request at - https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/31 - 2. Update FindHarfBuzz.cmake from - https://github.com/WebKit/WebKit/blob/1ce32454/Source/cmake/FindHarfBuzz.cmake - and guard post-CMake-3.1 features to keep the minimum version unchanged - 3. Update FindBrotliDec.cmake to stop the warnings, based on what - https://github.com/google/woff2/blob/a0d0ed7d/cmake/FindBrotliDec.cmake - is doing - - * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Implement 1 and 2. - * builds/cmake/FindBrotliDec.cmake: Implement 3. - -2021-05-19 Ben Wagner - - [gzip] Use exact type for `ft_gzip_alloc` and `ft_gzip_free`. - - While a function pointer may be cast to another function pointer - type, it is required to cast the function pointer back to the - original function pointer type before calling it. If a parameter is - a pointer the exact pointer type is required. Using a pointer to a - different underlying type is technically undefined behavior. The - wrapper functions `ft_gzip_alloc` and `ft_gzip_free` took - `FT_Memory` (a `FT_MemoryRec_*`) instead of `voidpf` (`void*`), so - when gzip calls these callbacks through `alloc_func` or `free_func` - it invokes undefined behavior. On most platforms this works out as - expected, but newer undefined behavior detectors and targets like - wasm can detect this and will produce an error. - - * src/gzip/ftgzip.c (ft_gzip_alloc, ft_gzip_free): Update signatures - to exactly match `alloc_func` and `free_func`, respectively. - Internally, cast the `void*` opaque pointer to `FT_Memory`. - -2021-05-18 Alexei Podtelezhnikov - - Prioritize the anti-aliasing renderer module. - - * modules.cfg: Reorder the renderers. - * include/freetype/config/ftmodule.h: Ditto. - -2021-05-16 Alexei Podtelezhnikov - - [sfnt] Additional guards on the POST table. - - Fixes timeout (#1055) analyzed by Ben Wagner, reported as - - https://crbug.com/1194092 - - * src/sfnt/ttload.c (tt_face_load_post): Check POST format. - * src/sfnt/sfobjs.c (sfnt_load_face): Synthesize the missing unicode - charmap only if the glyph names exist. - * src/psnames/psmodule.c (ps_unicode_value): Short cut ".notdef" and - ".null". - -2021-05-13 Daniel McArdle - - [psaux] Use doubling allocation strategy for CF2_ArrStack. - - Fixes timeout reported as - - https://crbug.com/1206181 - - * src/psaux/psarrst.c (cf2_arrstack_{push,init}): Implement it. - * src/psaux/psarrst.h (CF2_ArrStackiRec): Drop `chunk'. - -2021-05-12 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (FT_MAX_GRAY_SPANS): Increase from 10 to 16. - - Ten was barely enough for two slanted stems. Sixteen can actually fit - a bit more complicated scanlines. - -2021-05-11 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code. - -2021-05-11 Alexei Podtelezhnikov - - [smooth] Faster bitmap sweeping. - - Selecting the fill rule or checking the direct mode each time we call - `gray_hline' is sub-optimal. This effectively splits the direct mode - into a separate code path while inlining `gray_hline' and saving 5-7% - of rendering time. - - * src/smooth/ftgrays.c (gray_hline): Eliminated in favor of... - (FT_FILL_RULE, FT_GRAY_SET): ... these new macros... - (gray_sweep): ... inlined here. - (gray_sweep_direct): New function that handles the direct span buffer. - (gray_TWorker): Remove the span buffer. - (gray_raster_render, gray_convert_glyph): Updated. - -2021-05-10 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations. - - It is too bad the even-odd rule is not used much. - -2021-05-07 Alexei Podtelezhnikov - - [type1] Avoid MM memory zeroing. - - * src/type1/t1load.c (t1_allocate_blend, parse_blend_design_map): - Tweak allocation macros. - * src/type1/t1objs.c (T1_Face_Done): Minor. - -2021-05-07 Alexei Podtelezhnikov - - * src/bdf/bdflib.c (_bdf_list_ensure): Tweak allocation macro. - -2021-05-06 Alexei Podtelezhnikov - - * src/psaux/psobjs.c (ps_parser_load_field): Tweak allocation macro. - -2021-05-06 Alexei Podtelezhnikov - - * src/sfnt/sfobjs.c (sfnt_load_face): Tweak allocation macro. - -2021-05-06 Alexei Podtelezhnikov - - * src/cid/cidload.c (cid_read_subrs): Tweak allocation macro. - -2021-05-06 Alexei Podtelezhnikov - - * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Tweak allocation. - -2021-05-05 Alexei Podtelezhnikov - - [cff,psaux] Avoid memory zeroing (contd.). - - * src/cff/cffload.c (cff_blend_doBlend, cff_blend_build_vector): Tweak - allocation macros. - * src/psaux/psarrst.c (cf2_arrstack_setNumElements): Ditto. - * src/psaux/psstack.c (cf2_stack_init): Ditto. - -2021-05-04 Ben Wagner - - * src/cid/cidload.c (cid_hex_to_binary): Improve return value. - - Add argument to return the actual number of bytes that were decoded. - The actual number of bytes decoded can be quite variable depending - on the number of ignored 'whitespace' bytes or early termination - with `>`. - (cid_face_open): Updated to use this calculated value. This avoids - trusting `parser->binary_length` is always be correct and reading - uninitialized bits if fewer are actually decoded. - - First reported as - - https://crbug.com/1203240 - -2021-05-03 Alexei Podtelezhnikov - - [sfnt] Streamline POST format 2.0 handing. - - To reduce memory allocations, we read an entire Pascal-string buffer - and convert it to a C-string buffer. We also reject tables with - Postscript glyph names exceeding 63 bytes. - - * src/sfnt/ttpost.c (load_format20): Implement it. - (load_post_names): Check the minimal POST table size. - (load_format25, tt_face_free_ps_names): Updated accordingly. - -2021-05-02 Alexei Podtelezhnikov - - [bdf,pcf] Avoid memory zeroing (contd.). - - * src/bdf/bdflib.c (bdf_create_property, _bdf_add_comment, - _bdf_add_property, bdf_load_font): Tweak allocation macros. - * src/pcf/pcfread.c (pcf_get_properties, pcf_get_metrics): Ditto. - -2021-05-01 Alexei Podtelezhnikov - - * src/cid/cidload.c (cid_read_subrs): Tweak allocaton macro. - -2021-05-01 Alexei Podtelezhnikov - - [sfnt] Avoid some memory zeroing. - - * src/sfnt/sfobjs.c (sfnt_open_font, sfnt_init_face, - tt_name_ascii_from_{utf16,other}): Tweak allocaton macros. - * src/sfnt/ttload.c (tt_face_load_name): Ditto. - -2021-05-01 Alexei Podtelezhnikov - - * src/sfnt/ttpost.c (load_format_{20,25}): Tweak allocaton macros. - -2021-05-01 Alexei Podtelezhnikov - - * src/sfnt/pngshim.c (Load_SBit_Png): Tweak allocaton macro. - -2021-05-01 Alexei Podtelezhnikov - - [truetype] Avoid some memory zeroing. - - * src/truetype/ttinterp.c (Init_Context): Tweak allocation macro. - * src/truetype/ttpload.c (tt_face_load_cvt): Ditto. - -2021-05-01 Alexei Podtelezhnikov - - [woff2] Avoid some memory zeroing. - - * src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros. - -2021-04-30 Alexei Podtelezhnikov - - * src/gzip/ftgzip.c (ft_gzip_alloc): Zero out memory again. - -2021-04-27 Alexei Podtelezhnikov - - [lzw] Preserve decompression stack when relocating to heap. - - * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Copy stack when - relocating to heap. - -2021-04-27 Alexei Podtelezhnikov - - * src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check. - -2021-04-27 Werner Lemberg - - * src/psmodule.c (ps_unicodes_init): Ignore empty glyph names. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33637 - -2021-04-26 Alexei Podtelezhnikov - - * src/sfnt/sfobjs.c (sfnt_init_face): Revert macro change. - -2021-04-26 Alexei Podtelezhnikov - - [cff] Avoid some memory zeroing. - - * src/cff/cffparse.c (cff_parser_init): Tweak memory macro. - * src/cff/cffload.c (cff_index_load_offsets, cff_index_get_pointers, - cff_charset_load, cff_vstore_load): Ditto. - -2021-04-26 Alexei Podtelezhnikov - - [pfr] Avoid some memory zeroing. - - * src/pfr/pfrobjs.c (pfr_face_init) : Tweak memory macro. - * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps, - pfr_phy_font_load): Ditto. - -2021-04-26 Alexei Podtelezhnikov - - * src/winfonts/winfnt.c (FNT_Face_Init): Tweak memory macro. - -2021-04-26 Alexei Podtelezhnikov - - [psaux,psnames] Avoid some memory zeroing. - - * src/psaux/psstack.c (cf2_stack_init): Tweak memory macro. - * src/psnames/psmodule.c (ps_unicodes_init): Ditto. - -2021-04-25 Alexei Podtelezhnikov - - [base] Avoid some memory zeroing. - - * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Use FT_QNEW_ARRAY. - * src/base/ftsnames.c (FT_Get_Sfnt_{Name,LangTag}): Ditto. - -2021-04-25 Alexei Podtelezhnikov - - [bdf,pcf] Avoid some memory zeroing. - - * src/pcf/pcfread.c (pcf_read_TOC, pcf_get_properties, pcf_load_font): - Tweak memory macros. - * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto. - * src/bdf/bdflib.c (_bdf_readstreami, bdf_create_property, - _bdf_parse_glyphs, _bdf_parse_start): Ditto. - (_bdf_add_property): Do not handle zero size. - -2021-04-25 Issam E. Maghni - - * builds/meson/process_ftoption_h.py: Add LF at EOF. - - This fixes - - .../ftoption.h:1030:10: error: - no newline at end of file [-Werror,-Wnewline-eof] - - for the generated `ftoption.h` file. - -2021-04-24 Alexei Podtelezhnikov - - * src/cff/cffload.c (cff_index_get_pointers): s/FT_QALLOC/FT_ALLOC/. - -2021-04-23 Alexei Podtelezhnikov - - * src/base/ftobjs.c (Mac_Read_POST_Resource): s/FT_ALLOC/FT_QALLOC/. - * builds/mac/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto. - -2021-04-23 Alexei Podtelezhnikov - - * src/sdf/ftsdf.c (sdf_{edge,contour,shape}_new): Use FT_QALLOC. - -2021-04-23 Alexei Podtelezhnikov - - [sfnt] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/sfnt/sfdriver.c (get_win_string, get_apple_string, - sfnt_get_var_ps_name): Do not zero out the buffer. - * src/sfnt/sfobjs.c (sfnt_init_face): Ditto. - * src/sfnt/sfwoff.c (woff_open_font): Ditto. - * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. - -2021-04-23 Alexei Podtelezhnikov - - [cff,type1,type42] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/cff/cffload.c (cff_index_get_pointers, cff_index_get_name): - Do not zero out the buffer. - * src/cff/cffdrivr.c (cff_ps_get_font_info): Ditto. - * src/type1/t1load.c (parse_subrs, parse_charstrings, - parse_blend_axis_types): Ditto. - * src/type1/t1parse.c (T1_New_Parser, T1_Get_Private_Dict): Ditto. - * src/type42/t42parse.c (t42_parser_init): Ditto. - -2021-04-23 Alexei Podtelezhnikov - - [cid] s/FT_ALLOC/FT_QALLOC/ and clean up. - - * src/cid/cidgload.c (cid_load_glyph): Do not zero out the buffer. - * src/cid/cidload.c (cid_face_open, cid_read_subrs): Ditto. - -2021-04-23 Alexei Podtelezhnikov - - [pfr] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/pfr/pfrload.c (pfr_extra_item_load_font_id, pfr_aux_name_load): - Do not zero out the buffer. - -2021-04-23 Alexei Podtelezhnikov - - [bzip2,gzip] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Do not zero out the buffer. - * src/gzip/ftgzip.c (ft_gzip_alloc, FT_Stream_OpenGzip): Ditto. - -2021-04-23 Alexei Podtelezhnikov - - [pcf,bdf,winfonts] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/pcf/pcfread.c (pcf_interpret_style): Do not zero out the buffer. - * src/bdf/bdfdrivr.c (bdf_interpret_style): Ditto. - * src/winfonts/winfnt.c (FNT_Face_Init, FNT_Load_Glyph): Ditto. - -2021-04-22 Alexei Podtelezhnikov - - [cache] Optimize SBit copying. - - * src/cache/ftcsbits.c (ftc_snode_load): Do not initialize the buffer. - (ftc_sbit_copy_bitmap): Accept zero size, s/FT_ALLOC/FT_QALLOC/. - -2021-04-22 Alexei Podtelezhnikov - - [gxvalid,otvalid] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/gxvalid/gxvmod.c (gxv_load_table): Do not zero out the buffer. - * src/otvalid/otvmod.c (otv_load_table): Ditto. - -2021-04-22 Alexei Podtelezhnikov - - [psaux] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/psaux/psobjs.c (ps_table_done, ps_parser_load_field): Do not - zero out the buffer. - -2021-04-22 Alexei Podtelezhnikov - - [base] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. - - * src/base/ftobjs.c (open_face_PS_from_sfnt_stream, - Mac_Read_sfnt_Resource): Do not zero out the buffer. - * src/base/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto. - * src/base/ftrfork.c (raccess_make_file_name, - raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Ditto. - -2021-04-20 Alexei Podtelezhnikov - - [cache] Restore SBit copying for unowned (BDF) bitmaps. - - * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Restore. - (ftc_snode_load): Check ownership and copy unowned bitmaps. - -2021-04-19 Dominik Röttsches - - [sfnt] Return in 'COLR' v1 when layer pointer outside table - - * src/sfnt/ttcolr.c (tt_face_get_paint_layers): Add missing return - when paint pointer outside table. - (read_paint): Add missing return when paint pointer outside table. - -2021-04-18 Alexei Podtelezhnikov - - [cache] Switch to lazy SBit setting. - - * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Removed. - (ftc_snode_load): Take the bitmap ownership instead of copying. - -2021-04-16 Daniel Welty <@danielwelty> - - * src/cache/ftcsbits.c (ftc_snode_load): Properly handle short pitch. - -2021-04-16 Werner Lemberg - - * builds/unix/freetype2.m4: Fix help string formatting. - - The indented `dnl` macros inserted unwanted horizontal space. - - Problem reported by Ozkan Sezer . - -2021-04-16 Dominik Röttsches - - [sfnt] Safeguard 'COLR' v1 layer extraction - - * src/sfnt/ttcolr.c (tt_face_get_paint_layers): Do not output - layer pointer to iterator if it is outside the 'COLR' table. - (read_paint): Do not attempt to read layers that are outside the - table. - -2021-04-02 Ben Wagner - - [base] Complete `ft_glyphslot_clear`. - - * src/base/ftobjs.c (ft_glyphslot_clear): This function is intended - to reset all the values of a glyph slot. However, it was not - resetting the values of the advances and `glyph_index`. Reset the - advances and `glyph_index` to zero. - -2021-04-02 Ben Wagner - - [truetype] Prevent glyph program state from persisting. - - `FDEF` instructions are specified as allowed only in 'prep' or - 'fpgm'. FreeType has attempted to prevent their use in the glyph - program, but they were still allowed in glyph programs if defined in - a function defined in 'prep' or 'fpgm' and called from the glyph - program. - - Similarly, `IDEF` instructions are specified not to be able to - modify any existing instruction. FreeType has attempted to prevent - their use in the glyph program, but they can still be used like - `FDEF`. - - This change stores the initial bytecode range type and disallows the - use of `FDEF` and `IDEF` while running the glyph program. - - Most other state is copied from the `TT_Size` into the execution - context. However, it is possible for a glyph program to use `WS` to - write to the storage area or `WCVTP`, `WCVTF`, and `DELTAC[123]` to - write to the control value table. - - Allowing any change to the global state from the glyph program is - problematic as the outlines of any given glyph may change based on - the order the glyphs are loaded or even how many times they are - loaded. There exist fonts that write to the storage area or the - control value table in the glyph program, so their use should not be - an error. - - Possible solutions to using these in the glyph program are - - * ignore the writes; - * value-level copy on write, discard modified values when finished; - * array-level copy on write, discard the copy when finished; - * array-level copy up-front. - - Ignoring the writes may break otherwise good uses. A full copy - up-front was implemented, but was quite heavy as even well behaved - fonts required a full copy and the memory management that goes along - with it. Value-level copy on write could use less memory but - requires a great deal more record keeping and complexity. This - change implements array-level copy on write. If any attempt is made - to write to the control value table or the storage area when the - initial bytecode range was in a glyph program, the relevant array - will be copied to a designated storage area and the copy used for - the rest of the glyph program's execution. - - * src/truetype/ttinterp.h (TT_ExecContextRec): New fields - `iniRange`, `glyfCvtSize`, `glyfCvt`, `origCvt`, `glyfStoreSize`, - `glyfStorage`, and `origStorage`. - - * src/truetype/ttinterp.c (Modify_CVT_Check): New function to handle - `exc->glyfCvt`. - (Write_CVT, Write_CVT_Stretched, Move_CVT, Move_CVT_Stretched): Use - it. - (Ins_WS): Handle `exc->glyfStorage`. - (Ins_FDEF, Ins_IDEF): Updated. - (TT_RunIns): Updated. - (TT_Done_Context): Free 'glyf' CVT working and storage area. - (TT_Load_Context): Fix/add casts. - - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix cast. - -2021-03-30 Dominik Röttsches - - [sfnt] Check validity of pointer location of `read_color_line`. - - * src/sfnt/ttcolr.c (get_child_table_pointer): New function to fetch - child table pointer early for all paint formats that compute a child - table pointer. - (read_color_line, read_paint): Updated. - (tt_face_get_colorline_stops): Check `colr->table`. - -2021-03-28 Nikhil Ramakrishnan - - [docs] Update docwriter stylesheet for 1.3.1. - - This change is required to support docwriter 1.3.1. - - See - - https://gitlab.freedesktop.org/freetype/docwriter/-/merge_requests/101 - - for more information. - - * docs/markdown/stylesheets/extra.css: - (.wy-nav-content, .md-sidebar--secondary): Remove. - -2021-03-16 Alexei Podtelezhnikov - - * src/sfnt/pngshim.c (Load_SBit_Png): Free `rows` once later. - -2021-03-16 Ben Wagner - - [sfnt] Fix memory leak in png loading. - - Reported as - - https://bugs.chromium.org/p/chromium/issues/detail?id=1182552 - - Memory is allocated and the pointer assigned to `rows` inside a - 'setjmp' scope. This memory must be freed outside the 'setjmp' - scope after a 'longjmp'. Since `rows` is a local and modified - inside the 'setjmp' scope it must be marked volatile or it will have - an indeterminate value after the 'longjmp'. - - * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak of `rows`. - -2021-03-16 Christopher Degawa - - * CMakeLists.txt: Don't limit generation of 'pkg-config' file to UNIX. - - mingw-w64 uses the 'pkg-config' files but does not set UNIX. - -2021-03-11 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_set_cell): Refactor to fix VC++ warning. - -2021-03-13 Werner Lemberg - - Handle various VC++ compiler warnings. - - Fixes #1039. - - * src/base/ftstroke.c (ft_stroker_inside, ft_stroker_outside): - Initialize `sigma`. - - * src/sdf/ftsdf.c (sdf_generate_with_overlaps): Exit immediately if - function arguments are invalid. - * src/sdf/ftsdfrend.c (sdf_property_set) <"overlaps">: Fix cast. - - * src/sfnt/sfwoff2.c (woff2_decompress) - [!FT_CONFIG_OPTION_USE_BROTLI]: Use `FT_UNUSED`. - - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `fvar_head`. - -2021-03-11 Alexei Podtelezhnikov - - [smooth] Reduce copying during integration phase. - - We now record `cover' and `area' directly into the linked list. This - makes rendering faster by 10% or even more at larger sizes. - - * src/smooth/ftgrays.c (FT_INTEGRATE): Write directly. - (gray_TWorker): Add direct cell reference and remove unused fields. - (gray_set_cell): Consolidate the linked list management and pointers. - (gray_convert_glyph, gray_convert_glyph_inner): Updated. - -2021-03-10 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (FT_INTEGRATE): New convenience macro. - (gray_render_line, gray_render_scanline): Use it. - -2021-03-09 Alexei Podtelezhnikov - - * src/smooth/ftgrays.c (gray_render_line): Rearrange conditionals. - - These produce faster or more optimizable code. - -2021-03-08 Tim-Philipp Müller - - [meson] Fix 'mmap' handling on Windows. - - * meson.build (ft2_sources): Always use `windows/ftsystem.c` on - Windows unless mmap has been disabled. - - https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/5#note_829289 - -2021-03-07 Tim-Philipp Müller - - [ci] Add basic support for Meson builds with MSVC on Windows. - - This adds meson jobs for VS2017 (x86 and x86_64). - - * .gitlab-ci.yml: New file. - -2021-03-07 Tim-Philipp Müller - - [meson] Add subproject fallbacks for 'libpng' and 'zlib'. - - * subprojects/libpng.wrap, subprojects/zlib.wrap: New files. - - * meson.build: Updated. - -2021-03-07 Xavier Claessens - - [meson] Make it work with Windows. - - * meson.build: Do not process `ftconfig.h` when not using - `ftconfig.h.in`. - - Fixes #1029. - -2021-02-25 Werner Lemberg - - [woff2] Fix memory leak. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28148 - - * src/sfnt/sfwoff2.c (woff2_open_font): Reject fonts that have - multiple tables with the same tag. While not explicitly forbidden - in the OpenType specification, it is implicitly forbidden by - describing a binary search algorithm for tables that only works - reliably if table tags are unique. - -2021-02-22 Werner Lemberg - - * CMakeLists.txt: Update location of `LICENSE.TXT`. - - Fixes #1035. - -2021-02-19 Werner Lemberg - - * builds/unix/ax_pthread.m4: Update from 'autoconf-archive'. - - A bunch of fixes were added recently to its git repository. - -2021-02-17 Werner Lemberg - - [unix] Updates for autoconf 2.71. - - This fixes warnings reported by autoupdate. - - * builds/unix/ax_pthread.m4: Replace `as_echo` with `AS_ECHO`. - - * builds/unix/configure.raw: Remove obsolete `AC_HEADER_STDC`. - Don't escape back quotes in messages for `AC_MSG_WARN`. - -2021-02-16 Werner Lemberg - - * builds/toplevel.mk: Fix previous commit. - - : Use `TOP_DIR` in `wildcard` function. - (check_out_submodule, copy_submodule): Move down to come after - definition of `all` rule. - Call `mkdir` conditionally. - -2021-02-16 Werner Lemberg - - * builds/toplevel.mk: Use rules for handling 'dlg'. - - Suggested by Alexei. - - (check_out_submodule, copy_submodule): New targets. - : Replace calls to `shell` with rules. - -2021-02-16 Werner Lemberg - - * builds/toplevel.mk: Avoid side effects of `shell`. - - We use a dummy variable to catch its output. Otherwise the `make` - program is going to interpret the return value of `shell`; this can - cause obscure warning or error messages or even be harmful. - -2021-02-16 Werner Lemberg - - Move 'dlg' submodule to `subprojects` directory. - - This is for future changes with Meson, which doesn't allow a - different name for its `subprojects` directory. Having both a - `submodules` and a `subprojects` directory is confusing. - - * .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR, - DLG_SRC_DIR): Updated. - - * builds/toplevel.mk (, do-dist), - builds/windows/vc2010/script.bat: Updated. - - * src/tools/no-copyright: Updated. - -2021-02-16 Dominik Röttsches - - [sfnt] Update paint format values to support non-variable paints. - - * freetype.h (FT_PaintFormat): Update paint format identifiers after - a specification change. The specification was updated to have - sibling formats, variable and non-variable variants for each. - Reflect that here. - - * sfnt/ttcolr.c (read_paint): Remove parsing of variable indices as - the non-variable formats no longer have them. - -2021-02-15 Daniel E - - * CMakeLists.txt: Improve 'bz2' support. - - Not all distributions such as FreeBSD provide a `.pc` file for - '(lib)bz2' so follow autotools and add it to `Libs.private` instead. - -2021-02-13 Werner Lemberg - - * src/tools/update-copyright-year: Fix single-year entry handling. - - The fix from 2021-01-17 didn't cover the case where the year to be - updated is identical to the current year. - -2021-02-13 Werner Lemberg - - Add new function `FT_Get_Transform`. - - See - - https://github.com/harfbuzz/harfbuzz/issues/2428 - - for some reasons to introduce this function. - - * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Transform): - Implement it. - -2021-02-12 Alexei Podtelezhnikov - - Decorate `qsort` callbacks with `cdecl`. - - * include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF): - Add new macro. - - * src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c, - src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c, - src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update `qsort` callbacks. - - Fixes #1026 when compiling FreeType with an unusual calling - convention while the C library function `qsort` still expects - `cdecl`. - -2021-02-10 Dominik Röttsches - - [sfnt] Implement 'COLR' v1 sweep gradients. - - * freetype.h (FT_PaintSweepGradient): Add `FT_PaintSweepGradient` to - represent a 'COLR' v1 sweep gradient. - Update format. - (FT_PaintFormat): Update shifted paint formats. - Sync with spec. - * sfnt/ttcolr.c (read_paint): Logic to parse sweep gradients. - Fix struct access in radial gradient implementation. - -2021-02-09 Dominik Röttsches - - [sfnt] Provide optional root transform for 'COLR' v1 glyph graph. - - * include/freetype/freetype.h (FT_Get_Color_Glyph_Paint): - Additional function argument `root_transform` to control whether - root transform should be returned. - (FT_OpaquePaint): Additional tracking field to denote whether - root transform is to be returned. - * include/freetype/internal/sfnt.h - (TT_Get_Color_Glyph_Paint_Func): Propagate additional argument. - * src/base/ftobjs.c (FT_Get_Color_Glyph_Paint): Ditto. - * src/sfnt/ttcolr.c (tt_face_get_colr_glyph_paint): Return root - transform reflecting the size and tranform configured on - `FT_Face`. - (read_paint): Initialize and track status of insert_root_transform - flag. - -2021-02-09 Xavier Claessens - - * meson.build: s/freetype2_dep/freetype_dep/. - - Many projects (e.g., fontconfig, cairo) hardcode the `freetype_dep` - variable name to use FreeType as subproject because that was the - variable name in Centricular's Meson port of FreeType. While they - should stop hardcoding that variable name, it does not cost us - anything to keep using that name to ease transition. - -2021-02-09 Xavier Claessens - - [meson] Fix handling of HarfBuzz library. - - * meson.build (harfbuzz_dep): Do not fall back to HarfBuzz by - default. - - Otherwise it causes a dependency cycle: - - cairo => fontconfig => freetype2 => harfbuzz => cairo - - Meson will still fall back to HarfBuzz subprojects if the `harfbuzz` - option is set to `enabled` instead of `auto` and a - `subprojects/harfbuzz.wrap` file is present. In that case it is the - responsibility of the main project to set the proper options on each - subproject to break the dependency cycle. - - Fixes: #1028. - -2021-02-09 Xavier Claessens - - [meson] Fix dependency lookup and generate `ftconfig.h`. - - - zlib: If not found on the system, meson can build it as a - subproject. We thus never use the (outdated) zlib support that - comes with FreeType. Doing so has the additional advantage that - the zlib code can be shared with other projects like GLib if both - are subprojects of an application. - - harfbuzz: Build as a subproject if not found on the system. - - 'QUESTION: What if the compiler doesn't support `-D` but uses `/D` - instead as on Windows?' Answer: Meson translate arguments for us. - - visibility: Replace self-made code with meson-specific solution. - - * meson.build (ft2_defines): Rewrite logic to set and handle it. - (process_header_command): New variable, previously called - `ftoption_command`. - (ftoption_command, ftconfig_command): New variables. - (zlib_option): Removed. - (zlib_dep): New variable. - (ft2_deps): Updated. - (harfbuzz_dep): Updated. - (ftconfig_h_in, ftconfig_h): New variables. - (ft2_sources): Updated. - (ft2_lib): Updated, handle visibility. - (summary): Updted. - - * meson_options.txt (zlib): Updated. - -2021-02-09 Xavier Claessens - - * meson.build: Fix resource compilation on Windows. - - This is copied from GStreamer's meson port of FreeType. - - (ft2_sources): Add both debug and resource file (the latter for - Windows only). - (ft2_debug_src): Removed. - -2021-02-09 Xavier Claessens - - * meson.build: s/ft2_libtool_version/ft2_pkgconfig_version/. - - (freetype2_dep): Use it. - - `ft2_libtool_version` would be the shared library version, not the - one we should use in file `freetype2.pc`. - -2021-02-09 Xavier Claessens - - * meson.build: Use `meson.override_dependency`. - - This is a new meson mechanism to avoid other projects to hard-code - the `freetype2_dep` variable name in their build definition. It - also ensures that meson does not mix system and subproject versions - of FreeType inside of the same project. - - Also remove outdated TODO because `declare_dependency` was already - there. - -2021-02-09 Xavier Claessens - - * meson.build (bzip2_dep): Simplify. - - We remove `static:false` from `find_library('bz2')`. - - I don't know whether the previous code was a workaround for an old - meson bug, but at least with version >=0.55.0 (which FreeType uses) - it picks the shared library when both are available. - - File `freetype2.pc` still contains the full path to file `libbz2.so` - instead of `-lbz2` – that we need to do this is a meson bug even - present in the current version (0.57.0). - -2021-02-09 Xavier Claessens - - * meson.build: Set project version. - -2021-02-04 Werner Lemberg - - [base] Fix Netpbm tracing message. - - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Don't emit Netpbm - warning if there is nothing to output. - -2021-02-04 Werner Lemberg - - * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`. - - This ensures good logging output, with all lines having a proper - prefix (if requested). - - This is a continuation of a similar patch from 2020-12-02, which - missed some locations. - -2021-02-03 Alexei Podtelezhnikov - - * builds/unix/configure.raw [mmap]: Restore default path. - - Fixes #1023. - -2021-02-03 Werner Lemberg - - [psaux] Fix integer overflow. - - Reported as - - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30154 - - * src/psaux/psblues.c (cf2_blues_capture): Use `SUB_INT32`. - -2021-02-02 Alexei Podtelezhnikov - - * builds/unix/configure.raw [mmap support]: Explicitly handle Windows. - - Fixes #1024. - -2021-01-31 Werner Lemberg - - * builds/unix/configure.raw [mmap support]: Correctly handle Windows. - - Fixes #1024. - -2021-01-31 Werner Lemberg - - * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. - -2021-01-31 Werner Lemberg - - Always provide logging API. - - It's easier to have stubs if FT_DEBUG_LOGGING is undefined than to - modify `ftexport.sym` conditionally. - - Problem reported by Alexei. - - * src/base/ftdebug.c: Include `ftlogging.h`. - (FT_Trace_Set_Level, FT_Trace_Set_Default_Level, FT_Set_Log_Handler, - FT_Set_Default_Log_Handler) [!FT_DEBUG_LOGGING]: Provide stubs. - -2021-01-31 Werner Lemberg - - * builds/unix/configure.raw: Fix typo. - - Bug introduced in Vincent's last commit bb33f03. - - Fixes issue #1021. - -2021-01-27 Alexei Podtelezhnikov - - * src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps. - - Fixes bug #1020. - -2021-01-27 Alexei Podtelezhnikov - - [stroker] Minor clean-up. - - * src/base/ftstroke.c (FT_Stroker_{ConicTo,CubicTo}): Reset the last - line length. - (FT_Stroker_EndSubPath): Call `ft_stroker_process_corner'. - -2021-01-27 Vincent Torri - - * builds/windows/ftsystem.c: Add shared memory support on Windows. - - * CMakeLists.txt (BASE_SRCS), builds/unix/configure.raw (FTSYS_SRC), - builds/windows/vc2010/freetype.vcxproj, - builds/windows/visualc/freetype.vcproj, meson.build (ft2_sources): - Add it (conditionally). - -2021-01-23 Werner Lemberg - - Require HarfBuzz 2.0.0. - - This is needed to make commit f1f9705f9 work. - - * CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw - (harfbuzz_pkg), meson.build (harfbuzz_dep): Updated. - -2021-01-22 Alexei Podtelezhnikov - - * autogen.sh: Absorb `version.sed'. - * version.sed: Removed. - -2021-01-19 Alexei Podtelezhnikov - - * srd/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix return value. - -2021-01-15 Nikolaus Waxweiler - - [afshaper] Fix hb_ot_tags_from_script deprecation warning. - - * autofit/afshaper.c (af_shaper_get_coverage): Copy the source code - of the function as suggested in - https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle - at most three tags. - -2021-01-17 Werner Lemberg - - * src/tools/update-copyright-year: Fix single-year entry handling. - -2021-01-16 Alexei Podtelezhnikov - - * builds/unix/unixddef.mk: Remove the second DEVEL_DIR definition. - -2021-01-14 Dominik Röttsches - - [sfnt] Additional checks for 'colr' table presence. - - * sfnt/ttcolr.c (tt_face_get_colr_glyph_paint, - tt_face_get_colorline_stops, tt_face_get_paint): Additional checks - for whether colr table is present. Prevents crashes when these - methods are called on non-COLR fonts. - -2021-01-13 Dominik Röttsches - - Add config option to test for 'COLR' v1 support in headers. - - * include/freetype/config/ftoption.h (TT_SUPPORT_COLRV1): New macro - so that clients can test whether the FreeType checkout that they are - building against supports the 'COLR' v1 API. This is intended to be - a temporary solution until 'COLR' v1 support is released in a - FreeType version and such a check can be made by using the version - number instead. - -2020-12-16 Dominik Röttsches - - [base] Fill 'COLR' v1 API templates to make them work (#59703). - - * src/base/ftobjs.c (FT_Get_Color_Glyph_Paint, FT_Get_Paint_Layers, - FT_Get_Paint, FT_Get_Colorline_Stops): Add basic sanity checks, - check for existence of `FT_Face`, check arguments and delegate calls - for the respective 'COLR' v1 API to the SFNT driver. - -2020-12-16 Dominik Röttsches - - [sfnt] Register 'COLR' v1 API in driver (#59703). - - * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_Paint_Func, - TT_Get_Paint_Layers_Func, TT_Get_Colorline_Stops_Func, - TT_Get_Paint_Func): New function pointer types. - (SFNT_Interface): Add them. - (FT_DEFINE_SFNT_INTERFACE): Updated. - - * src/sfnt/sfdriver.c (PUT_COLOR_LAYERS_V1): New macro. - (sfnt_interface): Add new function pointers. - -2020-12-16 Dominik Röttsches - - [sfnt] Add 'COLR' v1 API to retrieve color layers (#59703). - - * src/sfnt/ttcolr.c (tt_face_get_paint_layers): New function to get - the layers of a `PaintColrLayers` table in the font, using an - `FT_LayerIterator` from an `FT_PaintColrLayers` object retrieved via - `tt_face_get_paint`. - - * src/sfnt/ttcolr.h: Updated. - -2020-12-16 Dominik Röttsches - - [sfnt] Add 'COLR' v1 API to iterate color stops (#59703). - - * src/sfnt/ttcolr.c (tt_face_get_colorline_stops): New function to - return the current `FT_ColorStop` object from `FT_ColorStopIterator`. - Also increment the iterator. - - * src/sfnt/ttcolr.h: Updated. - -2020-12-16 Dominik Röttsches - - [sfnt] Add API to get actual paint from `FT_OpaquePaint` (#59703). - - * src/sfnt/ttcolr.c (tt_face_get_paint): New function to resolve an - `FT_OpaquePaint` paint reference into an `FT_COLR_Paint` object of a - certain format, which contains the detailed information stored in a - paint of the respective format. - (read_paint): New function to provide the format specific parsing - and to populate the data members of each specific `FT_COLR_Paint` - subtype. - (read_color_line): New function to parse retrieved color line - information into an `FT_ColorLine` object, which has information - about the color line extend mode as well as an - `FT_ColorStopIterator` object. - - * src/sfnt/ttcolr.h: Updated. - -2020-12-16 Dominik Röttsches - - [sfnt] Add API to retrieve 'COLR' v1 root paint (#59703). - - * src/sfnt/ttcolr.c (BaseGlyphV1Record): New structure. - (tt_face_load_colr): Handle version 1 table header. - (find_base_glyph_v1_record): New auxiliary function. - (tt_face_get_colr_glyph_paint): New function to find the root - `FT_OpaquePaint` object for a given glyph ID. - - * src/sfnt/ttcolr.h: Updated. - -2020-12-16 Dominik Röttsches - - Add new methods required for 'COLR' v1 to public API (#59703). - - * include/freetype/freetype.h (FT_Get_Color_Glyph_Paint): New method - for retrieving the root paint object for a color glyph by specifying - a glyph ID. - (FT_Get_Paint_Layers): New method for retrieving the layers of a - `PaintColorGlyph`. - (FT_Get_ColorLine_Stops): New method for retrieving the stops of a - color. - (FT_Get_Paint): New method for resolving an `FT_OpaquePaint` into an - `FT_COLR_Paint` object. - -2020-12-16 Dominik Röttsches - - Add types required for 'COLR' v1 to public API (#59703). - - * include/freetype/freetype.h (FT_PaintFormat, FT_ColorStopIterator, - FT_ColorIndex, FT_ColorStop, FT_PaintExtend, FT_ColorLine, - FT_Affine23, FT_CompositeMode, FT_OpaquePaint, FT_PaintColrLayers, - FT_PaintSolid, FT_PaintLinearGradient, FT_PaintRadialGradient, - FT_PaintGlyph, FT_PaintColrGlyph, FT_PaintTransformed, - FT_PaintTranslate, FT_PaintRotate, FT_PaintSkew, FT_PaintComposite, - FT_COLR_Paint): Adding structs and enum to represent paint format, - color stop information, gradient extend information, structs to - reference paint offsets, and to define transforms and compositions. - Adding a union type to represent the union of the structs, - distinguished by `FT_PaintFormat`. - -2021-01-10 Werner Lemberg - - * builds/*: s/BUILD_DIR/PLATFORM_DIR/. - - The old variable name caused confusion. - -2021-01-08 Alexei Podtelezhnikov - - [builds] Revert `FTMODULE_H' changes. - - * builds/toplevel.mk, builds/freetype.mk: Revert changes. - -2021-01-07 Alexei Podtelezhnikov - - [builds/windows] Fix up DLG build with VC++. - - * builds/windows/vc2010/script.bat: Copy headers to include/. - * builds/windows/vc2010/freetype.vcxproj: Remove DLG paths. - -2021-01-07 Alexei Podtelezhnikov - - [builds] Relocate `FTMODULE_H'. - - * builds/toplevel.mk: Place `FTMODULE_H' in include/. - * builds/freetype.mk: Simplify included path. - -2021-01-07 Werner Lemberg - - Fix ABI incompatibility. - - * include/freetype/ftimage.h (FT_Pixel_Mode): Don't insert - `FT_PIXEL_MODE_GRAY16' but append it. - - * src/base/ftobjs.c (pixel_modes): Updated. - -2021-01-07 Alexei Podtelezhnikov - - [dlg] Move the headers to include/dlg to simplify their use. - - * autogen.sh, builds/toplevel.mk: Copy headers to include/dlg. - * builds/freetype.mk, builds/windows/vc2010/freetype.vcxproj: - Simplify included path. - * include/freetype/internal/ftdebug.h: Simplify #include. - * src/dlg/rules.mk, .gitignore: Updated. - -2021-01-06 Werner Lemberg - - * meson.build: Add summary. - - Based on a patch from Vincent Torri . - -2021-01-06 Torsten Hilbrich - - * meson.build: Fix 'png' build option (#59458). - - Without this patch, 'png' is always required. - -2021-01-04 Alexei Podtelezhnikov - - [builds/windows] Add SDF to VC2010 project. - - * builds/windows/vc2010/freetype.vcxproj: Updated; - AfterBuild conveniences. - -2020-12-26 Werner Lemberg - - [sdf] Use 'counter-clockwise', not 'anti-clockwise'. - - We prefer US nomenclature. - - * src/sdf/ftsdf.c (SDF_Contour_Orientation): - s/SDF_ORIENTATION-ACW/SDF_ORIENTATION_CCW/. - Update all users. - -2020-12-26 Werner Lemberg - - * src/base/ftobjs.c (pixel_modes): Updated. - -2020-12-26 Anuj Verma - - [sdf] Remove custom memory tracker. - - The internal FreeType memory tracker is sufficient. - - * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER, SDF_MemoryUser, - sdf_alloc, sdf_free, SDF_ALLOC, SDF_FREE, - SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP, - SDF_MEMORY_TRACKER_DONE): Removed. - - s/SDF_ALLOC/FT_ALLOC/. - s/SDF_FREE/FT_FREE/. - - Other updates. - -2020-12-24 Werner Lemberg - - [sdf] Fix `make multi`. - - * src/sdf/ftsdf.c: Include `ftoutln.h`. - -2020-12-24 Werner Lemberg - - [sdf] Fix tracing. - - * include/freetype/internal.fttrace.h: Add 'bsdf' component. - - * src/sdf/ftbsdf.c, src/sdf/ftsdf.c (FT_COMPONENT): Define. - -2020-08-21 Anuj Verma - - [sdf] Add debugging function. - - * src/sdf/ftsdf.c (sdf_shape_dump): New function. - -2020-08-20 Anuj Verma - - [sdf] Add 'bsdf' renderer to 'sdf' module. - - * src/sdf/ftsdfrend.c (ft_bsdf_render): New function. - - (ft_bitmap_sdf_renderer_class): New structure. - -2020-08-20 Anuj Verma - - [sdf] Add interface functions for the 'bsdf' rasterizer. - - * src/sdf/ftsdf.c (bsdf_raster_new, bsdf_raster_reset, - bsdf_raster_set_mode, bsdf_raster_render, bsdf_raster_done): New - functions. - - (ft_bitmap_sdf_raster): New variable. - - * src/sdf/ftsdf.h: Updated. - -2020-08-20 Anuj Verma - - [sdf] Add function to copy SDF data into output bitmap. - - * src/sdf/ftbsdf.c (finalize_sdf): New function. - -2020-08-20 Anuj Verma - - [sdf] Add '8-point sequential Euclidean distance mapping' algorithm. - - * src/sdf/ftbsdf.c (compare_neighbor, first_pass, second_pass, - edt8): New functions. - -2020-08-20 Anuj Verma - - [sdf] Add function to copy source bitmap to distance map. - - * src/sdf/ftbsdf.c (bsdf_init_distance_map): New function. - -2020-08-20 Anuj Verma - - [sdf] Add functions to compute pixel edge distances. - - * src/sdf/ftbsdf.c (compute_edge_distance, bsdf_approximate_edge): - New functions. - -2020-08-20 Anuj Verma - - [sdf] Add function to find edge pixels in a grid of alpha values. - - * src/sdf/ftbsdf.c (bsdf_is_edge): New function. - -2020-08-20 Anuj Verma - - [sdf] Add essential structures for the 'bsdf' rasterizer. - - * src/sdf/ftbsdf.c (ONE): New macro. - (BSDF_TRaster, ED, BSDF_Worker): New structures. - (zero_ed): New constant. - -2020-08-20 Anuj Verma - - [sdf] Add 'sdf' module to non-gnumake build systems. - - * include/freetype/config/ftmodule.h: Add both the 'sdf' and 'bsdf' - renderers to the list of modules. - - * CMakeLists.txt (BASE_SRCS): Add 'sdf' single-object module. - -2020-08-20 Anuj Verma - - [sdf] Added basic overlapping contour support. - - * src/sdf/ftsdf.c (sdf_generate_with_overlaps): New function. - (sdf_raster_render): Enable it. - -2020-08-19 Anuj Verma - - [sdf] Add build infrastructure. - - * src/sdf/module.mk, src/sdf/rules.mk: New files. - - * src/sdf/ftsdf.h (ft_sdf_raster): New forward declaration. - - * include/freetype/ftmoderr.h (FT_MODERRDEF): Add error definition - for the 'sdf' module. - - * include/freetype/internal/fttrace.h (FT_TRACE_DEF): Add trace - definition for the `sdf' module. - - * modules.cfg (RASTER_MODULES): Add the `sdf' module to the list of - rasterizers. - -2020-08-19 Anuj Verma - - [sdf] Add interface functions for the 'sdf' rasterizer. - - * src/sdf/ftsdf.c (sdf_raster_new, sdf_raster_reset, - sdf_raster_set_mode, sdf_raster_render, sdf_raster_done): New - functions. - (ft_sdf_raster): New structure. - -2020-08-19 Anuj Verma - - [sdf] Add subdivision and bounding box optimization. - - * src/sdf/ftsdf.c (sdf_generate_bounding_box): New function, which - is an optimized version of `sdf_generate`. - (sdf_generate_subdivision): New function. - -2020-08-19 Anuj Verma - - [sdf] Add function to generate SDF. - - * src/sdf/ftsdf.c (sdf_generate): New function, currently disabled. - This is a proof-of-concept implementation: It doesn't use any - optimization, it simply checks all grid points against all contours. - -2020-08-19 Anuj Verma - - [sdf] Add functions to get shortest distance from any edge/contour. - - * src/sdf/ftsdf.c (sdf_edge_get_min_distance): New function. - (sdf_contour_get_min_distance): New function, currently disabled. - -2020-08-18 Anuj Verma - - [sdf] Add shortest distance finding functions. - - * src/sdf/ftsdf.c (get_min_distance_line, get_min_distance_conic, - get_min_distance_cubic): New functions. Note that - `get_min_distance_conic` comes with two implementations (using an - analytical and an iterative method, to be controlled with the - `USE_NEWTON_FOR_CONIC` macro). - -2020-08-18 Anuj Verma - - [sdf] Add function to resolve corner distances. - - * src/sdf/ftsdf.c (resolve_corner): New function. - -2020-08-18 Anuj Verma - - [sdf] Add essential math functions. - - * src/sdf/ftsdf.c (cube_root, arc_cos) [!USE_NEWTON_FOR_CONIC]: New - auxiliary functions. - - * src/sdf/ftsdf.c (solve_quadratic_equation, solve_cubic_equation) - [!USE_NEWTON_FOR_CONIC]: New functions. - -2020-08-18 Anuj Verma - - [sdf] Add utility functions for contours. - - * src/sdf/ftsdf.c (get_control_box, get_contour_orientation): New - functions. - (split_conic, split_cubic, split_sdf_conic, split_sdf_cubic, - split_sdf_shape): New functions. - -2020-08-17 Anuj Verma - - [sdf] Add functions to decompose `FT_Outline`. - - * src/sdf/ftsdf.c (sdf_move_to, sdf_line_to, sdf_conic_to, - sdf_cubic_to): New auxiliary decomposition functions. - (sdf_compose_funcs): New structure. - (sdf_outline_decompose): New function. - -2020-08-17 Anuj Verma - - [sdf] Structs, enums, macros, and functions for 'sdf' rasterizer. - - * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER) - [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New macros. - (SDF_MemoryUser) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New - struct for memory usage tracing. - (sdf_alloc, sdf_free) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New - functions for memory usage tracing. - - (SDF_ALLOC, SDF_FREE): New macros for memory management. - (SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP, - SDF_MEMORY_TRACKER_DONE): New macros to set up memory usage tracing. - - (USE_NEWTON_FOR_CONIC, MAX_NEWTON_DIVISIONS, MAX_NEWTON_STEPS, - CORNER_CHECK_EPSILON, CG_DIMEN): New configuration macros for - controlling the process of finding the shortest distance. - - (MUL_26D6, VEC_26D6_DOT): New auxiliary macros. - - (SDF_TRaster, SDF_Edge, SDF_Contour, SDF_Shape, SDF_Signed_Distance, - SDF_Params): New structs for setting up SDF data. - (SDF_Edge_Type, SDF_Contour_Orientation): New enums for SDF data. - - (zero_vector, null_edge, null_contour, null_shape, max_sdf): Useful - constants. - - (sdf_edge_new, sdf_edge_done, sdf_contour_new, sdf_contour_done, - sdf_shape_new, sdf_shape_done): New constructors and destructors. - -2020-08-17 Anuj Verma - - [sdf] Add raster parameters structure. - - * src/sdf/ftsdf.h (SDF_Raster_Params): New structure. - - * src/sdf/sdf.c: Include source files in order to make a single - object of the module. - -2020-08-17 Anuj Verma - - [sdf] Add 'sdf' renderer. - - * src/sdf/ftsdf.c: Add 'sdf' renderer along with its interface - functions. - Also add functions to set and get properties. - -2020-08-17 Anuj Verma - - [sdf] Add common elements for 'sdf' and 'bsdf' renderers. - - * src/sdf/ftsdfrend.h (SDF_Rendere_Module, ft_sdf_renderer_class, - ft_bitmap_sdf_renderer_class): New structures. - - * src/sdf/ftsdfcommon.h (DEFAULT_SPREAD, MIN_SPREAD_MAX_SPREAD, - USE_SQUARED_DISTANCES): New macros. - (FT_INT_26D6, FT_INT_16D16, FT_26D6_16D16): New macros. - (FT_CALL, VECTOR_LENGTH_16D16): New macros. - (FT_26D6_Vec, FT_16D16_Vec, FT_16D16, FT_26D6, FT_6D10, FT_CBox): - New typedefs. - (square_root): New macro. - - * src/sdf/ftsdferrs.h: Add module error setup. - -2020-08-16 Anuj Verma - - [sdf] Add files for new 'sdf' module. - - Here is a breakdown of what the files will contain. - - * src/sdf/ftsdfrend.c, src/sdf/ftsdfrend.h: The 'sdf' and 'bsdf' - renderers. - - * src/sdf/ftsdf.c, src/sdf/ftsdf.h: The rasterizer for the 'sdf' - renderer. - * src/sdf/ftbsdf.c, src/sdf/ftbsdf.h: The rasterizer for the 'bsdf' - renderer. - - * src/sdf/ftsdfcommon.h: Commmon properties and functions for both - rasterizers. - * src/sdf/ftsdferrs.h: Common error defines. - - * src/sdf/sdf.c: For building a single object of the entire module. - -2020-08-16 Anuj Verma - - [base] Allow renderers of different formats. - - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the - glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming - 'bsdf' renderer will require bitmaps for processing. - - * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove - renderer's glyph format check before adding and removing them. The - 'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`. - -2020-08-16 Anuj Verma - - Add data types required for the forthcoming 'sdf' module. - - * include/freetype/freetype.h (FT_Render_Mode): Add new render mode - `FT_RENDER_MODE_SDF`, which will be used to generate SDF. - - * include/freetype/ftimage.h (FT_Pixel_Mode): Add new pixel mode - `FT_PIXEL_MODE_GRAY16`, which will be the output of the 'sdf' - module. - (FT_RASTER_FLAG_SDF): New raster flag to be used internally by the - 'sdf' module. - - * include/freetype/fttypes.h (FT_F6Dot10): New data type. - -2020-08-16 Anuj Verma - - [base] Allow renderers of different formats. - - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the - glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming - 'bsdf' renderer will require bitmaps for processing. - - * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove - renderer's glyph format check before adding and removing them. The - 'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`. - -2020-12-23 Werner Lemberg - - * builds/windows/detect.mk (COPY): Make it work with `shell`. - - Without this patch, we get the error - - builds/toplevel.mk:127: *** missing separator. Stop. - - Reported by Anuj, with a solution from Alexei. - -2020-12-23 Ignacio Casal Quinteiro - - * meson.build (ft2_defines): Fix builds on Windows. - -2020-12-18 Tatsuyuki Ishi - - [autofit] Fix double division in stem darkening. - - The old code used to divide the darkening amount by em_ratio twice, - leading to unnecessarily bold stems on certain fonts with higher - units per em (e.g. Inter). This patch fixes it. - - The return value of af_loader_compute_darkening was also changed to - use 16.16 fixed point to get rid of a redundant truncation operation. - This should slightly improve the precision, although it's still - bottlenecked by the emboldening function, which uses 26.6 fixed point. - - * src/autofit/afloader.[ch] - (af_loader_compute_darkening): Return FT_Fixed. - (af_loader_embolden_glyph_in_slot): Revise calculations. - -2020-12-17 Alexei Podtelezhnikov - - * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro. - - The driver name is needed for `FT_Property_Set' and `FT_Property_Get'. - -2020-12-16 Chris Liddell - - [truetype] Fix incremental metrics (#59503). - - * src/truetype/ttgload.c (tt_get_metrics, load_truetype_glyph): - Previously, the code would populate the phantom points before - calling the `get_glyph_metrics` callback. For formats like PCL XL - format 1, class 2 downloaded fonts (where metrics are removed from - the TTF header), this causes problems when the hinting program uses - the phantom points (misplaced and distorted glyphs) due to the - metrics being unset (all zeros). - (tt_get_metrics_incr_overrides): Renamed to... - (tt_get_metrics_incremental): ... this. Updated caller - - * include/freetype/ftincrem.h: Update the documentation to make it - clearer that `get_glyph_metrics` is to retrieve metrics from a - non-standard source, but *not* for the purpose of imposing custom - metrics. - -2020-12-14 Werner Lemberg - - [type42] Pacify static analysis tools (#59682). - - * src/type42/t42objs.c (T42_Size_Init, T42_GlyphSlot_Init): Avoid - warnings about uninitialized variables. - -2020-12-07 Werner Lemberg - - * builds/unix/configure.raw: Don't set `FT_DEBUG_LOGGING`. - - All debug options are handled exclusively in `ftoption.h`. - -2020-12-07 Werner Lemberg - - * src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`. - -2020-12-07 Werner Lemberg - - */*: s/FT_LOGGING/FT_DEBUG_LOGGING/. - -2020-12-05 Werner Lemberg - - * builds/toplevel.mk (do-dist): Remove `submodules` directory. - -2020-12-02 Werner Lemberg - - * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`. - - This ensures good logging output, with all lines having a proper - prefix (if requested). - -2020-12-02 Werner Lemberg - - [base] Don't close 'stderr' after logging. - - * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_logging_deinit): - Fix it. - -2020-12-02 Werner Lemberg - - * submodules/dlg: Updated to commit 9f0c8b22. - -2020-12-02 Werner Lemberg - - * src/bdf/bdflib.c: Fix `-Wformat` warning. - -2020-12-02 Werner Lemberg - - Improve setup for 'dlg' library. - - * autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect - stderr to `/dev/null`. - - * builds/toplevel.mk: Move code block to handle 'dlg' stuff into - `check_platform` conditional. - Also fix wildcard expressions for guarding `git submodule` commands. - Also make file copying work with non-Unix platforms (untested). - -2020-12-01 Werner Lemberg - - [build] Use gcc (and clang) in C99 mode. - - Other compilers are unchanged. - - * builds/compiler/gcc-dev.mk, builds/compiler/gcc.mk (ANSIFLAGS): - s/-ansi/-std=c99/. - - * builds/freetype.mk (FT_CFLAGS): Remove `-std=c99`. - - * builds/unix/configure.raw: Handle C99. - Remove no longer needed test for gcc 4.6 and earlier. - -2020-12-01 Werner Lemberg - - [dlg] Fix compiler warnings. - - * src/dlg/dlgwrap.c: Duplicate some feature test macros from - `dlg.c`, which must come first before loading standard headers. For - example, `freetype.h` loads `stdio.h` if compiled in debug mode. - -2020-12-01 Werner Lemberg - - * src/type42/t42parse.c: Fix `-Wformat` warnings. - -2020-12-01 Priyesh Kumar - - [builds/unix] Check for 'pthread' library. - - * builds/unix/ax_pthread.m4: New file, taken from 'autoconf-archive' - git repository. - - * builds/unix/configure.raw: Check for 'pthread'; also check whether - it works. - -2020-12-01 Werner Lemberg - - [base] Implement vertical alignment of log printing. - - Based on a patch by Priyesh. - - * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH): - New macro. - - * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_log_handler): - Print logs after a fixed width to handle different lengths of - `FT_COMPONENT` entries. - Use `ft_strrchr` to check for final newline character. - -2020-11-30 Priyesh Kumar - - Update logging related documentation. - - * docs/DEBUG: Updates related to `FT_LOGGING`. - - * README.git: Updates related to logging. - -2020-11-30 Priyesh Kumar - - * src/*: Fix `-Wformat` warnings. - -2020-11-30 Priyesh Kumar - - [builds/windows] Changes to build 'dlg' with FreeType on Windows. - - We only support Visual C++ 2010 and newer. - - * builds/windows/vc2010/script.bat: New windows batch file to copy - necessary 'dlg' files from `submodules/dlg` to `src/dlg`. This file - is used as a pre-built event in Visual C++. - - * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. - - * builds/windows/vc2010/freetype.vcxproj.filters: Add - `src/dlgwrap.c`. - - * builds/windows/vc2010/freetype.vcxproj - (AdditionalIncludeDirectories): Add include files of dlg for 'Debug' - and 'Debug Static' configurations on both 'x64' and 'win32' - platforms. - (PreprocessorDefinitions): Add `FT_LOGGING` for 'Debug' and 'Debug - Static' configurations on both 'x64' and 'win32' platforms. - Add `DLG_STATIC' for 'Debug' configuration on 'x64' and 'win32' - platforms. - (DisableLanguageExtensions): We need to disable the `/Za` option - when building 'dlg' with FreeType as 'dlg' strictly follows the C99 - standard. Visual C++ produces behaves unexpectedly when - compiling a C99 file with `/Za` option enabled. - -2020-11-30 Priyesh Kumar - - [base] Add public API to change log handling function. - - * include/freetype/ftlogging.h (FT_Custom_Log_Handler): New function - typedef to store the custom callback logging function. - (FT_Set_Log_Handler, FT_Set_Default_Log_Handler): New functions to - set and reset custom log handler. - - * include/freetype/internal/ftdebug.h (custom_output_handler): New - variable to support a custom callback logging function. - (FT_Logging_Callback): A new function typedef to print log using - custom callback logging function, which is set using - `FT_Set_Log_Handler`. - (FT_Log): Use it. - - * src/base/ftdebug.c (FT_Set_Log_Handler, - FT_Set_Default_Log_Handler, FT_Logging_Callback): Add function - definitions. - -2020-11-28 Priyesh Kumar - - [base] Add public API to change the levels of tracing components. - - * include/freetype/ftlogging.h: New header file. - - * include/freetype/internal/ftdebug.h [FT_LOGGING]: Include - `ftlogging.h`. - - * src/base/ftdebug.c (ft_custom_trace_level): New variable. - (ft_debug_init): Update to support change of levels of tracing - components of FreeType at run-time. - (FT_Trace_Set_Level): New function to change the levels of tracing - components at run-time. - (FT_Trace_Set_Default_Level): New function to reset the levels of - tracing components back to default. - -2020-11-28 Priyesh Kumar - - [base] Updates to print timestamp and name of `FT_COMPONENT` in logs. - - * include/freetype/internal/ftdebug.h (FT_LOGGING_TAG, - FT_LOGGING_TAG_): New macros to resolve the value of `FT_COMPONENT' - into a string. - (ft_add_tag, ft_remove_tag): New functions to add and remove dlg tags. - - * src/base/ftdebug.c: Add new variables to control the logging of - timestamp and name of `FT_COMPONENT` along with actual logs. - (ft_add_tag, ft_remove_tag): Add function definitions. - (ft_log_handler): Updates to print timestamp and name of - `FT_COMPONENT`. - (ft_debug_init) [FT_LOGGING]: Users can now control the logging of - timestamp and name of `FT_COMPONENT` by adding tags in the - `FT2_DEBUG` environment variable. - -2020-11-27 Priyesh Kumar - - [base] Add functions and variables to print logs to a file. - - * include/freetype/internal/ftdebug.h: Added dlg's header files. - (FT_LOG): New macro to redirect trace logs to dlg's API's whenever - `FT_LOGGING' is defined. - (ft_logging_init, ft_logging_deinit): New functions to handle - initialization and uninitialization of logging related variables. - (ft_log_handler): New function to handle logs of FreeType. - - * src/base/ftdebug.c: Add necessary logging related variables. - (ft_logging_init, ft_logging_deinit, ft_log_handler): Add function - definitions. - - * src/base/ftinit.c (FT_Init_FreeType) [FT_LOGGING]: Call - `ft_logging_init`. - (FT_Done_FreeType) [FT_LOGGING]: Call `ft_logging_deinit`. - - * src/base/ftobjs.c (FT_New_Library): Call `ft_debug_init` only if - `FT_LOGGING` is not defined. - -2020-11-27 Priyesh Kumar - - [builds] Necessary changes to make 'dlg' compile. - - * autogen.sh (copy_submodule_files): New script to copy all the - necessary source and include files from `submodules/dlg` to - `src/dlg`. - - * src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables - the build of 'dlg' if the `FT_LOGGING` macro is defined. - - * src/dlg/rules.mk: New sub-Makefile. - - * builds/freetype.mk (DLG_DIR): New variable to include the - header files of the 'dlg' library. - (INCLUDES): Add `DLG_DIR`. - (FT_CFLAGS): Add `-std=c99' flag. - Include `src/dlg/rules.mk` file to build 'dlg' library. - (OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`. - - * builds/toplevel.mk: For builds directly from the git repository - we need to copy files from `submodule/dlg` to `src/dlg`. - - * include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING): - New macro to enable or disable the logging facility in FreeType. - -2020-11-27 Priyesh Kumar - - * .gitmodules: Add 'dlg' library's git repository as submodule. - -2020-12-01 Werner Lemberg - - * src/tools/chktrcmp.py (trace_use_pat): Update to current use. - -2020-11-20 Alexei Podtelezhnikov - - [cff,cid,type1] Demote old engine for lack of CFF2. - - * src/cff/cffobjs.c (cff_driver_init): Always default to Adobe engine. - * src/cid/cidobjs.c (cid_driver_init): Ditto. - * src/type1/t1objs.c (T1_Driver_Init): Ditto. - -2020-11-09 Werner Lemberg - - * src/type42/t42parse.c (t42_parse_sfnts): More tracing messages. - -2020-11-04 Werner Lemberg - - * meson.build: Fix .pc file generation. - - For backwards compatibility we need the libtool version, not the .so - number. - - Reported by Nikolaus. - -2020-10-28 Werner Lemberg - - [truetype] Minor update to forthcoming OpenType 1.8.4 standard. - - * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Limit - size of `regionCount`. - -2020-10-26 Werner Lemberg - - * meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347). - - Without this patch, 'harfbuzz' and 'brotli' are always required. - - Patch submitted anonymously in Savannah bug report. - -2020-10-23 Ben Wagner - - * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak (#59322). - - The issue is that `rows` is allocated but will not be freed in the - event that the call to `png_read_image` fails and calls `longjmp`. - -2020-10-20 Werner Lemberg - - * Version 2.10.4 released. - ========================== - - - Tag sources with `VER-2-10-4'. - - * docs/VERSION.TXT: Add entry for version 2.10.4. - * docs/CHANGES: Updated. - - * README, src/base/ftver.rc, builds/windows/vc2010/index.html, - builds/windows/visualc/index.html, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/index.html, docs/freetype-config.1: - s/2.10.3/2.10.4/, s/2103/2104/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. - - * builds/unix/configure.raw (version_info): Set to 23:4:17. - * CMakeLists.txt (VERSION_PATCH): Set to 4. - -2020-10-19 Werner Lemberg - - [sfnt] Fix heap buffer overflow (#59308). - - This is CVE-2020-15999. - - * src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier. - -2020-10-17 Alexei Podtelezhnikov - - * src/sfnt/tt{colr,cpal}.c: Fix signedness warnings from VC++. - -2020-10-17 Alexei Podtelezhnikov - - * src/sfnt/sfwoff2.c (Read255UShort): Tweak types to please VC++. - -2020-10-10 Werner Lemberg - - * Version 2.10.3 released. - ========================== - - - Tag sources with `VER-2-10-3'. - - * docs/VERSION.TXT: Add entry for version 2.10.3. - - * README, src/base/ftver.rc, builds/windows/vc2010/index.html, - builds/windows/visualc/index.html, - builds/windows/visualce/index.html, - builds/wince/vc2005-ce/index.html, - builds/wince/vc2008-ce/index.html, docs/freetype-config.1: - s/2.10.2/2.10.3/, s/2102/2103/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. - - * builds/unix/configure.raw (version_info): Set to 23:3:17. - * CMakeLists.txt (VERSION_PATCH): Set to 3. - -2020-09-25 Werner Lemberg - - [autofit] Synchronize with ttfautohint. - - This corresponds to the following commits in the ttfautohint git - repository: - - bb6842bd3bd437b7b4a7921b0376c860f5e73d18 Typo, formatting. - d5c91ddb1cb310257a3dfe9a8e20e1fc51335faa Add Medefaidrin script. - - * src/autofit/afblue.dat: Add blue zone data for Medefaidrin. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Medefaidrin standard characters. - - * src/autofit/afranges.c, src/autofit/afstyles.h: Add Medefaidrin - data. - -2020-09-25 Werner Lemberg - - Move `scripts/make_distribution_archives.py` to `src/tools`. - - * scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR, - _SCRIPT_DIR): Updated to new location. - (main): s/shutils.copyfile/shutils.copy/ to preserve file - permissions. - (main): Prefix source file paths with `git_dir` while copying files - to allow calls of the script from other places than the top-level - directory. - -2020-09-24 Werner Lemberg - - * src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`. - - Towards the end of the the function there is a call to - `FT_Outline_Get_CBox` that retrieves the glyph bbox in scaled units. - That sets `horiBearing{X,Y}` and `vertBearingX` but `vertBearingY` - is left alone, and is not scaled. - - Patch from Eric Muller . - -2020-09-24 Werner Lemberg - - * src/base/ftobjs.c (FT_Load_Glyph): Trace glyph metrics. - -2020-09-22 Werner Lemberg - - [meson] Move auxiliary scripts to `builds/meson`. - - Suggested by Alexei. - - * scripts/*.py: Move meson scripts to... - * builds/meson/*.py: ... this new location. - - * meson.build: Updated. - -2020-09-21 David Turner - - Add python script for building tarballs. - - * scripts/make_distribution_archives.py: New file. - - This standalone Python script should be equivalent to running `make - dist` with the Make-based build system, with the following minor - differences: - - - Since `make distclean` doesn't always clean up `objs/` properly, - `make dist` archives may contain some stale binaries like - `objs/.libs/libfreetype.so.6` or others. - - - `config.guess` and `config.sub` are not updated unless option - `--gnu-config-dir=DIR` is used to specify the location of these - files. - - - Some bits of the auto-generated reference documentation may - appear in slightly different order, probably due to issues related - to mkdocs and docwriter. - - As an example, the call - - scripts/make_distribution_archives.py /tmp/freetype2-dist - - creates the following files under `/tmp/freetype2-dist`: - - freetype-.tar.gz - freetype-.tar.xz - ft.zip - -2020-09-21 Werner Lemberg - - * scripts/extract_freetype_version.py: Fix regex typos. - -2020-09-21 David Turner - - Add Meson build project file. - - Example usage: - - # Configure Meson build in directory `build-meson` to generate - # release binaries comparable to to the ones from the - # autotools/make build system. - meson setup build-meson \ - --prefix=/usr/local \ - --buildtype=debugoptimized \ - --strip \ - -Db_ndebug=true - - # After configuring the Meson build with the above command, - # compile and install to `/usr/local/`; this includes a pkg-config - # file. - ninja -C build-meson install - - # Alternatively, compile and install to `/tmp/aa/usr/local/...` - # for packaging. - DESTDIR=/tmp/aa ninja -C build-meson install - - # Generate documentation under `build-meson/docs`. - ninja -C build-meson docs - - Library size comparison for stripped `libfreetype.so` generated by - all three build systems: - - - Default build (autotools + libtool): 712 KiB - - CMake build (RelWithDebInfo): 712 KiB - - Meson build: 712 KiB - - - * meson.build: New top-level Meson build file for the library. - - * meson_options.txt: New file. It holds user-selectable options for - the build, which can be printed with `meson configure`, and selected - at `meson setup` or `meson --reconfigure` time with - `-D