From 754039e8770c6794c06046db45a1652b443b4ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Mon, 20 Apr 2026 21:20:34 +0300 Subject: [PATCH] Update FreeType to 2.14.3 --- thirdparty/README.md | 2 +- .../include/freetype/config/ftconfig.h | 2 +- .../include/freetype/config/ftheader.h | 2 +- .../include/freetype/config/ftoption.h | 10 +- .../include/freetype/config/ftstdlib.h | 2 +- .../include/freetype/config/integer-types.h | 2 +- .../include/freetype/config/mac-support.h | 4 +- .../include/freetype/config/public-macros.h | 2 +- .../freetype/include/freetype/freetype.h | 27 +- .../freetype/include/freetype/ftadvanc.h | 2 +- thirdparty/freetype/include/freetype/ftbbox.h | 2 +- thirdparty/freetype/include/freetype/ftbdf.h | 14 +- .../freetype/include/freetype/ftbitmap.h | 2 +- .../freetype/include/freetype/ftbzip2.h | 2 +- .../freetype/include/freetype/ftcache.h | 2 +- thirdparty/freetype/include/freetype/ftcid.h | 2 +- .../freetype/include/freetype/ftcolor.h | 2 +- .../freetype/include/freetype/ftdriver.h | 2 +- .../freetype/include/freetype/fterrdef.h | 2 +- .../freetype/include/freetype/fterrors.h | 2 +- .../freetype/include/freetype/ftfntfmt.h | 2 +- thirdparty/freetype/include/freetype/ftgasp.h | 2 +- .../freetype/include/freetype/ftglyph.h | 2 +- .../freetype/include/freetype/ftgxval.h | 2 +- thirdparty/freetype/include/freetype/ftgzip.h | 2 +- .../freetype/include/freetype/ftimage.h | 4 +- .../freetype/include/freetype/ftincrem.h | 2 +- .../freetype/include/freetype/ftlcdfil.h | 12 +- thirdparty/freetype/include/freetype/ftlist.h | 2 +- .../freetype/include/freetype/ftlogging.h | 2 +- thirdparty/freetype/include/freetype/ftlzw.h | 2 +- thirdparty/freetype/include/freetype/ftmac.h | 2 +- thirdparty/freetype/include/freetype/ftmm.h | 2 +- .../freetype/include/freetype/ftmodapi.h | 2 +- .../freetype/include/freetype/ftmoderr.h | 2 +- .../freetype/include/freetype/ftotval.h | 2 +- .../freetype/include/freetype/ftoutln.h | 2 +- .../freetype/include/freetype/ftparams.h | 9 +- thirdparty/freetype/include/freetype/ftpfr.h | 2 +- .../freetype/include/freetype/ftrender.h | 2 +- .../freetype/include/freetype/ftsizes.h | 2 +- .../freetype/include/freetype/ftsnames.h | 2 +- .../freetype/include/freetype/ftstroke.h | 2 +- .../freetype/include/freetype/ftsynth.h | 2 +- .../freetype/include/freetype/ftsystem.h | 2 +- .../freetype/include/freetype/fttrigon.h | 2 +- .../freetype/include/freetype/fttypes.h | 2 +- .../freetype/include/freetype/ftwinfnt.h | 2 +- .../include/freetype/internal/autohint.h | 2 +- .../include/freetype/internal/cffotypes.h | 2 +- .../include/freetype/internal/cfftypes.h | 6 +- .../freetype/internal/compiler-macros.h | 2 +- .../include/freetype/internal/ftcalc.h | 2 +- .../include/freetype/internal/ftdebug.h | 2 +- .../include/freetype/internal/ftdrv.h | 2 +- .../include/freetype/internal/ftgloadr.h | 2 +- .../include/freetype/internal/ftmemory.h | 2 +- .../include/freetype/internal/ftmmtypes.h | 2 +- .../include/freetype/internal/ftobjs.h | 32 +- .../include/freetype/internal/ftpsprop.h | 2 +- .../include/freetype/internal/ftrfork.h | 2 +- .../include/freetype/internal/ftserv.h | 2 +- .../include/freetype/internal/ftstream.h | 2 +- .../include/freetype/internal/fttrace.h | 2 +- .../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 | 2 +- .../include/freetype/internal/svginterface.h | 2 +- .../include/freetype/internal/t1types.h | 2 +- .../include/freetype/internal/tttypes.h | 2 +- .../include/freetype/internal/wofftypes.h | 2 +- thirdparty/freetype/include/freetype/otsvg.h | 2 +- .../freetype/include/freetype/t1tables.h | 6 +- .../freetype/include/freetype/ttnameid.h | 4 +- .../freetype/include/freetype/tttables.h | 2 +- thirdparty/freetype/include/freetype/tttags.h | 2 +- thirdparty/freetype/include/ft2build.h | 2 +- thirdparty/freetype/src/autofit/afadjust.c | 15 +- thirdparty/freetype/src/autofit/afadjust.h | 2 +- thirdparty/freetype/src/autofit/afblue.c | 2 +- thirdparty/freetype/src/autofit/afblue.cin | 39 --- thirdparty/freetype/src/autofit/afblue.h | 2 +- thirdparty/freetype/src/autofit/afblue.hin | 149 ---------- thirdparty/freetype/src/autofit/afcjk.c | 2 +- thirdparty/freetype/src/autofit/afcjk.h | 2 +- thirdparty/freetype/src/autofit/afcover.h | 2 +- thirdparty/freetype/src/autofit/afdummy.c | 2 +- thirdparty/freetype/src/autofit/afdummy.h | 2 +- thirdparty/freetype/src/autofit/aferrors.h | 2 +- thirdparty/freetype/src/autofit/afglobal.c | 2 +- thirdparty/freetype/src/autofit/afglobal.h | 6 +- thirdparty/freetype/src/autofit/afgsub.c | 9 +- thirdparty/freetype/src/autofit/afgsub.h | 2 +- thirdparty/freetype/src/autofit/afhints.c | 2 +- thirdparty/freetype/src/autofit/afhints.h | 2 +- thirdparty/freetype/src/autofit/afindic.c | 2 +- thirdparty/freetype/src/autofit/afindic.h | 2 +- thirdparty/freetype/src/autofit/aflatin.c | 66 +++-- thirdparty/freetype/src/autofit/aflatin.h | 2 +- thirdparty/freetype/src/autofit/afloader.c | 16 +- thirdparty/freetype/src/autofit/afloader.h | 2 +- thirdparty/freetype/src/autofit/afmodule.c | 2 +- thirdparty/freetype/src/autofit/afmodule.h | 2 +- thirdparty/freetype/src/autofit/afranges.c | 2 +- thirdparty/freetype/src/autofit/afranges.h | 2 +- thirdparty/freetype/src/autofit/afscript.h | 2 +- thirdparty/freetype/src/autofit/afshaper.c | 2 +- thirdparty/freetype/src/autofit/afshaper.h | 2 +- thirdparty/freetype/src/autofit/afstyles.h | 2 +- thirdparty/freetype/src/autofit/aftypes.h | 2 +- thirdparty/freetype/src/autofit/afws-decl.h | 2 +- thirdparty/freetype/src/autofit/afws-iter.h | 2 +- thirdparty/freetype/src/autofit/autofit.c | 2 +- thirdparty/freetype/src/autofit/ft-hb-ft.c | 2 +- thirdparty/freetype/src/autofit/ft-hb.c | 2 +- thirdparty/freetype/src/autofit/ft-hb.h | 2 +- thirdparty/freetype/src/base/ftadvanc.c | 68 +++-- thirdparty/freetype/src/base/ftbase.c | 2 +- thirdparty/freetype/src/base/ftbase.h | 2 +- thirdparty/freetype/src/base/ftbbox.c | 2 +- thirdparty/freetype/src/base/ftbdf.c | 2 +- thirdparty/freetype/src/base/ftbitmap.c | 20 +- thirdparty/freetype/src/base/ftcalc.c | 2 +- thirdparty/freetype/src/base/ftcid.c | 2 +- thirdparty/freetype/src/base/ftcolor.c | 2 +- thirdparty/freetype/src/base/ftdbgmem.c | 2 +- thirdparty/freetype/src/base/ftdebug.c | 2 +- thirdparty/freetype/src/base/fterrors.c | 2 +- thirdparty/freetype/src/base/ftfntfmt.c | 2 +- thirdparty/freetype/src/base/ftfstype.c | 2 +- thirdparty/freetype/src/base/ftgasp.c | 2 +- thirdparty/freetype/src/base/ftgloadr.c | 2 +- thirdparty/freetype/src/base/ftglyph.c | 23 +- thirdparty/freetype/src/base/ftgxval.c | 2 +- thirdparty/freetype/src/base/ftinit.c | 2 +- thirdparty/freetype/src/base/ftlcdfil.c | 273 +----------------- thirdparty/freetype/src/base/ftmac.c | 2 +- thirdparty/freetype/src/base/ftmm.c | 2 +- thirdparty/freetype/src/base/ftobjs.c | 55 ++-- thirdparty/freetype/src/base/ftotval.c | 2 +- thirdparty/freetype/src/base/ftoutln.c | 2 +- thirdparty/freetype/src/base/ftpatent.c | 2 +- thirdparty/freetype/src/base/ftpfr.c | 2 +- thirdparty/freetype/src/base/ftpsprop.c | 2 +- thirdparty/freetype/src/base/ftrfork.c | 2 +- thirdparty/freetype/src/base/ftsnames.c | 2 +- thirdparty/freetype/src/base/ftstream.c | 2 +- thirdparty/freetype/src/base/ftstroke.c | 11 +- thirdparty/freetype/src/base/ftsynth.c | 2 +- thirdparty/freetype/src/base/ftsystem.c | 2 +- thirdparty/freetype/src/base/fttrigon.c | 2 +- thirdparty/freetype/src/base/fttype1.c | 2 +- thirdparty/freetype/src/base/ftutil.c | 5 +- thirdparty/freetype/src/base/ftwinfnt.c | 2 +- thirdparty/freetype/src/bdf/bdfdrivr.c | 3 +- thirdparty/freetype/src/bzip2/ftbzip2.c | 2 +- thirdparty/freetype/src/cache/ftcache.c | 2 +- thirdparty/freetype/src/cache/ftcbasic.c | 2 +- thirdparty/freetype/src/cache/ftccache.c | 2 +- thirdparty/freetype/src/cache/ftccache.h | 2 +- thirdparty/freetype/src/cache/ftccback.h | 2 +- thirdparty/freetype/src/cache/ftccmap.c | 2 +- thirdparty/freetype/src/cache/ftcerror.h | 2 +- thirdparty/freetype/src/cache/ftcglyph.c | 2 +- thirdparty/freetype/src/cache/ftcglyph.h | 2 +- thirdparty/freetype/src/cache/ftcimage.c | 2 +- thirdparty/freetype/src/cache/ftcimage.h | 2 +- thirdparty/freetype/src/cache/ftcmanag.c | 2 +- thirdparty/freetype/src/cache/ftcmanag.h | 2 +- thirdparty/freetype/src/cache/ftcmru.c | 2 +- thirdparty/freetype/src/cache/ftcmru.h | 2 +- thirdparty/freetype/src/cache/ftcsbits.c | 2 +- thirdparty/freetype/src/cache/ftcsbits.h | 2 +- thirdparty/freetype/src/cff/cff.c | 2 +- thirdparty/freetype/src/cff/cffcmap.c | 2 +- thirdparty/freetype/src/cff/cffcmap.h | 2 +- thirdparty/freetype/src/cff/cffdrivr.c | 6 +- thirdparty/freetype/src/cff/cffdrivr.h | 2 +- thirdparty/freetype/src/cff/cfferrs.h | 2 +- thirdparty/freetype/src/cff/cffgload.c | 2 +- thirdparty/freetype/src/cff/cffgload.h | 2 +- thirdparty/freetype/src/cff/cffload.c | 6 +- thirdparty/freetype/src/cff/cffload.h | 2 +- thirdparty/freetype/src/cff/cffobjs.c | 10 +- thirdparty/freetype/src/cff/cffobjs.h | 4 +- thirdparty/freetype/src/cff/cffparse.c | 2 +- thirdparty/freetype/src/cff/cffparse.h | 2 +- thirdparty/freetype/src/cff/cfftoken.h | 6 +- thirdparty/freetype/src/cid/ciderrs.h | 2 +- thirdparty/freetype/src/cid/cidgload.c | 33 ++- thirdparty/freetype/src/cid/cidgload.h | 2 +- thirdparty/freetype/src/cid/cidload.c | 2 +- thirdparty/freetype/src/cid/cidload.h | 2 +- thirdparty/freetype/src/cid/cidobjs.c | 2 +- thirdparty/freetype/src/cid/cidobjs.h | 2 +- thirdparty/freetype/src/cid/cidparse.c | 2 +- thirdparty/freetype/src/cid/cidparse.h | 2 +- thirdparty/freetype/src/cid/cidriver.c | 2 +- thirdparty/freetype/src/cid/cidriver.h | 2 +- thirdparty/freetype/src/cid/cidtoken.h | 4 +- thirdparty/freetype/src/cid/type1cid.c | 2 +- thirdparty/freetype/src/gxvalid/gxvalid.c | 2 +- thirdparty/freetype/src/gxvalid/gxvalid.h | 2 +- thirdparty/freetype/src/gxvalid/gxvbsln.c | 2 +- thirdparty/freetype/src/gxvalid/gxvcommn.c | 2 +- thirdparty/freetype/src/gxvalid/gxvcommn.h | 2 +- thirdparty/freetype/src/gxvalid/gxverror.h | 2 +- thirdparty/freetype/src/gxvalid/gxvfeat.c | 2 +- thirdparty/freetype/src/gxvalid/gxvfeat.h | 2 +- thirdparty/freetype/src/gxvalid/gxvfgen.c | 2 +- thirdparty/freetype/src/gxvalid/gxvjust.c | 2 +- thirdparty/freetype/src/gxvalid/gxvkern.c | 2 +- thirdparty/freetype/src/gxvalid/gxvlcar.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmod.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmod.h | 2 +- thirdparty/freetype/src/gxvalid/gxvmort.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmort.h | 2 +- thirdparty/freetype/src/gxvalid/gxvmort0.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmort1.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmort2.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmort4.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmort5.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx.h | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx0.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx1.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx2.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx4.c | 2 +- thirdparty/freetype/src/gxvalid/gxvmorx5.c | 2 +- thirdparty/freetype/src/gxvalid/gxvopbd.c | 2 +- thirdparty/freetype/src/gxvalid/gxvprop.c | 2 +- thirdparty/freetype/src/gxvalid/gxvtrak.c | 2 +- thirdparty/freetype/src/gzip/ftgzip.c | 2 +- thirdparty/freetype/src/lzw/ftlzw.c | 2 +- thirdparty/freetype/src/lzw/ftzopen.c | 2 +- thirdparty/freetype/src/lzw/ftzopen.h | 2 +- thirdparty/freetype/src/otvalid/otvalid.c | 2 +- thirdparty/freetype/src/otvalid/otvalid.h | 2 +- thirdparty/freetype/src/otvalid/otvbase.c | 2 +- thirdparty/freetype/src/otvalid/otvcommn.c | 14 +- thirdparty/freetype/src/otvalid/otvcommn.h | 2 +- thirdparty/freetype/src/otvalid/otverror.h | 2 +- thirdparty/freetype/src/otvalid/otvgdef.c | 4 +- thirdparty/freetype/src/otvalid/otvgpos.c | 10 +- thirdparty/freetype/src/otvalid/otvgpos.h | 2 +- thirdparty/freetype/src/otvalid/otvgsub.c | 2 +- thirdparty/freetype/src/otvalid/otvjstf.c | 2 +- thirdparty/freetype/src/otvalid/otvmath.c | 2 +- thirdparty/freetype/src/otvalid/otvmod.c | 2 +- thirdparty/freetype/src/otvalid/otvmod.h | 2 +- thirdparty/freetype/src/pcf/pcfdrivr.c | 4 +- thirdparty/freetype/src/pfr/pfr.c | 2 +- thirdparty/freetype/src/pfr/pfrcmap.c | 2 +- thirdparty/freetype/src/pfr/pfrcmap.h | 2 +- thirdparty/freetype/src/pfr/pfrdrivr.c | 2 +- thirdparty/freetype/src/pfr/pfrdrivr.h | 2 +- thirdparty/freetype/src/pfr/pfrerror.h | 2 +- thirdparty/freetype/src/pfr/pfrgload.c | 2 +- thirdparty/freetype/src/pfr/pfrgload.h | 2 +- thirdparty/freetype/src/pfr/pfrload.c | 2 +- thirdparty/freetype/src/pfr/pfrload.h | 2 +- thirdparty/freetype/src/pfr/pfrobjs.c | 2 +- thirdparty/freetype/src/pfr/pfrobjs.h | 2 +- thirdparty/freetype/src/pfr/pfrsbit.c | 13 +- thirdparty/freetype/src/pfr/pfrsbit.h | 2 +- thirdparty/freetype/src/pfr/pfrtypes.h | 2 +- thirdparty/freetype/src/psaux/afmparse.c | 2 +- thirdparty/freetype/src/psaux/afmparse.h | 2 +- thirdparty/freetype/src/psaux/cffdecode.c | 2 +- thirdparty/freetype/src/psaux/cffdecode.h | 2 +- thirdparty/freetype/src/psaux/psaux.c | 2 +- thirdparty/freetype/src/psaux/psauxerr.h | 2 +- thirdparty/freetype/src/psaux/psauxmod.c | 2 +- thirdparty/freetype/src/psaux/psauxmod.h | 2 +- thirdparty/freetype/src/psaux/psconv.c | 2 +- thirdparty/freetype/src/psaux/psconv.h | 2 +- thirdparty/freetype/src/psaux/psobjs.c | 2 +- thirdparty/freetype/src/psaux/psobjs.h | 2 +- thirdparty/freetype/src/psaux/t1cmap.c | 2 +- thirdparty/freetype/src/psaux/t1cmap.h | 2 +- thirdparty/freetype/src/psaux/t1decode.c | 39 ++- thirdparty/freetype/src/psaux/t1decode.h | 2 +- thirdparty/freetype/src/pshinter/pshalgo.c | 242 ++-------------- thirdparty/freetype/src/pshinter/pshalgo.h | 2 +- thirdparty/freetype/src/pshinter/pshglob.c | 52 ++-- thirdparty/freetype/src/pshinter/pshglob.h | 2 +- thirdparty/freetype/src/pshinter/pshinter.c | 2 +- thirdparty/freetype/src/pshinter/pshmod.c | 2 +- thirdparty/freetype/src/pshinter/pshmod.h | 2 +- thirdparty/freetype/src/pshinter/pshnterr.h | 2 +- thirdparty/freetype/src/pshinter/pshrec.c | 2 +- thirdparty/freetype/src/pshinter/pshrec.h | 2 +- thirdparty/freetype/src/psnames/psmodule.c | 2 +- thirdparty/freetype/src/psnames/psmodule.h | 2 +- thirdparty/freetype/src/psnames/psnamerr.h | 2 +- thirdparty/freetype/src/psnames/psnames.c | 2 +- thirdparty/freetype/src/psnames/pstables.h | 2 +- thirdparty/freetype/src/raster/ftmisc.h | 2 +- thirdparty/freetype/src/raster/ftraster.c | 54 ++-- thirdparty/freetype/src/raster/ftraster.h | 2 +- thirdparty/freetype/src/raster/ftrend1.c | 2 +- thirdparty/freetype/src/raster/ftrend1.h | 2 +- thirdparty/freetype/src/raster/raster.c | 2 +- thirdparty/freetype/src/raster/rasterrs.h | 2 +- thirdparty/freetype/src/sdf/ftbsdf.c | 3 +- thirdparty/freetype/src/sdf/ftsdf.c | 19 +- thirdparty/freetype/src/sdf/ftsdf.h | 2 +- thirdparty/freetype/src/sdf/ftsdfcommon.c | 2 +- thirdparty/freetype/src/sdf/ftsdfcommon.h | 2 +- thirdparty/freetype/src/sdf/ftsdferrs.h | 2 +- thirdparty/freetype/src/sdf/ftsdfrend.c | 2 +- thirdparty/freetype/src/sdf/ftsdfrend.h | 2 +- thirdparty/freetype/src/sdf/sdf.c | 2 +- thirdparty/freetype/src/sfnt/pngshim.c | 7 +- thirdparty/freetype/src/sfnt/pngshim.h | 2 +- thirdparty/freetype/src/sfnt/sfdriver.c | 9 +- thirdparty/freetype/src/sfnt/sfdriver.h | 2 +- thirdparty/freetype/src/sfnt/sferrors.h | 2 +- thirdparty/freetype/src/sfnt/sfnt.c | 2 +- thirdparty/freetype/src/sfnt/sfobjs.c | 2 +- thirdparty/freetype/src/sfnt/sfobjs.h | 2 +- thirdparty/freetype/src/sfnt/sfwoff.c | 2 +- thirdparty/freetype/src/sfnt/sfwoff.h | 2 +- thirdparty/freetype/src/sfnt/sfwoff2.c | 12 +- thirdparty/freetype/src/sfnt/sfwoff2.h | 2 +- thirdparty/freetype/src/sfnt/ttbdf.c | 36 ++- thirdparty/freetype/src/sfnt/ttbdf.h | 2 +- thirdparty/freetype/src/sfnt/ttcmap.c | 2 +- thirdparty/freetype/src/sfnt/ttcmap.h | 2 +- thirdparty/freetype/src/sfnt/ttcmapc.h | 2 +- thirdparty/freetype/src/sfnt/ttcolr.c | 53 ++-- thirdparty/freetype/src/sfnt/ttcolr.h | 2 +- thirdparty/freetype/src/sfnt/ttcpal.c | 2 +- thirdparty/freetype/src/sfnt/ttcpal.h | 2 +- thirdparty/freetype/src/sfnt/ttgpos.c | 72 +++-- thirdparty/freetype/src/sfnt/ttgpos.h | 2 +- thirdparty/freetype/src/sfnt/ttkern.c | 2 +- thirdparty/freetype/src/sfnt/ttkern.h | 2 +- thirdparty/freetype/src/sfnt/ttload.c | 2 +- thirdparty/freetype/src/sfnt/ttload.h | 2 +- thirdparty/freetype/src/sfnt/ttmtx.c | 2 +- thirdparty/freetype/src/sfnt/ttmtx.h | 2 +- thirdparty/freetype/src/sfnt/ttpost.c | 2 +- thirdparty/freetype/src/sfnt/ttpost.h | 2 +- thirdparty/freetype/src/sfnt/ttsbit.c | 13 +- thirdparty/freetype/src/sfnt/ttsbit.h | 2 +- thirdparty/freetype/src/sfnt/ttsvg.c | 2 +- thirdparty/freetype/src/sfnt/ttsvg.h | 2 +- thirdparty/freetype/src/sfnt/woff2tags.c | 2 +- thirdparty/freetype/src/sfnt/woff2tags.h | 2 +- thirdparty/freetype/src/smooth/ftgrays.c | 6 +- thirdparty/freetype/src/smooth/ftgrays.h | 2 +- thirdparty/freetype/src/smooth/ftsmerrs.h | 2 +- thirdparty/freetype/src/smooth/ftsmooth.c | 167 ++++++++--- thirdparty/freetype/src/smooth/ftsmooth.h | 2 +- thirdparty/freetype/src/smooth/smooth.c | 2 +- thirdparty/freetype/src/svg/ftsvg.c | 12 +- thirdparty/freetype/src/svg/ftsvg.h | 2 +- thirdparty/freetype/src/svg/svg.c | 2 +- thirdparty/freetype/src/svg/svgtypes.h | 2 +- thirdparty/freetype/src/truetype/truetype.c | 2 +- thirdparty/freetype/src/truetype/ttdriver.c | 2 +- thirdparty/freetype/src/truetype/ttdriver.h | 2 +- thirdparty/freetype/src/truetype/tterrors.h | 2 +- thirdparty/freetype/src/truetype/ttgload.c | 25 +- thirdparty/freetype/src/truetype/ttgload.h | 2 +- thirdparty/freetype/src/truetype/ttgxvar.c | 8 +- thirdparty/freetype/src/truetype/ttgxvar.h | 2 +- thirdparty/freetype/src/truetype/ttinterp.c | 18 +- thirdparty/freetype/src/truetype/ttinterp.h | 4 +- thirdparty/freetype/src/truetype/ttobjs.c | 49 ++-- thirdparty/freetype/src/truetype/ttobjs.h | 2 +- thirdparty/freetype/src/truetype/ttpload.c | 2 +- thirdparty/freetype/src/truetype/ttpload.h | 2 +- thirdparty/freetype/src/type1/t1afm.c | 2 +- thirdparty/freetype/src/type1/t1afm.h | 2 +- thirdparty/freetype/src/type1/t1driver.c | 2 +- thirdparty/freetype/src/type1/t1driver.h | 2 +- thirdparty/freetype/src/type1/t1errors.h | 2 +- thirdparty/freetype/src/type1/t1gload.c | 2 +- thirdparty/freetype/src/type1/t1gload.h | 2 +- thirdparty/freetype/src/type1/t1load.c | 2 +- thirdparty/freetype/src/type1/t1load.h | 2 +- thirdparty/freetype/src/type1/t1objs.c | 2 +- thirdparty/freetype/src/type1/t1objs.h | 2 +- thirdparty/freetype/src/type1/t1parse.c | 2 +- thirdparty/freetype/src/type1/t1parse.h | 2 +- thirdparty/freetype/src/type1/t1tokens.h | 4 +- thirdparty/freetype/src/type1/type1.c | 2 +- thirdparty/freetype/src/type42/t42drivr.c | 2 +- thirdparty/freetype/src/type42/t42drivr.h | 2 +- thirdparty/freetype/src/type42/t42error.h | 2 +- thirdparty/freetype/src/type42/t42objs.c | 2 +- thirdparty/freetype/src/type42/t42objs.h | 2 +- thirdparty/freetype/src/type42/t42parse.c | 4 +- thirdparty/freetype/src/type42/t42parse.h | 2 +- thirdparty/freetype/src/type42/t42types.h | 2 +- thirdparty/freetype/src/type42/type42.c | 2 +- thirdparty/freetype/src/winfonts/fnterrs.h | 2 +- thirdparty/freetype/src/winfonts/winfnt.c | 2 +- thirdparty/freetype/src/winfonts/winfnt.h | 2 +- 422 files changed, 1044 insertions(+), 1586 deletions(-) delete mode 100644 thirdparty/freetype/src/autofit/afblue.cin delete mode 100644 thirdparty/freetype/src/autofit/afblue.hin diff --git a/thirdparty/README.md b/thirdparty/README.md index dcd9ce2ca6..c828b87e2f 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -356,7 +356,7 @@ for UI. ## freetype - Upstream: https://gitlab.freedesktop.org/freetype/freetype -- Version: 2.14.1 (526ec5c47b9ebccc4754c85ac0c0cdf7c85a5e9b, 2025) +- Version: 2.14.3 (0a0221a1347e2f1e07c395263540026e9a0aa7c7, 2026) - License: FreeType License (BSD-like) Files extracted from upstream source: diff --git a/thirdparty/freetype/include/freetype/config/ftconfig.h b/thirdparty/freetype/include/freetype/config/ftconfig.h index d66c5df997..9800e99adf 100644 --- a/thirdparty/freetype/include/freetype/config/ftconfig.h +++ b/thirdparty/freetype/include/freetype/config/ftconfig.h @@ -4,7 +4,7 @@ * * ANSI-specific configuration file (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/ftheader.h b/thirdparty/freetype/include/freetype/config/ftheader.h index 16eab9048f..24a9161e2f 100644 --- a/thirdparty/freetype/include/freetype/config/ftheader.h +++ b/thirdparty/freetype/include/freetype/config/ftheader.h @@ -4,7 +4,7 @@ * * Build macros of the FreeType 2 library. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/ftoption.h b/thirdparty/freetype/include/freetype/config/ftoption.h index 4934186893..b857e0ebbd 100644 --- a/thirdparty/freetype/include/freetype/config/ftoption.h +++ b/thirdparty/freetype/include/freetype/config/ftoption.h @@ -4,7 +4,7 @@ * * User-selectable configuration macros (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -759,7 +759,13 @@ FT_BEGIN_HEADER /************************************************************************** * * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an - * embedded 'BDF~' table within SFNT-based bitmap formats. + * embedded 'BDF~' table within an SFNT-based `.otb` font file. This table + * is an extension used by X11 to preserve BDF properties after conversion + * to SFNT containers. See + * + * https://fontforge.org/docs/techref/non-standard.html#non-standard-bdf + * + * for more details. */ #define TT_CONFIG_OPTION_BDF diff --git a/thirdparty/freetype/include/freetype/config/ftstdlib.h b/thirdparty/freetype/include/freetype/config/ftstdlib.h index f846b4456c..1c63e8d654 100644 --- a/thirdparty/freetype/include/freetype/config/ftstdlib.h +++ b/thirdparty/freetype/include/freetype/config/ftstdlib.h @@ -5,7 +5,7 @@ * ANSI-specific library and header configuration file (specification * only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/integer-types.h b/thirdparty/freetype/include/freetype/config/integer-types.h index a0b892ece4..4ab4c0c78b 100644 --- a/thirdparty/freetype/include/freetype/config/integer-types.h +++ b/thirdparty/freetype/include/freetype/config/integer-types.h @@ -4,7 +4,7 @@ * * FreeType integer types definitions. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/config/mac-support.h b/thirdparty/freetype/include/freetype/config/mac-support.h index d1b6a9898f..ac48995320 100644 --- a/thirdparty/freetype/include/freetype/config/mac-support.h +++ b/thirdparty/freetype/include/freetype/config/mac-support.h @@ -4,7 +4,7 @@ * * Mac/OS X support configuration header. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -24,6 +24,7 @@ * This is the only necessary change, so it is defined here instead * providing a new configuration file. */ +#ifdef FT_MACINTOSH #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) /* No Carbon frameworks for 64bit 10.4.x. */ /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ @@ -36,6 +37,7 @@ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) #undef FT_MACINTOSH #endif +#endif /* __APPLE__ ... */ #elif defined( __SC__ ) || defined( __MRC__ ) /* Classic MacOS compilers */ diff --git a/thirdparty/freetype/include/freetype/config/public-macros.h b/thirdparty/freetype/include/freetype/config/public-macros.h index 9f28b39473..c76509a99f 100644 --- a/thirdparty/freetype/include/freetype/config/public-macros.h +++ b/thirdparty/freetype/include/freetype/config/public-macros.h @@ -4,7 +4,7 @@ * * Define a set of compiler macros used in public FreeType headers. * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/freetype.h b/thirdparty/freetype/include/freetype/freetype.h index 1e24923588..68a9e0c6bd 100644 --- a/thirdparty/freetype/include/freetype/freetype.h +++ b/thirdparty/freetype/include/freetype/freetype.h @@ -4,7 +4,7 @@ * * FreeType high-level API and common types (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -4318,14 +4318,13 @@ FT_BEGIN_HEADER * property `no-stem-darkening` provided by the 'autofit', 'cff', * 'type1', and 't1cid' modules; see @no-stem-darkening). * - * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding - * to function @FT_Library_SetLcdFilterWeights). - * * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID * 'random' operator, corresponding to the `random-seed` property * provided by the 'cff', 'type1', and 't1cid' modules; see * @random-seed). * + * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (no longer supported). + * * Pass `NULL` as `data` in @FT_Parameter for a given tag to reset the * option and use the library or module default again. * @@ -4352,25 +4351,17 @@ FT_BEGIN_HEADER * FT_Bool darken_stems = 1; * * FT_Parameter property2; - * FT_LcdFiveTapFilter custom_weight = - * { 0x11, 0x44, 0x56, 0x44, 0x11 }; - * - * FT_Parameter property3; * FT_Int32 random_seed = 314159265; * - * FT_Parameter properties[3] = { property1, - * property2, - * property3 }; + * FT_Parameter properties[2] = { property1, + * property2 }; * * * property1.tag = FT_PARAM_TAG_STEM_DARKENING; * property1.data = &darken_stems; * - * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; - * property2.data = custom_weight; - * - * property3.tag = FT_PARAM_TAG_RANDOM_SEED; - * property3.data = &random_seed; + * property2.tag = FT_PARAM_TAG_RANDOM_SEED; + * property2.data = &random_seed; * * FT_Face_Properties( face, 3, properties ); * ``` @@ -4381,7 +4372,7 @@ FT_BEGIN_HEADER * FT_Parameter property; * * - * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property.tag = FT_PARAM_TAG_STEM_DARKENING; * property.data = NULL; * * FT_Face_Properties( face, 1, &property ); @@ -5178,7 +5169,7 @@ FT_BEGIN_HEADER */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 14 -#define FREETYPE_PATCH 1 +#define FREETYPE_PATCH 3 /************************************************************************** diff --git a/thirdparty/freetype/include/freetype/ftadvanc.h b/thirdparty/freetype/include/freetype/ftadvanc.h index 62a856ccbd..876a8a55cb 100644 --- a/thirdparty/freetype/include/freetype/ftadvanc.h +++ b/thirdparty/freetype/include/freetype/ftadvanc.h @@ -4,7 +4,7 @@ * * Quick computation of advance widths (specification only). * - * Copyright (C) 2008-2025 by + * Copyright (C) 2008-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbbox.h b/thirdparty/freetype/include/freetype/ftbbox.h index 348b4b3a26..0107d94986 100644 --- a/thirdparty/freetype/include/freetype/ftbbox.h +++ b/thirdparty/freetype/include/freetype/ftbbox.h @@ -4,7 +4,7 @@ * * FreeType exact bbox computation (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbdf.h b/thirdparty/freetype/include/freetype/ftbdf.h index faad25689c..fb1f318648 100644 --- a/thirdparty/freetype/include/freetype/ftbdf.h +++ b/thirdparty/freetype/include/freetype/ftbdf.h @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -44,7 +44,8 @@ FT_BEGIN_HEADER * * @description: * This section contains the declaration of functions specific to BDF and - * PCF fonts. + * PCF fonts. They also work for SFNT bitmap fonts that contain a 'BDF~' + * table like X11's `.otb` fonts. * */ @@ -151,7 +152,9 @@ FT_BEGIN_HEADER * FreeType error code. 0~means success. * * @note: - * This function only works with BDF faces, returning an error otherwise. + * This function only works with BDF faces and SFNT fonts that have a + * 'BDF~' table, returning an error otherwise. For the latter, a bitmap + * strike size must be selected first. */ FT_EXPORT( FT_Error ) FT_Get_BDF_Charset_ID( FT_Face face, @@ -165,7 +168,7 @@ FT_BEGIN_HEADER * FT_Get_BDF_Property * * @description: - * Retrieve a BDF property from a BDF or PCF font file. + * Retrieve a BDF property from a BDF or PCF font. * * @input: * face :: @@ -196,6 +199,9 @@ FT_BEGIN_HEADER * * In case of error, `aproperty->type` is always set to * @BDF_PROPERTY_TYPE_NONE. + * + * This also works with SFNT fonts that have a 'BDF~' table, after a + * bitmap strike size has been selected. */ FT_EXPORT( FT_Error ) FT_Get_BDF_Property( FT_Face face, diff --git a/thirdparty/freetype/include/freetype/ftbitmap.h b/thirdparty/freetype/include/freetype/ftbitmap.h index a22d43adf1..1df5f29aca 100644 --- a/thirdparty/freetype/include/freetype/ftbitmap.h +++ b/thirdparty/freetype/include/freetype/ftbitmap.h @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftbzip2.h b/thirdparty/freetype/include/freetype/ftbzip2.h index 38b5245826..732931d227 100644 --- a/thirdparty/freetype/include/freetype/ftbzip2.h +++ b/thirdparty/freetype/include/freetype/ftbzip2.h @@ -4,7 +4,7 @@ * * Bzip2-compressed stream support. * - * Copyright (C) 2010-2025 by + * Copyright (C) 2010-2026 by * Joel Klinghed. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftcache.h b/thirdparty/freetype/include/freetype/ftcache.h index 865b743a60..97223e36ec 100644 --- a/thirdparty/freetype/include/freetype/ftcache.h +++ b/thirdparty/freetype/include/freetype/ftcache.h @@ -4,7 +4,7 @@ * * FreeType Cache subsystem (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftcid.h b/thirdparty/freetype/include/freetype/ftcid.h index 7cda8ff3f3..f9744716d9 100644 --- a/thirdparty/freetype/include/freetype/ftcid.h +++ b/thirdparty/freetype/include/freetype/ftcid.h @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information (specification). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * Dereg Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftcolor.h b/thirdparty/freetype/include/freetype/ftcolor.h index 129b1a23fb..1cce747115 100644 --- a/thirdparty/freetype/include/freetype/ftcolor.h +++ b/thirdparty/freetype/include/freetype/ftcolor.h @@ -4,7 +4,7 @@ * * FreeType's glyph color management (specification). * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftdriver.h b/thirdparty/freetype/include/freetype/ftdriver.h index b65a06ab69..39635f86c3 100644 --- a/thirdparty/freetype/include/freetype/ftdriver.h +++ b/thirdparty/freetype/include/freetype/ftdriver.h @@ -4,7 +4,7 @@ * * FreeType API for controlling driver modules (specification only). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/fterrdef.h b/thirdparty/freetype/include/freetype/fterrdef.h index 3e591bede8..ce3817e55d 100644 --- a/thirdparty/freetype/include/freetype/fterrdef.h +++ b/thirdparty/freetype/include/freetype/fterrdef.h @@ -4,7 +4,7 @@ * * FreeType error codes (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/fterrors.h b/thirdparty/freetype/include/freetype/fterrors.h index eca494f90c..218c4610e2 100644 --- a/thirdparty/freetype/include/freetype/fterrors.h +++ b/thirdparty/freetype/include/freetype/fterrors.h @@ -4,7 +4,7 @@ * * FreeType error code handling (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftfntfmt.h b/thirdparty/freetype/include/freetype/ftfntfmt.h index 5df82447d0..2ea0c5f4d7 100644 --- a/thirdparty/freetype/include/freetype/ftfntfmt.h +++ b/thirdparty/freetype/include/freetype/ftfntfmt.h @@ -4,7 +4,7 @@ * * Support functions for font formats. * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftgasp.h b/thirdparty/freetype/include/freetype/ftgasp.h index 77e5a7e7bf..632b536b47 100644 --- a/thirdparty/freetype/include/freetype/ftgasp.h +++ b/thirdparty/freetype/include/freetype/ftgasp.h @@ -4,7 +4,7 @@ * * Access of TrueType's 'gasp' table (specification). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftglyph.h b/thirdparty/freetype/include/freetype/ftglyph.h index 3691781cf5..e967110e81 100644 --- a/thirdparty/freetype/include/freetype/ftglyph.h +++ b/thirdparty/freetype/include/freetype/ftglyph.h @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftgxval.h b/thirdparty/freetype/include/freetype/ftgxval.h index 843e0bc917..546a4818b6 100644 --- a/thirdparty/freetype/include/freetype/ftgxval.h +++ b/thirdparty/freetype/include/freetype/ftgxval.h @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Masatake YAMATO, Redhat K.K, * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/include/freetype/ftgzip.h b/thirdparty/freetype/include/freetype/ftgzip.h index e26c334c11..f0c1550f61 100644 --- a/thirdparty/freetype/include/freetype/ftgzip.h +++ b/thirdparty/freetype/include/freetype/ftgzip.h @@ -4,7 +4,7 @@ * * Gzip-compressed stream support. * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftimage.h b/thirdparty/freetype/include/freetype/ftimage.h index b0a0172ef4..1fff76b20d 100644 --- a/thirdparty/freetype/include/freetype/ftimage.h +++ b/thirdparty/freetype/include/freetype/ftimage.h @@ -5,7 +5,7 @@ * FreeType glyph image formats and default raster interface * (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -875,7 +875,7 @@ FT_BEGIN_HEADER */ typedef struct FT_Span_ { - short x; + unsigned short x; unsigned short len; unsigned char coverage; diff --git a/thirdparty/freetype/include/freetype/ftincrem.h b/thirdparty/freetype/include/freetype/ftincrem.h index 2233044754..32637fe5af 100644 --- a/thirdparty/freetype/include/freetype/ftincrem.h +++ b/thirdparty/freetype/include/freetype/ftincrem.h @@ -4,7 +4,7 @@ * * FreeType incremental loading (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlcdfil.h b/thirdparty/freetype/include/freetype/ftlcdfil.h index a0a8e9da92..72dbe2accc 100644 --- a/thirdparty/freetype/include/freetype/ftlcdfil.h +++ b/thirdparty/freetype/include/freetype/ftlcdfil.h @@ -5,7 +5,7 @@ * FreeType API for color filtering of subpixel bitmap glyphs * (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -145,16 +145,10 @@ FT_BEGIN_HEADER * * FT_LCD_FILTER_LEGACY :: * FT_LCD_FILTER_LEGACY1 :: - * This filter corresponds to the original libXft color filter. It - * provides high contrast output but can exhibit really bad color - * fringes if glyphs are not extremely well hinted to the pixel grid. - * This filter is only provided for comparison purposes, and might be - * disabled or stay unsupported in the future. The second value is - * provided for compatibility with FontConfig, which historically used - * different enumeration, sometimes incorrectly forwarded to FreeType. + * The legacy libXft color filter is no longer supported and ignored. * * @since: - * 2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2) + * 2.3.0 */ typedef enum FT_LcdFilter_ { diff --git a/thirdparty/freetype/include/freetype/ftlist.h b/thirdparty/freetype/include/freetype/ftlist.h index 14958b0ff3..74b3ffaee9 100644 --- a/thirdparty/freetype/include/freetype/ftlist.h +++ b/thirdparty/freetype/include/freetype/ftlist.h @@ -4,7 +4,7 @@ * * Generic list support for FreeType (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlogging.h b/thirdparty/freetype/include/freetype/ftlogging.h index d155171136..1670b12caf 100644 --- a/thirdparty/freetype/include/freetype/ftlogging.h +++ b/thirdparty/freetype/include/freetype/ftlogging.h @@ -4,7 +4,7 @@ * * Additional debugging APIs. * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftlzw.h b/thirdparty/freetype/include/freetype/ftlzw.h index de14bcc674..ab2a9b7d5a 100644 --- a/thirdparty/freetype/include/freetype/ftlzw.h +++ b/thirdparty/freetype/include/freetype/ftlzw.h @@ -4,7 +4,7 @@ * * LZW-compressed stream support. * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmac.h b/thirdparty/freetype/include/freetype/ftmac.h index c5ac49101a..a3ed7fba6f 100644 --- a/thirdparty/freetype/include/freetype/ftmac.h +++ b/thirdparty/freetype/include/freetype/ftmac.h @@ -4,7 +4,7 @@ * * Additional Mac-specific API. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmm.h b/thirdparty/freetype/include/freetype/ftmm.h index ff0bbab59f..fb239bda12 100644 --- a/thirdparty/freetype/include/freetype/ftmm.h +++ b/thirdparty/freetype/include/freetype/ftmm.h @@ -4,7 +4,7 @@ * * FreeType variation font interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmodapi.h b/thirdparty/freetype/include/freetype/ftmodapi.h index 2669e4a03b..7af33e33af 100644 --- a/thirdparty/freetype/include/freetype/ftmodapi.h +++ b/thirdparty/freetype/include/freetype/ftmodapi.h @@ -4,7 +4,7 @@ * * FreeType modules public interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftmoderr.h b/thirdparty/freetype/include/freetype/ftmoderr.h index 8e2ef2f01f..7c1b1fd3c0 100644 --- a/thirdparty/freetype/include/freetype/ftmoderr.h +++ b/thirdparty/freetype/include/freetype/ftmoderr.h @@ -4,7 +4,7 @@ * * FreeType module error offsets (specification). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftotval.h b/thirdparty/freetype/include/freetype/ftotval.h index f1cd22acc0..66ac5871dc 100644 --- a/thirdparty/freetype/include/freetype/ftotval.h +++ b/thirdparty/freetype/include/freetype/ftotval.h @@ -4,7 +4,7 @@ * * FreeType API for validating OpenType tables (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftoutln.h b/thirdparty/freetype/include/freetype/ftoutln.h index 2545ca8486..68cf65bae1 100644 --- a/thirdparty/freetype/include/freetype/ftoutln.h +++ b/thirdparty/freetype/include/freetype/ftoutln.h @@ -5,7 +5,7 @@ * Support for the FT_Outline type used to store glyph shapes of * most scalable font formats (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftparams.h b/thirdparty/freetype/include/freetype/ftparams.h index 2c09db1683..3f6af8681f 100644 --- a/thirdparty/freetype/include/freetype/ftparams.h +++ b/thirdparty/freetype/include/freetype/ftparams.h @@ -4,7 +4,7 @@ * * FreeType API for possible FT_Parameter tags (specification only). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -133,11 +133,8 @@ FT_BEGIN_HEADER * FT_PARAM_TAG_LCD_FILTER_WEIGHTS * * @description: - * An @FT_Parameter tag to be used with @FT_Face_Properties. The - * corresponding argument specifies the five LCD filter weights for a - * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding the - * global default values or the values set up with - * @FT_Library_SetLcdFilterWeights. + * Overriding global LCD filter weights with custom values for a given + * face is no longer supported and ignored. * * @since: * 2.8 diff --git a/thirdparty/freetype/include/freetype/ftpfr.h b/thirdparty/freetype/include/freetype/ftpfr.h index 399b5ca3c2..abcd388008 100644 --- a/thirdparty/freetype/include/freetype/ftpfr.h +++ b/thirdparty/freetype/include/freetype/ftpfr.h @@ -4,7 +4,7 @@ * * FreeType API for accessing PFR-specific data (specification only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftrender.h b/thirdparty/freetype/include/freetype/ftrender.h index cc3102073b..292c797cce 100644 --- a/thirdparty/freetype/include/freetype/ftrender.h +++ b/thirdparty/freetype/include/freetype/ftrender.h @@ -4,7 +4,7 @@ * * FreeType renderer modules public interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsizes.h b/thirdparty/freetype/include/freetype/ftsizes.h index fdb89f24cc..f609eb2d76 100644 --- a/thirdparty/freetype/include/freetype/ftsizes.h +++ b/thirdparty/freetype/include/freetype/ftsizes.h @@ -4,7 +4,7 @@ * * FreeType size objects management (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsnames.h b/thirdparty/freetype/include/freetype/ftsnames.h index 99728574db..f5511495f0 100644 --- a/thirdparty/freetype/include/freetype/ftsnames.h +++ b/thirdparty/freetype/include/freetype/ftsnames.h @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftstroke.h b/thirdparty/freetype/include/freetype/ftstroke.h index 2c4761c768..c7f1d4643f 100644 --- a/thirdparty/freetype/include/freetype/ftstroke.h +++ b/thirdparty/freetype/include/freetype/ftstroke.h @@ -4,7 +4,7 @@ * * FreeType path stroker (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsynth.h b/thirdparty/freetype/include/freetype/ftsynth.h index 93499a4b4f..90b4b19c25 100644 --- a/thirdparty/freetype/include/freetype/ftsynth.h +++ b/thirdparty/freetype/include/freetype/ftsynth.h @@ -5,7 +5,7 @@ * FreeType synthesizing code for emboldening and slanting * (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftsystem.h b/thirdparty/freetype/include/freetype/ftsystem.h index 1de9f8e603..2ad3d7286d 100644 --- a/thirdparty/freetype/include/freetype/ftsystem.h +++ b/thirdparty/freetype/include/freetype/ftsystem.h @@ -4,7 +4,7 @@ * * FreeType low-level system interface definition (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/fttrigon.h b/thirdparty/freetype/include/freetype/fttrigon.h index ed7bd06a78..ebedc3a8d1 100644 --- a/thirdparty/freetype/include/freetype/fttrigon.h +++ b/thirdparty/freetype/include/freetype/fttrigon.h @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (specification). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/fttypes.h b/thirdparty/freetype/include/freetype/fttypes.h index e207c5ebe0..97ddcde65a 100644 --- a/thirdparty/freetype/include/freetype/fttypes.h +++ b/thirdparty/freetype/include/freetype/fttypes.h @@ -4,7 +4,7 @@ * * FreeType simple types definitions (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/ftwinfnt.h b/thirdparty/freetype/include/freetype/ftwinfnt.h index 78609d578a..b95cad0a42 100644 --- a/thirdparty/freetype/include/freetype/ftwinfnt.h +++ b/thirdparty/freetype/include/freetype/ftwinfnt.h @@ -4,7 +4,7 @@ * * FreeType API for accessing Windows fnt-specific data. * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/autohint.h b/thirdparty/freetype/include/freetype/internal/autohint.h index 987e704e9b..a22d8af7cd 100644 --- a/thirdparty/freetype/include/freetype/internal/autohint.h +++ b/thirdparty/freetype/include/freetype/internal/autohint.h @@ -4,7 +4,7 @@ * * High-level 'autohint' module-specific interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/cffotypes.h b/thirdparty/freetype/include/freetype/internal/cffotypes.h index 26ee43bb9a..8d6acbce7a 100644 --- a/thirdparty/freetype/include/freetype/internal/cffotypes.h +++ b/thirdparty/freetype/include/freetype/internal/cffotypes.h @@ -4,7 +4,7 @@ * * Basic OpenType/CFF object type definitions (specification). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/cfftypes.h b/thirdparty/freetype/include/freetype/internal/cfftypes.h index 62335db483..d474dcf40e 100644 --- a/thirdparty/freetype/include/freetype/internal/cfftypes.h +++ b/thirdparty/freetype/include/freetype/internal/cfftypes.h @@ -5,7 +5,7 @@ * Basic OpenType/CFF type definitions and interface (specification * only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -191,8 +191,8 @@ FT_BEGIN_HEADER FT_UInt weight; FT_Bool is_fixed_pitch; FT_Fixed italic_angle; - FT_Fixed underline_position; - FT_Fixed underline_thickness; + FT_Short underline_position; + FT_UShort underline_thickness; FT_Int paint_type; FT_Int charstring_type; FT_Matrix font_matrix; diff --git a/thirdparty/freetype/include/freetype/internal/compiler-macros.h b/thirdparty/freetype/include/freetype/internal/compiler-macros.h index e6d0166d88..4863d6de75 100644 --- a/thirdparty/freetype/include/freetype/internal/compiler-macros.h +++ b/thirdparty/freetype/include/freetype/internal/compiler-macros.h @@ -4,7 +4,7 @@ * * Compiler-specific macro definitions used internally by FreeType. * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftcalc.h b/thirdparty/freetype/include/freetype/internal/ftcalc.h index 16a732224e..4c4943164a 100644 --- a/thirdparty/freetype/include/freetype/internal/ftcalc.h +++ b/thirdparty/freetype/include/freetype/internal/ftcalc.h @@ -4,7 +4,7 @@ * * Arithmetic computations (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftdebug.h b/thirdparty/freetype/include/freetype/internal/ftdebug.h index d7facf40d1..62b9ec2f79 100644 --- a/thirdparty/freetype/include/freetype/internal/ftdebug.h +++ b/thirdparty/freetype/include/freetype/internal/ftdebug.h @@ -4,7 +4,7 @@ * * Debugging and logging component (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftdrv.h b/thirdparty/freetype/include/freetype/internal/ftdrv.h index 24be4dad36..d52fc84f0f 100644 --- a/thirdparty/freetype/include/freetype/internal/ftdrv.h +++ b/thirdparty/freetype/include/freetype/internal/ftdrv.h @@ -4,7 +4,7 @@ * * FreeType internal font driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftgloadr.h b/thirdparty/freetype/include/freetype/internal/ftgloadr.h index 8f2a54c015..902135e460 100644 --- a/thirdparty/freetype/include/freetype/internal/ftgloadr.h +++ b/thirdparty/freetype/include/freetype/internal/ftgloadr.h @@ -4,7 +4,7 @@ * * The FreeType glyph loader (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftmemory.h b/thirdparty/freetype/include/freetype/internal/ftmemory.h index c75c33f289..ca840cb510 100644 --- a/thirdparty/freetype/include/freetype/internal/ftmemory.h +++ b/thirdparty/freetype/include/freetype/internal/ftmemory.h @@ -4,7 +4,7 @@ * * The FreeType memory management macros (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftmmtypes.h b/thirdparty/freetype/include/freetype/internal/ftmmtypes.h index be3747bbf9..a4db9c487b 100644 --- a/thirdparty/freetype/include/freetype/internal/ftmmtypes.h +++ b/thirdparty/freetype/include/freetype/internal/ftmmtypes.h @@ -5,7 +5,7 @@ * OpenType Variations type definitions for internal use * with the multi-masters service (specification). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and * Dominik Röttsches. * diff --git a/thirdparty/freetype/include/freetype/internal/ftobjs.h b/thirdparty/freetype/include/freetype/internal/ftobjs.h index 3db2fe28ff..4fa4991dd8 100644 --- a/thirdparty/freetype/include/freetype/internal/ftobjs.h +++ b/thirdparty/freetype/include/freetype/internal/ftobjs.h @@ -4,7 +4,7 @@ * * The FreeType private base classes (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -365,11 +365,6 @@ FT_BEGIN_HEADER * Value~0 means to use the font's value. Value~-1 means to use the * CFF driver's default. * - * lcd_weights :: - * lcd_filter_func :: - * These fields specify the LCD filtering weights and callback function - * for ClearType-style subpixel rendering. - * * refcount :: * A counter initialized to~1 at the time an @FT_Face structure is * created. @FT_Reference_Face increments this counter, and @@ -391,11 +386,6 @@ FT_BEGIN_HEADER FT_Char no_stem_darkening; FT_Int32 random_seed; -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */ - FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ -#endif - FT_Int refcount; } FT_Face_InternalRec; @@ -724,9 +714,9 @@ FT_BEGIN_HEADER const FT_Vector* origin ); /* Allocate a new bitmap buffer in a glyph slot. */ + /* Dimensions must be preset in advance. */ FT_BASE( FT_Error ) - ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, - FT_ULong size ); + ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot ); /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */ @@ -889,10 +879,6 @@ FT_BEGIN_HEADER * lcd_weights :: * The LCD filter weights for ClearType-style subpixel rendering. * - * lcd_filter_func :: - * The LCD filtering callback function for for ClearType-style subpixel - * rendering. - * * lcd_geometry :: * This array specifies LCD subpixel geometry and controls Harmony LCD * rendering technique, alternative to ClearType. @@ -926,7 +912,6 @@ FT_BEGIN_HEADER #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */ - FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ #else FT_Vector lcd_geometry[3]; /* RGB subpixel positions */ #endif @@ -995,17 +980,6 @@ FT_BEGIN_HEADER #endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */ - /* Define default raster's interface. The default raster is located in */ - /* `src/base/ftraster.c'. */ - /* */ - /* Client applications can register new rasters through the */ - /* FT_Set_Raster() API. */ - -#ifndef FT_NO_DEFAULT_RASTER - FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; -#endif - - /************************************************************************** * * @macro: diff --git a/thirdparty/freetype/include/freetype/internal/ftpsprop.h b/thirdparty/freetype/include/freetype/internal/ftpsprop.h index 18a954d22f..5967199a3b 100644 --- a/thirdparty/freetype/include/freetype/internal/ftpsprop.h +++ b/thirdparty/freetype/include/freetype/internal/ftpsprop.h @@ -4,7 +4,7 @@ * * Get and set properties of PostScript drivers (specification). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftrfork.h b/thirdparty/freetype/include/freetype/internal/ftrfork.h index e077f98bfb..d0bb6b5bb0 100644 --- a/thirdparty/freetype/include/freetype/internal/ftrfork.h +++ b/thirdparty/freetype/include/freetype/internal/ftrfork.h @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Masatake YAMATO and Redhat K.K. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftserv.h b/thirdparty/freetype/include/freetype/internal/ftserv.h index ce11bba19b..9c6406c82d 100644 --- a/thirdparty/freetype/include/freetype/internal/ftserv.h +++ b/thirdparty/freetype/include/freetype/internal/ftserv.h @@ -4,7 +4,7 @@ * * The FreeType services (specification only). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftstream.h b/thirdparty/freetype/include/freetype/internal/ftstream.h index 20c1dd7c4b..d60cd481c8 100644 --- a/thirdparty/freetype/include/freetype/internal/ftstream.h +++ b/thirdparty/freetype/include/freetype/internal/ftstream.h @@ -4,7 +4,7 @@ * * Stream handling (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/fttrace.h b/thirdparty/freetype/include/freetype/internal/fttrace.h index 3fd592800e..798896cd0c 100644 --- a/thirdparty/freetype/include/freetype/internal/fttrace.h +++ b/thirdparty/freetype/include/freetype/internal/fttrace.h @@ -4,7 +4,7 @@ * * Tracing handling (specification only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/ftvalid.h b/thirdparty/freetype/include/freetype/internal/ftvalid.h index 03a726c82c..fbcf2c63ef 100644 --- a/thirdparty/freetype/include/freetype/internal/ftvalid.h +++ b/thirdparty/freetype/include/freetype/internal/ftvalid.h @@ -4,7 +4,7 @@ * * FreeType validation support (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/psaux.h b/thirdparty/freetype/include/freetype/internal/psaux.h index 344be0f19a..ee574fef11 100644 --- a/thirdparty/freetype/include/freetype/internal/psaux.h +++ b/thirdparty/freetype/include/freetype/internal/psaux.h @@ -5,7 +5,7 @@ * Auxiliary functions and data structures related to PostScript fonts * (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/pshints.h b/thirdparty/freetype/include/freetype/internal/pshints.h index 96c5d84f05..e7adcd3805 100644 --- a/thirdparty/freetype/include/freetype/internal/pshints.h +++ b/thirdparty/freetype/include/freetype/internal/pshints.h @@ -6,7 +6,7 @@ * recorders (specification only). These are used to support native * T1/T2 hints in the 'type1', 'cid', and 'cff' font drivers. * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svbdf.h b/thirdparty/freetype/include/freetype/internal/services/svbdf.h index 5bd51da23f..52212cc7a2 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svbdf.h +++ b/thirdparty/freetype/include/freetype/internal/services/svbdf.h @@ -4,7 +4,7 @@ * * The FreeType BDF services (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svcfftl.h b/thirdparty/freetype/include/freetype/internal/services/svcfftl.h index c97bf84fb2..ab29dede53 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svcfftl.h +++ b/thirdparty/freetype/include/freetype/internal/services/svcfftl.h @@ -4,7 +4,7 @@ * * The FreeType CFF tables loader service (specification). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svcid.h b/thirdparty/freetype/include/freetype/internal/services/svcid.h index 748a8caf88..9063211ee0 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svcid.h +++ b/thirdparty/freetype/include/freetype/internal/services/svcid.h @@ -4,7 +4,7 @@ * * The FreeType CID font services (specification). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h index 690fdc2a24..770381da67 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h +++ b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h @@ -4,7 +4,7 @@ * * The FreeType font format service (specification only). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svgldict.h b/thirdparty/freetype/include/freetype/internal/services/svgldict.h index 7128d6f3d7..6020f9f78a 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svgldict.h +++ b/thirdparty/freetype/include/freetype/internal/services/svgldict.h @@ -4,7 +4,7 @@ * * The FreeType glyph dictionary services (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svgxval.h b/thirdparty/freetype/include/freetype/internal/services/svgxval.h index 1ca3e0a031..056114e6f8 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svgxval.h +++ b/thirdparty/freetype/include/freetype/internal/services/svgxval.h @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/include/freetype/internal/services/svkern.h b/thirdparty/freetype/include/freetype/internal/services/svkern.h index 8a3d59bec6..7a06a01e8f 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svkern.h +++ b/thirdparty/freetype/include/freetype/internal/services/svkern.h @@ -4,7 +4,7 @@ * * The FreeType Kerning service (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svmetric.h b/thirdparty/freetype/include/freetype/internal/services/svmetric.h index 4dde3a8151..b6559d2b1a 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svmetric.h +++ b/thirdparty/freetype/include/freetype/internal/services/svmetric.h @@ -4,7 +4,7 @@ * * The FreeType services for metrics variations (specification). * - * Copyright (C) 2016-2025 by + * Copyright (C) 2016-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svmm.h b/thirdparty/freetype/include/freetype/internal/services/svmm.h index 9be133e2db..fd851dba12 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svmm.h +++ b/thirdparty/freetype/include/freetype/internal/services/svmm.h @@ -4,7 +4,7 @@ * * The FreeType Multiple Masters and GX var services (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svotval.h b/thirdparty/freetype/include/freetype/internal/services/svotval.h index 933e5de98d..487dca3f04 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svotval.h +++ b/thirdparty/freetype/include/freetype/internal/services/svotval.h @@ -4,7 +4,7 @@ * * The FreeType OpenType validation service (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpfr.h b/thirdparty/freetype/include/freetype/internal/services/svpfr.h index c81b6a68a8..94cd695eb0 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpfr.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpfr.h @@ -4,7 +4,7 @@ * * Internal PFR service functions (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpostnm.h b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h index 33864ebc34..d99f4f681e 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpostnm.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h @@ -4,7 +4,7 @@ * * The FreeType PostScript name services (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svprop.h b/thirdparty/freetype/include/freetype/internal/services/svprop.h index 0eb79c885d..b6cba4c7f4 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svprop.h +++ b/thirdparty/freetype/include/freetype/internal/services/svprop.h @@ -4,7 +4,7 @@ * * The FreeType property service (specification). * - * Copyright (C) 2012-2025 by + * Copyright (C) 2012-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpscmap.h b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h index 8f85d12157..310eb53f33 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpscmap.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h @@ -4,7 +4,7 @@ * * The FreeType PostScript charmap service (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h index 83de04478d..78725a48fa 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h +++ b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h @@ -4,7 +4,7 @@ * * The FreeType PostScript info service (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svsfnt.h b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h index 9bf5e3473c..0ce5aca137 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svsfnt.h +++ b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h @@ -4,7 +4,7 @@ * * The FreeType SFNT table loading service (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svttcmap.h b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h index fc9b0aeb8e..14921304eb 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svttcmap.h +++ b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h @@ -4,7 +4,7 @@ * * The FreeType TrueType/sfnt cmap extra information service. * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * Masatake YAMATO, Redhat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/include/freetype/internal/services/svtteng.h b/thirdparty/freetype/include/freetype/internal/services/svtteng.h index 979e9ea102..d4a9bab6de 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svtteng.h +++ b/thirdparty/freetype/include/freetype/internal/services/svtteng.h @@ -4,7 +4,7 @@ * * The FreeType TrueType engine query service (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svttglyf.h b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h index e4f54c1003..528238024b 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svttglyf.h +++ b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h @@ -4,7 +4,7 @@ * * The FreeType TrueType glyph service. * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h index ff887ffdc0..e5a3a6649b 100644 --- a/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h +++ b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h @@ -4,7 +4,7 @@ * * The FreeType Windows FNT/FONT service (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/sfnt.h b/thirdparty/freetype/include/freetype/internal/sfnt.h index adba217887..cc1ac7a6e4 100644 --- a/thirdparty/freetype/include/freetype/internal/sfnt.h +++ b/thirdparty/freetype/include/freetype/internal/sfnt.h @@ -4,7 +4,7 @@ * * High-level 'sfnt' driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/svginterface.h b/thirdparty/freetype/include/freetype/internal/svginterface.h index 20c73b2fbd..3a4ca314dd 100644 --- a/thirdparty/freetype/include/freetype/internal/svginterface.h +++ b/thirdparty/freetype/include/freetype/internal/svginterface.h @@ -4,7 +4,7 @@ * * Interface of ot-svg module (specification only). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/t1types.h b/thirdparty/freetype/include/freetype/internal/t1types.h index 5b26e4620d..e39076f195 100644 --- a/thirdparty/freetype/include/freetype/internal/t1types.h +++ b/thirdparty/freetype/include/freetype/internal/t1types.h @@ -5,7 +5,7 @@ * Basic Type1/Type2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/tttypes.h b/thirdparty/freetype/include/freetype/internal/tttypes.h index d0e5eee89b..65341a3a25 100644 --- a/thirdparty/freetype/include/freetype/internal/tttypes.h +++ b/thirdparty/freetype/include/freetype/internal/tttypes.h @@ -5,7 +5,7 @@ * Basic SFNT/TrueType type definitions and interface (specification * only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/internal/wofftypes.h b/thirdparty/freetype/include/freetype/internal/wofftypes.h index 7d5b7df0fa..b8ef95e27a 100644 --- a/thirdparty/freetype/include/freetype/internal/wofftypes.h +++ b/thirdparty/freetype/include/freetype/internal/wofftypes.h @@ -5,7 +5,7 @@ * Basic WOFF/WOFF2 type definitions and interface (specification * only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/otsvg.h b/thirdparty/freetype/include/freetype/otsvg.h index 326bbcd015..42330a703b 100644 --- a/thirdparty/freetype/include/freetype/otsvg.h +++ b/thirdparty/freetype/include/freetype/otsvg.h @@ -4,7 +4,7 @@ * * Interface for OT-SVG support related things (specification). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/t1tables.h b/thirdparty/freetype/include/freetype/t1tables.h index fc3c1706de..badfdf4076 100644 --- a/thirdparty/freetype/include/freetype/t1tables.h +++ b/thirdparty/freetype/include/freetype/t1tables.h @@ -5,7 +5,7 @@ * Basic Type 1/Type 2 tables definitions and interface (specification * only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -92,7 +92,7 @@ FT_BEGIN_HEADER FT_String* full_name; FT_String* family_name; FT_String* weight; - FT_Long italic_angle; + FT_Fixed italic_angle; FT_Bool is_fixed_pitch; FT_Short underline_position; FT_UShort underline_thickness; @@ -645,7 +645,7 @@ FT_BEGIN_HEADER PS_DICT_UNDERLINE_POSITION, /* FT_Short */ PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ PS_DICT_FS_TYPE, /* FT_UShort */ - PS_DICT_ITALIC_ANGLE, /* FT_Long */ + PS_DICT_ITALIC_ANGLE, /* FT_Fixed */ PS_DICT_MAX = PS_DICT_ITALIC_ANGLE diff --git a/thirdparty/freetype/include/freetype/ttnameid.h b/thirdparty/freetype/include/freetype/ttnameid.h index 3ef61091cc..76ddb6f0a5 100644 --- a/thirdparty/freetype/include/freetype/ttnameid.h +++ b/thirdparty/freetype/include/freetype/ttnameid.h @@ -4,7 +4,7 @@ * * TrueType name ID definitions (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -169,7 +169,7 @@ FT_BEGIN_HEADER #define TT_MAC_ID_LAOTIAN 22 #define TT_MAC_ID_GEORGIAN 23 #define TT_MAC_ID_ARMENIAN 24 -#define TT_MAC_ID_MALDIVIAN 25 +#define TT_MAC_ID_MALDIVIAN 25 /* TrueType version 1.66 */ #define TT_MAC_ID_SIMPLIFIED_CHINESE 25 #define TT_MAC_ID_TIBETAN 26 #define TT_MAC_ID_MONGOLIAN 27 diff --git a/thirdparty/freetype/include/freetype/tttables.h b/thirdparty/freetype/include/freetype/tttables.h index aa4336435d..a2ec304483 100644 --- a/thirdparty/freetype/include/freetype/tttables.h +++ b/thirdparty/freetype/include/freetype/tttables.h @@ -5,7 +5,7 @@ * Basic SFNT/TrueType tables definitions and interface * (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/freetype/tttags.h b/thirdparty/freetype/include/freetype/tttags.h index 56bb0a3ee5..3be3e2ff90 100644 --- a/thirdparty/freetype/include/freetype/tttags.h +++ b/thirdparty/freetype/include/freetype/tttags.h @@ -4,7 +4,7 @@ * * Tags for TrueType and OpenType tables (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/include/ft2build.h b/thirdparty/freetype/include/ft2build.h index 3008aea7cf..ffbf4a1e6a 100644 --- a/thirdparty/freetype/include/ft2build.h +++ b/thirdparty/freetype/include/ft2build.h @@ -4,7 +4,7 @@ * * FreeType 2 build and setup macros. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afadjust.c b/thirdparty/freetype/src/autofit/afadjust.c index 6637cacfcc..6940baf68c 100644 --- a/thirdparty/freetype/src/autofit/afadjust.c +++ b/thirdparty/freetype/src/autofit/afadjust.c @@ -4,7 +4,7 @@ * * Auto-fitter routines to adjust components based on charcode (body). * - * Copyright (C) 2023-2025 by + * Copyright (C) 2023-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Craig White . @@ -1405,7 +1405,8 @@ FT_TRACE4(( " " )); idx = HB_SET_VALUE_INVALID; while ( hb( set_next )( gsub_lookups, &idx ) ) - if ( globals->gsub_lookups_single_alternate[idx] ) + if ( idx < globals->gsub_lookup_count && + globals->gsub_lookups_single_alternate[idx] ) { have_idx = TRUE; FT_TRACE4(( " %u", idx )); @@ -1428,9 +1429,17 @@ idx = HB_SET_VALUE_INVALID; while ( hb( set_next )( gsub_lookups, &idx ) ) { - FT_UInt32 offset = globals->gsub_lookups_single_alternate[idx]; + FT_UInt32 offset; + /* HarfBuzz only validates lookup indices while */ + /* processing lookups, not while collecting them, */ + /* so we have to do that by ourselves. */ + if ( idx < globals->gsub_lookup_count ) + offset = globals->gsub_lookups_single_alternate[idx]; + else + offset = 0; + /* Put all substitutions into a single hash table. Note that */ /* the hash values usually contain more than a single character */ /* code; this can happen if different 'SingleSubst' subtables */ diff --git a/thirdparty/freetype/src/autofit/afadjust.h b/thirdparty/freetype/src/autofit/afadjust.h index 4837451ae4..85dbfaad29 100644 --- a/thirdparty/freetype/src/autofit/afadjust.h +++ b/thirdparty/freetype/src/autofit/afadjust.h @@ -4,7 +4,7 @@ * * Auto-fitter routines to adjust components based on charcode (header). * - * Copyright (C) 2023-2025 by + * Copyright (C) 2023-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Craig White . diff --git a/thirdparty/freetype/src/autofit/afblue.c b/thirdparty/freetype/src/autofit/afblue.c index a6219bdfe4..77c8389ec7 100644 --- a/thirdparty/freetype/src/autofit/afblue.c +++ b/thirdparty/freetype/src/autofit/afblue.c @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (body). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afblue.cin b/thirdparty/freetype/src/autofit/afblue.cin deleted file mode 100644 index 786c6b3b9e..0000000000 --- a/thirdparty/freetype/src/autofit/afblue.cin +++ /dev/null @@ -1,39 +0,0 @@ -/**************************************************************************** - * - * afblue.c - * - * Auto-fitter data for blue strings (body). - * - * Copyright (C) 2013-2025 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - */ - - -#include "aftypes.h" - - - FT_LOCAL_ARRAY_DEF( char ) - af_blue_strings[] = - { - /* */ -@AF_BLUE_STRINGS_ARRAY@ - }; - - - /* stringsets are specific to styles */ - FT_LOCAL_ARRAY_DEF( AF_Blue_StringRec ) - af_blue_stringsets[] = - { - /* */ -@AF_BLUE_STRINGSETS_ARRAY@ - }; - - -/* END */ diff --git a/thirdparty/freetype/src/autofit/afblue.h b/thirdparty/freetype/src/autofit/afblue.h index 5bb8406dc2..f124eedee4 100644 --- a/thirdparty/freetype/src/autofit/afblue.h +++ b/thirdparty/freetype/src/autofit/afblue.h @@ -7,7 +7,7 @@ * * Auto-fitter data for blue strings (specification). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afblue.hin b/thirdparty/freetype/src/autofit/afblue.hin deleted file mode 100644 index dbac14548d..0000000000 --- a/thirdparty/freetype/src/autofit/afblue.hin +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** - * - * afblue.h - * - * Auto-fitter data for blue strings (specification). - * - * Copyright (C) 2013-2025 by - * David Turner, Robert Wilhelm, and Werner Lemberg. - * - * This file is part of the FreeType project, and may only be used, - * modified, and distributed under the terms of the FreeType project - * license, LICENSE.TXT. By continuing to use, modify, or distribute - * this file you indicate that you have read the license and - * understand and accept it fully. - * - */ - - -#ifndef AFBLUE_H_ -#define AFBLUE_H_ - - -FT_BEGIN_HEADER - - - /* an auxiliary macro to decode a UTF-8 character -- since we only use */ - /* hard-coded, self-converted data, no error checking is performed */ -#define GET_UTF8_CHAR( ch, p ) \ - do \ - { \ - ch = (unsigned char)*p++; \ - if ( ch >= 0x80 ) \ - { \ - FT_UInt len_; \ - \ - \ - if ( ch < 0xE0 ) \ - { \ - len_ = 1; \ - ch &= 0x1F; \ - } \ - else if ( ch < 0xF0 ) \ - { \ - len_ = 2; \ - ch &= 0x0F; \ - } \ - else \ - { \ - len_ = 3; \ - ch &= 0x07; \ - } \ - \ - for ( ; len_ > 0; len_-- ) \ - ch = ( ch << 6 ) | ( *p++ & 0x3F ); \ - } \ - } while ( 0 ) - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** B L U E S T R I N G S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* At the bottommost level, we define strings for finding blue zones. */ - - -#define AF_BLUE_STRING_MAX_LEN @AF_BLUE_STRING_MAX_LEN@ - - /* The AF_Blue_String enumeration values are offsets into the */ - /* `af_blue_strings' array. */ - - typedef enum AF_Blue_String_ - { -@AF_BLUE_STRING_ENUM@ - - AF_BLUE_STRING_MAX /* do not remove */ - - } AF_Blue_String; - - - FT_LOCAL_ARRAY( char ) - af_blue_strings[]; - - - /*************************************************************************/ - /*************************************************************************/ - /***** *****/ - /***** B L U E S T R I N G S E T S *****/ - /***** *****/ - /*************************************************************************/ - /*************************************************************************/ - - /* The next level is to group blue strings into style-specific sets. */ - - - /* Properties are specific to a writing system. We assume that a given */ - /* blue string can't be used in more than a single writing system, which */ - /* is a safe bet. */ -#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must be value 1 */ -#define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 ) -#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 ) -#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 ) -#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 ) - -#define AF_BLUE_PROPERTY_LATIN_CAPITAL_BOTTOM ( 1U << 5 ) -#define AF_BLUE_PROPERTY_LATIN_SMALL_BOTTOM ( 1U << 6 ) - -#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must be value 1 */ -#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must be value 2 */ -#define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP - - -#define AF_BLUE_STRINGSET_MAX_LEN @AF_BLUE_STRINGSET_MAX_LEN@ - - /* The AF_Blue_Stringset enumeration values are offsets into the */ - /* `af_blue_stringsets' array. */ - - typedef enum AF_Blue_Stringset_ - { -@AF_BLUE_STRINGSET_ENUM@ - - AF_BLUE_STRINGSET_MAX /* do not remove */ - - } AF_Blue_Stringset; - - - typedef struct AF_Blue_StringRec_ - { - AF_Blue_String string; - FT_UShort properties; - - } AF_Blue_StringRec; - - - FT_LOCAL_ARRAY( AF_Blue_StringRec ) - af_blue_stringsets[]; - -/* */ - -FT_END_HEADER - - -#endif /* AFBLUE_H_ */ - - -/* END */ diff --git a/thirdparty/freetype/src/autofit/afcjk.c b/thirdparty/freetype/src/autofit/afcjk.c index 7086601838..7a1cc32c9d 100644 --- a/thirdparty/freetype/src/autofit/afcjk.c +++ b/thirdparty/freetype/src/autofit/afcjk.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (body). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afcjk.h b/thirdparty/freetype/src/autofit/afcjk.h index bd1b39358e..98681868a8 100644 --- a/thirdparty/freetype/src/autofit/afcjk.h +++ b/thirdparty/freetype/src/autofit/afcjk.h @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for CJK writing system (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afcover.h b/thirdparty/freetype/src/autofit/afcover.h index b93bcd1a2c..d60e0050be 100644 --- a/thirdparty/freetype/src/autofit/afcover.h +++ b/thirdparty/freetype/src/autofit/afcover.h @@ -4,7 +4,7 @@ * * Auto-fitter coverages (specification only). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afdummy.c b/thirdparty/freetype/src/autofit/afdummy.c index 8613544f91..f9d1dd38db 100644 --- a/thirdparty/freetype/src/autofit/afdummy.c +++ b/thirdparty/freetype/src/autofit/afdummy.c @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afdummy.h b/thirdparty/freetype/src/autofit/afdummy.h index 78a79439d9..14546b1e50 100644 --- a/thirdparty/freetype/src/autofit/afdummy.h +++ b/thirdparty/freetype/src/autofit/afdummy.h @@ -5,7 +5,7 @@ * Auto-fitter dummy routines to be used if no hinting should be * performed (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/aferrors.h b/thirdparty/freetype/src/autofit/aferrors.h index f3093fc90d..3d7538ba2d 100644 --- a/thirdparty/freetype/src/autofit/aferrors.h +++ b/thirdparty/freetype/src/autofit/aferrors.h @@ -4,7 +4,7 @@ * * Autofitter error codes (specification only). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afglobal.c b/thirdparty/freetype/src/autofit/afglobal.c index e74d814116..ff6903cc17 100644 --- a/thirdparty/freetype/src/autofit/afglobal.c +++ b/thirdparty/freetype/src/autofit/afglobal.c @@ -4,7 +4,7 @@ * * Auto-fitter routines to compute global hinting values (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afglobal.h b/thirdparty/freetype/src/autofit/afglobal.h index 362f56e290..c4dd933583 100644 --- a/thirdparty/freetype/src/autofit/afglobal.h +++ b/thirdparty/freetype/src/autofit/afglobal.h @@ -5,7 +5,7 @@ * Auto-fitter routines to compute global hinting values * (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -116,7 +116,9 @@ FT_BEGIN_HEADER /* The GSUB table. */ FT_Byte* gsub; - /* Lookup offsets, with only SingleSubst and AlternateSubst non-NULL. */ + /* An array of lookup offsets (of `gsub_lookup_count` elements), */ + /* with only SingleSubst and AlternateSubst lookups non-NULL. */ + FT_UShort gsub_lookup_count; FT_UInt32* gsub_lookups_single_alternate; #endif diff --git a/thirdparty/freetype/src/autofit/afgsub.c b/thirdparty/freetype/src/autofit/afgsub.c index 386999d5c5..af7b0f6798 100644 --- a/thirdparty/freetype/src/autofit/afgsub.c +++ b/thirdparty/freetype/src/autofit/afgsub.c @@ -4,7 +4,7 @@ * * Auto-fitter routines to parse the GSUB table (body). * - * Copyright (C) 2025 by + * Copyright (C) 2025-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -15,8 +15,6 @@ * */ -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ - #include #include @@ -24,6 +22,9 @@ #include + +#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + #include "afglobal.h" #include "afgsub.h" #include "aftypes.h" @@ -363,11 +364,13 @@ } globals->gsub = gsub; + globals->gsub_lookup_count = lookupCount; globals->gsub_lookups_single_alternate = gsub_lookups_single_alternate; return; Fail: + globals->gsub_lookup_count = 0; FT_FREE( gsub ); FT_FREE( gsub_lookups_single_alternate ); } diff --git a/thirdparty/freetype/src/autofit/afgsub.h b/thirdparty/freetype/src/autofit/afgsub.h index d57d61475b..10884f9236 100644 --- a/thirdparty/freetype/src/autofit/afgsub.h +++ b/thirdparty/freetype/src/autofit/afgsub.h @@ -4,7 +4,7 @@ * * Auto-fitter routines to parse the GSUB table (header). * - * Copyright (C) 2025 by + * Copyright (C) 2025-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afhints.c b/thirdparty/freetype/src/autofit/afhints.c index 11faa655f6..376912a5d1 100644 --- a/thirdparty/freetype/src/autofit/afhints.c +++ b/thirdparty/freetype/src/autofit/afhints.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afhints.h b/thirdparty/freetype/src/autofit/afhints.h index 46b3ed3366..84244d6f5c 100644 --- a/thirdparty/freetype/src/autofit/afhints.h +++ b/thirdparty/freetype/src/autofit/afhints.h @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afindic.c b/thirdparty/freetype/src/autofit/afindic.c index a2cd14f881..29b6d22ed6 100644 --- a/thirdparty/freetype/src/autofit/afindic.c +++ b/thirdparty/freetype/src/autofit/afindic.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for Indic writing system (body). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * Rahul Bhalerao , . * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afindic.h b/thirdparty/freetype/src/autofit/afindic.h index a2e825e9f8..df4892a9f1 100644 --- a/thirdparty/freetype/src/autofit/afindic.h +++ b/thirdparty/freetype/src/autofit/afindic.h @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for Indic writing system * (specification). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * Rahul Bhalerao , . * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/aflatin.c b/thirdparty/freetype/src/autofit/aflatin.c index cb5667ff79..73addf28eb 100644 --- a/thirdparty/freetype/src/autofit/aflatin.c +++ b/thirdparty/freetype/src/autofit/aflatin.c @@ -4,7 +4,7 @@ * * Auto-fitter hinting routines for latin writing system (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -3269,9 +3269,9 @@ next_on = next_on->next; if ( next_on->y > p->y && prev_on->y > p->y ) - measurement = p->y - min_y; + measurement = SUB_LONG( p->y, min_y ); else if ( next_on->y < p->y && prev_on->y < p->y ) - measurement = max_y - p->y; + measurement = SUB_LONG( max_y, p->y ); else continue; @@ -3309,11 +3309,14 @@ p = first_point; do { - p = p->next; - /* We adjust the height of the diacritic only, which means */ - /* we are never dealing with large numbers and can thus avoid */ - /* `FT_MulFix`. */ - p->y = ( ( p->y - min_y ) * target_height / height ) + min_y; + p = p->next; + /* We adjust the height of the diacritic only, which means */ + /* we are never dealing with (valid) large numbers and can */ + /* thus avoid `FT_MulFix`. */ + p->y = ADD_LONG( MUL_LONG( SUB_LONG( p->y, + min_y ), + target_height ) / height, + min_y ); } while ( p != first_point ); @@ -3370,9 +3373,9 @@ next_on = next_on->next; if ( next_on->y > p->y && prev_on->y > p->y ) - measurement = p->y - min_y; + measurement = SUB_LONG( p->y, min_y ); else if ( next_on->y < p->y && prev_on->y < p->y ) - measurement = max_y - p->y; + measurement = SUB_LONG( max_y, p->y ); else continue; @@ -3403,8 +3406,11 @@ p = first_point; do { - p = p->next; - p->y = ( ( p->y - max_y ) * target_height / height ) + max_y; + p = p->next; + p->y = ADD_LONG( MUL_LONG( SUB_LONG( p->y, + max_y ), + target_height ) / height, + max_y ); } while ( p != first_point ); @@ -3462,9 +3468,9 @@ } while ( p != first_point ); /* Align bottom of the tilde to the grid. */ - min_y_rounded = FT_PIX_ROUND( min_y ); - delta = min_y_rounded - min_y; - height = max_y - min_y; + min_y_rounded = FT_PIX_ROUND_LONG( min_y ); + delta = SUB_LONG( min_y_rounded, min_y ); + height = SUB_LONG( max_y, min_y ); /* If the tilde is less than 3 pixels tall, snap the center of it */ /* to the grid instead of the bottom to improve readability. */ @@ -3502,9 +3508,9 @@ } while ( p != first_point ); - max_y_rounded = FT_PIX_ROUND( max_y ); - delta = max_y_rounded - max_y; - height = max_y - min_y; + max_y_rounded = FT_PIX_ROUND_LONG( max_y ); + delta = SUB_LONG( max_y_rounded, max_y ); + height = SUB_LONG( max_y, min_y ); if ( height < 64 * 3 ) delta -= ( FT_PIX_ROUND( height ) - height ) / 2; @@ -3673,7 +3679,7 @@ high_min_y = hints->contour_y_minima[high_contour]; high_max_y = hints->contour_y_maxima[high_contour]; - high_height = high_max_y - high_min_y; + high_height = SUB_LONG( high_max_y, high_min_y ); if ( high_height > accent_height_limit ) { @@ -3705,7 +3711,7 @@ /* We also check that the y minimum of the 'other' contour */ /* is below the high contour to avoid potential false hits */ /* with contours enclosed in the high one. */ - distance = high_min_y - max_y; + distance = SUB_LONG( high_min_y, max_y ); if ( distance < 64 && distance < min_distance && min_y < high_min_y ) @@ -3724,14 +3730,14 @@ tilde_min_y = hints->contour_y_minima[tilde_contour]; tilde_max_y = hints->contour_y_maxima[tilde_contour]; - tilde_height = tilde_max_y - tilde_min_y; + tilde_height = SUB_LONG( tilde_max_y, tilde_min_y); /* The vertical separation adjustment potentially undoes a */ /* tilde center alignment. If it would grid-align a tilde */ /* less than 3 pixels in height, shift additionally to */ /* re-center the tilde. */ - pos = high_min_y + adjustment_amount; + pos = ADD_LONG( high_min_y, adjustment_amount ); if ( adjust_below_top && is_top_tilde ) pos += high_height; @@ -3764,7 +3770,7 @@ { /* Value 8 is heuristic. */ FT_Pos height_delta = high_height / 8; - FT_Pos min_y_limit = high_min_y - height_delta; + FT_Pos min_y_limit = SUB_LONG( high_min_y, height_delta ); FT_TRACE4(( " Pushing high contour %ld units up\n", @@ -3784,7 +3790,7 @@ centering_adjustment )); af_move_contours_up( hints, - min_y_limit + high_height, + ADD_LONG( min_y_limit, high_height ), centering_adjustment ); } } @@ -3838,7 +3844,7 @@ low_min_y = hints->contour_y_minima[low_contour]; low_max_y = hints->contour_y_maxima[low_contour]; - low_height = low_max_y - low_min_y; + low_height = SUB_LONG( low_max_y, low_min_y ); if ( low_height > accent_height_limit ) { @@ -3863,7 +3869,7 @@ min_y = hints->contour_y_minima[contour]; max_y = hints->contour_y_maxima[contour]; - distance = min_y - low_max_y; + distance = SUB_LONG( min_y, low_max_y ); if ( distance < 64 && distance < min_distance && max_y > low_max_y ) @@ -3882,9 +3888,9 @@ tilde_min_y = hints->contour_y_minima[tilde_contour]; tilde_max_y = hints->contour_y_maxima[tilde_contour]; - tilde_height = tilde_max_y - tilde_min_y; + tilde_height = SUB_LONG( tilde_max_y, tilde_min_y ); - pos = low_max_y - adjustment_amount; + pos = SUB_LONG( low_max_y, adjustment_amount ); if ( adjust_above_bottom && is_bottom_tilde ) pos -= low_height; @@ -3915,7 +3921,7 @@ ( calculated_amount <= 66 || adjustment_amount <= 66 ) ) { FT_Pos height_delta = low_height / 8; - FT_Pos max_y_limit = low_max_y + height_delta; + FT_Pos max_y_limit = ADD_LONG( low_max_y, height_delta ); FT_TRACE4(( " Pushing low contour %ld units down\n", @@ -3929,7 +3935,7 @@ centering_adjustment )); af_move_contours_down( hints, - max_y_limit - low_height, + SUB_LONG( max_y_limit, low_height ), centering_adjustment ); } } diff --git a/thirdparty/freetype/src/autofit/aflatin.h b/thirdparty/freetype/src/autofit/aflatin.h index 82b4b0d480..b6bdc5177f 100644 --- a/thirdparty/freetype/src/autofit/aflatin.h +++ b/thirdparty/freetype/src/autofit/aflatin.h @@ -5,7 +5,7 @@ * Auto-fitter hinting routines for latin writing system * (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afloader.c b/thirdparty/freetype/src/autofit/afloader.c index d84adc0967..8ac7b53856 100644 --- a/thirdparty/freetype/src/autofit/afloader.c +++ b/thirdparty/freetype/src/autofit/afloader.c @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -524,16 +524,18 @@ bbox.xMin = FT_PIX_FLOOR( bbox.xMin ); bbox.yMin = FT_PIX_FLOOR( bbox.yMin ); - bbox.xMax = FT_PIX_CEIL( bbox.xMax ); - bbox.yMax = FT_PIX_CEIL( bbox.yMax ); + bbox.xMax = FT_PIX_CEIL_LONG( bbox.xMax ); + bbox.yMax = FT_PIX_CEIL_LONG( bbox.yMax ); - slot->metrics.width = bbox.xMax - bbox.xMin; - slot->metrics.height = bbox.yMax - bbox.yMin; + slot->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin ); + slot->metrics.height = SUB_LONG( bbox.yMax, bbox.yMin ); slot->metrics.horiBearingX = bbox.xMin; slot->metrics.horiBearingY = bbox.yMax; - slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x ); - slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y ); + slot->metrics.vertBearingX = FT_PIX_FLOOR( ADD_LONG( bbox.xMin, + vvector.x ) ); + slot->metrics.vertBearingY = FT_PIX_FLOOR( ADD_LONG( bbox.yMax, + vvector.y ) ); /* for mono-width fonts (like Andale, Courier, etc.) we need */ /* to keep the original rounded advance width; ditto for */ diff --git a/thirdparty/freetype/src/autofit/afloader.h b/thirdparty/freetype/src/autofit/afloader.h index a04b4df0b3..8efd0fd57e 100644 --- a/thirdparty/freetype/src/autofit/afloader.h +++ b/thirdparty/freetype/src/autofit/afloader.h @@ -4,7 +4,7 @@ * * Auto-fitter glyph loading routines (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afmodule.c b/thirdparty/freetype/src/autofit/afmodule.c index 22d85a889e..57d5d47dfb 100644 --- a/thirdparty/freetype/src/autofit/afmodule.c +++ b/thirdparty/freetype/src/autofit/afmodule.c @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afmodule.h b/thirdparty/freetype/src/autofit/afmodule.h index c62421ef69..1f8a68122d 100644 --- a/thirdparty/freetype/src/autofit/afmodule.h +++ b/thirdparty/freetype/src/autofit/afmodule.h @@ -4,7 +4,7 @@ * * Auto-fitter module implementation (specification). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afranges.c b/thirdparty/freetype/src/autofit/afranges.c index fd54948f3a..4d0755decb 100644 --- a/thirdparty/freetype/src/autofit/afranges.c +++ b/thirdparty/freetype/src/autofit/afranges.c @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (body). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afranges.h b/thirdparty/freetype/src/autofit/afranges.h index fa00eb7504..f293694512 100644 --- a/thirdparty/freetype/src/autofit/afranges.h +++ b/thirdparty/freetype/src/autofit/afranges.h @@ -4,7 +4,7 @@ * * Auto-fitter Unicode script ranges (specification). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afscript.h b/thirdparty/freetype/src/autofit/afscript.h index 5c4cbbcb92..d071ed68b7 100644 --- a/thirdparty/freetype/src/autofit/afscript.h +++ b/thirdparty/freetype/src/autofit/afscript.h @@ -4,7 +4,7 @@ * * Auto-fitter scripts (specification only). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afshaper.c b/thirdparty/freetype/src/autofit/afshaper.c index f3c0744fd9..5c9e5376ad 100644 --- a/thirdparty/freetype/src/autofit/afshaper.c +++ b/thirdparty/freetype/src/autofit/afshaper.c @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (body). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afshaper.h b/thirdparty/freetype/src/autofit/afshaper.h index 757368fc9c..6e73b9fb2e 100644 --- a/thirdparty/freetype/src/autofit/afshaper.h +++ b/thirdparty/freetype/src/autofit/afshaper.h @@ -4,7 +4,7 @@ * * HarfBuzz interface for accessing OpenType features (specification). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afstyles.h b/thirdparty/freetype/src/autofit/afstyles.h index 206232efe2..e7a7fe531b 100644 --- a/thirdparty/freetype/src/autofit/afstyles.h +++ b/thirdparty/freetype/src/autofit/afstyles.h @@ -4,7 +4,7 @@ * * Auto-fitter styles (specification only). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/aftypes.h b/thirdparty/freetype/src/autofit/aftypes.h index 959640a12e..a3a881eede 100644 --- a/thirdparty/freetype/src/autofit/aftypes.h +++ b/thirdparty/freetype/src/autofit/aftypes.h @@ -4,7 +4,7 @@ * * Auto-fitter types (specification only). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afws-decl.h b/thirdparty/freetype/src/autofit/afws-decl.h index 12fa7a27a2..ddebdcd1e7 100644 --- a/thirdparty/freetype/src/autofit/afws-decl.h +++ b/thirdparty/freetype/src/autofit/afws-decl.h @@ -4,7 +4,7 @@ * * Auto-fitter writing system declarations (specification only). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/afws-iter.h b/thirdparty/freetype/src/autofit/afws-iter.h index 1752697b37..720c2dc50c 100644 --- a/thirdparty/freetype/src/autofit/afws-iter.h +++ b/thirdparty/freetype/src/autofit/afws-iter.h @@ -4,7 +4,7 @@ * * Auto-fitter writing systems iterator (specification only). * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/autofit.c b/thirdparty/freetype/src/autofit/autofit.c index f3fb1974d1..8cd973bf14 100644 --- a/thirdparty/freetype/src/autofit/autofit.c +++ b/thirdparty/freetype/src/autofit/autofit.c @@ -4,7 +4,7 @@ * * Auto-fitter module (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/ft-hb-ft.c b/thirdparty/freetype/src/autofit/ft-hb-ft.c index d82106b543..05a66ad32f 100644 --- a/thirdparty/freetype/src/autofit/ft-hb-ft.c +++ b/thirdparty/freetype/src/autofit/ft-hb-ft.c @@ -60,7 +60,7 @@ ft_hb_ft_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data) error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length); if (error) { - free (buffer); + ft_sfree (buffer); return NULL; } diff --git a/thirdparty/freetype/src/autofit/ft-hb.c b/thirdparty/freetype/src/autofit/ft-hb.c index 3c145d0464..ed438da6af 100644 --- a/thirdparty/freetype/src/autofit/ft-hb.c +++ b/thirdparty/freetype/src/autofit/ft-hb.c @@ -4,7 +4,7 @@ * * FreeType-HarfBuzz bridge (body). * - * Copyright (C) 2025 by + * Copyright (C) 2025-2026 by * Behdad Esfahbod. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/autofit/ft-hb.h b/thirdparty/freetype/src/autofit/ft-hb.h index 95914deb8d..d2cc0482eb 100644 --- a/thirdparty/freetype/src/autofit/ft-hb.h +++ b/thirdparty/freetype/src/autofit/ft-hb.h @@ -4,7 +4,7 @@ * * FreeType-HarfBuzz bridge (specification). * - * Copyright (C) 2025 by + * Copyright (C) 2025-2026 by * Behdad Esfahbod. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftadvanc.c b/thirdparty/freetype/src/base/ftadvanc.c index ff0fc51050..6485834666 100644 --- a/thirdparty/freetype/src/base/ftadvanc.c +++ b/thirdparty/freetype/src/base/ftadvanc.c @@ -4,7 +4,7 @@ * * Quick computation of advance widths (body). * - * Copyright (C) 2008-2025 by + * Copyright (C) 2008-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -20,6 +20,7 @@ #include #include +#include static FT_Error @@ -47,11 +48,43 @@ /* (see `FT_Load_Glyph' implementation in src/base/ftobjs.c) */ for ( nn = 0; nn < count; nn++ ) - advances[nn] = FT_MulDiv( advances[nn], scale, 64 ); + advances[nn] = FT_MulFix( 1024 * advances[nn], scale ); return FT_Err_Ok; } + /* loading (and hinting) to calculate the advances is slow */ + /* unless TrueType hdmx table is provided as an accelerator */ + static FT_Error + ft_load_advances( FT_Face face, + FT_UInt gindex, + FT_UInt count, + FT_Int32 flags, + FT_Fixed *padvances ) + { + FT_UInt nn; + FT_Error error = FT_Err_Ok; + FT_Pos factor = flags & FT_LOAD_NO_SCALE ? 1 : 1024; + FT_Pos* advance = flags & FT_LOAD_VERTICAL_LAYOUT + ? &face->glyph->advance.y + : &face->glyph->advance.x; + + + flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; + + for ( nn = 0; nn < count; nn++ ) + { + error = FT_Load_Glyph( face, gindex + nn, flags ); + if ( error ) + break; + + /* scale from 26.6 to 16.16, unless NO_SCALE was requested */ + padvances[nn] = *advance * factor; + } + + return error; + } + /* at the moment, we can perform fast advance retrieval only in */ /* the following cases: */ @@ -102,7 +135,10 @@ return error; } - return FT_Get_Advances( face, gindex, 1, flags, padvance ); + if ( flags & FT_ADVANCE_FLAG_FAST_ONLY ) + return FT_THROW( Unimplemented_Feature ); + + return ft_load_advances( face, gindex, 1, flags, padvance ); } @@ -115,12 +151,9 @@ FT_Int32 flags, FT_Fixed *padvances ) { - FT_Error error = FT_Err_Ok; - FT_Face_GetAdvancesFunc func; - FT_UInt num, end, nn; - FT_Int factor; + FT_UInt num, end; if ( !face ) @@ -140,6 +173,9 @@ func = face->driver->clazz->get_advances; if ( func && LOAD_ADVANCE_FAST_CHECK( face, flags ) ) { + FT_Error error; + + error = func( face, start, count, flags, padvances ); if ( !error ) return ft_face_scale_advances_( face, padvances, count, flags ); @@ -148,26 +184,10 @@ return error; } - error = FT_Err_Ok; - if ( flags & FT_ADVANCE_FLAG_FAST_ONLY ) return FT_THROW( Unimplemented_Feature ); - flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; - factor = ( flags & FT_LOAD_NO_SCALE ) ? 1 : 1024; - for ( nn = 0; nn < count; nn++ ) - { - error = FT_Load_Glyph( face, start + nn, flags ); - if ( error ) - break; - - /* scale from 26.6 to 16.16, unless NO_SCALE was requested */ - padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT ) - ? face->glyph->advance.y * factor - : face->glyph->advance.x * factor; - } - - return error; + return ft_load_advances( face, start, count, flags, padvances ); } diff --git a/thirdparty/freetype/src/base/ftbase.c b/thirdparty/freetype/src/base/ftbase.c index 72bae31fdc..5a5c851598 100644 --- a/thirdparty/freetype/src/base/ftbase.c +++ b/thirdparty/freetype/src/base/ftbase.c @@ -4,7 +4,7 @@ * * Single object library component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftbase.h b/thirdparty/freetype/src/base/ftbase.h index 66f091165f..952ac51d50 100644 --- a/thirdparty/freetype/src/base/ftbase.h +++ b/thirdparty/freetype/src/base/ftbase.h @@ -4,7 +4,7 @@ * * Private functions used in the `base' module (specification). * - * Copyright (C) 2008-2025 by + * Copyright (C) 2008-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftbbox.c b/thirdparty/freetype/src/base/ftbbox.c index feccdee5dd..4641ce27e8 100644 --- a/thirdparty/freetype/src/base/ftbbox.c +++ b/thirdparty/freetype/src/base/ftbbox.c @@ -4,7 +4,7 @@ * * FreeType bbox computation (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/thirdparty/freetype/src/base/ftbdf.c b/thirdparty/freetype/src/base/ftbdf.c index f15da313d8..7ce76d3c48 100644 --- a/thirdparty/freetype/src/base/ftbdf.c +++ b/thirdparty/freetype/src/base/ftbdf.c @@ -4,7 +4,7 @@ * * FreeType API for accessing BDF-specific strings (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftbitmap.c b/thirdparty/freetype/src/base/ftbitmap.c index 2c8e44b905..f88cbc11e6 100644 --- a/thirdparty/freetype/src/base/ftbitmap.c +++ b/thirdparty/freetype/src/base/ftbitmap.c @@ -4,7 +4,7 @@ * * FreeType utility functions for bitmaps (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -922,14 +922,7 @@ target->pitch = (int)final_width * 4; target->num_grays = 256; - if ( FT_LONG_MAX / target->pitch < (int)target->rows ) - { - FT_TRACE5(( "FT_Blend_Bitmap: target bitmap too large (%u x %u)\n", - final_width, final_rows )); - return FT_THROW( Invalid_Argument ); - } - - if ( FT_ALLOC( target->buffer, target->pitch * (int)target->rows ) ) + if ( FT_ALLOC_MULT( target->buffer, target->rows, target->pitch ) ) return error; free_target_bitmap_on_error = 1; @@ -950,16 +943,9 @@ new_pitch = (int)final_width * 4; - if ( FT_LONG_MAX / new_pitch < (int)final_rows ) - { - FT_TRACE5(( "FT_Blend_Bitmap: target bitmap too large (%u x %u)\n", - final_width, final_rows )); - return FT_THROW( Invalid_Argument ); - } - /* TODO: provide an in-buffer solution for large bitmaps */ /* to avoid allocation of a new buffer */ - if ( FT_ALLOC( buffer, new_pitch * (int)final_rows ) ) + if ( FT_ALLOC_MULT( buffer, final_rows, new_pitch ) ) goto Error; /* copy data to new buffer */ diff --git a/thirdparty/freetype/src/base/ftcalc.c b/thirdparty/freetype/src/base/ftcalc.c index 7d6e12e254..d233dba3d6 100644 --- a/thirdparty/freetype/src/base/ftcalc.c +++ b/thirdparty/freetype/src/base/ftcalc.c @@ -4,7 +4,7 @@ * * Arithmetic computations (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftcid.c b/thirdparty/freetype/src/base/ftcid.c index 35cd0fcd2b..878c666e12 100644 --- a/thirdparty/freetype/src/base/ftcid.c +++ b/thirdparty/freetype/src/base/ftcid.c @@ -4,7 +4,7 @@ * * FreeType API for accessing CID font information. * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * Derek Clegg and Michael Toftdal. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftcolor.c b/thirdparty/freetype/src/base/ftcolor.c index 90b02b7d2d..ed6b5f0599 100644 --- a/thirdparty/freetype/src/base/ftcolor.c +++ b/thirdparty/freetype/src/base/ftcolor.c @@ -4,7 +4,7 @@ * * FreeType's glyph color management (body). * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftdbgmem.c b/thirdparty/freetype/src/base/ftdbgmem.c index 7f54e759b1..0335f14256 100644 --- a/thirdparty/freetype/src/base/ftdbgmem.c +++ b/thirdparty/freetype/src/base/ftdbgmem.c @@ -4,7 +4,7 @@ * * Memory debugger (body). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftdebug.c b/thirdparty/freetype/src/base/ftdebug.c index c615f29e52..27091a5579 100644 --- a/thirdparty/freetype/src/base/ftdebug.c +++ b/thirdparty/freetype/src/base/ftdebug.c @@ -4,7 +4,7 @@ * * Debugging and logging component (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/fterrors.c b/thirdparty/freetype/src/base/fterrors.c index 27e9c5134e..a140dab860 100644 --- a/thirdparty/freetype/src/base/fterrors.c +++ b/thirdparty/freetype/src/base/fterrors.c @@ -4,7 +4,7 @@ * * FreeType API for error code handling. * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * Armin Hasitzka, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftfntfmt.c b/thirdparty/freetype/src/base/ftfntfmt.c index 7f4f14ffdb..99e8c2b17d 100644 --- a/thirdparty/freetype/src/base/ftfntfmt.c +++ b/thirdparty/freetype/src/base/ftfntfmt.c @@ -4,7 +4,7 @@ * * FreeType utility file for font formats (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftfstype.c b/thirdparty/freetype/src/base/ftfstype.c index 3a95752ffa..58d5144a9e 100644 --- a/thirdparty/freetype/src/base/ftfstype.c +++ b/thirdparty/freetype/src/base/ftfstype.c @@ -4,7 +4,7 @@ * * FreeType utility file to access FSType data (body). * - * Copyright (C) 2008-2025 by + * Copyright (C) 2008-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftgasp.c b/thirdparty/freetype/src/base/ftgasp.c index 2202240b57..3c13456802 100644 --- a/thirdparty/freetype/src/base/ftgasp.c +++ b/thirdparty/freetype/src/base/ftgasp.c @@ -4,7 +4,7 @@ * * Access of TrueType's `gasp' table (body). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftgloadr.c b/thirdparty/freetype/src/base/ftgloadr.c index 47781bc4d5..bd66e61d1c 100644 --- a/thirdparty/freetype/src/base/ftgloadr.c +++ b/thirdparty/freetype/src/base/ftgloadr.c @@ -4,7 +4,7 @@ * * The FreeType glyph loader (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftglyph.c b/thirdparty/freetype/src/base/ftglyph.c index 75babb1aa5..096f4d965e 100644 --- a/thirdparty/freetype/src/base/ftglyph.c +++ b/thirdparty/freetype/src/base/ftglyph.c @@ -4,7 +4,7 @@ * * FreeType convenience functions to handle glyphs (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -62,7 +62,7 @@ FT_GlyphSlot slot ) { FT_BitmapGlyph glyph = (FT_BitmapGlyph)bitmap_glyph; - FT_Error error = FT_Err_Ok; + FT_Error error; FT_Library library = FT_GLYPH( glyph )->library; @@ -75,17 +75,8 @@ glyph->left = slot->bitmap_left; glyph->top = slot->bitmap_top; - /* do lazy copying whenever possible */ - if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) - { - glyph->bitmap = slot->bitmap; - slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; - } - else - { - FT_Bitmap_Init( &glyph->bitmap ); - error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap ); - } + FT_Bitmap_Init( &glyph->bitmap ); + error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap ); Exit: return error; @@ -865,9 +856,9 @@ goto Exit; /* in case of success, copy the bitmap to the glyph bitmap */ - error = ft_bitmap_glyph_init( (FT_Glyph)bitmap, &dummy ); - if ( error ) - goto Exit; + bitmap->left = dummy.bitmap_left; + bitmap->top = dummy.bitmap_top; + bitmap->bitmap = dummy.bitmap; /* copy advance */ bitmap->root.advance = glyph->advance; diff --git a/thirdparty/freetype/src/base/ftgxval.c b/thirdparty/freetype/src/base/ftgxval.c index 1961cf4fbe..e48f582c71 100644 --- a/thirdparty/freetype/src/base/ftgxval.c +++ b/thirdparty/freetype/src/base/ftgxval.c @@ -4,7 +4,7 @@ * * FreeType API for validating TrueTypeGX/AAT tables (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Masatake YAMATO, Redhat K.K, * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/base/ftinit.c b/thirdparty/freetype/src/base/ftinit.c index 37d7f87bcb..b20289316d 100644 --- a/thirdparty/freetype/src/base/ftinit.c +++ b/thirdparty/freetype/src/base/ftinit.c @@ -4,7 +4,7 @@ * * FreeType initialization layer (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftlcdfil.c b/thirdparty/freetype/src/base/ftlcdfil.c index d026da8b01..9adbf7518f 100644 --- a/thirdparty/freetype/src/base/ftlcdfil.c +++ b/thirdparty/freetype/src/base/ftlcdfil.c @@ -4,7 +4,7 @@ * * FreeType API for color filtering of subpixel bitmap glyphs (body). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -25,265 +25,28 @@ #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING -/* define USE_LEGACY to implement the legacy filter */ -#define USE_LEGACY - -#define FT_SHIFTCLAMP( x ) ( x >>= 8, (FT_Byte)( x > 255 ? 255 : x ) ) - - - /* add padding according to filter weights */ + /* add padding sufficient for a 5-tap filter, */ + /* which is 2/3 of a pixel */ FT_BASE_DEF( void ) ft_lcd_padding( FT_BBox* cbox, FT_GlyphSlot slot, FT_Render_Mode mode ) { - FT_Byte* lcd_weights; - FT_Bitmap_LcdFilterFunc lcd_filter_func; + FT_UNUSED( slot ); - - /* Per-face LCD filtering takes priority if set up. */ - if ( slot->face && slot->face->internal->lcd_filter_func ) + if ( mode == FT_RENDER_MODE_LCD ) { - lcd_weights = slot->face->internal->lcd_weights; - lcd_filter_func = slot->face->internal->lcd_filter_func; + cbox->xMin -= 43; + cbox->xMax += 43; } - else + else if ( mode == FT_RENDER_MODE_LCD_V ) { - lcd_weights = slot->library->lcd_weights; - lcd_filter_func = slot->library->lcd_filter_func; - } - - if ( lcd_filter_func == ft_lcd_filter_fir ) - { - if ( mode == FT_RENDER_MODE_LCD ) - { - cbox->xMin -= lcd_weights[0] ? 43 : - lcd_weights[1] ? 22 : 0; - cbox->xMax += lcd_weights[4] ? 43 : - lcd_weights[3] ? 22 : 0; - } - else if ( mode == FT_RENDER_MODE_LCD_V ) - { - cbox->yMin -= lcd_weights[0] ? 43 : - lcd_weights[1] ? 22 : 0; - cbox->yMax += lcd_weights[4] ? 43 : - lcd_weights[3] ? 22 : 0; - } + cbox->yMin -= 43; + cbox->yMax += 43; } } - /* FIR filter used by the default and light filters */ - FT_BASE_DEF( void ) - ft_lcd_filter_fir( FT_Bitmap* bitmap, - FT_LcdFiveTapFilter weights ) - { - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; - FT_Int pitch = bitmap->pitch; - FT_Byte* origin = bitmap->buffer; - FT_Byte mode = bitmap->pixel_mode; - - - /* take care of bitmap flow */ - if ( pitch > 0 && height > 0 ) - origin += pitch * (FT_Int)( height - 1 ); - - /* horizontal in-place FIR filter */ - if ( mode == FT_PIXEL_MODE_LCD && width >= 2 ) - { - FT_Byte* line = origin; - - - /* `fir' must be at least 32 bit wide, since the sum of */ - /* the values in `weights' can exceed 0xFF */ - - for ( ; height > 0; height--, line -= pitch ) - { - FT_UInt fir[5]; - FT_UInt val, xx; - - - val = line[0]; - fir[2] = weights[2] * val; - fir[3] = weights[3] * val; - fir[4] = weights[4] * val; - - val = line[1]; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - for ( xx = 2; xx < width; xx++ ) - { - val = line[xx]; - fir[0] = fir[1] + weights[0] * val; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - line[xx - 2] = FT_SHIFTCLAMP( fir[0] ); - } - - line[xx - 2] = FT_SHIFTCLAMP( fir[1] ); - line[xx - 1] = FT_SHIFTCLAMP( fir[2] ); - } - } - - /* vertical in-place FIR filter */ - else if ( mode == FT_PIXEL_MODE_LCD_V && height >= 2 ) - { - FT_Byte* column = origin; - - - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column; - FT_UInt fir[5]; - FT_UInt val, yy; - - - val = col[0]; - fir[2] = weights[2] * val; - fir[3] = weights[3] * val; - fir[4] = weights[4] * val; - col -= pitch; - - val = col[0]; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - col -= pitch; - - for ( yy = 2; yy < height; yy++, col -= pitch ) - { - val = col[0]; - fir[0] = fir[1] + weights[0] * val; - fir[1] = fir[2] + weights[1] * val; - fir[2] = fir[3] + weights[2] * val; - fir[3] = fir[4] + weights[3] * val; - fir[4] = weights[4] * val; - - col[pitch * 2] = FT_SHIFTCLAMP( fir[0] ); - } - - col[pitch * 2] = FT_SHIFTCLAMP( fir[1] ); - col[pitch] = FT_SHIFTCLAMP( fir[2] ); - } - } - } - - -#ifdef USE_LEGACY - - /* intra-pixel filter used by the legacy filter */ - static void - _ft_lcd_filter_legacy( FT_Bitmap* bitmap, - FT_Byte* weights ) - { - FT_UInt width = (FT_UInt)bitmap->width; - FT_UInt height = (FT_UInt)bitmap->rows; - FT_Int pitch = bitmap->pitch; - FT_Byte* origin = bitmap->buffer; - FT_Byte mode = bitmap->pixel_mode; - - static const unsigned int filters[3][3] = - { - { 65538 * 9/13, 65538 * 1/6, 65538 * 1/13 }, - { 65538 * 3/13, 65538 * 4/6, 65538 * 3/13 }, - { 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 } - }; - - FT_UNUSED( weights ); - - - /* take care of bitmap flow */ - if ( pitch > 0 && height > 0 ) - origin += pitch * (FT_Int)( height - 1 ); - - /* horizontal in-place intra-pixel filter */ - if ( mode == FT_PIXEL_MODE_LCD && width >= 3 ) - { - FT_Byte* line = origin; - - - for ( ; height > 0; height--, line -= pitch ) - { - FT_UInt xx; - - - for ( xx = 0; xx < width; xx += 3 ) - { - FT_UInt r, g, b; - FT_UInt p; - - - p = line[xx]; - r = filters[0][0] * p; - g = filters[0][1] * p; - b = filters[0][2] * p; - - p = line[xx + 1]; - r += filters[1][0] * p; - g += filters[1][1] * p; - b += filters[1][2] * p; - - p = line[xx + 2]; - r += filters[2][0] * p; - g += filters[2][1] * p; - b += filters[2][2] * p; - - line[xx] = (FT_Byte)( r / 65536 ); - line[xx + 1] = (FT_Byte)( g / 65536 ); - line[xx + 2] = (FT_Byte)( b / 65536 ); - } - } - } - else if ( mode == FT_PIXEL_MODE_LCD_V && height >= 3 ) - { - FT_Byte* column = origin; - - - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column - 2 * pitch; - - - for ( ; height > 0; height -= 3, col -= 3 * pitch ) - { - FT_UInt r, g, b; - FT_UInt p; - - - p = col[0]; - r = filters[0][0] * p; - g = filters[0][1] * p; - b = filters[0][2] * p; - - p = col[pitch]; - r += filters[1][0] * p; - g += filters[1][1] * p; - b += filters[1][2] * p; - - p = col[pitch * 2]; - r += filters[2][0] * p; - g += filters[2][1] * p; - b += filters[2][2] * p; - - col[0] = (FT_Byte)( r / 65536 ); - col[pitch] = (FT_Byte)( g / 65536 ); - col[pitch * 2] = (FT_Byte)( b / 65536 ); - } - } - } - } - -#endif /* USE_LEGACY */ - - /* documentation in ftlcdfil.h */ FT_EXPORT_DEF( FT_Error ) @@ -297,7 +60,6 @@ return FT_THROW( Invalid_Argument ); ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; return FT_Err_Ok; } @@ -321,32 +83,23 @@ switch ( filter ) { case FT_LCD_FILTER_NONE: - library->lcd_filter_func = NULL; + ft_memset( library->lcd_weights, + 0, + FT_LCD_FILTER_FIVE_TAPS ); break; case FT_LCD_FILTER_DEFAULT: ft_memcpy( library->lcd_weights, default_weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; break; case FT_LCD_FILTER_LIGHT: ft_memcpy( library->lcd_weights, light_weights, FT_LCD_FILTER_FIVE_TAPS ); - library->lcd_filter_func = ft_lcd_filter_fir; break; -#ifdef USE_LEGACY - - case FT_LCD_FILTER_LEGACY: - case FT_LCD_FILTER_LEGACY1: - library->lcd_filter_func = _ft_lcd_filter_legacy; - break; - -#endif - default: return FT_THROW( Invalid_Argument ); } diff --git a/thirdparty/freetype/src/base/ftmac.c b/thirdparty/freetype/src/base/ftmac.c index 37d97be183..7251a4cb96 100644 --- a/thirdparty/freetype/src/base/ftmac.c +++ b/thirdparty/freetype/src/base/ftmac.c @@ -8,7 +8,7 @@ * This file is for Mac OS X only; see builds/mac/ftoldmac.c for * classic platforms built by MPW. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftmm.c b/thirdparty/freetype/src/base/ftmm.c index 9e67001406..0d3bf3b77d 100644 --- a/thirdparty/freetype/src/base/ftmm.c +++ b/thirdparty/freetype/src/base/ftmm.c @@ -4,7 +4,7 @@ * * Multiple Master font support (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftobjs.c b/thirdparty/freetype/src/base/ftobjs.c index cced4fed06..f9f64c40fe 100644 --- a/thirdparty/freetype/src/base/ftobjs.c +++ b/thirdparty/freetype/src/base/ftobjs.c @@ -4,7 +4,7 @@ * * The FreeType private base classes (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -385,6 +385,7 @@ FT_Pos y_shift = 0; FT_Pos x_left, y_top; FT_Pos width, height, pitch; + FT_Bool ret; if ( slot->format == FT_GLYPH_FORMAT_SVG ) @@ -495,6 +496,20 @@ width = pbox.xMax - pbox.xMin; height = pbox.yMax - pbox.yMin; + /* Flag the width or height unsuitable for rendering. */ + /* The limit is based on the ppem value when available. */ + /* FT_Renderer modules should check the return value. */ + ret = FT_BOOL( width >= 0x10000 || height >= 0x10000 || + pbox.xMin < -0x1000000 || pbox.xMax >= 0x1000000 || + pbox.yMin < -0x1000000 || pbox.yMax >= 0x1000000 || + ( slot->face && + ( width > 10 * slot->face->size->metrics.x_ppem || + height > 10 * slot->face->size->metrics.y_ppem ) ) ); + + if ( ret ) + FT_TRACE3(( "ft_glyphslot_preset_bitmap: [%ld %ld %ld %ld]\n", + pbox.xMin, pbox.yMin, pbox.xMax, pbox.yMax )); + switch ( pixel_mode ) { case FT_PIXEL_MODE_MONO: @@ -524,15 +539,7 @@ bitmap->rows = (unsigned int)height; bitmap->pitch = pitch; - if ( pbox.xMin < -0x8000 || pbox.xMax > 0x7FFF || - pbox.yMin < -0x8000 || pbox.yMax > 0x7FFF ) - { - FT_TRACE3(( "ft_glyphslot_preset_bitmap: [%ld %ld %ld %ld]\n", - pbox.xMin, pbox.yMin, pbox.xMax, pbox.yMax )); - return 1; - } - - return 0; + return ret; } @@ -549,8 +556,7 @@ FT_BASE_DEF( FT_Error ) - ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot, - FT_ULong size ) + ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot ) { FT_Memory memory = FT_FACE_MEMORY( slot->face ); FT_Error error; @@ -561,7 +567,10 @@ else slot->internal->flags |= FT_GLYPH_OWN_BITMAP; - FT_MEM_ALLOC( slot->bitmap.buffer, size ); + /* dimensions must be preset */ + FT_MEM_ALLOC_MULT( slot->bitmap.buffer, + slot->bitmap.rows, + slot->bitmap.pitch ); return error; } @@ -1413,7 +1422,10 @@ if ( ( cur[0]->platform_id == TT_PLATFORM_MICROSOFT && cur[0]->encoding_id == TT_MS_ID_UCS_4 ) || ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE && - cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) ) + cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) || + ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE && + cur[0]->encoding_id == TT_APPLE_ID_FULL_UNICODE && + FT_Get_CMap_Format( cur[0] ) == 13 ) ) { face->charmap = cur[0]; return FT_Err_Ok; @@ -2798,11 +2810,6 @@ internal->refcount = 1; internal->no_stem_darkening = -1; - -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - /* Per-face filtering can only be set up by FT_Face_Properties */ - internal->lcd_filter_func = NULL; -#endif } if ( aface ) @@ -4032,18 +4039,8 @@ } else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS ) { -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - if ( properties->data ) - { - ft_memcpy( face->internal->lcd_weights, - properties->data, - FT_LCD_FILTER_FIVE_TAPS ); - face->internal->lcd_filter_func = ft_lcd_filter_fir; - } -#else error = FT_THROW( Unimplemented_Feature ); goto Exit; -#endif } else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED ) { diff --git a/thirdparty/freetype/src/base/ftotval.c b/thirdparty/freetype/src/base/ftotval.c index 503126f4b6..ae14113612 100644 --- a/thirdparty/freetype/src/base/ftotval.c +++ b/thirdparty/freetype/src/base/ftotval.c @@ -4,7 +4,7 @@ * * FreeType API for validating OpenType tables (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftoutln.c b/thirdparty/freetype/src/base/ftoutln.c index 8a15b03eb8..a0a1549ada 100644 --- a/thirdparty/freetype/src/base/ftoutln.c +++ b/thirdparty/freetype/src/base/ftoutln.c @@ -4,7 +4,7 @@ * * FreeType outline management (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftpatent.c b/thirdparty/freetype/src/base/ftpatent.c index 664bc34dee..3f149eb607 100644 --- a/thirdparty/freetype/src/base/ftpatent.c +++ b/thirdparty/freetype/src/base/ftpatent.c @@ -5,7 +5,7 @@ * FreeType API for checking patented TrueType bytecode instructions * (body). Obsolete, retained for backward compatibility. * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftpfr.c b/thirdparty/freetype/src/base/ftpfr.c index f2af1fecc2..f95808201a 100644 --- a/thirdparty/freetype/src/base/ftpfr.c +++ b/thirdparty/freetype/src/base/ftpfr.c @@ -4,7 +4,7 @@ * * FreeType API for accessing PFR-specific data (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftpsprop.c b/thirdparty/freetype/src/base/ftpsprop.c index 0631cd63f6..13f6c5102c 100644 --- a/thirdparty/freetype/src/base/ftpsprop.c +++ b/thirdparty/freetype/src/base/ftpsprop.c @@ -5,7 +5,7 @@ * Get and set properties of PostScript drivers (body). * See `ftdriver.h' for available properties. * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftrfork.c b/thirdparty/freetype/src/base/ftrfork.c index 1e241f4f95..fbb8ace717 100644 --- a/thirdparty/freetype/src/base/ftrfork.c +++ b/thirdparty/freetype/src/base/ftrfork.c @@ -4,7 +4,7 @@ * * Embedded resource forks accessor (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Masatake YAMATO and Redhat K.K. * * FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are diff --git a/thirdparty/freetype/src/base/ftsnames.c b/thirdparty/freetype/src/base/ftsnames.c index 34a67a148f..d8274cccd4 100644 --- a/thirdparty/freetype/src/base/ftsnames.c +++ b/thirdparty/freetype/src/base/ftsnames.c @@ -7,7 +7,7 @@ * * This is _not_ used to retrieve glyph names! * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftstream.c b/thirdparty/freetype/src/base/ftstream.c index c04a0506de..b08a1a9b65 100644 --- a/thirdparty/freetype/src/base/ftstream.c +++ b/thirdparty/freetype/src/base/ftstream.c @@ -4,7 +4,7 @@ * * I/O stream support (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftstroke.c b/thirdparty/freetype/src/base/ftstroke.c index 591f18eaa8..e599ecaf46 100644 --- a/thirdparty/freetype/src/base/ftstroke.c +++ b/thirdparty/freetype/src/base/ftstroke.c @@ -4,7 +4,7 @@ * * FreeType path stroker (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -693,6 +693,7 @@ Fail: num_points = 0; num_contours = 0; + error = FT_THROW( Invalid_Outline ); goto Exit; } @@ -2251,7 +2252,7 @@ FT_Stroker stroker, FT_Bool destroy ) { - FT_Error error = FT_ERR( Invalid_Argument ); + FT_Error error = FT_THROW( Invalid_Argument ); FT_Glyph glyph = NULL; @@ -2283,7 +2284,9 @@ if ( error ) goto Fail; - FT_Stroker_GetCounts( stroker, &num_points, &num_contours ); + error = FT_Stroker_GetCounts( stroker, &num_points, &num_contours ); + if ( error ) + goto Fail; FT_Outline_Done( glyph->library, outline ); @@ -2326,7 +2329,7 @@ FT_Bool inside, FT_Bool destroy ) { - FT_Error error = FT_ERR( Invalid_Argument ); + FT_Error error = FT_THROW( Invalid_Argument ); FT_Glyph glyph = NULL; diff --git a/thirdparty/freetype/src/base/ftsynth.c b/thirdparty/freetype/src/base/ftsynth.c index 08bc174220..23960eda3a 100644 --- a/thirdparty/freetype/src/base/ftsynth.c +++ b/thirdparty/freetype/src/base/ftsynth.c @@ -4,7 +4,7 @@ * * FreeType synthesizing code for emboldening and slanting (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftsystem.c b/thirdparty/freetype/src/base/ftsystem.c index 186119d558..be9159f614 100644 --- a/thirdparty/freetype/src/base/ftsystem.c +++ b/thirdparty/freetype/src/base/ftsystem.c @@ -4,7 +4,7 @@ * * ANSI-specific FreeType low-level system interface (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/fttrigon.c b/thirdparty/freetype/src/base/fttrigon.c index 29eff639c5..baa47eba08 100644 --- a/thirdparty/freetype/src/base/fttrigon.c +++ b/thirdparty/freetype/src/base/fttrigon.c @@ -4,7 +4,7 @@ * * FreeType trigonometric functions (body). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/fttype1.c b/thirdparty/freetype/src/base/fttype1.c index 77978df674..f9a46801f3 100644 --- a/thirdparty/freetype/src/base/fttype1.c +++ b/thirdparty/freetype/src/base/fttype1.c @@ -4,7 +4,7 @@ * * FreeType utility file for PS names support (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/base/ftutil.c b/thirdparty/freetype/src/base/ftutil.c index 0b7382627c..5d8fc7b9bf 100644 --- a/thirdparty/freetype/src/base/ftutil.c +++ b/thirdparty/freetype/src/base/ftutil.c @@ -4,7 +4,7 @@ * * FreeType utility file for memory and list management (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -424,11 +424,10 @@ while ( cur ) { FT_ListNode next = cur->next; - void* data = cur->data; if ( destroy ) - destroy( memory, data, user ); + destroy( memory, cur->data, user ); FT_FREE( cur ); cur = next; diff --git a/thirdparty/freetype/src/base/ftwinfnt.c b/thirdparty/freetype/src/base/ftwinfnt.c index 256b58005e..038451ae09 100644 --- a/thirdparty/freetype/src/base/ftwinfnt.c +++ b/thirdparty/freetype/src/base/ftwinfnt.c @@ -4,7 +4,7 @@ * * FreeType API for accessing Windows FNT specific info (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/bdf/bdfdrivr.c b/thirdparty/freetype/src/bdf/bdfdrivr.c index f57bb0007e..94549b6922 100644 --- a/thirdparty/freetype/src/bdf/bdfdrivr.c +++ b/thirdparty/freetype/src/bdf/bdfdrivr.c @@ -800,7 +800,6 @@ THE SOFTWARE. FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; bdf_glyph_t glyph; - int bpp = bdf->bdffont->bpp; FT_UNUSED( load_flags ); @@ -839,7 +838,7 @@ THE SOFTWARE. /* we can simply point to it */ ft_glyphslot_set_bitmap( slot, glyph.bitmap ); - switch ( bpp ) + switch ( bdf->bdffont->bpp ) { case 1: bitmap->pixel_mode = FT_PIXEL_MODE_MONO; diff --git a/thirdparty/freetype/src/bzip2/ftbzip2.c b/thirdparty/freetype/src/bzip2/ftbzip2.c index 16d158d72d..6326c71ac1 100644 --- a/thirdparty/freetype/src/bzip2/ftbzip2.c +++ b/thirdparty/freetype/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ * parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2010-2025 by + * Copyright (C) 2010-2026 by * Joel Klinghed. * * based on `src/gzip/ftgzip.c' diff --git a/thirdparty/freetype/src/cache/ftcache.c b/thirdparty/freetype/src/cache/ftcache.c index afdf1e4f5b..95f784370d 100644 --- a/thirdparty/freetype/src/cache/ftcache.c +++ b/thirdparty/freetype/src/cache/ftcache.c @@ -4,7 +4,7 @@ * * The FreeType Caching sub-system (body only). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcbasic.c b/thirdparty/freetype/src/cache/ftcbasic.c index e7cf2605fe..81c5ded473 100644 --- a/thirdparty/freetype/src/cache/ftcbasic.c +++ b/thirdparty/freetype/src/cache/ftcbasic.c @@ -4,7 +4,7 @@ * * The FreeType basic cache interface (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftccache.c b/thirdparty/freetype/src/cache/ftccache.c index 91227147a8..28f3f3e7a0 100644 --- a/thirdparty/freetype/src/cache/ftccache.c +++ b/thirdparty/freetype/src/cache/ftccache.c @@ -4,7 +4,7 @@ * * The FreeType internal cache interface (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftccache.h b/thirdparty/freetype/src/cache/ftccache.h index 20c2638e72..55ecf5e70c 100644 --- a/thirdparty/freetype/src/cache/ftccache.h +++ b/thirdparty/freetype/src/cache/ftccache.h @@ -4,7 +4,7 @@ * * FreeType internal cache interface (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftccback.h b/thirdparty/freetype/src/cache/ftccback.h index 1af2f17f97..f013833e66 100644 --- a/thirdparty/freetype/src/cache/ftccback.h +++ b/thirdparty/freetype/src/cache/ftccback.h @@ -4,7 +4,7 @@ * * Callback functions of the caching sub-system (specification only). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftccmap.c b/thirdparty/freetype/src/cache/ftccmap.c index e3a4ec2429..758468fb45 100644 --- a/thirdparty/freetype/src/cache/ftccmap.c +++ b/thirdparty/freetype/src/cache/ftccmap.c @@ -4,7 +4,7 @@ * * FreeType CharMap cache (body) * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcerror.h b/thirdparty/freetype/src/cache/ftcerror.h index f714491c75..41491c2f46 100644 --- a/thirdparty/freetype/src/cache/ftcerror.h +++ b/thirdparty/freetype/src/cache/ftcerror.h @@ -4,7 +4,7 @@ * * Caching sub-system error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcglyph.c b/thirdparty/freetype/src/cache/ftcglyph.c index 703c69d91f..3c291ce50f 100644 --- a/thirdparty/freetype/src/cache/ftcglyph.c +++ b/thirdparty/freetype/src/cache/ftcglyph.c @@ -4,7 +4,7 @@ * * FreeType Glyph Image (FT_Glyph) cache (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcglyph.h b/thirdparty/freetype/src/cache/ftcglyph.h index b728b636e4..1777a17e53 100644 --- a/thirdparty/freetype/src/cache/ftcglyph.h +++ b/thirdparty/freetype/src/cache/ftcglyph.h @@ -4,7 +4,7 @@ * * FreeType abstract glyph cache (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcimage.c b/thirdparty/freetype/src/cache/ftcimage.c index 05d393dcd9..b028bf8e45 100644 --- a/thirdparty/freetype/src/cache/ftcimage.c +++ b/thirdparty/freetype/src/cache/ftcimage.c @@ -4,7 +4,7 @@ * * FreeType Image cache (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcimage.h b/thirdparty/freetype/src/cache/ftcimage.h index 8eb1482624..d48c54c51b 100644 --- a/thirdparty/freetype/src/cache/ftcimage.h +++ b/thirdparty/freetype/src/cache/ftcimage.h @@ -4,7 +4,7 @@ * * FreeType Generic Image cache (specification) * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcmanag.c b/thirdparty/freetype/src/cache/ftcmanag.c index 4bfb389bb7..4c1d85ab1f 100644 --- a/thirdparty/freetype/src/cache/ftcmanag.c +++ b/thirdparty/freetype/src/cache/ftcmanag.c @@ -4,7 +4,7 @@ * * FreeType Cache Manager (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcmanag.h b/thirdparty/freetype/src/cache/ftcmanag.h index c691aebb39..22d56d7eb8 100644 --- a/thirdparty/freetype/src/cache/ftcmanag.h +++ b/thirdparty/freetype/src/cache/ftcmanag.h @@ -4,7 +4,7 @@ * * FreeType Cache Manager (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcmru.c b/thirdparty/freetype/src/cache/ftcmru.c index 2a5f2f3aa5..e8dc9052da 100644 --- a/thirdparty/freetype/src/cache/ftcmru.c +++ b/thirdparty/freetype/src/cache/ftcmru.c @@ -4,7 +4,7 @@ * * FreeType MRU support (body). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcmru.h b/thirdparty/freetype/src/cache/ftcmru.h index 18e7a840ea..962d088687 100644 --- a/thirdparty/freetype/src/cache/ftcmru.h +++ b/thirdparty/freetype/src/cache/ftcmru.h @@ -4,7 +4,7 @@ * * Simple MRU list-cache (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcsbits.c b/thirdparty/freetype/src/cache/ftcsbits.c index 6857f82b41..7f6a9b1b4e 100644 --- a/thirdparty/freetype/src/cache/ftcsbits.c +++ b/thirdparty/freetype/src/cache/ftcsbits.c @@ -4,7 +4,7 @@ * * FreeType sbits manager (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cache/ftcsbits.h b/thirdparty/freetype/src/cache/ftcsbits.h index 20ccb13b73..669e77cb30 100644 --- a/thirdparty/freetype/src/cache/ftcsbits.h +++ b/thirdparty/freetype/src/cache/ftcsbits.h @@ -4,7 +4,7 @@ * * A small-bitmap cache (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cff.c b/thirdparty/freetype/src/cff/cff.c index 01d641ff98..8125c104d1 100644 --- a/thirdparty/freetype/src/cff/cff.c +++ b/thirdparty/freetype/src/cff/cff.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffcmap.c b/thirdparty/freetype/src/cff/cffcmap.c index cb69abdb90..75e2420d99 100644 --- a/thirdparty/freetype/src/cff/cffcmap.c +++ b/thirdparty/freetype/src/cff/cffcmap.c @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffcmap.h b/thirdparty/freetype/src/cff/cffcmap.h index 60e16d9487..e812e7a89e 100644 --- a/thirdparty/freetype/src/cff/cffcmap.h +++ b/thirdparty/freetype/src/cff/cffcmap.h @@ -4,7 +4,7 @@ * * CFF character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffdrivr.c b/thirdparty/freetype/src/cff/cffdrivr.c index 0079ddd195..18c7b87904 100644 --- a/thirdparty/freetype/src/cff/cffdrivr.c +++ b/thirdparty/freetype/src/cff/cffdrivr.c @@ -4,7 +4,7 @@ * * OpenType font driver implementation (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Dominik Röttsches. * * This file is part of the FreeType project, and may only be used, @@ -456,8 +456,8 @@ dict->weight ); font_info->italic_angle = dict->italic_angle; font_info->is_fixed_pitch = dict->is_fixed_pitch; - font_info->underline_position = (FT_Short)dict->underline_position; - font_info->underline_thickness = (FT_UShort)dict->underline_thickness; + font_info->underline_position = dict->underline_position; + font_info->underline_thickness = dict->underline_thickness; cff->font_info = font_info; } diff --git a/thirdparty/freetype/src/cff/cffdrivr.h b/thirdparty/freetype/src/cff/cffdrivr.h index 52a1e727a6..2f3c58b67d 100644 --- a/thirdparty/freetype/src/cff/cffdrivr.h +++ b/thirdparty/freetype/src/cff/cffdrivr.h @@ -4,7 +4,7 @@ * * High-level OpenType driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cfferrs.h b/thirdparty/freetype/src/cff/cfferrs.h index 7491886c7b..ca1158c0df 100644 --- a/thirdparty/freetype/src/cff/cfferrs.h +++ b/thirdparty/freetype/src/cff/cfferrs.h @@ -4,7 +4,7 @@ * * CFF error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffgload.c b/thirdparty/freetype/src/cff/cffgload.c index e8bab3c1e3..0c986930ce 100644 --- a/thirdparty/freetype/src/cff/cffgload.c +++ b/thirdparty/freetype/src/cff/cffgload.c @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffgload.h b/thirdparty/freetype/src/cff/cffgload.h index 662bb7cff5..eb4b5f30b5 100644 --- a/thirdparty/freetype/src/cff/cffgload.h +++ b/thirdparty/freetype/src/cff/cffgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffload.c b/thirdparty/freetype/src/cff/cffload.c index 326f885056..9d067cfeeb 100644 --- a/thirdparty/freetype/src/cff/cffload.c +++ b/thirdparty/freetype/src/cff/cffload.c @@ -4,7 +4,7 @@ * * OpenType and CFF data/program tables loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -2014,8 +2014,8 @@ /* set defaults */ FT_ZERO( top ); - top->underline_position = -( 100L << 16 ); - top->underline_thickness = 50L << 16; + top->underline_position = -100; + top->underline_thickness = 50; top->charstring_type = 2; top->font_matrix.xx = 0x10000L; top->font_matrix.yy = 0x10000L; diff --git a/thirdparty/freetype/src/cff/cffload.h b/thirdparty/freetype/src/cff/cffload.h index fdc132c8f3..ab02ca2d7f 100644 --- a/thirdparty/freetype/src/cff/cffload.h +++ b/thirdparty/freetype/src/cff/cffload.h @@ -4,7 +4,7 @@ * * OpenType & CFF data/program tables loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffobjs.c b/thirdparty/freetype/src/cff/cffobjs.c index 1aeb908f4a..c6ba35e273 100644 --- a/thirdparty/freetype/src/cff/cffobjs.c +++ b/thirdparty/freetype/src/cff/cffobjs.c @@ -4,7 +4,7 @@ * * OpenType objects manager (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -16,7 +16,6 @@ */ - #include #include #include @@ -45,6 +44,7 @@ #define CFF_fixedToInt( x ) \ ( (FT_Short)( ( (x) + 0x8000U ) >> 16 ) ) + /************************************************************************** * * The macro FT_COMPONENT is used in trace mode. It is an implicit @@ -846,10 +846,8 @@ cffface->height = (FT_Short)( cffface->ascender - cffface->descender ); - cffface->underline_position = - (FT_Short)( dict->underline_position >> 16 ); - cffface->underline_thickness = - (FT_Short)( dict->underline_thickness >> 16 ); + cffface->underline_position = (FT_Short)dict->underline_position; + cffface->underline_thickness = (FT_Short)dict->underline_thickness; /* retrieve font family & style name */ if ( dict->family_name ) diff --git a/thirdparty/freetype/src/cff/cffobjs.h b/thirdparty/freetype/src/cff/cffobjs.h index 982dcd64dd..c6ab805c5b 100644 --- a/thirdparty/freetype/src/cff/cffobjs.h +++ b/thirdparty/freetype/src/cff/cffobjs.h @@ -4,7 +4,7 @@ * * OpenType objects manager (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -20,8 +20,6 @@ #define CFFOBJS_H_ - - FT_BEGIN_HEADER diff --git a/thirdparty/freetype/src/cff/cffparse.c b/thirdparty/freetype/src/cff/cffparse.c index 864b2490b3..fadc3258c9 100644 --- a/thirdparty/freetype/src/cff/cffparse.c +++ b/thirdparty/freetype/src/cff/cffparse.c @@ -4,7 +4,7 @@ * * CFF token stream parser (body) * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cffparse.h b/thirdparty/freetype/src/cff/cffparse.h index 47cceb1a4a..1daf548cbc 100644 --- a/thirdparty/freetype/src/cff/cffparse.h +++ b/thirdparty/freetype/src/cff/cffparse.h @@ -4,7 +4,7 @@ * * CFF token stream parser (specification) * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cff/cfftoken.h b/thirdparty/freetype/src/cff/cfftoken.h index cc5aaa2867..0eadc7118f 100644 --- a/thirdparty/freetype/src/cff/cfftoken.h +++ b/thirdparty/freetype/src/cff/cfftoken.h @@ -4,7 +4,7 @@ * * CFF token definitions (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -30,8 +30,8 @@ CFF_FIELD_STRING ( 4, weight, "Weight" ) CFF_FIELD_BOOL ( 0x101, is_fixed_pitch, "isFixedPitch" ) CFF_FIELD_FIXED ( 0x102, italic_angle, "ItalicAngle" ) - CFF_FIELD_FIXED ( 0x103, underline_position, "UnderlinePosition" ) - CFF_FIELD_FIXED ( 0x104, underline_thickness, "UnderlineThickness" ) + CFF_FIELD_NUM ( 0x103, underline_position, "UnderlinePosition" ) + CFF_FIELD_NUM ( 0x104, underline_thickness, "UnderlineThickness" ) CFF_FIELD_NUM ( 0x105, paint_type, "PaintType" ) CFF_FIELD_NUM ( 0x106, charstring_type, "CharstringType" ) CFF_FIELD_CALLBACK( 0x107, font_matrix, "FontMatrix" ) diff --git a/thirdparty/freetype/src/cid/ciderrs.h b/thirdparty/freetype/src/cid/ciderrs.h index 1591979d37..00497b796b 100644 --- a/thirdparty/freetype/src/cid/ciderrs.h +++ b/thirdparty/freetype/src/cid/ciderrs.h @@ -4,7 +4,7 @@ * * CID error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidgload.c b/thirdparty/freetype/src/cid/cidgload.c index 249ede5757..cc68b4a960 100644 --- a/thirdparty/freetype/src/cid/cidgload.c +++ b/thirdparty/freetype/src/cid/cidgload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 Glyph Loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -193,6 +193,37 @@ p = (FT_Byte*)glyph_data.pointer; fd_select = cid_get_offset( &p, cid->fd_bytes ); + if ( fd_select >= cid->num_dicts ) + { + /* + * fd_select == 0xFF is often used to indicate that the CID + * has no charstring to be rendered, similar to GID = 0xFFFF + * in TrueType fonts. + */ + if ( ( cid->fd_bytes == 1 && fd_select == 0xFFU ) || + ( cid->fd_bytes == 2 && fd_select == 0xFFFFU ) ) + { + FT_TRACE1(( "cid_load_glyph: fail for glyph index %u:\n", + glyph_index )); + FT_TRACE1(( " FD number %lu is the maximum\n", + fd_select )); + FT_TRACE1(( " integer fitting into %u byte%s\n", + cid->fd_bytes, cid->fd_bytes == 1 ? "" : "s" )); + } + else + { + FT_TRACE0(( "cid_load_glyph: fail for glyph index %u:\n", + glyph_index )); + FT_TRACE0(( " FD number %lu is larger\n", + fd_select )); + FT_TRACE0(( " than number of dictionaries (%u)\n", + cid->num_dicts )); + } + + error = FT_THROW( Invalid_Offset ); + goto Exit; + } + glyph_length = glyph_data.length - cid->fd_bytes; if ( !FT_QALLOC( charstring, glyph_length ) ) diff --git a/thirdparty/freetype/src/cid/cidgload.h b/thirdparty/freetype/src/cid/cidgload.h index cef96073de..51b16c7594 100644 --- a/thirdparty/freetype/src/cid/cidgload.h +++ b/thirdparty/freetype/src/cid/cidgload.h @@ -4,7 +4,7 @@ * * OpenType Glyph Loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidload.c b/thirdparty/freetype/src/cid/cidload.c index bb1bf13e22..1a0e6b1561 100644 --- a/thirdparty/freetype/src/cid/cidload.c +++ b/thirdparty/freetype/src/cid/cidload.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidload.h b/thirdparty/freetype/src/cid/cidload.h index 659dd0e378..cef7d1c9a6 100644 --- a/thirdparty/freetype/src/cid/cidload.h +++ b/thirdparty/freetype/src/cid/cidload.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 font loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidobjs.c b/thirdparty/freetype/src/cid/cidobjs.c index 634bbf2f13..2d11609598 100644 --- a/thirdparty/freetype/src/cid/cidobjs.c +++ b/thirdparty/freetype/src/cid/cidobjs.c @@ -4,7 +4,7 @@ * * CID objects manager (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidobjs.h b/thirdparty/freetype/src/cid/cidobjs.h index 800268efa2..4066462312 100644 --- a/thirdparty/freetype/src/cid/cidobjs.h +++ b/thirdparty/freetype/src/cid/cidobjs.h @@ -4,7 +4,7 @@ * * CID objects manager (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidparse.c b/thirdparty/freetype/src/cid/cidparse.c index 4d1ba33596..fb936bd48d 100644 --- a/thirdparty/freetype/src/cid/cidparse.c +++ b/thirdparty/freetype/src/cid/cidparse.c @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidparse.h b/thirdparty/freetype/src/cid/cidparse.h index 6ae2e54239..555245230b 100644 --- a/thirdparty/freetype/src/cid/cidparse.h +++ b/thirdparty/freetype/src/cid/cidparse.h @@ -4,7 +4,7 @@ * * CID-keyed Type1 parser (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidriver.c b/thirdparty/freetype/src/cid/cidriver.c index a3a587c57b..ab188776e2 100644 --- a/thirdparty/freetype/src/cid/cidriver.c +++ b/thirdparty/freetype/src/cid/cidriver.c @@ -4,7 +4,7 @@ * * CID driver interface (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidriver.h b/thirdparty/freetype/src/cid/cidriver.h index 55d0b8a0d9..a4ddccec80 100644 --- a/thirdparty/freetype/src/cid/cidriver.h +++ b/thirdparty/freetype/src/cid/cidriver.h @@ -4,7 +4,7 @@ * * High-level CID driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/cid/cidtoken.h b/thirdparty/freetype/src/cid/cidtoken.h index 25ba74fed9..22136310cd 100644 --- a/thirdparty/freetype/src/cid/cidtoken.h +++ b/thirdparty/freetype/src/cid/cidtoken.h @@ -4,7 +4,7 @@ * * CID token definitions (specification only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -47,7 +47,7 @@ T1_FIELD_STRING( "FullName", full_name, 0 ) T1_FIELD_STRING( "FamilyName", family_name, 0 ) T1_FIELD_STRING( "Weight", weight, 0 ) - T1_FIELD_NUM ( "ItalicAngle", italic_angle, 0 ) + T1_FIELD_FIXED ( "ItalicAngle", italic_angle, 0 ) T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch, 0 ) T1_FIELD_NUM ( "UnderlinePosition", underline_position, 0 ) T1_FIELD_NUM ( "UnderlineThickness", underline_thickness, 0 ) diff --git a/thirdparty/freetype/src/cid/type1cid.c b/thirdparty/freetype/src/cid/type1cid.c index 1291ba7a2a..fbcce4f70b 100644 --- a/thirdparty/freetype/src/cid/type1cid.c +++ b/thirdparty/freetype/src/cid/type1cid.c @@ -4,7 +4,7 @@ * * FreeType OpenType driver component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/gxvalid/gxvalid.c b/thirdparty/freetype/src/gxvalid/gxvalid.c index d3f2d12dc9..93c10f127d 100644 --- a/thirdparty/freetype/src/gxvalid/gxvalid.c +++ b/thirdparty/freetype/src/gxvalid/gxvalid.c @@ -4,7 +4,7 @@ * * FreeType validator for TrueTypeGX/AAT tables (body only). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvalid.h b/thirdparty/freetype/src/gxvalid/gxvalid.h index a9537a1560..ee76946147 100644 --- a/thirdparty/freetype/src/gxvalid/gxvalid.h +++ b/thirdparty/freetype/src/gxvalid/gxvalid.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT table validation (specification only). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvbsln.c b/thirdparty/freetype/src/gxvalid/gxvbsln.c index 28f1873b09..9b9c10b980 100644 --- a/thirdparty/freetype/src/gxvalid/gxvbsln.c +++ b/thirdparty/freetype/src/gxvalid/gxvbsln.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT bsln table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvcommn.c b/thirdparty/freetype/src/gxvalid/gxvcommn.c index f666404440..111db5c693 100644 --- a/thirdparty/freetype/src/gxvalid/gxvcommn.c +++ b/thirdparty/freetype/src/gxvalid/gxvcommn.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common tables validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvcommn.h b/thirdparty/freetype/src/gxvalid/gxvcommn.h index 1e19ccfb6b..cc95c4cece 100644 --- a/thirdparty/freetype/src/gxvalid/gxvcommn.h +++ b/thirdparty/freetype/src/gxvalid/gxvcommn.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common tables validation (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxverror.h b/thirdparty/freetype/src/gxvalid/gxverror.h index 73acb7fa41..90a6eda03e 100644 --- a/thirdparty/freetype/src/gxvalid/gxverror.h +++ b/thirdparty/freetype/src/gxvalid/gxverror.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT validation module error codes (specification only). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvfeat.c b/thirdparty/freetype/src/gxvalid/gxvfeat.c index 5d4aca04c6..826f3eedf5 100644 --- a/thirdparty/freetype/src/gxvalid/gxvfeat.c +++ b/thirdparty/freetype/src/gxvalid/gxvfeat.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT feat table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvfeat.h b/thirdparty/freetype/src/gxvalid/gxvfeat.h index 6a0cbea35a..9d34b701a2 100644 --- a/thirdparty/freetype/src/gxvalid/gxvfeat.h +++ b/thirdparty/freetype/src/gxvalid/gxvfeat.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT feat table validation (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvfgen.c b/thirdparty/freetype/src/gxvalid/gxvfgen.c index 13a88826b7..d0c53ca526 100644 --- a/thirdparty/freetype/src/gxvalid/gxvfgen.c +++ b/thirdparty/freetype/src/gxvalid/gxvfgen.c @@ -5,7 +5,7 @@ * Generate feature registry data for gxv `feat' validator. * This program is derived from gxfeatreg.c in gxlayout. * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Masatake YAMATO and Redhat K.K. * * This file may only be used, diff --git a/thirdparty/freetype/src/gxvalid/gxvjust.c b/thirdparty/freetype/src/gxvalid/gxvjust.c index 1b3a8b1ac1..c5177522e3 100644 --- a/thirdparty/freetype/src/gxvalid/gxvjust.c +++ b/thirdparty/freetype/src/gxvalid/gxvjust.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT just table validation (body). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvkern.c b/thirdparty/freetype/src/gxvalid/gxvkern.c index 222fd038ca..f1f8ce7cd3 100644 --- a/thirdparty/freetype/src/gxvalid/gxvkern.c +++ b/thirdparty/freetype/src/gxvalid/gxvkern.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT kern table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvlcar.c b/thirdparty/freetype/src/gxvalid/gxvlcar.c index 4882df4249..7b90d43a7b 100644 --- a/thirdparty/freetype/src/gxvalid/gxvlcar.c +++ b/thirdparty/freetype/src/gxvalid/gxvlcar.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT lcar table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmod.c b/thirdparty/freetype/src/gxvalid/gxvmod.c index 4f27c5a8a9..89e142be5d 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmod.c +++ b/thirdparty/freetype/src/gxvalid/gxvmod.c @@ -4,7 +4,7 @@ * * FreeType's TrueTypeGX/AAT validation module implementation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmod.h b/thirdparty/freetype/src/gxvalid/gxvmod.h index 39a375d978..51e339e00b 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmod.h +++ b/thirdparty/freetype/src/gxvalid/gxvmod.h @@ -5,7 +5,7 @@ * FreeType's TrueTypeGX/AAT validation module implementation * (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort.c b/thirdparty/freetype/src/gxvalid/gxvmort.c index 846ac48b99..de03f2e388 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT mort table validation (body). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort.h b/thirdparty/freetype/src/gxvalid/gxvmort.h index 66d46a072b..3db0d2a61e 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort.h +++ b/thirdparty/freetype/src/gxvalid/gxvmort.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common definition for mort table (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort0.c b/thirdparty/freetype/src/gxvalid/gxvmort0.c index 5817c27d7a..78b042d5de 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort0.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort0.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type0 (Indic Script Rearrangement) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort1.c b/thirdparty/freetype/src/gxvalid/gxvmort1.c index 20cccadf17..57ee197d48 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort1.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort1.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type1 (Contextual Substitution) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort2.c b/thirdparty/freetype/src/gxvalid/gxvmort2.c index 80aabbc9c5..e982a67bf5 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort2.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort2.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type2 (Ligature Substitution) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort4.c b/thirdparty/freetype/src/gxvalid/gxvmort4.c index 40ed730071..2ad0632fa5 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort4.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort4.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type4 (Non-Contextual Glyph Substitution) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmort5.c b/thirdparty/freetype/src/gxvalid/gxvmort5.c index 1b274be3b6..613debd453 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmort5.c +++ b/thirdparty/freetype/src/gxvalid/gxvmort5.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT mort table validation * body for type5 (Contextual Glyph Insertion) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx.c b/thirdparty/freetype/src/gxvalid/gxvmorx.c index 931e57b00c..9efe182038 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT morx table validation (body). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx.h b/thirdparty/freetype/src/gxvalid/gxvmorx.h index 2b8bf3575d..60b084a8d0 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx.h +++ b/thirdparty/freetype/src/gxvalid/gxvmorx.h @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT common definition for morx table (specification). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx0.c b/thirdparty/freetype/src/gxvalid/gxvmorx0.c index 0085ac92f1..54cded1f64 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx0.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx0.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type0 (Indic Script Rearrangement) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx1.c b/thirdparty/freetype/src/gxvalid/gxvmorx1.c index b495412ffc..56a64c257c 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx1.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx1.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type1 (Contextual Substitution) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx2.c b/thirdparty/freetype/src/gxvalid/gxvmorx2.c index 0527161dc3..be333e0424 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx2.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx2.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type2 (Ligature Substitution) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx4.c b/thirdparty/freetype/src/gxvalid/gxvmorx4.c index e6e99fcb74..9af41f4bf5 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx4.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx4.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvmorx5.c b/thirdparty/freetype/src/gxvalid/gxvmorx5.c index 7dec9a9015..edc3f3bc01 100644 --- a/thirdparty/freetype/src/gxvalid/gxvmorx5.c +++ b/thirdparty/freetype/src/gxvalid/gxvmorx5.c @@ -5,7 +5,7 @@ * TrueTypeGX/AAT morx table validation * body for type5 (Contextual Glyph Insertion) subtable. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvopbd.c b/thirdparty/freetype/src/gxvalid/gxvopbd.c index 65003100ca..265ad39a2c 100644 --- a/thirdparty/freetype/src/gxvalid/gxvopbd.c +++ b/thirdparty/freetype/src/gxvalid/gxvopbd.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT opbd table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvprop.c b/thirdparty/freetype/src/gxvalid/gxvprop.c index 31f2b5eb30..f27ce103c4 100644 --- a/thirdparty/freetype/src/gxvalid/gxvprop.c +++ b/thirdparty/freetype/src/gxvalid/gxvprop.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT prop table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gxvalid/gxvtrak.c b/thirdparty/freetype/src/gxvalid/gxvtrak.c index 329f12729d..06300beff3 100644 --- a/thirdparty/freetype/src/gxvalid/gxvtrak.c +++ b/thirdparty/freetype/src/gxvalid/gxvtrak.c @@ -4,7 +4,7 @@ * * TrueTypeGX/AAT trak table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * suzuki toshiya, Masatake YAMATO, Red Hat K.K., * David Turner, Robert Wilhelm, and Werner Lemberg. * diff --git a/thirdparty/freetype/src/gzip/ftgzip.c b/thirdparty/freetype/src/gzip/ftgzip.c index ffa3824d44..4a5ec87297 100644 --- a/thirdparty/freetype/src/gzip/ftgzip.c +++ b/thirdparty/freetype/src/gzip/ftgzip.c @@ -8,7 +8,7 @@ * parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/lzw/ftlzw.c b/thirdparty/freetype/src/lzw/ftlzw.c index 09de4a10f5..ce5070d75f 100644 --- a/thirdparty/freetype/src/lzw/ftlzw.c +++ b/thirdparty/freetype/src/lzw/ftlzw.c @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * Albert Chin-A-Young. * * based on code in `src/gzip/ftgzip.c' diff --git a/thirdparty/freetype/src/lzw/ftzopen.c b/thirdparty/freetype/src/lzw/ftzopen.c index 1dffedd03d..3a42824902 100644 --- a/thirdparty/freetype/src/lzw/ftzopen.c +++ b/thirdparty/freetype/src/lzw/ftzopen.c @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/lzw/ftzopen.h b/thirdparty/freetype/src/lzw/ftzopen.h index e362a5366d..9c06b367d8 100644 --- a/thirdparty/freetype/src/lzw/ftzopen.h +++ b/thirdparty/freetype/src/lzw/ftzopen.h @@ -8,7 +8,7 @@ * be used to parse compressed PCF fonts, as found with many X11 server * distributions. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvalid.c b/thirdparty/freetype/src/otvalid/otvalid.c index 6ca90581ef..e68a0823fe 100644 --- a/thirdparty/freetype/src/otvalid/otvalid.c +++ b/thirdparty/freetype/src/otvalid/otvalid.c @@ -4,7 +4,7 @@ * * FreeType validator for OpenType tables (body only). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvalid.h b/thirdparty/freetype/src/otvalid/otvalid.h index 2b5598e0cd..6ab7c65cb4 100644 --- a/thirdparty/freetype/src/otvalid/otvalid.h +++ b/thirdparty/freetype/src/otvalid/otvalid.h @@ -4,7 +4,7 @@ * * OpenType table validation (specification only). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvbase.c b/thirdparty/freetype/src/otvalid/otvbase.c index cbaf4c27ce..8cea131939 100644 --- a/thirdparty/freetype/src/otvalid/otvbase.c +++ b/thirdparty/freetype/src/otvalid/otvbase.c @@ -4,7 +4,7 @@ * * OpenType BASE table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvcommn.c b/thirdparty/freetype/src/otvalid/otvcommn.c index d6ca7eefe0..a6771c7826 100644 --- a/thirdparty/freetype/src/otvalid/otvcommn.c +++ b/thirdparty/freetype/src/otvalid/otvcommn.c @@ -4,7 +4,7 @@ * * OpenType common tables validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -390,7 +390,7 @@ } - /* uses valid->lookup_count */ + /* sets otvalid->lookup_count */ FT_LOCAL_DEF( void ) otv_LookupList_validate( FT_Bytes table, @@ -488,7 +488,7 @@ OTV_TRACE(( " (FeatureCount = %u)\n", FeatureCount )); - OTV_LIMIT_CHECK( FeatureCount * 2 ); + OTV_LIMIT_CHECK( FeatureCount * 6 ); otvalid->lookup_count = otv_LookupList_get_count( lookups ); @@ -846,7 +846,7 @@ } - /* sets otvalid->extra1 (valid->lookup_count) */ + /* sets otvalid->extra1 (otvalid->lookup_count) */ FT_LOCAL_DEF( void ) otv_u_O_O_x_Onx( FT_Bytes table, @@ -874,7 +874,7 @@ OTV_LIMIT_CHECK( ClassSetCount * 2 ); otvalid->nesting_level++; - func = otvalid->func[otvalid->nesting_level]; + func = otvalid->func[otvalid->nesting_level]; otvalid->extra1 = otvalid->lookup_count; for ( ; ClassSetCount > 0; ClassSetCount-- ) @@ -931,7 +931,7 @@ } - /* sets otvalid->extra1 (valid->lookup_count) */ + /* sets otvalid->extra1 (otvalid->lookup_count) */ FT_LOCAL_DEF( void ) otv_u_O_O_O_O_x_Onx( FT_Bytes table, @@ -966,7 +966,7 @@ OTV_LIMIT_CHECK( ChainClassSetCount * 2 ); otvalid->nesting_level++; - func = otvalid->func[otvalid->nesting_level]; + func = otvalid->func[otvalid->nesting_level]; otvalid->extra1 = otvalid->lookup_count; for ( ; ChainClassSetCount > 0; ChainClassSetCount-- ) diff --git a/thirdparty/freetype/src/otvalid/otvcommn.h b/thirdparty/freetype/src/otvalid/otvcommn.h index 20f38b495b..4648e70dee 100644 --- a/thirdparty/freetype/src/otvalid/otvcommn.h +++ b/thirdparty/freetype/src/otvalid/otvcommn.h @@ -4,7 +4,7 @@ * * OpenType common tables validation (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otverror.h b/thirdparty/freetype/src/otvalid/otverror.h index 17fb5fb840..d1c2c4b56c 100644 --- a/thirdparty/freetype/src/otvalid/otverror.h +++ b/thirdparty/freetype/src/otvalid/otverror.h @@ -4,7 +4,7 @@ * * OpenType validation module error codes (specification only). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvgdef.c b/thirdparty/freetype/src/otvalid/otvgdef.c index cee0601485..08d0a68d68 100644 --- a/thirdparty/freetype/src/otvalid/otvgdef.c +++ b/thirdparty/freetype/src/otvalid/otvgdef.c @@ -4,7 +4,7 @@ * * OpenType GDEF table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -41,7 +41,7 @@ #define AttachListFunc otv_O_x_Ox #define LigCaretListFunc otv_O_x_Ox - /* sets valid->extra1 (0) */ + /* sets otvalid->extra1 (0) */ static void otv_O_x_Ox( FT_Bytes table, diff --git a/thirdparty/freetype/src/otvalid/otvgpos.c b/thirdparty/freetype/src/otvalid/otvgpos.c index e0d860801e..b9e36bd833 100644 --- a/thirdparty/freetype/src/otvalid/otvgpos.c +++ b/thirdparty/freetype/src/otvalid/otvgpos.c @@ -4,7 +4,7 @@ * * OpenType GPOS table validation (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -33,11 +33,11 @@ static void otv_Anchor_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); static void otv_MarkArray_validate( FT_Bytes table, - OTV_Validator valid ); + OTV_Validator otvalid ); /*************************************************************************/ @@ -52,8 +52,8 @@ #define LigatureAttachFunc otv_x_sxy #define Mark2ArrayFunc otv_x_sxy - /* uses valid->extra1 (counter) */ - /* uses valid->extra2 (boolean to handle NULL anchor field) */ + /* uses otvalid->extra1 (counter) */ + /* uses otvalid->extra2 (boolean to handle NULL anchor field) */ static void otv_x_sxy( FT_Bytes table, diff --git a/thirdparty/freetype/src/otvalid/otvgpos.h b/thirdparty/freetype/src/otvalid/otvgpos.h index 2fc1309e1c..8539801fd9 100644 --- a/thirdparty/freetype/src/otvalid/otvgpos.h +++ b/thirdparty/freetype/src/otvalid/otvgpos.h @@ -4,7 +4,7 @@ * * OpenType GPOS table validator (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvgsub.c b/thirdparty/freetype/src/otvalid/otvgsub.c index 0df97d8dbb..2669be37c9 100644 --- a/thirdparty/freetype/src/otvalid/otvgsub.c +++ b/thirdparty/freetype/src/otvalid/otvgsub.c @@ -4,7 +4,7 @@ * * OpenType GSUB table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvjstf.c b/thirdparty/freetype/src/otvalid/otvjstf.c index 8909612d9f..6706e1a7f8 100644 --- a/thirdparty/freetype/src/otvalid/otvjstf.c +++ b/thirdparty/freetype/src/otvalid/otvjstf.c @@ -4,7 +4,7 @@ * * OpenType JSTF table validation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvmath.c b/thirdparty/freetype/src/otvalid/otvmath.c index 78e6c66926..80d78890be 100644 --- a/thirdparty/freetype/src/otvalid/otvmath.c +++ b/thirdparty/freetype/src/otvalid/otvmath.c @@ -4,7 +4,7 @@ * * OpenType MATH table validation (body). * - * Copyright (C) 2007-2025 by + * Copyright (C) 2007-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by George Williams. diff --git a/thirdparty/freetype/src/otvalid/otvmod.c b/thirdparty/freetype/src/otvalid/otvmod.c index d2456cb58f..946c81902f 100644 --- a/thirdparty/freetype/src/otvalid/otvmod.c +++ b/thirdparty/freetype/src/otvalid/otvmod.c @@ -4,7 +4,7 @@ * * FreeType's OpenType validation module implementation (body). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/otvalid/otvmod.h b/thirdparty/freetype/src/otvalid/otvmod.h index aec6f66574..f00f98f125 100644 --- a/thirdparty/freetype/src/otvalid/otvmod.h +++ b/thirdparty/freetype/src/otvalid/otvmod.h @@ -5,7 +5,7 @@ * FreeType's OpenType validation module implementation * (specification). * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pcf/pcfdrivr.c b/thirdparty/freetype/src/pcf/pcfdrivr.c index ecd6849516..6d65c6909e 100644 --- a/thirdparty/freetype/src/pcf/pcfdrivr.c +++ b/thirdparty/freetype/src/pcf/pcfdrivr.c @@ -378,6 +378,8 @@ THE SOFTWARE. } error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL ); + if ( error ) + PCF_Face_Done( face ); } } @@ -529,7 +531,7 @@ THE SOFTWARE. /* XXX: to do: are there cases that need repadding the bitmap? */ bytes = (FT_ULong)bitmap->pitch * bitmap->rows; - error = ft_glyphslot_alloc_bitmap( slot, (FT_ULong)bytes ); + error = ft_glyphslot_alloc_bitmap( slot ); if ( error ) goto Exit; diff --git a/thirdparty/freetype/src/pfr/pfr.c b/thirdparty/freetype/src/pfr/pfr.c index ecfc4f22c8..260c2703ce 100644 --- a/thirdparty/freetype/src/pfr/pfr.c +++ b/thirdparty/freetype/src/pfr/pfr.c @@ -4,7 +4,7 @@ * * FreeType PFR driver component. * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrcmap.c b/thirdparty/freetype/src/pfr/pfrcmap.c index 489b1a5ddd..786aaa1163 100644 --- a/thirdparty/freetype/src/pfr/pfrcmap.c +++ b/thirdparty/freetype/src/pfr/pfrcmap.c @@ -4,7 +4,7 @@ * * FreeType PFR cmap handling (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrcmap.h b/thirdparty/freetype/src/pfr/pfrcmap.h index acf4b508da..9ebb3f23da 100644 --- a/thirdparty/freetype/src/pfr/pfrcmap.h +++ b/thirdparty/freetype/src/pfr/pfrcmap.h @@ -4,7 +4,7 @@ * * FreeType PFR cmap handling (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrdrivr.c b/thirdparty/freetype/src/pfr/pfrdrivr.c index 268924b506..31f3509bb7 100644 --- a/thirdparty/freetype/src/pfr/pfrdrivr.c +++ b/thirdparty/freetype/src/pfr/pfrdrivr.c @@ -4,7 +4,7 @@ * * FreeType PFR driver interface (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrdrivr.h b/thirdparty/freetype/src/pfr/pfrdrivr.h index 61aadb9738..2c75a14d78 100644 --- a/thirdparty/freetype/src/pfr/pfrdrivr.h +++ b/thirdparty/freetype/src/pfr/pfrdrivr.h @@ -4,7 +4,7 @@ * * High-level Type PFR driver interface (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrerror.h b/thirdparty/freetype/src/pfr/pfrerror.h index 479e3728f4..78cbac32f8 100644 --- a/thirdparty/freetype/src/pfr/pfrerror.h +++ b/thirdparty/freetype/src/pfr/pfrerror.h @@ -4,7 +4,7 @@ * * PFR error codes (specification only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrgload.c b/thirdparty/freetype/src/pfr/pfrgload.c index a694ba1810..68849b4a11 100644 --- a/thirdparty/freetype/src/pfr/pfrgload.c +++ b/thirdparty/freetype/src/pfr/pfrgload.c @@ -4,7 +4,7 @@ * * FreeType PFR glyph loader (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrgload.h b/thirdparty/freetype/src/pfr/pfrgload.h index 5886ed364e..81a0532783 100644 --- a/thirdparty/freetype/src/pfr/pfrgload.h +++ b/thirdparty/freetype/src/pfr/pfrgload.h @@ -4,7 +4,7 @@ * * FreeType PFR glyph loader (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrload.c b/thirdparty/freetype/src/pfr/pfrload.c index 07867b45da..1105ba4812 100644 --- a/thirdparty/freetype/src/pfr/pfrload.c +++ b/thirdparty/freetype/src/pfr/pfrload.c @@ -4,7 +4,7 @@ * * FreeType PFR loader (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrload.h b/thirdparty/freetype/src/pfr/pfrload.h index f530a0a583..a2f3bcc3df 100644 --- a/thirdparty/freetype/src/pfr/pfrload.h +++ b/thirdparty/freetype/src/pfr/pfrload.h @@ -4,7 +4,7 @@ * * FreeType PFR loader (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrobjs.c b/thirdparty/freetype/src/pfr/pfrobjs.c index 39ad3cc7df..9fdd84a86d 100644 --- a/thirdparty/freetype/src/pfr/pfrobjs.c +++ b/thirdparty/freetype/src/pfr/pfrobjs.c @@ -4,7 +4,7 @@ * * FreeType PFR object methods (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrobjs.h b/thirdparty/freetype/src/pfr/pfrobjs.h index 850bf5b4a6..3ad74e97d3 100644 --- a/thirdparty/freetype/src/pfr/pfrobjs.h +++ b/thirdparty/freetype/src/pfr/pfrobjs.h @@ -4,7 +4,7 @@ * * FreeType PFR object methods (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrsbit.c b/thirdparty/freetype/src/pfr/pfrsbit.c index 08db4c4593..515089a65b 100644 --- a/thirdparty/freetype/src/pfr/pfrsbit.c +++ b/thirdparty/freetype/src/pfr/pfrsbit.c @@ -4,7 +4,7 @@ * * FreeType PFR bitmap loader (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -785,20 +785,15 @@ goto Exit1; /* Allocate and read bitmap data */ - { - FT_ULong len = (FT_ULong)glyph->root.bitmap.pitch * ysize; - - - error = ft_glyphslot_alloc_bitmap( &glyph->root, len ); - if ( !error ) - error = pfr_load_bitmap_bits( + error = ft_glyphslot_alloc_bitmap( &glyph->root ); + if ( !error ) + error = pfr_load_bitmap_bits( p, stream->limit, format, FT_BOOL( face->header.color_flags & PFR_FLAG_INVERT_BITMAP ), &glyph->root.bitmap ); - } } Exit1: diff --git a/thirdparty/freetype/src/pfr/pfrsbit.h b/thirdparty/freetype/src/pfr/pfrsbit.h index c5c27e36b1..639f8c8182 100644 --- a/thirdparty/freetype/src/pfr/pfrsbit.h +++ b/thirdparty/freetype/src/pfr/pfrsbit.h @@ -4,7 +4,7 @@ * * FreeType PFR bitmap loader (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pfr/pfrtypes.h b/thirdparty/freetype/src/pfr/pfrtypes.h index 83461cb16b..54cc09ca39 100644 --- a/thirdparty/freetype/src/pfr/pfrtypes.h +++ b/thirdparty/freetype/src/pfr/pfrtypes.h @@ -4,7 +4,7 @@ * * FreeType PFR data structures (specification only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/afmparse.c b/thirdparty/freetype/src/psaux/afmparse.c index b813efde4e..1cc8ab29d4 100644 --- a/thirdparty/freetype/src/psaux/afmparse.c +++ b/thirdparty/freetype/src/psaux/afmparse.c @@ -4,7 +4,7 @@ * * AFM parser (body). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/afmparse.h b/thirdparty/freetype/src/psaux/afmparse.h index add8597717..02a9617b8d 100644 --- a/thirdparty/freetype/src/psaux/afmparse.h +++ b/thirdparty/freetype/src/psaux/afmparse.h @@ -4,7 +4,7 @@ * * AFM parser (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/cffdecode.c b/thirdparty/freetype/src/psaux/cffdecode.c index 17bdd23c7d..908a811261 100644 --- a/thirdparty/freetype/src/psaux/cffdecode.c +++ b/thirdparty/freetype/src/psaux/cffdecode.c @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (body). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/cffdecode.h b/thirdparty/freetype/src/psaux/cffdecode.h index e72ec043ba..0836a642b2 100644 --- a/thirdparty/freetype/src/psaux/cffdecode.h +++ b/thirdparty/freetype/src/psaux/cffdecode.h @@ -4,7 +4,7 @@ * * PostScript CFF (Type 2) decoding routines (specification). * - * Copyright (C) 2017-2025 by + * Copyright (C) 2017-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psaux.c b/thirdparty/freetype/src/psaux/psaux.c index 37b5f8b2c6..f0c3c2ef97 100644 --- a/thirdparty/freetype/src/psaux/psaux.c +++ b/thirdparty/freetype/src/psaux/psaux.c @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript driver component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psauxerr.h b/thirdparty/freetype/src/psaux/psauxerr.h index 0d7fe2b612..5766482d1b 100644 --- a/thirdparty/freetype/src/psaux/psauxerr.h +++ b/thirdparty/freetype/src/psaux/psauxerr.h @@ -4,7 +4,7 @@ * * PS auxiliary module error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psauxmod.c b/thirdparty/freetype/src/psaux/psauxmod.c index 942804190c..2f9eb87484 100644 --- a/thirdparty/freetype/src/psaux/psauxmod.c +++ b/thirdparty/freetype/src/psaux/psauxmod.c @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psauxmod.h b/thirdparty/freetype/src/psaux/psauxmod.h index 4a5ebc1b60..e7fa15c34b 100644 --- a/thirdparty/freetype/src/psaux/psauxmod.h +++ b/thirdparty/freetype/src/psaux/psauxmod.h @@ -4,7 +4,7 @@ * * FreeType auxiliary PostScript module implementation (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psconv.c b/thirdparty/freetype/src/psaux/psconv.c index 4567d3f3c0..3a054cbbf6 100644 --- a/thirdparty/freetype/src/psaux/psconv.c +++ b/thirdparty/freetype/src/psaux/psconv.c @@ -4,7 +4,7 @@ * * Some convenience conversions (body). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psconv.h b/thirdparty/freetype/src/psaux/psconv.h index 63735af411..fc123faea4 100644 --- a/thirdparty/freetype/src/psaux/psconv.h +++ b/thirdparty/freetype/src/psaux/psconv.h @@ -4,7 +4,7 @@ * * Some convenience conversions (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psobjs.c b/thirdparty/freetype/src/psaux/psobjs.c index 8159fd6ef1..5019f9925c 100644 --- a/thirdparty/freetype/src/psaux/psobjs.c +++ b/thirdparty/freetype/src/psaux/psobjs.c @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/psobjs.h b/thirdparty/freetype/src/psaux/psobjs.h index 277aa1247c..04205f891b 100644 --- a/thirdparty/freetype/src/psaux/psobjs.h +++ b/thirdparty/freetype/src/psaux/psobjs.h @@ -4,7 +4,7 @@ * * Auxiliary functions for PostScript fonts (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1cmap.c b/thirdparty/freetype/src/psaux/t1cmap.c index 66493b6812..686ca7abdf 100644 --- a/thirdparty/freetype/src/psaux/t1cmap.c +++ b/thirdparty/freetype/src/psaux/t1cmap.c @@ -4,7 +4,7 @@ * * Type 1 character map support (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1cmap.h b/thirdparty/freetype/src/psaux/t1cmap.h index 114bfbb041..be66a0c7f6 100644 --- a/thirdparty/freetype/src/psaux/t1cmap.h +++ b/thirdparty/freetype/src/psaux/t1cmap.h @@ -4,7 +4,7 @@ * * Type 1 character map support (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psaux/t1decode.c b/thirdparty/freetype/src/psaux/t1decode.c index c3fb343d4c..ece512412d 100644 --- a/thirdparty/freetype/src/psaux/t1decode.c +++ b/thirdparty/freetype/src/psaux/t1decode.c @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -458,6 +458,7 @@ FT_Bool large_int; FT_Fixed seed; + FT_UInt len_buildchar; T1_Hints_Funcs hinter; #ifdef FT_DEBUG_LEVEL_TRACE @@ -483,13 +484,16 @@ hinter = (T1_Hints_Funcs)builder->hints_funcs; - /* a font that reads BuildCharArray without setting */ - /* its values first is buggy, but ... */ - FT_ASSERT( ( decoder->len_buildchar == 0 ) == - ( decoder->buildchar == NULL ) ); + /* Cache `len_buildchar` locally so that a stray write to the */ + /* decoder structure during charstring processing cannot bypass */ + /* the bounds checks in callothersubr 19/24/25 handlers. */ + len_buildchar = decoder->len_buildchar; - if ( decoder->buildchar && decoder->len_buildchar > 0 ) - FT_ARRAY_ZERO( decoder->buildchar, decoder->len_buildchar ); + FT_ASSERT( ( len_buildchar == 0 ) == + ( decoder->buildchar == NULL ) ); + + if ( decoder->buildchar && len_buildchar > 0 ) + FT_ARRAY_ZERO( decoder->buildchar, len_buildchar ); zone->base = charstring_base; limit = zone->limit = charstring_base + charstring_len; @@ -969,8 +973,8 @@ idx = Fix2Int( top[0] ); - if ( idx < 0 || - (FT_UInt)idx + blend->num_designs > decoder->len_buildchar ) + if ( idx < 0 || + (FT_UInt)idx + blend->num_designs > len_buildchar ) goto Unexpected_OtherSubr; ft_memcpy( &decoder->buildchar[idx], @@ -1037,7 +1041,7 @@ idx = Fix2UInt( top[1] ); - if ( idx >= decoder->len_buildchar ) + if ( idx >= len_buildchar ) goto Unexpected_OtherSubr; decoder->buildchar[idx] = top[0]; @@ -1058,7 +1062,7 @@ idx = Fix2UInt( top[0] ); - if ( idx >= decoder->len_buildchar ) + if ( idx >= len_buildchar ) goto Unexpected_OtherSubr; top[0] = decoder->buildchar[idx]; @@ -1204,14 +1208,14 @@ #ifdef FT_DEBUG_LEVEL_TRACE - if ( decoder->len_buildchar > 0 ) + if ( len_buildchar > 0 ) { FT_UInt i; FT_TRACE4(( "BuildCharArray = [ " )); - for ( i = 0; i < decoder->len_buildchar; i++ ) + for ( i = 0; i < len_buildchar; i++ ) FT_TRACE4(( "%ld ", decoder->buildchar[i] )); FT_TRACE4(( "]\n" )); @@ -1523,6 +1527,15 @@ goto Syntax_Error; } + /* Ensure that popping an unknown 'othersubr' result does not */ + /* push the stack pointer past the end of the stack array. */ + if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS ) + { + FT_ERROR(( "t1_decoder_parse_charstrings:" + " stack overflow in pop\n" )); + goto Syntax_Error; + } + unknown_othersubr_result_cnt--; top++; /* `push' the operand to callothersubr onto the stack */ break; diff --git a/thirdparty/freetype/src/psaux/t1decode.h b/thirdparty/freetype/src/psaux/t1decode.h index 7b913f55df..1b5d5205a8 100644 --- a/thirdparty/freetype/src/psaux/t1decode.h +++ b/thirdparty/freetype/src/psaux/t1decode.h @@ -4,7 +4,7 @@ * * PostScript Type 1 decoding routines (specification). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshalgo.c b/thirdparty/freetype/src/pshinter/pshalgo.c index ca30702321..f169fc3459 100644 --- a/thirdparty/freetype/src/pshinter/pshalgo.c +++ b/thirdparty/freetype/src/pshinter/pshalgo.c @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (body). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used @@ -35,10 +35,6 @@ #endif -#define COMPUTE_INFLEXS /* compute inflection points to optimize `S' */ - /* and similar glyphs */ - - /*************************************************************************/ /*************************************************************************/ /***** *****/ @@ -920,117 +916,6 @@ #define psh_corner_orientation ft_corner_orientation -#ifdef COMPUTE_INFLEXS - - /* compute all inflex points in a given glyph */ - static void - psh_glyph_compute_inflections( PSH_Glyph glyph ) - { - FT_UInt n; - - - for ( n = 0; n < glyph->num_contours; n++ ) - { - PSH_Point first, start, end, before, after; - FT_Pos in_x, in_y, out_x, out_y; - FT_Int orient_prev, orient_cur; - FT_Int finished = 0; - - - /* we need at least 4 points to create an inflection point */ - if ( glyph->contours[n].count < 4 ) - continue; - - /* compute first segment in contour */ - first = glyph->contours[n].start; - - start = end = first; - do - { - end = end->next; - if ( end == first ) - goto Skip; - - in_x = end->org_u - start->org_u; - in_y = end->org_v - start->org_v; - - } while ( in_x == 0 && in_y == 0 ); - - /* extend the segment start whenever possible */ - before = start; - do - { - do - { - start = before; - before = before->prev; - if ( before == first ) - goto Skip; - - out_x = start->org_u - before->org_u; - out_y = start->org_v - before->org_v; - - } while ( out_x == 0 && out_y == 0 ); - - orient_prev = psh_corner_orientation( in_x, in_y, out_x, out_y ); - - } while ( orient_prev == 0 ); - - first = start; - in_x = out_x; - in_y = out_y; - - /* now, process all segments in the contour */ - do - { - /* first, extend current segment's end whenever possible */ - after = end; - do - { - do - { - end = after; - after = after->next; - if ( after == first ) - finished = 1; - - out_x = after->org_u - end->org_u; - out_y = after->org_v - end->org_v; - - } while ( out_x == 0 && out_y == 0 ); - - orient_cur = psh_corner_orientation( in_x, in_y, out_x, out_y ); - - } while ( orient_cur == 0 ); - - if ( ( orient_cur ^ orient_prev ) < 0 ) - { - do - { - psh_point_set_inflex( start ); - start = start->next; - } - while ( start != end ); - - psh_point_set_inflex( start ); - } - - start = end; - end = after; - orient_prev = orient_cur; - in_x = out_x; - in_y = out_y; - - } while ( !finished ); - - Skip: - ; - } - } - -#endif /* COMPUTE_INFLEXS */ - - static void psh_glyph_done( PSH_Glyph glyph ) { @@ -1258,11 +1143,6 @@ glyph->outline = outline; glyph->globals = globals; -#ifdef COMPUTE_INFLEXS - psh_glyph_load_points( glyph, 0 ); - psh_glyph_compute_inflections( glyph ); -#endif /* COMPUTE_INFLEXS */ - /* now deal with hints tables */ error = psh_hint_table_init( &glyph->hint_tables [0], &ps_hints->dimension[0].hints, @@ -1285,122 +1165,47 @@ } - /* compute all extrema in a glyph for a given dimension */ + /* compute all extreme and inflection points */ + /* in a glyph for a given dimension */ static void psh_glyph_compute_extrema( PSH_Glyph glyph ) { FT_UInt n; - /* first of all, compute all local extrema */ for ( n = 0; n < glyph->num_contours; n++ ) { - PSH_Point first = glyph->contours[n].start; - PSH_Point point, before, after; + PSH_Point first, point, before, after; - if ( glyph->contours[n].count == 0 ) + /* we need at least 3 points to create an extremum */ + if ( glyph->contours[n].count < 3 ) continue; - point = first; - before = point; + first = glyph->contours[n].start; + point = first->prev; + after = first; do { - before = before->prev; - if ( before == first ) - goto Skip; - - } while ( before->org_u == point->org_u ); - - first = point = before->next; - - for (;;) - { - after = point; - do - { - after = after->next; - if ( after == first ) - goto Next; - - } while ( after->org_u == point->org_u ); - - if ( before->org_u < point->org_u ) - { - if ( after->org_u < point->org_u ) - { - /* local maximum */ - goto Extremum; - } - } - else /* before->org_u > point->org_u */ - { - if ( after->org_u > point->org_u ) - { - /* local minimum */ - Extremum: - do - { - psh_point_set_extremum( point ); - point = point->next; - - } while ( point != after ); - } - } - - before = after->prev; + before = point; point = after; + after = point->next; - } /* for */ + if ( ( before->org_u < point->org_u && point->org_u < after->org_u ) || + ( before->org_u > point->org_u && point->org_u > after->org_u ) ) + continue; - Next: - ; - } + /* otherwise this is either extremum or inflection point */ + psh_point_set_extremum( point ); - /* for each extremum, determine its direction along the */ - /* orthogonal axis */ - for ( n = 0; n < glyph->num_points; n++ ) - { - PSH_Point point, before, after; + /* also note its direction */ + if ( before->org_v < after->org_v ) + psh_point_set_positive( point ); + else if ( before->org_v > after->org_v ) + psh_point_set_negative( point ); - - point = &glyph->points[n]; - before = point; - after = point; - - if ( psh_point_is_extremum( point ) ) - { - do - { - before = before->prev; - if ( before == point ) - goto Skip; - - } while ( before->org_v == point->org_v ); - - do - { - after = after->next; - if ( after == point ) - goto Skip; - - } while ( after->org_v == point->org_v ); - } - - if ( before->org_v < point->org_v && - after->org_v > point->org_v ) - { - psh_point_set_positive( point ); - } - else if ( before->org_v > point->org_v && - after->org_v < point->org_v ) - { - psh_point_set_negative( point ); - } - - Skip: - ; + } while ( after != first ); } } @@ -1836,8 +1641,7 @@ point->dir_in != point->dir_out ) continue; - if ( !psh_point_is_extremum( point ) && - !psh_point_is_inflex( point ) ) + if ( !psh_point_is_extremum( point ) ) continue; point->flags &= ~PSH_POINT_SMOOTH; diff --git a/thirdparty/freetype/src/pshinter/pshalgo.h b/thirdparty/freetype/src/pshinter/pshalgo.h index f4aa854055..95d41b49aa 100644 --- a/thirdparty/freetype/src/pshinter/pshalgo.h +++ b/thirdparty/freetype/src/pshinter/pshalgo.h @@ -4,7 +4,7 @@ * * PostScript hinting algorithm (specification). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshglob.c b/thirdparty/freetype/src/pshinter/pshglob.c index 521a5ff6c5..2e4efea068 100644 --- a/thirdparty/freetype/src/pshinter/pshglob.c +++ b/thirdparty/freetype/src/pshinter/pshglob.c @@ -5,7 +5,7 @@ * PostScript hinter global hinting management (body). * Inspired by the new auto-hinter module. * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used @@ -376,36 +376,24 @@ /* not. We simply need to compare the vertical scale */ /* parameter to the raw bluescale value. Here is why: */ /* */ - /* We need to suppress overshoots for all pointsizes. */ - /* At 300dpi that satisfies: */ + /* The specs explain how the bluescale is calculated */ + /* from the desired maximum rounded pointsize at 300 dpi */ + /* and assuming upem of 1000. */ /* */ - /* pointsize < 240*bluescale + 0.49 */ + /* bluescale = ( pointsize - 0.49 ) / 240 */ /* */ - /* This corresponds to: */ + /* For unrounded pointsize in general terms */ /* */ - /* pixelsize < 1000*bluescale + 49/24 */ + /* bluescale = ( pointsize * dpi / 72 ) / upem */ /* */ - /* scale*EM_Size < 1000*bluescale + 49/24 */ + /* which is */ /* */ - /* However, for normal Type 1 fonts, EM_Size is 1000! */ - /* We thus only check: */ + /* bluescale = pixelsize / upem */ /* */ - /* scale < bluescale + 49/24000 */ + /* Therefore, the bluescale value can be used directly */ + /* as a scale limit, now that it is in comparable units */ /* */ - /* which we shorten to */ - /* */ - /* "scale < bluescale" */ - /* */ - /* Note that `blue_scale' is stored 1000 times its real */ - /* value, and that `scale' converts from font units to */ - /* fractional pixels. */ - /* */ - - /* 1000 / 64 = 125 / 8 */ - if ( scale >= 0x20C49BAL ) - blues->no_overshoots = FT_BOOL( scale < blues->blue_scale * 8 / 125 ); - else - blues->no_overshoots = FT_BOOL( scale * 125 < blues->blue_scale * 8 ); + blues->no_overshoots = FT_BOOL( scale < blues->blue_scale ); /* */ /* The blue threshold is the font units distance under */ @@ -420,8 +408,8 @@ FT_Int threshold = blues->blue_shift; - while ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 ) - threshold--; + if ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 ) + threshold = 32 * 0x10000L / scale; blues->blue_threshold = threshold; } @@ -708,7 +696,6 @@ /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */ { - FT_Fixed max_scale; FT_Short max_height = 1; @@ -725,11 +712,12 @@ priv->family_other_blues, max_height ); - /* BlueScale is scaled 1000 times */ - max_scale = FT_DivFix( 1000, max_height ); - globals->blues.blue_scale = priv->blue_scale < max_scale - ? priv->blue_scale - : max_scale; + /* restrict BlueScale value that is amplified 1000-fold and */ + /* rescale it to be comparable to the metrics scale */ + if ( FT_MulFix( max_height, priv->blue_scale ) < 1000 ) + globals->blues.blue_scale = priv->blue_scale * 8 / 125; + else + globals->blues.blue_scale = 64 * 0x10000L / max_height; } globals->blues.blue_shift = priv->blue_shift; diff --git a/thirdparty/freetype/src/pshinter/pshglob.h b/thirdparty/freetype/src/pshinter/pshglob.h index 555e99facb..0158b92ab9 100644 --- a/thirdparty/freetype/src/pshinter/pshglob.h +++ b/thirdparty/freetype/src/pshinter/pshglob.h @@ -4,7 +4,7 @@ * * PostScript hinter global hinting management. * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshinter.c b/thirdparty/freetype/src/pshinter/pshinter.c index 140c7b2f92..f22de34bd4 100644 --- a/thirdparty/freetype/src/pshinter/pshinter.c +++ b/thirdparty/freetype/src/pshinter/pshinter.c @@ -4,7 +4,7 @@ * * FreeType PostScript Hinting module * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshmod.c b/thirdparty/freetype/src/pshinter/pshmod.c index c9f4a94fe9..f6b2e2df94 100644 --- a/thirdparty/freetype/src/pshinter/pshmod.c +++ b/thirdparty/freetype/src/pshinter/pshmod.c @@ -4,7 +4,7 @@ * * FreeType PostScript hinter module implementation (body). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshmod.h b/thirdparty/freetype/src/pshinter/pshmod.h index de9c398e9f..d68ef9a873 100644 --- a/thirdparty/freetype/src/pshinter/pshmod.h +++ b/thirdparty/freetype/src/pshinter/pshmod.h @@ -4,7 +4,7 @@ * * PostScript hinter module interface (specification). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshnterr.h b/thirdparty/freetype/src/pshinter/pshnterr.h index 7076664ddd..96bc3a3175 100644 --- a/thirdparty/freetype/src/pshinter/pshnterr.h +++ b/thirdparty/freetype/src/pshinter/pshnterr.h @@ -4,7 +4,7 @@ * * PS Hinter error codes (specification only). * - * Copyright (C) 2003-2025 by + * Copyright (C) 2003-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshrec.c b/thirdparty/freetype/src/pshinter/pshrec.c index 13754313fb..f14c9c7cbd 100644 --- a/thirdparty/freetype/src/pshinter/pshrec.c +++ b/thirdparty/freetype/src/pshinter/pshrec.c @@ -4,7 +4,7 @@ * * FreeType PostScript hints recorder (body). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/pshinter/pshrec.h b/thirdparty/freetype/src/pshinter/pshrec.h index a79069f98d..0b644f5b96 100644 --- a/thirdparty/freetype/src/pshinter/pshrec.h +++ b/thirdparty/freetype/src/pshinter/pshrec.h @@ -4,7 +4,7 @@ * * Postscript (Type1/Type2) hints recorder (specification). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psmodule.c b/thirdparty/freetype/src/psnames/psmodule.c index c5d71edad8..5409c61faf 100644 --- a/thirdparty/freetype/src/psnames/psmodule.c +++ b/thirdparty/freetype/src/psnames/psmodule.c @@ -4,7 +4,7 @@ * * psnames module implementation (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psmodule.h b/thirdparty/freetype/src/psnames/psmodule.h index 482fd0a36d..7a619d83fb 100644 --- a/thirdparty/freetype/src/psnames/psmodule.h +++ b/thirdparty/freetype/src/psnames/psmodule.h @@ -4,7 +4,7 @@ * * High-level psnames module interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psnamerr.h b/thirdparty/freetype/src/psnames/psnamerr.h index 17987f9cd4..bef9e797c8 100644 --- a/thirdparty/freetype/src/psnames/psnamerr.h +++ b/thirdparty/freetype/src/psnames/psnamerr.h @@ -4,7 +4,7 @@ * * PS names module error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/psnames.c b/thirdparty/freetype/src/psnames/psnames.c index 77ea42c516..b0ade9874d 100644 --- a/thirdparty/freetype/src/psnames/psnames.c +++ b/thirdparty/freetype/src/psnames/psnames.c @@ -4,7 +4,7 @@ * * FreeType psnames module component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/psnames/pstables.h b/thirdparty/freetype/src/psnames/pstables.h index 65ce6c0b47..8a32aac325 100644 --- a/thirdparty/freetype/src/psnames/pstables.h +++ b/thirdparty/freetype/src/psnames/pstables.h @@ -4,7 +4,7 @@ * * PostScript glyph names. * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/ftmisc.h b/thirdparty/freetype/src/raster/ftmisc.h index 9d97223e94..cf96cd09ed 100644 --- a/thirdparty/freetype/src/raster/ftmisc.h +++ b/thirdparty/freetype/src/raster/ftmisc.h @@ -5,7 +5,7 @@ * Miscellaneous macros for stand-alone rasterizer (specification * only). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/thirdparty/freetype/src/raster/ftraster.c b/thirdparty/freetype/src/raster/ftraster.c index 807d444e7a..4165800a1a 100644 --- a/thirdparty/freetype/src/raster/ftraster.c +++ b/thirdparty/freetype/src/raster/ftraster.c @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -546,7 +546,7 @@ * */ - if ( High ) + if ( High && ras.bTop + ras.bRight < 256 ) { ras.precision_bits = 12; ras.precision_step = 256; @@ -1351,17 +1351,9 @@ /* this arc has no given direction, split it! */ Split_Conic( arc ); arc += 2; + continue; } - else if ( y1 == y3 ) - { - /* this arc is flat, advance position */ - /* and pop it from the Bezier stack */ - arc -= 2; - - ras.lastX = x3; - ras.lastY = y3; - } - else + else if ( y1 != y3 ) { /* the arc is y-monotonous, either ascending or descending */ /* detect a change of direction */ @@ -1389,13 +1381,16 @@ if ( Bezier_Down( RAS_VARS 2, arc, Split_Conic, ras.minY, ras.maxY ) ) goto Fail; - arc -= 2; - - ras.lastX = x3; - ras.lastY = y3; } - } while ( arc >= arcs ); + ras.lastX = x3; + ras.lastY = y3; + + if ( arc == arcs ) + break; + arc -= 2; + + } while ( 1 ); return SUCCESS; @@ -1498,17 +1493,9 @@ /* this arc has no given direction, split it! */ Split_Cubic( arc ); arc += 3; + continue; } - else if ( y1 == y4 ) - { - /* this arc is flat, advance position */ - /* and pop it from the Bezier stack */ - arc -= 3; - - ras.lastX = x4; - ras.lastY = y4; - } - else + else if ( y1 != y4 ) { state_bez = y1 < y4 ? Ascending_State : Descending_State; @@ -1535,13 +1522,16 @@ if ( Bezier_Down( RAS_VARS 3, arc, Split_Cubic, ras.minY, ras.maxY ) ) goto Fail; - arc -= 3; - - ras.lastX = x4; - ras.lastY = y4; } - } while ( arc >= arcs ); + ras.lastX = x4; + ras.lastY = y4; + + if ( arc == arcs ) + break; + arc -= 3; + + } while ( 1 ); return SUCCESS; diff --git a/thirdparty/freetype/src/raster/ftraster.h b/thirdparty/freetype/src/raster/ftraster.h index 64499bf955..e20184ddc8 100644 --- a/thirdparty/freetype/src/raster/ftraster.h +++ b/thirdparty/freetype/src/raster/ftraster.h @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used diff --git a/thirdparty/freetype/src/raster/ftrend1.c b/thirdparty/freetype/src/raster/ftrend1.c index 3fa008704e..6b28cb0bf8 100644 --- a/thirdparty/freetype/src/raster/ftrend1.c +++ b/thirdparty/freetype/src/raster/ftrend1.c @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/ftrend1.h b/thirdparty/freetype/src/raster/ftrend1.h index d838a942b0..92249a0cb9 100644 --- a/thirdparty/freetype/src/raster/ftrend1.h +++ b/thirdparty/freetype/src/raster/ftrend1.h @@ -4,7 +4,7 @@ * * The FreeType glyph rasterizer interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/raster.c b/thirdparty/freetype/src/raster/raster.c index 1b1be144a5..df2ec38d42 100644 --- a/thirdparty/freetype/src/raster/raster.c +++ b/thirdparty/freetype/src/raster/raster.c @@ -4,7 +4,7 @@ * * FreeType monochrome rasterer module component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/raster/rasterrs.h b/thirdparty/freetype/src/raster/rasterrs.h index 39d82a8051..744d179cd8 100644 --- a/thirdparty/freetype/src/raster/rasterrs.h +++ b/thirdparty/freetype/src/raster/rasterrs.h @@ -4,7 +4,7 @@ * * monochrome renderer error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sdf/ftbsdf.c b/thirdparty/freetype/src/sdf/ftbsdf.c index d4c5115ea6..d70ebbf173 100644 --- a/thirdparty/freetype/src/sdf/ftbsdf.c +++ b/thirdparty/freetype/src/sdf/ftbsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for bitmap fonts (body only). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -113,6 +113,7 @@ * // copy SDF data to the target bitmap * copy(dm to t); * } + * ``` * */ diff --git a/thirdparty/freetype/src/sdf/ftsdf.c b/thirdparty/freetype/src/sdf/ftsdf.c index 1076b1b4ee..e86b995946 100644 --- a/thirdparty/freetype/src/sdf/ftsdf.c +++ b/thirdparty/freetype/src/sdf/ftsdf.c @@ -4,7 +4,7 @@ * * Signed Distance Field support for outline fonts (body). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. @@ -3281,8 +3281,12 @@ goto Exit; } - if ( FT_ALLOC( dists, - bitmap->width * bitmap->rows * sizeof ( *dists ) ) ) + if ( bitmap->rows > FT_INT_MAX / bitmap->width ) + { + error = FT_THROW( Array_Too_Large ); + goto Exit; + } + if ( FT_NEW_ARRAY( dists, bitmap->rows * bitmap->width ) ) goto Exit; contours = shape->contours; @@ -3597,13 +3601,11 @@ } /* allocate the bitmaps to generate SDF for separate contours */ - if ( FT_ALLOC( bitmaps, - (FT_UInt)num_contours * sizeof ( *bitmaps ) ) ) + if ( FT_NEW_ARRAY( bitmaps, num_contours ) ) goto Exit; /* allocate array to hold orientation for all contours */ - if ( FT_ALLOC( orientations, - (FT_UInt)num_contours * sizeof ( *orientations ) ) ) + if ( FT_NEW_ARRAY( orientations, num_contours ) ) goto Exit; contour = shape->contours; @@ -3621,8 +3623,7 @@ bitmaps[i].pixel_mode = bitmap->pixel_mode; /* allocate memory for the buffer */ - if ( FT_ALLOC( bitmaps[i].buffer, - bitmap->rows * (FT_UInt)bitmap->pitch ) ) + if ( FT_ALLOC_MULT( bitmaps[i].buffer, bitmap->rows, bitmap->pitch ) ) goto Exit; /* determine the orientation */ diff --git a/thirdparty/freetype/src/sdf/ftsdf.h b/thirdparty/freetype/src/sdf/ftsdf.h index fb17580362..9bf17d1d91 100644 --- a/thirdparty/freetype/src/sdf/ftsdf.h +++ b/thirdparty/freetype/src/sdf/ftsdf.h @@ -4,7 +4,7 @@ * * Signed Distance Field support (specification). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfcommon.c b/thirdparty/freetype/src/sdf/ftsdfcommon.c index fa99944f84..ffbf7a46a4 100644 --- a/thirdparty/freetype/src/sdf/ftsdfcommon.c +++ b/thirdparty/freetype/src/sdf/ftsdfcommon.c @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (body). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfcommon.h b/thirdparty/freetype/src/sdf/ftsdfcommon.h index b87e97ed38..d62e00fa39 100644 --- a/thirdparty/freetype/src/sdf/ftsdfcommon.h +++ b/thirdparty/freetype/src/sdf/ftsdfcommon.h @@ -4,7 +4,7 @@ * * Auxiliary data for Signed Distance Field support (specification). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdferrs.h b/thirdparty/freetype/src/sdf/ftsdferrs.h index e28e2e1cad..5bb8f05bbe 100644 --- a/thirdparty/freetype/src/sdf/ftsdferrs.h +++ b/thirdparty/freetype/src/sdf/ftsdferrs.h @@ -4,7 +4,7 @@ * * Signed Distance Field error codes (specification only). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfrend.c b/thirdparty/freetype/src/sdf/ftsdfrend.c index e24b3b614b..1f50ec447a 100644 --- a/thirdparty/freetype/src/sdf/ftsdfrend.c +++ b/thirdparty/freetype/src/sdf/ftsdfrend.c @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (body). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/ftsdfrend.h b/thirdparty/freetype/src/sdf/ftsdfrend.h index ab98a79632..bb362949af 100644 --- a/thirdparty/freetype/src/sdf/ftsdfrend.h +++ b/thirdparty/freetype/src/sdf/ftsdfrend.h @@ -4,7 +4,7 @@ * * Signed Distance Field renderer interface (specification). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sdf/sdf.c b/thirdparty/freetype/src/sdf/sdf.c index 7f02d9a59d..21dfe6650b 100644 --- a/thirdparty/freetype/src/sdf/sdf.c +++ b/thirdparty/freetype/src/sdf/sdf.c @@ -4,7 +4,7 @@ * * FreeType Signed Distance Field renderer module component (body only). * - * Copyright (C) 2020-2025 by + * Copyright (C) 2020-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Written by Anuj Verma. diff --git a/thirdparty/freetype/src/sfnt/pngshim.c b/thirdparty/freetype/src/sfnt/pngshim.c index 9df75dc3ac..e588e6b380 100644 --- a/thirdparty/freetype/src/sfnt/pngshim.c +++ b/thirdparty/freetype/src/sfnt/pngshim.c @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * @@ -420,10 +420,7 @@ if ( populate_map_and_metrics ) { /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */ - FT_ULong size = map->rows * (FT_ULong)map->pitch; - - - error = ft_glyphslot_alloc_bitmap( slot, size ); + error = ft_glyphslot_alloc_bitmap( slot ); if ( error ) goto DestroyExit; } diff --git a/thirdparty/freetype/src/sfnt/pngshim.h b/thirdparty/freetype/src/sfnt/pngshim.h index c59199e60d..f187b639a1 100644 --- a/thirdparty/freetype/src/sfnt/pngshim.h +++ b/thirdparty/freetype/src/sfnt/pngshim.h @@ -4,7 +4,7 @@ * * PNG Bitmap glyph support. * - * Copyright (C) 2013-2025 by + * Copyright (C) 2013-2026 by * Google, Inc. * Written by Stuart Gill and Behdad Esfahbod. * diff --git a/thirdparty/freetype/src/sfnt/sfdriver.c b/thirdparty/freetype/src/sfnt/sfdriver.c index ec78247aa5..4046b1a0cd 100644 --- a/thirdparty/freetype/src/sfnt/sfdriver.c +++ b/thirdparty/freetype/src/sfnt/sfdriver.c @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1142,12 +1142,7 @@ FT_Error error; - /* XXX: I don't know whether this is correct, since - * tt_face_find_bdf_prop only returns something correct if we have - * previously selected a size that is listed in the BDF table. - * Should we change the BDF table format to include single offsets - * for `CHARSET_REGISTRY' and `CHARSET_ENCODING'? - */ + /* We expect that a bitmap strike has been selected. */ error = tt_face_find_bdf_prop( face, "CHARSET_REGISTRY", ®istry ); if ( !error ) { diff --git a/thirdparty/freetype/src/sfnt/sfdriver.h b/thirdparty/freetype/src/sfnt/sfdriver.h index be4e33166c..e9eed184b7 100644 --- a/thirdparty/freetype/src/sfnt/sfdriver.h +++ b/thirdparty/freetype/src/sfnt/sfdriver.h @@ -4,7 +4,7 @@ * * High-level SFNT driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sferrors.h b/thirdparty/freetype/src/sfnt/sferrors.h index 2da4ac776b..05b259c1bf 100644 --- a/thirdparty/freetype/src/sfnt/sferrors.h +++ b/thirdparty/freetype/src/sfnt/sferrors.h @@ -4,7 +4,7 @@ * * SFNT error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfnt.c b/thirdparty/freetype/src/sfnt/sfnt.c index 84f6ad5156..2eab87f2fd 100644 --- a/thirdparty/freetype/src/sfnt/sfnt.c +++ b/thirdparty/freetype/src/sfnt/sfnt.c @@ -4,7 +4,7 @@ * * Single object library component. * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfobjs.c b/thirdparty/freetype/src/sfnt/sfobjs.c index 6af35787e8..fc855cbb6b 100644 --- a/thirdparty/freetype/src/sfnt/sfobjs.c +++ b/thirdparty/freetype/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ * * SFNT object management (base). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfobjs.h b/thirdparty/freetype/src/sfnt/sfobjs.h index 8c38b72795..a27ad7064a 100644 --- a/thirdparty/freetype/src/sfnt/sfobjs.h +++ b/thirdparty/freetype/src/sfnt/sfobjs.h @@ -4,7 +4,7 @@ * * SFNT object management (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfwoff.c b/thirdparty/freetype/src/sfnt/sfwoff.c index 015c7b78b4..b8a3030d9c 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff.c +++ b/thirdparty/freetype/src/sfnt/sfwoff.c @@ -4,7 +4,7 @@ * * WOFF format management (base). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfwoff.h b/thirdparty/freetype/src/sfnt/sfwoff.h index df7ace5c20..a563fcc682 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff.h +++ b/thirdparty/freetype/src/sfnt/sfwoff.h @@ -4,7 +4,7 @@ * * WOFFF format management (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/sfwoff2.c b/thirdparty/freetype/src/sfnt/sfwoff2.c index 5acbbaa2a7..013e30fc52 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff2.c +++ b/thirdparty/freetype/src/sfnt/sfwoff2.c @@ -4,7 +4,7 @@ * * WOFF2 format management (base). * - * Copyright (C) 2019-2025 by + * Copyright (C) 2019-2026 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1043,7 +1043,6 @@ FT_ULong total_n_points = 0; FT_UShort n_points_contour; FT_UInt j; - FT_ULong flag_size; FT_ULong triplet_size; FT_ULong triplet_bytes_used; FT_Bool have_overlap = FALSE; @@ -1088,8 +1087,8 @@ } substreams[N_POINTS_STREAM].offset = FT_STREAM_POS(); - flag_size = total_n_points; - if ( flag_size > substreams[FLAG_STREAM].size ) + points_size += total_n_points; + if ( points_size > substreams[FLAG_STREAM].size ) goto Fail; flags_buf = stream->base + substreams[FLAG_STREAM].offset; @@ -1106,8 +1105,7 @@ triplet_bytes_used = 0; /* Create array to store point information. */ - points_size = total_n_points; - if ( FT_QNEW_ARRAY( points, points_size ) ) + if ( FT_QNEW_ARRAY( points, total_n_points ) ) goto Fail; if ( triplet_decode( flags_buf, @@ -1118,7 +1116,7 @@ &triplet_bytes_used ) ) goto Fail; - substreams[FLAG_STREAM].offset += flag_size; + substreams[FLAG_STREAM].offset += total_n_points; substreams[GLYPH_STREAM].offset += triplet_bytes_used; if ( FT_STREAM_SEEK( substreams[GLYPH_STREAM].offset ) || diff --git a/thirdparty/freetype/src/sfnt/sfwoff2.h b/thirdparty/freetype/src/sfnt/sfwoff2.h index 588761d0c8..e0296d8260 100644 --- a/thirdparty/freetype/src/sfnt/sfwoff2.h +++ b/thirdparty/freetype/src/sfnt/sfwoff2.h @@ -4,7 +4,7 @@ * * WOFFF2 format management (specification). * - * Copyright (C) 2019-2025 by + * Copyright (C) 2019-2026 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttbdf.c b/thirdparty/freetype/src/sfnt/ttbdf.c index 78a33fa30e..9fa12c099f 100644 --- a/thirdparty/freetype/src/sfnt/ttbdf.c +++ b/thirdparty/freetype/src/sfnt/ttbdf.c @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded BDF properties (body). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -16,6 +16,12 @@ */ + /* + * The 'BDF ' SFNT table is described in the FontForge documentation, see + * + * https://fontforge.org/docs/techref/non-standard.html#non-standard-bdf + */ + #include #include #include @@ -80,21 +86,19 @@ bdf->table_end = bdf->table + length; { - FT_Byte* p = bdf->table; - FT_UInt version = FT_NEXT_USHORT( p ); - FT_UInt num_strikes = FT_NEXT_USHORT( p ); - FT_ULong strings = FT_NEXT_ULONG ( p ); - FT_UInt count; - FT_Byte* strike; + FT_Byte* p = bdf->table; + FT_UInt version = FT_NEXT_USHORT( p ); + FT_UInt num_strikes = FT_NEXT_USHORT( p ); + FT_ULong strings = FT_NEXT_ULONG ( p ); + FT_UInt count; + FT_Byte* strike; if ( version != 0x0001 || strings < 8 || ( strings - 8 ) / 4 < num_strikes || - strings + 1 > length ) - { + strings >= length ) goto BadTable; - } bdf->num_strikes = num_strikes; bdf->strings = bdf->table + strings; @@ -104,15 +108,14 @@ p = bdf->table + 8; strike = p + count * 4; - + /* Check table length. */ for ( ; count > 0; count-- ) { FT_UInt num_items = FT_PEEK_USHORT( p + 2 ); - /* - * We don't need to check the value sets themselves, since this - * is done later. - */ + + /* We don't check the value sets themselves; */ + /* this is done while accessing a property. */ strike += 10 * num_items; p += 4; @@ -200,6 +203,7 @@ FT_UInt32 name_offset = FT_PEEK_ULONG( p ); FT_UInt32 value = FT_PEEK_ULONG( p + 6 ); + /* be a bit paranoid for invalid entries here */ if ( name_offset < bdf->strings_size && property_len < bdf->strings_size - name_offset && @@ -212,7 +216,7 @@ case 0x00: /* string */ case 0x01: /* atoms */ /* check that the content is really 0-terminated */ - if ( value < bdf->strings_size && + if ( value < bdf->strings_size && ft_memchr( bdf->strings + value, 0, bdf->strings_size ) ) { aprop->type = BDF_PROPERTY_TYPE_ATOM; diff --git a/thirdparty/freetype/src/sfnt/ttbdf.h b/thirdparty/freetype/src/sfnt/ttbdf.h index abcce2cc6e..87d210e52f 100644 --- a/thirdparty/freetype/src/sfnt/ttbdf.h +++ b/thirdparty/freetype/src/sfnt/ttbdf.h @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded BDF properties (specification). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcmap.c b/thirdparty/freetype/src/sfnt/ttcmap.c index 91b0234422..f5837e65e8 100644 --- a/thirdparty/freetype/src/sfnt/ttcmap.c +++ b/thirdparty/freetype/src/sfnt/ttcmap.c @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcmap.h b/thirdparty/freetype/src/sfnt/ttcmap.h index 645e9e37e0..fdb34f525e 100644 --- a/thirdparty/freetype/src/sfnt/ttcmap.h +++ b/thirdparty/freetype/src/sfnt/ttcmap.h @@ -4,7 +4,7 @@ * * TrueType character mapping table (cmap) support (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcmapc.h b/thirdparty/freetype/src/sfnt/ttcmapc.h index 65807bb737..c17ac5bba1 100644 --- a/thirdparty/freetype/src/sfnt/ttcmapc.h +++ b/thirdparty/freetype/src/sfnt/ttcmapc.h @@ -4,7 +4,7 @@ * * TT CMAP classes definitions (specification only). * - * Copyright (C) 2009-2025 by + * Copyright (C) 2009-2026 by * Oran Agra and Mickey Gabel. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttcolr.c b/thirdparty/freetype/src/sfnt/ttcolr.c index ad9ad6f271..b22e279b34 100644 --- a/thirdparty/freetype/src/sfnt/ttcolr.c +++ b/thirdparty/freetype/src/sfnt/ttcolr.c @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (body). * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * David Turner, Robert Wilhelm, Dominik Röttsches, and Werner Lemberg. * * Originally written by Shao Yu Zhang . @@ -236,8 +236,10 @@ p1 = (FT_Byte*)( table + base_glyphs_offset_v1 ); num_base_glyphs_v1 = FT_PEEK_ULONG( p1 ); - if ( ( table_size - base_glyphs_offset_v1 ) / BASE_GLYPH_PAINT_RECORD_SIZE - < num_base_glyphs_v1 ) + /* Account for 4 byte numBaseGlyphPaintRecords at the beginning of */ + /* the BaseGlyphPaintRecord array. */ + if ( ( table_size - base_glyphs_offset_v1 - 4 ) / + BASE_GLYPH_PAINT_RECORD_SIZE < num_base_glyphs_v1 ) goto InvalidTable; colr->num_base_glyphs_v1 = num_base_glyphs_v1; @@ -451,20 +453,14 @@ FT_UInt *acolor_index, FT_LayerIterator* iterator ) { - Colr* colr = (Colr*)face->colr; - BaseGlyphRecord glyph_record; - - - if ( !colr ) - return 0; - - if ( !iterator->p ) + if ( !iterator->p ) /* first call to function */ { - FT_ULong offset; + Colr* colr = (Colr*)face->colr; + BaseGlyphRecord glyph_record; - /* first call to function */ - iterator->layer = 0; + if ( !colr ) + return 0; if ( !find_base_glyph_record( colr->base_glyphs, colr->num_base_glyphs, @@ -472,21 +468,18 @@ &glyph_record ) ) return 0; - if ( glyph_record.num_layers ) - iterator->num_layers = glyph_record.num_layers; - else + if ( glyph_record.num_layers == 0 || + glyph_record.first_layer_index + glyph_record.num_layers > + colr->num_layers ) return 0; - offset = LAYER_SIZE * glyph_record.first_layer_index; - if ( offset + LAYER_SIZE * glyph_record.num_layers > colr->table_size ) - return 0; - - iterator->p = colr->layers + offset; + iterator->num_layers = glyph_record.num_layers; + iterator->layer = 0; + iterator->p = colr->layers + + LAYER_SIZE * glyph_record.first_layer_index; } - if ( iterator->layer >= iterator->num_layers || - iterator->p < colr->layers || - iterator->p >= ( (FT_Byte*)colr->table + colr->table_size ) ) + if ( iterator->layer >= iterator->num_layers ) return 0; *aglyph_index = FT_NEXT_USHORT( iterator->p ); @@ -1749,7 +1742,6 @@ FT_UInt x, y; FT_Byte b, g, r, alpha; - FT_ULong size; FT_Byte* src; FT_Byte* dst; @@ -1767,13 +1759,9 @@ dstSlot->bitmap.pitch = (int)dstSlot->bitmap.width * 4; dstSlot->bitmap.num_grays = 256; - size = dstSlot->bitmap.rows * (unsigned int)dstSlot->bitmap.pitch; - - error = ft_glyphslot_alloc_bitmap( dstSlot, size ); + error = ft_glyphslot_alloc_bitmap( dstSlot ); if ( error ) return error; - - FT_MEM_ZERO( dstSlot->bitmap.buffer, size ); } else { @@ -1805,8 +1793,7 @@ FT_Byte* q; - size = rows * pitch; - if ( FT_ALLOC( buf, size ) ) + if ( FT_ALLOC_MULT( buf, rows, pitch ) ) return error; p = dstSlot->bitmap.buffer; diff --git a/thirdparty/freetype/src/sfnt/ttcolr.h b/thirdparty/freetype/src/sfnt/ttcolr.h index 3913acc74d..c7bf1f2a4a 100644 --- a/thirdparty/freetype/src/sfnt/ttcolr.h +++ b/thirdparty/freetype/src/sfnt/ttcolr.h @@ -4,7 +4,7 @@ * * TrueType and OpenType colored glyph layer support (specification). * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/thirdparty/freetype/src/sfnt/ttcpal.c b/thirdparty/freetype/src/sfnt/ttcpal.c index 6d1208f6af..04e2db1eab 100644 --- a/thirdparty/freetype/src/sfnt/ttcpal.c +++ b/thirdparty/freetype/src/sfnt/ttcpal.c @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (body). * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/thirdparty/freetype/src/sfnt/ttcpal.h b/thirdparty/freetype/src/sfnt/ttcpal.h index a0b4c9d927..5c2e660e13 100644 --- a/thirdparty/freetype/src/sfnt/ttcpal.h +++ b/thirdparty/freetype/src/sfnt/ttcpal.h @@ -4,7 +4,7 @@ * * TrueType and OpenType color palette support (specification). * - * Copyright (C) 2018-2025 by + * Copyright (C) 2018-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Originally written by Shao Yu Zhang . diff --git a/thirdparty/freetype/src/sfnt/ttgpos.c b/thirdparty/freetype/src/sfnt/ttgpos.c index 4ff54933f4..6f9bddf34a 100644 --- a/thirdparty/freetype/src/sfnt/ttgpos.c +++ b/thirdparty/freetype/src/sfnt/ttgpos.c @@ -4,7 +4,7 @@ * * Routines to parse and access the 'GPOS' table for simple kerning (body). * - * Copyright (C) 2025 by + * Copyright (C) 2025-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -55,7 +55,7 @@ FT_Byte* p = table; FT_Byte* limit; - FT_Long last_id = -1; + FT_UInt next_id = 0; if ( table_limit < p + 4 ) @@ -79,9 +79,9 @@ FT_UInt id = FT_NEXT_USHORT( p ); - if ( last_id >= id ) + if ( next_id > id ) return FALSE; - last_id = id; + next_id = id + 1; } } else if ( format == 2 ) @@ -103,9 +103,9 @@ if ( startGlyphID > endGlyphID ) return FALSE; - if ( last_id >= startGlyphID ) + if ( next_id > startGlyphID ) return FALSE; - last_id = endGlyphID; + next_id = endGlyphID + 1; /* XXX: Is this modulo 65536 arithmetic? */ if ( startCoverageIndex + endGlyphID - startGlyphID >= @@ -164,7 +164,7 @@ else if ( format == 2 ) { FT_UInt classRangeCount; - FT_Long last_id = -1; + FT_UInt next_id = 0; if ( table_limit < p + 2 ) @@ -185,9 +185,9 @@ if ( startGlyphID > endGlyphID ) return FALSE; - if ( last_id >= startGlyphID ) + if ( next_id > startGlyphID ) return FALSE; - last_id = endGlyphID; + next_id = endGlyphID + 1; if ( class_value > max_class_value ) max_class_value = class_value; @@ -291,7 +291,7 @@ FT_Byte* p = table; FT_Byte* limit; - FT_Long last_id = -1; + FT_UInt next_id = 0; if ( table_limit < p + 2 ) @@ -311,10 +311,10 @@ FT_UInt id = FT_NEXT_USHORT( p ); - if ( last_id >= id ) + if ( next_id > id ) return FALSE; - last_id = id; + next_id = id + 1; p += 2; /* Skip `valueRecord1`. */ } @@ -408,6 +408,8 @@ FT_UInt class1Count; FT_UInt class2Count; + FT_UInt max_size; + /* The number of coverage indices is not relevant here. */ if ( !tt_face_validate_coverage( coverage, table_limit, FT_UINT_MAX ) ) @@ -432,7 +434,11 @@ /* For our purposes, the first value record only contains */ /* X advances while the second one is empty. */ - limit = p + class1Count * class2Count * 2; + max_size = class1Count * class2Count; + if ( max_size > FT_UINT_MAX / 2 ) + return FALSE; + + limit = p + max_size * 2; if ( table_limit < limit ) return FALSE; @@ -443,8 +449,9 @@ } - /* The return value is the number of fitting subtables. */ - static FT_UInt + /* The return value is the number of fitting subtables. It is negative */ + /* if there is a validation error. */ + static FT_Int tt_face_validate_lookup_table( FT_Byte* table, FT_Byte* table_limit ) { @@ -459,7 +466,7 @@ if ( table_limit < p + 6 ) - return 0; + return -1; lookupType = FT_NEXT_USHORT( p ); @@ -468,7 +475,7 @@ subtableCount = FT_NEXT_USHORT( p ); limit = p + subtableCount * 2; if ( table_limit < limit ) - return 0; + return -1; while ( p < limit ) { @@ -485,15 +492,15 @@ if ( table_limit < q + 8 ) - return 0; + return -1; if ( FT_NEXT_USHORT( q ) != 1 ) /* format */ - return 0; + return -1; if ( real_lookupType == 0 ) real_lookupType = FT_NEXT_USHORT( q ); else if ( real_lookupType != FT_NEXT_USHORT( q ) ) - return 0; + return -1; subtable += FT_PEEK_ULONG( q ); } @@ -502,7 +509,7 @@ /* Ensure the first eight bytes of the subtable formats. */ if ( table_limit < subtable + 8 ) - return 0; + return -1; format = FT_PEEK_USHORT( subtable ); @@ -513,20 +520,20 @@ if ( !tt_face_validate_pair_pos1( subtable, table_limit, &is_fitting ) ) - return 0; + return -1; } else if ( format == 2 ) { if ( !tt_face_validate_pair_pos2( subtable, table_limit, &is_fitting ) ) - return 0; + return -1; } else - return 0; + return -1; } else - return 0; + return -1; if ( is_fitting ) num_fitting_subtables++; @@ -657,6 +664,7 @@ for ( i = 0; i < lookupCount; i++ ) { FT_UInt lookupOffset; + FT_Int fits; if ( !use_lookup_table[i] ) @@ -664,10 +672,12 @@ lookupOffset = FT_PEEK_USHORT( p + i * 2 ); - num_fitting_subtables += - tt_face_validate_lookup_table( lookup_list + lookupOffset, - gpos_limit ); + fits = tt_face_validate_lookup_table( lookup_list + lookupOffset, + gpos_limit ); + if ( fits < 0 ) + goto Fail; + num_fitting_subtables += (FT_UInt)fits; } /* Loop again over all lookup tables and */ @@ -709,7 +719,7 @@ return error; Fail: - FT_FREE( gpos ); + FT_FRAME_RELEASE( gpos ); FT_FREE( gpos_lookups_kerning ); FT_FREE( use_lookup_table ); @@ -813,7 +823,7 @@ /* XXX: Is this modulo 65536 arithmetic? */ if ( startGlyphID <= glyph_index && - startGlyphID + glyphCount >= glyph_index ) + startGlyphID + glyphCount > glyph_index ) return FT_PEEK_USHORT( p + ( glyph_index - startGlyphID ) * 2 ); } else @@ -880,7 +890,7 @@ if ( second_glyph > mid_index ) - min = max + 1; + min = mid + 1; else if ( second_glyph < mid_index ) max = mid; else diff --git a/thirdparty/freetype/src/sfnt/ttgpos.h b/thirdparty/freetype/src/sfnt/ttgpos.h index eebc22e9ec..3c227445ba 100644 --- a/thirdparty/freetype/src/sfnt/ttgpos.h +++ b/thirdparty/freetype/src/sfnt/ttgpos.h @@ -5,7 +5,7 @@ * Routines to parse and access the 'GPOS' table for simple kerning * (specification). * - * Copyright (C) 2024-2025 by + * Copyright (C) 2024-2026 by * David Saltzman * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttkern.c b/thirdparty/freetype/src/sfnt/ttkern.c index 76618b0d3b..65b249ff4c 100644 --- a/thirdparty/freetype/src/sfnt/ttkern.c +++ b/thirdparty/freetype/src/sfnt/ttkern.c @@ -4,7 +4,7 @@ * * Routines to parse and access the 'kern' table for kerning (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttkern.h b/thirdparty/freetype/src/sfnt/ttkern.h index e0075dce61..8cc912a79e 100644 --- a/thirdparty/freetype/src/sfnt/ttkern.h +++ b/thirdparty/freetype/src/sfnt/ttkern.h @@ -5,7 +5,7 @@ * Routines to parse and access the 'kern' table for kerning * (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttload.c b/thirdparty/freetype/src/sfnt/ttload.c index 0c257ce4d3..e17d07a971 100644 --- a/thirdparty/freetype/src/sfnt/ttload.c +++ b/thirdparty/freetype/src/sfnt/ttload.c @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttload.h b/thirdparty/freetype/src/sfnt/ttload.h index e3666c901b..0a0aab24ce 100644 --- a/thirdparty/freetype/src/sfnt/ttload.h +++ b/thirdparty/freetype/src/sfnt/ttload.h @@ -5,7 +5,7 @@ * Load the basic TrueType tables, i.e., tables that can be either in * TTF or OTF fonts (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttmtx.c b/thirdparty/freetype/src/sfnt/ttmtx.c index 541d844747..60dce87d84 100644 --- a/thirdparty/freetype/src/sfnt/ttmtx.c +++ b/thirdparty/freetype/src/sfnt/ttmtx.c @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (body). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttmtx.h b/thirdparty/freetype/src/sfnt/ttmtx.h index 1ee84507f1..618e04ffd2 100644 --- a/thirdparty/freetype/src/sfnt/ttmtx.h +++ b/thirdparty/freetype/src/sfnt/ttmtx.h @@ -4,7 +4,7 @@ * * Load the metrics tables common to TTF and OTF fonts (specification). * - * Copyright (C) 2006-2025 by + * Copyright (C) 2006-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttpost.c b/thirdparty/freetype/src/sfnt/ttpost.c index 4246b6c8ef..98603e115e 100644 --- a/thirdparty/freetype/src/sfnt/ttpost.c +++ b/thirdparty/freetype/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttpost.h b/thirdparty/freetype/src/sfnt/ttpost.h index a11b669685..896118015e 100644 --- a/thirdparty/freetype/src/sfnt/ttpost.h +++ b/thirdparty/freetype/src/sfnt/ttpost.h @@ -5,7 +5,7 @@ * PostScript name table processing for TrueType and OpenType fonts * (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttsbit.c b/thirdparty/freetype/src/sfnt/ttsbit.c index 9f9013bf39..1655e40b68 100644 --- a/thirdparty/freetype/src/sfnt/ttsbit.c +++ b/thirdparty/freetype/src/sfnt/ttsbit.c @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (body). * - * Copyright (C) 2005-2025 by + * Copyright (C) 2005-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * Copyright 2013 by Google, Inc. @@ -547,7 +547,6 @@ FT_Error error = FT_Err_Ok; FT_UInt width, height; FT_Bitmap* map = decoder->bitmap; - FT_ULong size; if ( !decoder->metrics_loaded ) @@ -599,17 +598,11 @@ goto Exit; } - size = map->rows * (FT_ULong)map->pitch; - - /* check that there is no empty image */ - if ( size == 0 ) - goto Exit; /* exit successfully! */ - if ( metrics_only ) goto Exit; /* only metrics are requested */ - error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size ); - if ( error ) + error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph ); + if ( error || !map->buffer ) goto Exit; decoder->bitmap_allocated = 1; diff --git a/thirdparty/freetype/src/sfnt/ttsbit.h b/thirdparty/freetype/src/sfnt/ttsbit.h index 7427149d68..8fd4522326 100644 --- a/thirdparty/freetype/src/sfnt/ttsbit.h +++ b/thirdparty/freetype/src/sfnt/ttsbit.h @@ -4,7 +4,7 @@ * * TrueType and OpenType embedded bitmap support (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttsvg.c b/thirdparty/freetype/src/sfnt/ttsvg.c index c7b83b2b7d..79cf531d05 100644 --- a/thirdparty/freetype/src/sfnt/ttsvg.c +++ b/thirdparty/freetype/src/sfnt/ttsvg.c @@ -4,7 +4,7 @@ * * OpenType SVG Color (specification). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/ttsvg.h b/thirdparty/freetype/src/sfnt/ttsvg.h index d2e127d6df..6253ed1d49 100644 --- a/thirdparty/freetype/src/sfnt/ttsvg.h +++ b/thirdparty/freetype/src/sfnt/ttsvg.h @@ -4,7 +4,7 @@ * * OpenType SVG Color (specification). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/woff2tags.c b/thirdparty/freetype/src/sfnt/woff2tags.c index 0f9e3889aa..1c3779d9f3 100644 --- a/thirdparty/freetype/src/sfnt/woff2tags.c +++ b/thirdparty/freetype/src/sfnt/woff2tags.c @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (base). * - * Copyright (C) 2019-2025 by + * Copyright (C) 2019-2026 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/sfnt/woff2tags.h b/thirdparty/freetype/src/sfnt/woff2tags.h index e223022962..200262d386 100644 --- a/thirdparty/freetype/src/sfnt/woff2tags.h +++ b/thirdparty/freetype/src/sfnt/woff2tags.h @@ -4,7 +4,7 @@ * * WOFF2 Font table tags (specification). * - * Copyright (C) 2019-2025 by + * Copyright (C) 2019-2026 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftgrays.c b/thirdparty/freetype/src/smooth/ftgrays.c index 365fbad42a..0f7b63937d 100644 --- a/thirdparty/freetype/src/smooth/ftgrays.c +++ b/thirdparty/freetype/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ * * A new `perfect' anti-aliasing renderer (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1804,7 +1804,7 @@ typedef ptrdiff_t FT_PtrDist; FT_FILL_RULE( coverage, cover, fill ); span[n].coverage = (unsigned char)coverage; - span[n].x = (short)x; + span[n].x = (unsigned short)x; span[n].len = (unsigned short)( cell->x - x ); if ( ++n == FT_MAX_GRAY_SPANS ) @@ -1823,7 +1823,7 @@ typedef ptrdiff_t FT_PtrDist; FT_FILL_RULE( coverage, area, fill ); span[n].coverage = (unsigned char)coverage; - span[n].x = (short)cell->x; + span[n].x = (unsigned short)cell->x; span[n].len = 1; if ( ++n == FT_MAX_GRAY_SPANS ) diff --git a/thirdparty/freetype/src/smooth/ftgrays.h b/thirdparty/freetype/src/smooth/ftgrays.h index e463e5b3eb..99c7383e76 100644 --- a/thirdparty/freetype/src/smooth/ftgrays.h +++ b/thirdparty/freetype/src/smooth/ftgrays.h @@ -4,7 +4,7 @@ * * FreeType smooth renderer declaration * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftsmerrs.h b/thirdparty/freetype/src/smooth/ftsmerrs.h index 8d5068549f..2f2276bd58 100644 --- a/thirdparty/freetype/src/smooth/ftsmerrs.h +++ b/thirdparty/freetype/src/smooth/ftsmerrs.h @@ -4,7 +4,7 @@ * * smooth renderer error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/ftsmooth.c b/thirdparty/freetype/src/smooth/ftsmooth.c index 21a6eca00b..7378e6adc4 100644 --- a/thirdparty/freetype/src/smooth/ftsmooth.c +++ b/thirdparty/freetype/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (body). * - * Copyright (C) 2000-2025 by + * Copyright (C) 2000-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -80,6 +80,7 @@ { unsigned char* origin; /* pixmap origin at the bottom-left */ int pitch; /* pitch to go down one row */ + unsigned char wght[5]; /* filtering weights */ } TOrigin; @@ -274,6 +275,32 @@ } + /* This function applies a horizontal filter in direct rendering mode */ + static void + ft_smooth_lcd_spans( int y, + int count, + const FT_Span* spans, + void* target_ ) /* TOrigin* */ + { + TOrigin* target = (TOrigin*)target_; + + unsigned char* dst_line = target->origin - y * target->pitch - 2; + unsigned char* dst; + unsigned short w; + + + for ( ; count--; spans++ ) + for ( dst = dst_line + spans->x, w = spans->len; w--; dst++ ) + { + dst[0] += ( spans->coverage * target->wght[0] + 85 ) >> 8; + dst[1] += ( spans->coverage * target->wght[1] + 85 ) >> 8; + dst[2] += ( spans->coverage * target->wght[2] + 85 ) >> 8; + dst[3] += ( spans->coverage * target->wght[3] + 85 ) >> 8; + dst[4] += ( spans->coverage * target->wght[4] + 85 ) >> 8; + } + } + + static FT_Error ft_smooth_raster_lcd( FT_Renderer render, FT_Outline* outline, @@ -285,11 +312,47 @@ FT_Vector* vec; FT_Raster_Params params; + TOrigin target; - params.target = bitmap; - params.source = outline; - params.flags = FT_RASTER_FLAG_AA; + if ( render->root.library->lcd_weights[2] ) + { + /* Reject outlines that are too wide for 16-bit FT_Span. */ + /* Other limits are applied upstream with the same error code. */ + if ( bitmap->width > 0x7FFF ) + return FT_THROW( Raster_Overflow ); + + /* Set up direct rendering for instant filtering. */ + params.source = outline; + params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT; + params.gray_spans = ft_smooth_lcd_spans; + params.user = ⌖ + + params.clip_box.xMin = 0; + params.clip_box.yMin = 0; + params.clip_box.xMax = bitmap->width; + params.clip_box.yMax = bitmap->rows; + + if ( bitmap->pitch < 0 ) + target.origin = bitmap->buffer; + else + target.origin = bitmap->buffer + + ( bitmap->rows - 1 ) * (unsigned int)bitmap->pitch; + + target.pitch = bitmap->pitch; + + target.wght[0] = render->root.library->lcd_weights[0]; + target.wght[1] = render->root.library->lcd_weights[1]; + target.wght[2] = render->root.library->lcd_weights[2]; + target.wght[3] = render->root.library->lcd_weights[3]; + target.wght[4] = render->root.library->lcd_weights[4]; + } + else + { + params.target = bitmap; + params.source = outline; + params.flags = FT_RASTER_FLAG_AA; + } /* implode outline */ for ( vec = points; vec < points_end; vec++ ) @@ -306,6 +369,32 @@ } + /* This function applies a vertical filter in direct rendering mode */ + static void + ft_smooth_lcdv_spans( int y, + int count, + const FT_Span* spans, + void* target_ ) /* TOrigin* */ + { + TOrigin* target = (TOrigin*)target_; + + int pitch = target->pitch; + unsigned char* dst_line = target->origin - ( y + 2 ) * pitch; + unsigned char* dst; + unsigned short w; + + + for ( ; count--; spans++ ) + for ( dst = dst_line + spans->x, w = spans->len; w--; dst++ ) + { + dst[ 0] += ( spans->coverage * target->wght[0] + 85 ) >> 8; + dst[ pitch] += ( spans->coverage * target->wght[1] + 85 ) >> 8; + dst[2 * pitch] += ( spans->coverage * target->wght[2] + 85 ) >> 8; + dst[3 * pitch] += ( spans->coverage * target->wght[3] + 85 ) >> 8; + dst[4 * pitch] += ( spans->coverage * target->wght[4] + 85 ) >> 8; + } + } + static FT_Error ft_smooth_raster_lcdv( FT_Renderer render, FT_Outline* outline, @@ -317,11 +406,42 @@ FT_Vector* vec; FT_Raster_Params params; + TOrigin target; - params.target = bitmap; - params.source = outline; - params.flags = FT_RASTER_FLAG_AA; + if ( render->root.library->lcd_weights[2] ) + { + /* Set up direct rendering for instant filtering. */ + params.source = outline; + params.flags = FT_RASTER_FLAG_AA | FT_RASTER_FLAG_DIRECT; + params.gray_spans = ft_smooth_lcdv_spans; + params.user = ⌖ + + params.clip_box.xMin = 0; + params.clip_box.yMin = 0; + params.clip_box.xMax = bitmap->width; + params.clip_box.yMax = bitmap->rows; + + if ( bitmap->pitch < 0 ) + target.origin = bitmap->buffer; + else + target.origin = bitmap->buffer + + ( bitmap->rows - 1 ) * (unsigned int)bitmap->pitch; + + target.pitch = bitmap->pitch; + + target.wght[0] = render->root.library->lcd_weights[0]; + target.wght[1] = render->root.library->lcd_weights[1]; + target.wght[2] = render->root.library->lcd_weights[2]; + target.wght[3] = render->root.library->lcd_weights[3]; + target.wght[4] = render->root.library->lcd_weights[4]; + } + else + { + params.target = bitmap; + params.source = outline; + params.flags = FT_RASTER_FLAG_AA; + } /* implode outline */ for ( vec = points; vec < points_end; vec++ ) @@ -494,12 +614,6 @@ else y_shift += 64 * (FT_Int)bitmap->rows; - if ( origin ) - { - x_shift += origin->x; - y_shift += origin->y; - } - /* translate outline to render it into the bitmap */ if ( x_shift || y_shift ) FT_Outline_Translate( outline, x_shift, y_shift ); @@ -527,33 +641,6 @@ error = ft_smooth_raster_lcd ( render, outline, bitmap ); else if ( mode == FT_RENDER_MODE_LCD_V ) error = ft_smooth_raster_lcdv( render, outline, bitmap ); - -#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - /* finally apply filtering */ - { - FT_Byte* lcd_weights; - FT_Bitmap_LcdFilterFunc lcd_filter_func; - - - /* Per-face LCD filtering takes priority if set up. */ - if ( slot->face && slot->face->internal->lcd_filter_func ) - { - lcd_weights = slot->face->internal->lcd_weights; - lcd_filter_func = slot->face->internal->lcd_filter_func; - } - else - { - lcd_weights = slot->library->lcd_weights; - lcd_filter_func = slot->library->lcd_filter_func; - } - - if ( lcd_filter_func ) - lcd_filter_func( bitmap, lcd_weights ); - } - -#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - } Exit: diff --git a/thirdparty/freetype/src/smooth/ftsmooth.h b/thirdparty/freetype/src/smooth/ftsmooth.h index f76708ae70..56c7ac70b5 100644 --- a/thirdparty/freetype/src/smooth/ftsmooth.h +++ b/thirdparty/freetype/src/smooth/ftsmooth.h @@ -4,7 +4,7 @@ * * Anti-aliasing renderer interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/smooth/smooth.c b/thirdparty/freetype/src/smooth/smooth.c index 23dc7accf9..4ecd3ccdb9 100644 --- a/thirdparty/freetype/src/smooth/smooth.c +++ b/thirdparty/freetype/src/smooth/smooth.c @@ -4,7 +4,7 @@ * * FreeType anti-aliasing rasterer module component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/svg/ftsvg.c b/thirdparty/freetype/src/svg/ftsvg.c index 8e73c3ba4e..c98d7f7db9 100644 --- a/thirdparty/freetype/src/svg/ftsvg.c +++ b/thirdparty/freetype/src/svg/ftsvg.c @@ -4,7 +4,7 @@ * * The FreeType SVG renderer interface (body). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, @@ -108,8 +108,6 @@ FT_Memory memory = library->memory; FT_Error error; - FT_ULong size_image_buffer; - SVG_RendererHooks hooks = svg_renderer->hooks; @@ -135,10 +133,10 @@ ft_svg_preset_slot( (FT_Module)renderer, slot, TRUE ); - size_image_buffer = (FT_ULong)slot->bitmap.pitch * slot->bitmap.rows; - /* No `FT_QALLOC` here since we need a clean, empty canvas */ - /* to start with. */ - if ( FT_ALLOC( slot->bitmap.buffer, size_image_buffer ) ) + /* No `FT_QALLOC_MULT` here since we need a clean, empty canvas */ + /* to start with. */ + if ( FT_ALLOC_MULT( slot->bitmap.buffer, + slot->bitmap.rows, slot->bitmap.pitch ) ) return error; error = hooks.render_svg( slot, &svg_renderer->state ); diff --git a/thirdparty/freetype/src/svg/ftsvg.h b/thirdparty/freetype/src/svg/ftsvg.h index b04c7fef15..6254485c5a 100644 --- a/thirdparty/freetype/src/svg/ftsvg.h +++ b/thirdparty/freetype/src/svg/ftsvg.h @@ -4,7 +4,7 @@ * * The FreeType SVG renderer interface (specification). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/svg/svg.c b/thirdparty/freetype/src/svg/svg.c index c64755c0a9..fff03ee59e 100644 --- a/thirdparty/freetype/src/svg/svg.c +++ b/thirdparty/freetype/src/svg/svg.c @@ -4,7 +4,7 @@ * * FreeType SVG renderer module component (body only). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/svg/svgtypes.h b/thirdparty/freetype/src/svg/svgtypes.h index 65b3eacb6e..f731bdf111 100644 --- a/thirdparty/freetype/src/svg/svgtypes.h +++ b/thirdparty/freetype/src/svg/svgtypes.h @@ -4,7 +4,7 @@ * * The FreeType SVG renderer internal types (specification). * - * Copyright (C) 2022-2025 by + * Copyright (C) 2022-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and Moazin Khatti. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/truetype.c b/thirdparty/freetype/src/truetype/truetype.c index bc8048d0f5..accec4597d 100644 --- a/thirdparty/freetype/src/truetype/truetype.c +++ b/thirdparty/freetype/src/truetype/truetype.c @@ -4,7 +4,7 @@ * * FreeType TrueType driver component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttdriver.c b/thirdparty/freetype/src/truetype/ttdriver.c index 6369d83d6d..90d6e81057 100644 --- a/thirdparty/freetype/src/truetype/ttdriver.c +++ b/thirdparty/freetype/src/truetype/ttdriver.c @@ -4,7 +4,7 @@ * * TrueType font driver implementation (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttdriver.h b/thirdparty/freetype/src/truetype/ttdriver.h index 943eaae348..c00bba066e 100644 --- a/thirdparty/freetype/src/truetype/ttdriver.h +++ b/thirdparty/freetype/src/truetype/ttdriver.h @@ -4,7 +4,7 @@ * * High-level TrueType driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/tterrors.h b/thirdparty/freetype/src/truetype/tterrors.h index 631dbf5a80..1ae4b087ac 100644 --- a/thirdparty/freetype/src/truetype/tterrors.h +++ b/thirdparty/freetype/src/truetype/tterrors.h @@ -4,7 +4,7 @@ * * TrueType error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttgload.c b/thirdparty/freetype/src/truetype/ttgload.c index e810ebfd55..dcff7c3bb7 100644 --- a/thirdparty/freetype/src/truetype/ttgload.c +++ b/thirdparty/freetype/src/truetype/ttgload.c @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -1185,9 +1185,7 @@ /* make room for phantom points */ - error = FT_GLYPHLOADER_CHECK_POINTS( loader->gloader, - outline->n_points + 4, - 0 ); + error = FT_GLYPHLOADER_CHECK_POINTS( loader->gloader, 4, 0 ); if ( error ) return error; @@ -1425,6 +1423,14 @@ FT_TRACE5(( " nesting level: %u\n", recurse_count )); #endif + /* arbitrary recursion limit */ + if ( recurse_count > 100 ) + { + FT_TRACE4(( "load_truetype_glyph: recursion depth exceeded\n" )); + error = FT_THROW( Invalid_Composite ); + goto Exit; + } + /* some fonts have an incorrect value of `maxComponentDepth' */ if ( recurse_count > face->max_profile.maxComponentDepth ) { @@ -2217,6 +2223,10 @@ exec = size->context; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* reset backward compatibility; note that */ + /* the CVT program always runs without it */ + exec->backward_compatibility = 0; + if ( driver->interpreter_version == TT_INTERPRETER_VERSION_40 ) { grayscale = FALSE; @@ -2253,9 +2263,7 @@ return error; } - error = TT_Load_Context( exec, face, size ); - if ( error ) - return error; + TT_Load_Context( exec, face, size ); /* check whether the cvt program has disabled hinting */ if ( size->GS.instruct_control & 1 ) @@ -2283,8 +2291,7 @@ mode != FT_RENDER_MODE_MONO && !FT_IS_TRICKY( glyph->face ) ) exec->backward_compatibility = ( size->GS.instruct_control & 4 ) ^ 4; - else - exec->backward_compatibility = 0; + #endif /* TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL */ loader->exec = exec; diff --git a/thirdparty/freetype/src/truetype/ttgload.h b/thirdparty/freetype/src/truetype/ttgload.h index 39d6ae3664..3d6a762d1f 100644 --- a/thirdparty/freetype/src/truetype/ttgload.h +++ b/thirdparty/freetype/src/truetype/ttgload.h @@ -4,7 +4,7 @@ * * TrueType Glyph Loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttgxvar.c b/thirdparty/freetype/src/truetype/ttgxvar.c index 2ff40c9e80..5ab6e17119 100644 --- a/thirdparty/freetype/src/truetype/ttgxvar.c +++ b/thirdparty/freetype/src/truetype/ttgxvar.c @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. * * This file is part of the FreeType project, and may only be used, @@ -697,11 +697,9 @@ if ( long_words ) per_region_size *= 2; - if ( FT_NEW_ARRAY( varData->deltaSet, per_region_size * item_count ) ) + if ( FT_QALLOC_MULT( varData->deltaSet, item_count, per_region_size ) ) goto Exit; - if ( FT_Stream_Read( stream, - varData->deltaSet, - per_region_size * item_count ) ) + if ( FT_STREAM_READ( varData->deltaSet, item_count * per_region_size ) ) { FT_TRACE2(( "deltaSet read failed." )); error = FT_THROW( Invalid_Table ); diff --git a/thirdparty/freetype/src/truetype/ttgxvar.h b/thirdparty/freetype/src/truetype/ttgxvar.h index 568c8027bb..8a59c0cd6e 100644 --- a/thirdparty/freetype/src/truetype/ttgxvar.h +++ b/thirdparty/freetype/src/truetype/ttgxvar.h @@ -4,7 +4,7 @@ * * TrueType GX Font Variation loader (specification) * - * Copyright (C) 2004-2025 by + * Copyright (C) 2004-2026 by * David Turner, Robert Wilhelm, Werner Lemberg and George Williams. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttinterp.c b/thirdparty/freetype/src/truetype/ttinterp.c index 7b26c9a9df..f850bc418e 100644 --- a/thirdparty/freetype/src/truetype/ttinterp.c +++ b/thirdparty/freetype/src/truetype/ttinterp.c @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -272,7 +272,7 @@ * * Note that not all members of `TT_ExecContext` get initialized. */ - FT_LOCAL_DEF( FT_Error ) + FT_LOCAL_DEF( void ) TT_Load_Context( TT_ExecContext exec, TT_Face face, TT_Size size ) @@ -284,7 +284,7 @@ exec->size = size; /* CVT and storage are not persistent in FreeType */ - /* reset them after they might have been modifief */ + /* reset them after they might have been modified */ exec->storage = exec->stack + exec->stackSize; exec->cvt = exec->storage + exec->storeSize; @@ -297,8 +297,6 @@ exec->metrics = *size->metrics; exec->twilight = size->twilight; - - return FT_Err_Ok; } @@ -5457,11 +5455,11 @@ /* single width cut-in test */ /* |org_dist - single_width_value| < single_width_cutin */ - if ( exc->GS.single_width_cutin > 0 && - org_dist < exc->GS.single_width_value + - exc->GS.single_width_cutin && - org_dist > exc->GS.single_width_value - - exc->GS.single_width_cutin ) + if ( exc->GS.single_width_cutin > 0 && + org_dist < ADD_LONG( exc->GS.single_width_value, + exc->GS.single_width_cutin ) && + org_dist > SUB_LONG( exc->GS.single_width_value, + exc->GS.single_width_cutin ) ) { if ( org_dist >= 0 ) org_dist = exc->GS.single_width_value; diff --git a/thirdparty/freetype/src/truetype/ttinterp.h b/thirdparty/freetype/src/truetype/ttinterp.h index 2e69d19189..05ac831dfd 100644 --- a/thirdparty/freetype/src/truetype/ttinterp.h +++ b/thirdparty/freetype/src/truetype/ttinterp.h @@ -4,7 +4,7 @@ * * TrueType bytecode interpreter (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -439,7 +439,7 @@ FT_BEGIN_HEADER FT_LOCAL( void ) TT_Done_Context( TT_ExecContext exec ); - FT_LOCAL( FT_Error ) + FT_LOCAL( void ) TT_Load_Context( TT_ExecContext exec, TT_Face face, TT_Size size ); diff --git a/thirdparty/freetype/src/truetype/ttobjs.c b/thirdparty/freetype/src/truetype/ttobjs.c index fd0c0ad14f..dc89768858 100644 --- a/thirdparty/freetype/src/truetype/ttobjs.c +++ b/thirdparty/freetype/src/truetype/ttobjs.c @@ -4,7 +4,7 @@ * * Objects manager (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -734,6 +734,10 @@ /* a `loca' table is not valid */ if ( face->glyf_len && FT_ERR_EQ( error, Table_Missing ) ) goto Exit; + /* if both `glyf' and `loca' tables are missing, */ + /* we don't have a valid font file either */ + if ( face->glyf_len == 0 && FT_ERR_EQ( error, Locations_Missing ) ) + goto Bad_Format; if ( error ) goto Exit; } @@ -884,9 +888,7 @@ FT_Error error; - error = TT_Load_Context( exec, face, size ); - if ( error ) - return error; + TT_Load_Context( exec, face, size ); /* disable CVT and glyph programs coderange */ TT_Clear_CodeRange( exec, tt_coderange_cvt ); @@ -952,9 +954,7 @@ FT_ARRAY_ZERO( size->twilight.org, size->twilight.n_points ); FT_ARRAY_ZERO( size->twilight.cur, size->twilight.n_points ); - error = TT_Load_Context( exec, face, size ); - if ( error ) - return error; + TT_Load_Context( exec, face, size ); /* clear storage area */ FT_ARRAY_ZERO( exec->storage, exec->storeSize ); @@ -1043,13 +1043,15 @@ if ( !exec ) return FT_THROW( Could_Not_Find_Context ); + size->context = exec; + exec->pedantic_hinting = pedantic; exec->maxFDefs = maxp->maxFunctionDefs; exec->maxIDefs = maxp->maxInstructionDefs; if ( FT_NEW_ARRAY( exec->FDefs, exec->maxFDefs + exec->maxIDefs ) ) - goto Exit; + goto Fail; exec->IDefs = exec->FDefs + exec->maxFDefs; @@ -1059,16 +1061,30 @@ exec->maxFunc = 0; exec->maxIns = 0; - /* XXX: We reserve a little more elements on the stack to deal */ - /* with broken fonts like arialbs, courbs, timesbs, etc. */ - exec->stackSize = maxp->maxStackElements + 32; + /* We reserve extra elements on the stack to deal with broken fonts. */ + /* */ + /* Some fonts (e.g., `Rubik-Italic.ttf`) have buggy hinting bytecode */ + /* that pushes more values than `maxStackElements` declared in the */ + /* 'maxp' table. For example, `Rubik-Italic.ttf`'s 'prep' program */ + /* pushes 255 values but `maxStackElements` is only set to 153. */ + /* */ + /* To alleviate this situation we increase the value of */ + /* `maxStackElements` based on a percentage of `maxStackElements`, */ + /* with a minimum of 128 extra slots. This allows most broken fonts */ + /* to work without completely disabling hinting, while adding only a */ + /* small overhead for correctly authored fonts. */ + + /* Use 50% more than declared, with minimum safety margin of 128. */ + exec->stackSize = maxp->maxStackElements + + FT_MAX( maxp->maxStackElements / 2, 128 ); + exec->storeSize = maxp->maxStorage; exec->cvtSize = face->cvt_size; if ( FT_NEW_ARRAY( exec->stack, exec->stackSize + (FT_Long)( exec->storeSize + exec->cvtSize ) ) ) - goto Exit; + goto Fail; /* reserve twilight zone and set GS before fpgm is executed, */ /* just in case, even though fpgm should not touch them */ @@ -1079,11 +1095,10 @@ error = tt_glyphzone_new( memory, n_twilight, 0, &size->twilight ); if ( error ) - goto Exit; + goto Fail; size->GS = tt_default_graphics_state; size->cvt_ready = -1; - size->context = exec; size->ttmetrics.rotated = FALSE; size->ttmetrics.stretched = FALSE; @@ -1099,10 +1114,8 @@ error = tt_size_run_fpgm( size ); return error; - Exit: - if ( error ) - tt_size_done_bytecode( size ); - + Fail: + tt_size_done_bytecode( size ); return error; } diff --git a/thirdparty/freetype/src/truetype/ttobjs.h b/thirdparty/freetype/src/truetype/ttobjs.h index 28d6c7d855..9b2f412ac4 100644 --- a/thirdparty/freetype/src/truetype/ttobjs.h +++ b/thirdparty/freetype/src/truetype/ttobjs.h @@ -4,7 +4,7 @@ * * Objects manager (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttpload.c b/thirdparty/freetype/src/truetype/ttpload.c index 827454d857..5b0a3944d6 100644 --- a/thirdparty/freetype/src/truetype/ttpload.c +++ b/thirdparty/freetype/src/truetype/ttpload.c @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/truetype/ttpload.h b/thirdparty/freetype/src/truetype/ttpload.h index bb4d3c9cc5..ad0a9eb7a6 100644 --- a/thirdparty/freetype/src/truetype/ttpload.h +++ b/thirdparty/freetype/src/truetype/ttpload.h @@ -4,7 +4,7 @@ * * TrueType-specific tables loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1afm.c b/thirdparty/freetype/src/type1/t1afm.c index b1a0d23bed..cc94a0d4a4 100644 --- a/thirdparty/freetype/src/type1/t1afm.c +++ b/thirdparty/freetype/src/type1/t1afm.c @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1afm.h b/thirdparty/freetype/src/type1/t1afm.h index 92ff627dd0..f31c9d100f 100644 --- a/thirdparty/freetype/src/type1/t1afm.h +++ b/thirdparty/freetype/src/type1/t1afm.h @@ -4,7 +4,7 @@ * * AFM support for Type 1 fonts (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1driver.c b/thirdparty/freetype/src/type1/t1driver.c index 5ded771402..1d7a342708 100644 --- a/thirdparty/freetype/src/type1/t1driver.c +++ b/thirdparty/freetype/src/type1/t1driver.c @@ -4,7 +4,7 @@ * * Type 1 driver interface (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1driver.h b/thirdparty/freetype/src/type1/t1driver.h index 1cc3d24e7d..2869adab6e 100644 --- a/thirdparty/freetype/src/type1/t1driver.h +++ b/thirdparty/freetype/src/type1/t1driver.h @@ -4,7 +4,7 @@ * * High-level Type 1 driver interface (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1errors.h b/thirdparty/freetype/src/type1/t1errors.h index 46bddbc30f..efe53be1f4 100644 --- a/thirdparty/freetype/src/type1/t1errors.h +++ b/thirdparty/freetype/src/type1/t1errors.h @@ -4,7 +4,7 @@ * * Type 1 error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1gload.c b/thirdparty/freetype/src/type1/t1gload.c index b9bc0b56ce..dd9b6cd80f 100644 --- a/thirdparty/freetype/src/type1/t1gload.c +++ b/thirdparty/freetype/src/type1/t1gload.c @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1gload.h b/thirdparty/freetype/src/type1/t1gload.h index 6bedd132c5..b3de427a2f 100644 --- a/thirdparty/freetype/src/type1/t1gload.h +++ b/thirdparty/freetype/src/type1/t1gload.h @@ -4,7 +4,7 @@ * * Type 1 Glyph Loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1load.c b/thirdparty/freetype/src/type1/t1load.c index 0f11445bef..1d095f8ac1 100644 --- a/thirdparty/freetype/src/type1/t1load.c +++ b/thirdparty/freetype/src/type1/t1load.c @@ -4,7 +4,7 @@ * * Type 1 font loader (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1load.h b/thirdparty/freetype/src/type1/t1load.h index 2cd8241968..39d4b94e9d 100644 --- a/thirdparty/freetype/src/type1/t1load.h +++ b/thirdparty/freetype/src/type1/t1load.h @@ -4,7 +4,7 @@ * * Type 1 font loader (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1objs.c b/thirdparty/freetype/src/type1/t1objs.c index 7f25208f87..4ee0a59109 100644 --- a/thirdparty/freetype/src/type1/t1objs.c +++ b/thirdparty/freetype/src/type1/t1objs.c @@ -4,7 +4,7 @@ * * Type 1 objects manager (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1objs.h b/thirdparty/freetype/src/type1/t1objs.h index 6c71977c15..f152f630a8 100644 --- a/thirdparty/freetype/src/type1/t1objs.h +++ b/thirdparty/freetype/src/type1/t1objs.h @@ -4,7 +4,7 @@ * * Type 1 objects manager (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1parse.c b/thirdparty/freetype/src/type1/t1parse.c index ef643e298f..a9b8d18a6f 100644 --- a/thirdparty/freetype/src/type1/t1parse.c +++ b/thirdparty/freetype/src/type1/t1parse.c @@ -4,7 +4,7 @@ * * Type 1 parser (body). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1parse.h b/thirdparty/freetype/src/type1/t1parse.h index f4ad426e9e..ebd7c3fb34 100644 --- a/thirdparty/freetype/src/type1/t1parse.h +++ b/thirdparty/freetype/src/type1/t1parse.h @@ -4,7 +4,7 @@ * * Type 1 parser (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type1/t1tokens.h b/thirdparty/freetype/src/type1/t1tokens.h index c3736cd42c..745351a34c 100644 --- a/thirdparty/freetype/src/type1/t1tokens.h +++ b/thirdparty/freetype/src/type1/t1tokens.h @@ -4,7 +4,7 @@ * * Type 1 tokenizer (specification). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, @@ -33,7 +33,7 @@ T1_FIELD_DICT_FONTDICT ) /* we use pointers to detect modifications made by synthetic fonts */ - T1_FIELD_NUM ( "ItalicAngle", italic_angle, + T1_FIELD_FIXED ( "ItalicAngle", italic_angle, T1_FIELD_DICT_FONTDICT ) T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch, T1_FIELD_DICT_FONTDICT ) diff --git a/thirdparty/freetype/src/type1/type1.c b/thirdparty/freetype/src/type1/type1.c index ba053ebd63..b8e88e6eac 100644 --- a/thirdparty/freetype/src/type1/type1.c +++ b/thirdparty/freetype/src/type1/type1.c @@ -4,7 +4,7 @@ * * FreeType Type 1 driver component (body only). * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42drivr.c b/thirdparty/freetype/src/type42/t42drivr.c index 234fb16f9c..a45d13ebd1 100644 --- a/thirdparty/freetype/src/type42/t42drivr.c +++ b/thirdparty/freetype/src/type42/t42drivr.c @@ -4,7 +4,7 @@ * * High-level Type 42 driver interface (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42drivr.h b/thirdparty/freetype/src/type42/t42drivr.h index d286da02a5..1c2bb2029a 100644 --- a/thirdparty/freetype/src/type42/t42drivr.h +++ b/thirdparty/freetype/src/type42/t42drivr.h @@ -4,7 +4,7 @@ * * High-level Type 42 driver interface (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42error.h b/thirdparty/freetype/src/type42/t42error.h index f7c9a9403f..9c386d8c48 100644 --- a/thirdparty/freetype/src/type42/t42error.h +++ b/thirdparty/freetype/src/type42/t42error.h @@ -4,7 +4,7 @@ * * Type 42 error codes (specification only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42objs.c b/thirdparty/freetype/src/type42/t42objs.c index d20917aea2..a01c3129d0 100644 --- a/thirdparty/freetype/src/type42/t42objs.c +++ b/thirdparty/freetype/src/type42/t42objs.c @@ -4,7 +4,7 @@ * * Type 42 objects manager (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42objs.h b/thirdparty/freetype/src/type42/t42objs.h index 69a0fcd2fd..15767f8716 100644 --- a/thirdparty/freetype/src/type42/t42objs.h +++ b/thirdparty/freetype/src/type42/t42objs.h @@ -4,7 +4,7 @@ * * Type 42 objects manager (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42parse.c b/thirdparty/freetype/src/type42/t42parse.c index 5beab0b5a0..d645be2a01 100644 --- a/thirdparty/freetype/src/type42/t42parse.c +++ b/thirdparty/freetype/src/type42/t42parse.c @@ -4,7 +4,7 @@ * * Type 42 font parser (body). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, @@ -65,7 +65,7 @@ T1_FIELD_STRING( "FullName", full_name, 0 ) T1_FIELD_STRING( "FamilyName", family_name, 0 ) T1_FIELD_STRING( "Weight", weight, 0 ) - T1_FIELD_NUM ( "ItalicAngle", italic_angle, 0 ) + T1_FIELD_FIXED ( "ItalicAngle", italic_angle, 0 ) T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch, 0 ) T1_FIELD_NUM ( "UnderlinePosition", underline_position, 0 ) T1_FIELD_NUM ( "UnderlineThickness", underline_thickness, 0 ) diff --git a/thirdparty/freetype/src/type42/t42parse.h b/thirdparty/freetype/src/type42/t42parse.h index f8d0a8b265..4e61169a87 100644 --- a/thirdparty/freetype/src/type42/t42parse.h +++ b/thirdparty/freetype/src/type42/t42parse.h @@ -4,7 +4,7 @@ * * Type 42 font parser (specification). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/t42types.h b/thirdparty/freetype/src/type42/t42types.h index 72614b1799..b0bf9e8ecf 100644 --- a/thirdparty/freetype/src/type42/t42types.h +++ b/thirdparty/freetype/src/type42/t42types.h @@ -4,7 +4,7 @@ * * Type 42 font data types (specification only). * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * Roberto Alameda. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/type42/type42.c b/thirdparty/freetype/src/type42/type42.c index 82abeed7b8..da1e6214d3 100644 --- a/thirdparty/freetype/src/type42/type42.c +++ b/thirdparty/freetype/src/type42/type42.c @@ -4,7 +4,7 @@ * * FreeType Type 42 driver component. * - * Copyright (C) 2002-2025 by + * Copyright (C) 2002-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/winfonts/fnterrs.h b/thirdparty/freetype/src/winfonts/fnterrs.h index 9eae20aaec..b2644edbf3 100644 --- a/thirdparty/freetype/src/winfonts/fnterrs.h +++ b/thirdparty/freetype/src/winfonts/fnterrs.h @@ -4,7 +4,7 @@ * * Win FNT/FON error codes (specification only). * - * Copyright (C) 2001-2025 by + * Copyright (C) 2001-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, diff --git a/thirdparty/freetype/src/winfonts/winfnt.c b/thirdparty/freetype/src/winfonts/winfnt.c index 2653a2ecc1..264185058a 100644 --- a/thirdparty/freetype/src/winfonts/winfnt.c +++ b/thirdparty/freetype/src/winfonts/winfnt.c @@ -4,7 +4,7 @@ * * FreeType font driver for Windows FNT/FON files * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * Copyright 2003 Huw D M Davies for Codeweavers * Copyright 2007 Dmitry Timoshkov for Codeweavers diff --git a/thirdparty/freetype/src/winfonts/winfnt.h b/thirdparty/freetype/src/winfonts/winfnt.h index 56706450fa..420e11e3c6 100644 --- a/thirdparty/freetype/src/winfonts/winfnt.h +++ b/thirdparty/freetype/src/winfonts/winfnt.h @@ -4,7 +4,7 @@ * * FreeType font driver for Windows FNT/FON files * - * Copyright (C) 1996-2025 by + * Copyright (C) 1996-2026 by * David Turner, Robert Wilhelm, and Werner Lemberg. * Copyright 2007 Dmitry Timoshkov for Codeweavers *