From 455fea162744ea626704e6aa2bcfb0ad7aeb47e1 Mon Sep 17 00:00:00 2001 From: purplerain Date: Tue, 6 Aug 2024 22:23:11 +0000 Subject: [PATCH] sync with OpenBSD -current --- 3RDPARTY | 8 +- MODULES | 10 +- distrib/sets/lists/xbase/mi | 4 +- lib/freetype/CMakeLists.txt | 2 +- lib/freetype/ChangeLog | 1604 ++++ lib/freetype/Makefile | 6 +- lib/freetype/README | 8 +- lib/freetype/Symbols.map | 4 + lib/freetype/builds/freetype.mk | 2 +- lib/freetype/builds/mac/README | 8 - .../builds/meson/parse_modules_cfg.py | 6 +- lib/freetype/builds/toplevel.mk | 27 +- lib/freetype/builds/unix/configure.ac | 10 +- lib/freetype/builds/unix/configure.raw | 8 +- lib/freetype/builds/vms/apinames_vms.bash | 2 + lib/freetype/builds/vms/vmslib.dat | 28 - .../builds/wince/vc2005-ce/index.html | 2 +- .../builds/wince/vc2008-ce/index.html | 2 +- .../builds/windows/vc2010/freetype.vcxproj | 16 +- lib/freetype/builds/windows/vc2010/index.html | 2 +- .../builds/windows/visualc/index.html | 2 +- .../builds/windows/visualce/index.html | 2 +- lib/freetype/devel/ftoption.h | 47 +- lib/freetype/docs/CHANGES | 64 +- lib/freetype/docs/DEBUG | 6 +- lib/freetype/docs/INSTALL.VMS | 49 +- lib/freetype/docs/README | 2 - lib/freetype/docs/VERSIONS.TXT | 2 + lib/freetype/docs/formats.txt | 12 +- lib/freetype/docs/freetype-config.1 | 2 +- lib/freetype/docs/release | 44 +- lib/freetype/include/dlg/dlg.h | 190 +- .../include/freetype/config/ftoption.h | 47 +- .../include/freetype/config/ftstdlib.h | 14 +- lib/freetype/include/freetype/freetype.h | 565 +- lib/freetype/include/freetype/ftcache.h | 74 +- lib/freetype/include/freetype/ftchapters.h | 23 +- lib/freetype/include/freetype/ftdriver.h | 11 +- lib/freetype/include/freetype/ftimage.h | 10 +- lib/freetype/include/freetype/ftlogging.h | 2 +- lib/freetype/include/freetype/ftmm.h | 57 +- lib/freetype/include/freetype/ftoutln.h | 2 +- lib/freetype/include/freetype/ftrender.h | 2 +- lib/freetype/include/freetype/ftsynth.h | 12 + lib/freetype/include/freetype/ftsystem.h | 16 +- .../freetype/internal/compiler-macros.h | 7 +- .../include/freetype/internal/ftcalc.h | 4 +- .../include/freetype/internal/ftdrv.h | 1 + .../include/freetype/internal/ftmmtypes.h | 20 +- .../freetype/internal/services/svmetric.h | 10 +- .../include/freetype/internal/services/svmm.h | 109 +- .../freetype/internal/services/svpscmap.h | 2 +- .../include/freetype/internal/t1types.h | 26 +- .../include/freetype/internal/tttypes.h | 137 +- lib/freetype/shlib_version | 2 +- lib/freetype/src/autofit/afblue.dat | 2 +- lib/freetype/src/autofit/afcjk.c | 62 +- lib/freetype/src/autofit/afcjk.h | 20 +- lib/freetype/src/autofit/afglobal.c | 5 +- lib/freetype/src/autofit/afglobal.h | 2 +- lib/freetype/src/autofit/afhints.c | 58 +- lib/freetype/src/autofit/afindic.c | 32 +- lib/freetype/src/autofit/aflatin.c | 87 +- lib/freetype/src/autofit/aflatin.h | 4 +- lib/freetype/src/autofit/afloader.c | 6 +- lib/freetype/src/autofit/afmodule.c | 37 +- lib/freetype/src/autofit/afshaper.c | 6 +- lib/freetype/src/autofit/ft-hb.c | 2 +- lib/freetype/src/base/ftbbox.c | 42 +- lib/freetype/src/base/ftcalc.c | 88 +- lib/freetype/src/base/ftdbgmem.c | 2 +- lib/freetype/src/base/ftmac.c | 2 +- lib/freetype/src/base/ftmm.c | 146 +- lib/freetype/src/base/ftobjs.c | 26 +- lib/freetype/src/base/ftoutln.c | 52 +- lib/freetype/src/base/ftstream.c | 8 +- lib/freetype/src/base/ftstroke.c | 21 +- lib/freetype/src/base/ftsynth.c | 20 +- lib/freetype/src/base/ftsystem.c | 9 +- lib/freetype/src/base/ftver.rc | 4 +- lib/freetype/src/bdf/bdf.h | 4 - lib/freetype/src/bdf/bdfdrivr.c | 116 +- lib/freetype/src/bdf/bdflib.c | 67 +- lib/freetype/src/bzip2/ftbzip2.c | 19 +- lib/freetype/src/cache/ftcbasic.c | 8 +- lib/freetype/src/cache/ftccache.c | 125 +- lib/freetype/src/cache/ftccache.h | 17 +- lib/freetype/src/cache/ftcglyph.c | 46 +- lib/freetype/src/cache/ftcglyph.h | 15 +- lib/freetype/src/cache/ftcmanag.c | 42 +- lib/freetype/src/cache/ftcmru.c | 30 +- lib/freetype/src/cache/ftcsbits.c | 17 +- lib/freetype/src/cache/ftcsbits.h | 11 - lib/freetype/src/cff/cffcmap.c | 107 +- lib/freetype/src/cff/cffdrivr.c | 443 +- lib/freetype/src/cff/cffgload.c | 6 +- lib/freetype/src/cff/cffload.c | 40 +- lib/freetype/src/cff/cffload.h | 4 +- lib/freetype/src/cff/cffobjs.c | 24 +- lib/freetype/src/cff/cffparse.c | 252 +- lib/freetype/src/cff/cffparse.h | 13 +- lib/freetype/src/cid/cidgload.c | 141 +- lib/freetype/src/cid/cidgload.h | 8 + lib/freetype/src/cid/cidload.c | 51 +- lib/freetype/src/cid/cidobjs.c | 14 +- lib/freetype/src/cid/cidparse.c | 18 +- lib/freetype/src/cid/cidriver.c | 93 +- lib/freetype/src/dlg/dlgwrap.c | 2 +- lib/freetype/src/gxvalid/gxvfgen.c | 3 +- lib/freetype/src/gzip/README.freetype | 2 +- lib/freetype/src/gzip/ftgzip.c | 5 +- lib/freetype/src/gzip/infback.c | 644 -- lib/freetype/src/gzip/rules.mk | 34 +- lib/freetype/src/pcf/pcfdrivr.c | 122 +- lib/freetype/src/pfr/pfrcmap.c | 48 +- lib/freetype/src/pfr/pfrdrivr.c | 26 +- lib/freetype/src/pfr/pfrgload.c | 3 +- lib/freetype/src/pfr/pfrload.c | 60 +- lib/freetype/src/pfr/pfrobjs.c | 6 +- lib/freetype/src/psaux/afmparse.c | 2 +- lib/freetype/src/psaux/cffdecode.c | 6 +- lib/freetype/src/psaux/pshints.c | 2 +- lib/freetype/src/psaux/t1cmap.c | 141 +- lib/freetype/src/psaux/t1decode.c | 4 +- lib/freetype/src/pshinter/pshalgo.c | 2 +- lib/freetype/src/pshinter/pshmod.c | 9 +- lib/freetype/src/pshinter/pshrec.c | 63 +- lib/freetype/src/psnames/psmodule.c | 42 +- lib/freetype/src/raster/ftraster.c | 44 +- lib/freetype/src/raster/ftrend1.c | 21 +- lib/freetype/src/sdf/ftbsdf.c | 7 +- lib/freetype/src/sdf/ftsdf.c | 21 +- lib/freetype/src/sdf/ftsdfrend.c | 35 +- lib/freetype/src/sfnt/pngshim.c | 7 +- lib/freetype/src/sfnt/sfdriver.c | 143 +- lib/freetype/src/sfnt/sfobjs.c | 30 +- lib/freetype/src/sfnt/sfwoff.c | 2 +- lib/freetype/src/sfnt/sfwoff2.c | 20 +- lib/freetype/src/sfnt/ttbdf.c | 13 +- lib/freetype/src/sfnt/ttbdf.h | 2 +- lib/freetype/src/sfnt/ttcmap.c | 547 +- lib/freetype/src/sfnt/ttcolr.c | 10 +- lib/freetype/src/sfnt/ttcpal.c | 2 +- lib/freetype/src/sfnt/ttload.c | 7 + lib/freetype/src/sfnt/ttmtx.c | 2 +- lib/freetype/src/sfnt/ttpost.c | 288 +- lib/freetype/src/sfnt/ttsbit.c | 2 +- lib/freetype/src/sfnt/ttsvg.c | 2 +- lib/freetype/src/sfnt/woff2tags.c | 2 +- lib/freetype/src/smooth/ftgrays.c | 54 +- lib/freetype/src/smooth/ftsmooth.c | 22 +- lib/freetype/src/svg/ftsvg.c | 45 +- lib/freetype/src/tools/apinames.c | 44 +- lib/freetype/src/tools/ftrandom/ftrandom.c | 2 +- lib/freetype/src/tools/vms_shorten_symbol.c | 250 + lib/freetype/src/truetype/rules.mk | 3 +- lib/freetype/src/truetype/truetype.c | 1 - lib/freetype/src/truetype/ttdriver.c | 157 +- lib/freetype/src/truetype/ttgload.c | 565 +- lib/freetype/src/truetype/ttgxvar.c | 524 +- lib/freetype/src/truetype/ttgxvar.h | 40 +- lib/freetype/src/truetype/ttinterp.c | 963 +- lib/freetype/src/truetype/ttinterp.h | 84 +- lib/freetype/src/truetype/ttobjs.c | 88 +- lib/freetype/src/truetype/ttobjs.h | 8 +- lib/freetype/src/truetype/ttpload.c | 37 +- lib/freetype/src/truetype/ttpload.h | 6 +- lib/freetype/src/truetype/ttsubpix.c | 1013 -- lib/freetype/src/truetype/ttsubpix.h | 110 - lib/freetype/src/type1/t1afm.c | 4 +- lib/freetype/src/type1/t1driver.c | 93 +- lib/freetype/src/type1/t1load.c | 260 +- lib/freetype/src/type1/t1load.h | 22 +- lib/freetype/src/type1/t1objs.c | 8 +- lib/freetype/src/type42/t42drivr.c | 43 +- lib/freetype/src/type42/t42parse.c | 94 +- lib/freetype/src/winfonts/winfnt.c | 40 +- lib/freetype/subprojects/libpng.wrap | 17 +- lib/freetype/subprojects/zlib.wrap | 17 +- lib/freetype/vms_make.com | 1293 ++- lib/libX11/ChangeLog | 559 ++ lib/libX11/Makefile.bsd-wrapper | 4 +- lib/libX11/README.md | 11 + lib/libX11/aclocal.m4 | 90 +- lib/libX11/compile | 11 +- lib/libX11/configure | 52 +- lib/libX11/configure.ac | 2 +- lib/libX11/modules/im/ximcp/imDefFlt.c | 42 +- lib/libX11/modules/im/ximcp/imDefIm.c | 20 +- lib/libX11/modules/im/ximcp/imDefLkup.c | 159 +- lib/libX11/modules/im/ximcp/imExten.c | 2 +- lib/libX11/modules/im/ximcp/imRmAttr.c | 1 + lib/libX11/modules/om/generic/omGeneric.c | 2 +- lib/libX11/nls/en_US.UTF-8/Compose.pre | 27 +- lib/libX11/src/CopyCmap.c | 5 - lib/libX11/src/CrCmap.c | 6 +- lib/libX11/src/FilterEv.c | 25 + lib/libX11/src/FreeCmap.c | 6 +- lib/libX11/src/KeyBind.c | 3 +- lib/libX11/src/imConv.c | 4 + lib/libX11/src/xcms/cmsCmap.c | 14 + lib/libX11/src/xcms/cmsTrig.c | 4 + lib/libX11/src/xkb/XKBMAlloc.c | 2 +- lib/libX11/src/xlibi18n/XimintP.h | 20 + lib/libX11/src/xlibi18n/lcFile.c | 12 +- lib/libXtst/ChangeLog | 125 +- lib/libXtst/Makefile.in | 1 - lib/libXtst/aclocal.m4 | 166 +- lib/libXtst/compile | 11 +- lib/libXtst/config.guess | 1783 ++-- lib/libXtst/config.h.in | 10 +- lib/libXtst/config.sub | 2954 +++--- lib/libXtst/configure | 8471 +++++++++-------- lib/libXtst/configure.ac | 5 +- lib/libXtst/install-sh | 414 +- lib/libXtst/m4/libtool.m4 | 8400 ++++++++++++++++ lib/libXtst/m4/ltoptions.m4 | 437 + lib/libXtst/m4/ltsugar.m4 | 124 + lib/libXtst/m4/ltversion.m4 | 24 + lib/libXtst/m4/lt~obsolete.m4 | 99 + lib/libXtst/man/Makefile.am | 2 +- lib/libXtst/man/Makefile.in | 3 +- lib/libXtst/specs/Makefile.in | 1 - lib/libXtst/src/Makefile.in | 1 - lib/libXtst/src/XRecord.c | 57 +- xserver/dix/devices.c | 1 - xserver/glamor/glamor_egl.c | 2 +- xserver/hw/dmx/man/Makefile.am | 2 - xserver/hw/dmx/man/Xdmx.man | 732 -- 229 files changed, 25075 insertions(+), 13981 deletions(-) create mode 100644 lib/freetype/builds/vms/apinames_vms.bash delete mode 100644 lib/freetype/builds/vms/vmslib.dat delete mode 100644 lib/freetype/src/gzip/infback.c create mode 100644 lib/freetype/src/tools/vms_shorten_symbol.c delete mode 100644 lib/freetype/src/truetype/ttsubpix.c delete mode 100644 lib/freetype/src/truetype/ttsubpix.h create mode 100644 lib/libXtst/m4/libtool.m4 create mode 100644 lib/libXtst/m4/ltoptions.m4 create mode 100644 lib/libXtst/m4/ltsugar.m4 create mode 100644 lib/libXtst/m4/ltversion.m4 create mode 100644 lib/libXtst/m4/lt~obsolete.m4 delete mode 100644 xserver/hw/dmx/man/Makefile.am delete mode 100644 xserver/hw/dmx/man/Xdmx.man diff --git a/3RDPARTY b/3RDPARTY index 4660cd33..b8d9db6d 100644 --- a/3RDPARTY +++ b/3RDPARTY @@ -1,21 +1,21 @@ -# $OpenBSD: 3RDPARTY,v 1.429 2024/07/19 19:00:02 matthieu Exp $ +# $OpenBSD: 3RDPARTY,v 1.432 2024/08/04 18:22:48 matthieu Exp $ # Package: Freetype -Version: 2.13.0 +Version: 2.13.2 Current Vers: 2.13.2 Maintainer: Freetype.org Archive Site: http://download.savannah.gnu.org/releases/freetype/ Package: xterm -Version: 378 +Version: 393 Current Vers: 393 Maintainer: Thomas E. Dickey Archive Site: http://invisible-island.net/xterm/xterm.html Package: Mesa Version 23.3.6 -Current Vers: 24.1.4 +Current Vers: 24.1.5 Maintainer: Brian Paul Archive Site: https://archive.mesa3d.org/ diff --git a/MODULES b/MODULES index c6d13aaa..4a40dbab 100644 --- a/MODULES +++ b/MODULES @@ -1,4 +1,4 @@ -# $OpenBSD: MODULES,v 1.525 2024/07/19 15:12:09 matthieu Exp $ +# $OpenBSD: MODULES,v 1.527 2024/08/04 18:22:48 matthieu Exp $ # # X.Org maintained modules # @@ -22,7 +22,7 @@ app/setxkbmap 1.3.4 app/smproxy 1.0.7 app/twm 1.0.12 app/viewres 1.0.7 -app/x11perf 1.6.2 +app/x11perf 1.7.0 needs-update app/xauth 1.1.3 app/xbacklight 1.2.3 app/xbiff 1.0.5 @@ -149,7 +149,7 @@ font/xfree86-type1 1.0.5 lib/libICE 1.1.1 lib/libSM 1.2.4 -lib/libX11 1.8.9 +lib/libX11 1.8.10 lib/libXScrnSaver 1.2.4 lib/libXau 1.0.11 lib/libXaw 1.0.16 @@ -159,7 +159,7 @@ lib/libXdamage 1.1.6 lib/libXdmcp 1.1.5 lib/libXext 1.3.6 lib/libXfixes 6.0.1 -lib/libXfont2 2.0.6 +lib/libXfont2 2.0.7 needs-update lib/libXft 2.3.8 lib/libXi 1.8.1 lib/libXinerama 1.1.5 @@ -170,7 +170,7 @@ lib/libXrandr 1.5.4 lib/libXrender 0.9.11 lib/libXres 1.2.2 lib/libXt 1.3.0 -lib/libXtst 1.2.4 +lib/libXtst 1.2.5 lib/libXv 1.0.12 lib/libXvMC 1.0.14 lib/libXxf86dga 1.1.6 diff --git a/distrib/sets/lists/xbase/mi b/distrib/sets/lists/xbase/mi index fe15faeb..31359c49 100644 --- a/distrib/sets/lists/xbase/mi +++ b/distrib/sets/lists/xbase/mi @@ -218,7 +218,7 @@ ./usr/X11R6/lib/libX11-xcb.so.2.0 ./usr/X11R6/lib/libX11.a ./usr/X11R6/lib/libX11.la -./usr/X11R6/lib/libX11.so.18.1 +./usr/X11R6/lib/libX11.so.18.2 ./usr/X11R6/lib/libXRes.a ./usr/X11R6/lib/libXRes.la ./usr/X11R6/lib/libXRes.so.5.1 @@ -309,7 +309,7 @@ ./usr/X11R6/lib/libfontenc.la ./usr/X11R6/lib/libfontenc.so.4.0 ./usr/X11R6/lib/libfreetype.a -./usr/X11R6/lib/libfreetype.so.30.3 +./usr/X11R6/lib/libfreetype.so.30.4 ./usr/X11R6/lib/libpciaccess.a ./usr/X11R6/lib/libpciaccess.so.2.1 ./usr/X11R6/lib/libpixman-1.a diff --git a/lib/freetype/CMakeLists.txt b/lib/freetype/CMakeLists.txt index 554b580e..8dbca01e 100644 --- a/lib/freetype/CMakeLists.txt +++ b/lib/freetype/CMakeLists.txt @@ -164,7 +164,7 @@ project(freetype C) set(VERSION_MAJOR "2") set(VERSION_MINOR "13") -set(VERSION_PATCH "0") +set(VERSION_PATCH "2") # Generate LIBRARY_VERSION and LIBRARY_SOVERSION. set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'") diff --git a/lib/freetype/ChangeLog b/lib/freetype/ChangeLog index 16faf18b..ca58f007 100644 --- a/lib/freetype/ChangeLog +++ b/lib/freetype/ChangeLog @@ -1,3 +1,1607 @@ +2023-08-25 Werner Lemberg + + * Version 2.13.2 released. + ========================== + + Tag sources with `VER-2-13-2'. + + * docs/VERSION.TXT: Add entry for version 2.13.2. + * docs/CHANGES: Updated. + * docs/release, docs/README, builds/macs/README: Updated. + + * README, src/base/ftver.rc, builds/windows/vc2010/index.html, + builds/windows/visualc/index.html, builds/windows/visualce/index.html, + builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, + docs/freetype-config.1: s/2.13.1/2.13.2/, s/2131/2132/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. + + * builds/unix/configure.raw (version_info): Set to 26:1:20. + * CMakeLists.txt (VERSION_PATCH): Set to 2. + +2023-08-25 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_MulAddFix): Simplify 32-bit rounding. + +2023-08-25 Werner Lemberg + + Fix clang warnings. + + * src/cffload.c (cff_blend_doBlend): Fix type of `sum`. + * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Fix type of + `word_delta_count`. + +2023-08-24 Werner Lemberg + + * subprojects/*.wrap: Updated. + +2023-08-24 Hugh McMaster + + builds/unix/configure.raw: Use variable to specify minimum Python version. + +2023-08-24 Alexei Podtelezhnikov + + * builds/toplevel.mk: Simplify version extraction. + +2023-08-22 Alexei Podtelezhnikov + + [base] Improve the matrix degeneracy check. + + Also fixes #1251. + + * src/base/ftcalc.c (FT_Matrix_Check): To avoid overflow, scale by shifting. + * include/freetype/internal/ftcalc.h (FT_Matrix_Check): Update description. + +2023-08-22 Werner Lemberg + + builds/toplevel.mk: Don't use `\#` in functions. + + The behaviour changed in GNU make 4.3, where `#` (without the backslash) + would be necessary. Using a variable instead the code works with both older + and newer GNU make versions. + + Fixes #1252. + +2023-08-19 Hugh McMaster + + builds/freetype.mk: Invoke `mkdocs` as a Python module + + FreeType's `refdoc` target currently allows users to override the + default Python path, which is useful for testing and development. + + In contrast, `mkdocs` is invoked via the default Python path. + + Invoking `mkdocs` via Python's module syntax allows for greater + flexibility, although there is no change for the default use case. + +2023-08-17 Ben Wagner + + [base] Avoid UB with memcpy + + `FT_NEW_ARRAY(p, 0)` sets `p` to `NULL`. `FT_Stream_ReadAt` with a + memory based stream uses `FT_MEM_COPY` which is `memcpy` which specifies + that it is undefined behavior for either the `src` or `dst` to be + `NULL`. Instead of forcing all callers work around calling + `FT_Stream_Read` when `buffer == NULL && count == 0` do the check in + `FT_StreamRead`. This allows any call with `count == 0` to succesfully + read zero bytes without UB. + + * src/base/ftstream.c (FT_Stream_ReadAt): skip `FT_MEM_COPY` when + `count == 0`. (FT_Stream_TryRead): ditto + + Fixes: #1250 + +2023-08-12 Werner Lemberg + + Fix warnings in tracing messages for 32bit compilation. + + Since we now require C99, use `%td` for `ptrdiff_t` and `%zu` for `size_t`. + +2023-08-04 Ben Wagner + + Avoid overflow in COLR bounds checks. + + The values read into `base_glyphs_offset_v1` and `layer_offset_v1` may + be in the range 0xFFFFFFFD-0xFFFFFFFF. On systems where `unsigned long` + is 32 bits adding 4 to such values will wrap and pass bounds checks but + accessing values at such offsets will be out of bounds. + + On the other hand `table_size` has already been tested to be at least + `COLRV1_HEADER_SIZE` (34) so it is safe to subtract 4 from it. + + * src/sfnt/ttcolr.c (tt_face_load_colr): subtract 4 from `table_size` + instead of adding 4 to font data offsets in bounds checks + + Fixes: https://crbug.com/1469348 + +2023-08-02 Alexei Podtelezhnikov + + * src/base/ftobjs.c (open_face_from_buffer): Silence `maybe-uninitialized`. + + We never call this function without a `driver_name` (#1245). + +2023-07-29 Alexei Podtelezhnikov + + [truetype] Reduce v40 footprint. + + * src/truetype/ttgload.c (TT_HInt_Glyph, tt_loader_set_pp, + tt_loader_init): Refactor code. + +2023-07-27 Alexei Podtelezhnikov + + [truetype] Remove Infinality for good (remaining bits). + + * src/truetype/ttobjs.h: Remove remaining fields. + * src/truetype/ttinterp.c: Do not initialize them. + * include/freetype/internal/tttypes.h: Remove descriptions. + +2023-07-27 Alexei Podtelezhnikov + + [truetype] Remove Infinality for good. + + Remove everything `#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY`, + which was undefined for a while now. + + * include/freetype/internal/tttypes.h: Ditto. + * src/truetype/truetype.c: Ditto. + * src/truetype/ttdriver.c: Ditto. + * src/truetype/ttgload.c: Ditto. + * src/truetype/ttinterp.c: Ditto. + * src/truetype/ttinterp.h: Ditto. + * src/truetype/ttobjs.c: Ditto. + * src/truetype/ttsubpix.[ch]: Remove files. + * src/truetype/rules.mk: Don't mention "ttsubpix.c". + +2023-07-21 Jouk Jansen + + * vms_make.com: Provide separate library compiled with C++. + + Some types on OpenVMS x86_64 (for example, `long') have different sizes + depending on whether compiled with either C or C++. In particular, + X-Windows applications crash if linked with the C++ version. + + This patch makes `vms_make.com` create a second version of the FreeType + library compiled with C++ if OpenVMS is running on the x86_64 platform. + +2023-07-21 Jouk Jansen + + * vms_make.com: Fix typos. + +2023-07-21 Jouk Jansen + + * src/smooth/ftgrays.c (FT_SSE2): Fix definition for VMS. + +2023-07-19 Jouk Jansen + + vms_make.com: Make use of additional libraries optional. + + Check whether `.olb` files are present. + + Also check for the HarfBuzz library. + +2023-07-19 Jouk Jansen + + vms_make.com: Add `/warn=noinfo` to `CFLAGS`. + + This reduces enormously the informationals while compiling on x86_64 (i.e., + which `.h` file is inluded form where). + +2023-07-18 Ben Wagner + + [woff2] Clean up on large brotli expansion + + * src/sfnt/sfwoff2.c (woff2_open_font): set error and goto cleanup + + Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60711 + +2023-07-16 Werner Lemberg + + [woff2] Avoid allocation bomb. + + This is a fix for commit 85167dbd5, reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60615 + + * src/sfnt/sfwoff2.c (MAX_SFNT_SIZE): New macro. + (woff2_open_font): Use it to limit the maximum size of an uncompressed WOFF2 + font. + +2023-07-14 Werner Lemberg + + [cff] Fix compiler warning. + + * src/cff/cffparse.c, src/cff/cffparse.h: Make `cff_parse_fixed` a local + function. + +2023-07-14 Ben Wagner + + [woff2] Remove sfnt size guess check + + In WOFF the `totalSfntSize` must be correct, however in WOFF2 this value + is now just a hint and a conforming implementation must not reject + otherwise valid data if the `totalSfntSize` turns out not to be exact. + + * src/sfnt/sfwoff2.c (woff2_open_font): remove check that uncompressed + woff2 data would fit in the sfnt size guess. + + Fixes: #1235 + +2023-07-14 Skef Iterum + + [cff] Make blend operator work with floats in private dicts. + + The CFF2 blend operator takes N default values and corresponding + sets of deltas and pushes N values specific to a designspace + location. CFF has a floating point numeric type and the FreeType + blending code was not converting those into its internal 16.16 + Fixed type format. + + Fixes #1243. + + * src/cff/cffparse.c (do_fixed): Handle floating point numbers. + Also fix scaling overflow check for integer-to-fixed conversion. + + * src/cff/cffload.c (cff_blend_doBlend): Updated. + +2023-07-08 Hin-Tak Leung + + * src/truetype/ttgload.c (TT_Hint_Glyph): More mostly cosmetic update. + + This is a follow-up to commit 49c74ac02, which creates a new local variable + "exec = loader->exec", and shortening a lot of "loader->exec". This commit + does two more such changes missed in that first commit. + +2023-07-06 Hugh McMaster + + [gzip] Don't compile internal zlib development files when using system zlib. + + `src/gzip/rules.mk` compiles the internal zlib sources even when using the + zlib development files provided by a host system. If the internal zlib + development files are not present, FreeType fails to build from source. + + This patch ensures the internal zlib development files are only + prerequisites when not using zlib development files on a host system. + + * src/gzip/rules.mk (GZIP_DRV_SRCS): Define conditionally. + +2023-06-24 Werner Lemberg + + * Version 2.13.1 released. + ========================== + + Tag sources with `VER-2-13-1'. + + * docs/VERSION.TXT: Add entry for version 2.13.1. + * docs/CHANGES: Updated. + * docs/release, docs/README, builds/macs/README: Updated. + + * README, src/base/ftver.rc, builds/windows/vc2010/index.html, + builds/windows/visualc/index.html, builds/windows/visualce/index.html, + builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, + docs/freetype-config.1: s/2.13.0/2.13/1/, s/2130/2131/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + + * builds/unix/configure.raw (version_info): Set to 26:0:20. + * CMakeLists.txt (VERSION_PATCH): Set to 1. + + * subprojects/libpng.wrap, subprojects/zlib.wrap, subprojects/dlg: Updated. + +2023-06-09 suzuki toshiya + + Comment fixes. + +2023-06-09 Werner Lemberg + + [sdf] Correct handling of empty glyphs. + + This is a refinement of commit 7b3ebb9. + + * src/sdf/ftsdfrend.c (ft_sdf_render): Goto 'Exit' instead of directly + returning. + (fd_bsdf_render): Ditto, also taking care of setting `FT_GLYPH_OWN_BITMAP` + correctly. + +2023-06-05 Ben Wagner + + Mark FT_Renderer_Class::raster_class as pointer to const + + The `FT_DEFINE_RASTER_FUNCS` macro declares a `const FT_Raster_Funcs`. + The address of the definition is taken and assigned to + `FT_Renderer_Class::raster_class` which is currently `FT_Raster_Funcs*`. + Until recently the `const` was cast away and with the removal of the + cast there are now warnings about dropping this `const`. Instead of + adding back the casts, make `FT_Renderer_Class::raster_class` a pointer + to const, as is done with pointers in other interfaces. + + * include/freetype/ftrender.h (FT_Renderer_Class_): mark `raster_class` + as const. + +2023-06-03 Ben Wagner + + Fix some `FT_Fixed` vs. `FT_Long` confusion. + + `FT_Fixed` and `FT_Long` are both typedef'ed to be `signed long`. However, + `FT_Fixed` implies that the lower 16 bits are being used to express + fractional values and so these two types should not be confused. + + * include/freetype/internal/services/svmm.h (FT_Set_MM_Blend_Func): Use + `FT_Fixed` for `coords`. Users are passing `FT_Fixed` and implementations + are taking `FT_Fixed`. + (FT_Get_MM_Blend_Func): Ditto. + + * src/autofit/afcjk.c (af_cjk_metrics_check_digits): Use `FT_Long` for + `advance` and `old_advance`. `advance`'s address is passed as `FT_Long*` to + `af_shaper_get_elem`, which writes the advance in em units (not fixed). The + exact value is not important here as it is only compared to check whether it + has changed. + + * src/autofit/aflatin.c (af_latin_metrics_check_digits): Ditto. + +2023-06-03 Ben Wagner + + */*: Remove many function pointer casts. + + In C it is undefined behavior to call a function through a function pointer + of a different type. This is now detected by the Control Flow Integrity + Sanitizer. All known issues have already been fixed. Prevent any + accidental re-introduction by removing function pointer casts when defining + services. The services will call the service functions through the function + pointers on the service. As a result the functions must have the same type + so there should be no need to cast. Removing the casts allows compilers to + warn about assignment to an incompatible function pointer type. + +2023-06-03 Werner Lemberg + + Minor formatting. + +2023-05-23 Werner Lemberg + + Replace `sprintf` with `snprintf`. + + Fixes #1233. + + * include/freetype/config/ftstdlib.h (ft_sprintf): Replace with... + (ft_snprintf): This new macro. + + * src/autofit/afhints.c (af_print_idx): Add argument to pass the buffer + size. + (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, + af_glyph_hints_dump_edges): Updated. + + * src/bdf/bdflib.c (BUFSIZE): New macro. + (bdf_parse_properties_, bdf_parse_start_): Use `ft_snprintf`. + + * src/tools/ftrandom/ftrandom.c (do_test): Use `snprintf`. + +2023-05-23 Werner Lemberg + + docs/DEBUG: Formatting. + +2023-05-20 suzuki toshiya + + [doc] Type1 GX (sfnt-wrapped Type1) is not supported. + + * docs/formats.txt: Clarify the reference of Type1 GX, + and state that this format is not supported. This + is because the content `TYP1' table is not exactly same + with the Type1 font format specification; no eexec + encryption is used. For detail and concrete examples, + see the analysis on: + + https://gitlab.freedesktop.org/freetype/freetype/-/issues/1231 + +2023-05-19 Craig White + + Add missing end quote of a string in the example code of FT_Trace_Set_Level + +2023-05-19 Seigo Nonaka + + [truetype] Reduce heap allocation of `deltaSet` variation data. + + `deltaSet` is an array of packed integers that can be 32 bits, 16 bits, or + 8 bits. Before this change, these values were unpacked to 32-bit integers. + However, this can cause big heap allocations, e.g., around 500 KByte for + 'NotoSansCJK'. To reduce this amount, store the packed integers and unpack + them just before passing to the calculation. At calculation time, due to + the variable length of region indices, temporary heap allocations are + necessary. This heap allocation is not negligible and visible in `ftbench` + results. So, use stack-allocated arrays for short array calculations. + + Fixes #1230. + + * include/freetype/internal/ftmmtypes.h (GX_ItemVarDataRec): New fields + `wordDeltaCount` and `longWords`. + + * src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Load packed + data. + (tt_var_get_item_delta): Unpack data before applying. + +2023-05-17 Jouk Jansen + + vms_make.com: Create shared executable for x86 version of OpenVMS. + +2023-05-15 Werner Lemberg + + Add new load flag `FT_LOAD_NO_SVG`. + + Modern color fonts often contain both an 'SVG' and 'COLR' table. FreeType + always preferred 'SVG' over 'COLR' (this was a design decision), however, + this might not be the right choice for the user. The new flags makes + FreeType ignore the 'SVG' table while loading a glyph. + + Fixes #1229. + + * include/freetype/freetype.h (FT_LOAD_NO_SVG): New macro. + + * src/base/ftobjs.c (FT_Load_Glyph), src/cff/cffgload.c (cff_slot_load), + src/truetype/ttgload.c (TT_Load_Glyph): Use it. + +2023-05-13 Werner Lemberg + + .mailmap: Updated. + +2023-05-13 Alexei Podtelezhnikov + + [cache] Merge functions. + + * src/cache/ftccache.c (FTC_Cache_Init): Merge into... + (ftc_cache_done): ... this function, with unnecessary checks removed. + +2023-05-13 Alexei Podtelezhnikov + + [cache] Minor casting and cosmetic updates. + + * src/cache/ftcglyph.c (ftc_gcache_{init,done}): Remove casting. + (FTC_GCache_Lookup): Cosmetic variable renaming. + * src/cache/ftcsbits.c (ftc_snode_compare): Formatting. + +2023-05-12 Werner Lemberg + + * include/freetype/ftcache.h: Typo, punctuation. + +2023-05-12 Alexei Podtelezhnikov + + * include/freetype/ftcache.h: Formatted and updated. + +2023-05-12 suzuki toshiya + + * include/freetype/internal/t1types.h: Fix the indentation. + +2023-05-11 Alexei Podtelezhnikov + + [cache] Revise the dynamic hash table accounting. + + Instead of counting entries relative to the middle of the hash table, + this switches to the absolute counter with the full index range mask. + As a result, some calculations become a bit simpler. The cache resizing + logic stays largely the same. + + * src/cache/ftccache.h (FTC_NODE_TOP_FOR_HASH): Revised with new counter. + * src/cache/ftccache.c (ftc_get_top_node_for_hash): Ditto. + (ftc_cache_resize): Simplify reallocations and stop their zeroing. + (ftc_cache_init): Stop over-allocating but keep zeroing initially. + (FTC_Cache_Clear, FTC_Cache_RemoveFaceID): Updated accordingly. + +2023-05-11 suzuki toshiya + + [t1cid] Set FT_FACE_FLAG_CID_KEYED. + + * cidobjs.c (cid_face_init): Set FT_FACE_FLAG_CID_KEYED. + + * cidriver.c (cid_get_is_cid): Comment about the case that + is_cid cannot guarantee the glyph collection specification. + +2023-05-09 Jouk Jansen + + * src/smooth/ftgrays.c (FT_SSE2): Don't define for VMS. + +2023-05-08 Werner Lemberg + + * src/cff/cffdrivr.c (cff_glyph_load): Fix guard for `size`. + + This was forgotten to change in commit 2b54eba36b (in May 2004). + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58739 + +2023-05-08 Werner Lemberg + + Minor compiler warning fixes. + + * src/autofit/afcjk.c (af_cjk_get_standard_widths), src/autofit/aflatin.c + (af_latin_get_standard_widths): Use `FT_CALLBACK_DEF`. + + * src/cff/cffparse.c (cff_parser_run): Initialize and fix allocation of `q`. + +2023-05-08 Werner Lemberg + + * src/psaux/t1cmap.c: Signature fixes. + +2023-05-08 Werner Lemberg + + * src/bzip2/ftbzip2.c: Signature fixes. + +2023-05-08 Werner Lemberg + + [cache] Signature fixes. + + * src/cache/ftcglyph.c, src/cache/ftcglyph.h (FTC_GNode_Compare): Remove + redundant function. It is equivalent to `ftc_gnode_compare` and becomes + completely meaningless with fixed signatures. + Update all callers. + + * src/cache/ftcsbits.c, src/cache/ftcsbits.h (FTC_SNode_Compare): Remove + redundant function. It is equivalent to `ftc_snode_compare` and becomes + completely meaningless with fixed signatures. + Update all callers. + +2023-05-07 Werner Lemberg + + [sdf] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/svg/ftsvg.c: Signature fixes. + +2023-05-07 Werner Lemberg + + [raster] Signature fixes. + +2023-05-07 Werner Lemberg + + [smooth] Signature fixes. + +2023-05-07 Werner Lemberg + + [pshinter] Signature fixes. + + * src/pshinter/pshrec.c (t1_hints_close, t1_hints_apply): New wrapper + functions. + (t1_hints_funcs_init): Use them. + (t2_hints_close, t2_hints_apply): New wrapper functions. + (t2_hints_funcs_init): Use them. + +2023-05-07 Werner Lemberg + + [autofit] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/sfnt/ttcmap: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/pcf/pcfdrivr.c: Signature fix. + +2023-05-07 Werner Lemberg + + * src/winfonts/winfnt.c: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/type42/t42parse.c: Signature fixes. + +2023-05-07 Werner Lemberg + + [pfr] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/cid/cidload.c: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/cff/cffcmap.c: Signature fixes. + +2023-05-07 Werner Lemberg + + * src/type1/t1load.c: Signature fixes. + +2023-05-07 Werner Lemberg + + [truetype] Signature fixes. + +2023-05-07 Werner Lemberg + + [base] Signature fixes. + +2023-05-07 Werner Lemberg + + * src/type42/t42drivr.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/type1/*: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/truetype/*: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + + * src/sfnt/sfdriver.c (sfnt_load_table): New wrapper function. + (sfnt_service_sfnt_table): Use it. + +2023-05-07 Werner Lemberg + + * src/psnames/psmodule.c: Use `FT_CALLBACK_DEF`. + +2023-05-07 Werner Lemberg + + * src/pfr/pfrdrivr.c: face -> pfrface, pfrface -> face. + +2023-05-07 Werner Lemberg + + * src/pcf/pcfdrivr.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/cid/cidriver.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/bdf/bdfdrivr.c: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-07 Werner Lemberg + + * src/cff/*: Clean up interface. + + Ensure that all driver functions use the signature of the service or driver. + This avoids pointer mismatches, which are technically undefined behaviour. + Recent compilers are more picky in catching them as part of Control Flow + Integrity tests. + +2023-05-06 Werner Lemberg + + [truetype] Fix style name handling for variation fonts. + + * include/freetype/internal/tttypes.h (TT_FaceRec): New field + `non_var_style_name`. + + * src/sfnt/sfobjs.c (sfnt_load_face): Initialize `non_var_style_name`. + (sfnt_done_face): Free `non_var_style_name`. + + * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Restore non-VF style name + if switching back to non-VF mode. + +2023-05-06 Werner Lemberg + + [truetype] Fix PostScript name handling for variation fonts. + + A variation font's PostScript name of a named instance is usually different + from the PostScript name of an unnamed instance. However, if a change + between a named instance and an unnamed instance with exactly the same + design axis values happened, it was possible that the PostScript name wasn't + correctly updated. + + This commit reorganizes the code to handle this issue within the top-level + API functions, using a new service to trigger recomputation of the + PostScript name. + + * include/freetype/internal/services/svmm.h (FT_Construct_PS_Name_Func): New + typedef. + (FT_Service_MultiMasters): New field `construct_ps_name`. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call + `mm->construct_ps_name` to handle `postscript_name`. + (FT_Set_Named_Instance): Call `mm->construct_ps_name` to handle + `postscript_name`. + Use shortcut. + * src/cff/cffdrivr.c (cff_construct_ps_name): New function. + (cff_service_multi_masters): Updated. + + * src/truetype/ttgxvar.c (tt_set_mm_blend): Don't handle `postscript_name`. + (TT_Set_MM_Blend): Simplify. + (TT_Set_Named_Instance): Return -1 if axis values haven't changed. + Don't set `face_index`. + (tt_construct_ps_name): New function. + + * src/truetype/ttgxvar.h: Updated. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + + * src/type1/t1load.c (T1_Set_MM_Blend): Simplify. + +2023-05-06 Werner Lemberg + + * include/freetype/internal/services/svmm.h: Minor changes. + +2023-05-06 Werner Lemberg + + [truetype] Fix deactivation of variation font handling. + + According to the documentation, the functions `FT_Set_Named_Instance`, + `FT_Set_MM_Design_Coordinates`, `FT_Set_Var_Design_Coordinates`, and + `FT_Set_Var_Blend_Coordinates` can unset the `FT_FACE_FLAG_VARIATION` flag. + (The same is true for `FT_Set_MM_WeightVector` but this information was + accidentally omitted from the documentation.) + + However, if a call of these functions didn't change the axis values this + could fail because internal shortcuts exited too early. + + This commit reorganizes the code to handle `FT_FACE_FLAG_VARIATION` in the + top-level API functions, also taking care of the issue at hand. + + * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_MM_WeightVector, + FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Handle `FT_FACE_FLAG_VARIATION`. + + * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design, + TT_Set_Named_Instance) Don't handle `FT_FACE_FLAG_VARIATION`. + + * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_WeightVector, + T1_Set_MM_Design): Ditto. + + * src/cff/cffobjs.c (cff_face_init): Use `FT_Set_Named_Instance` instead of + low-level functions. + + * src/truetype/ttobjs.c (tt_face_init): Ditto. + +2023-05-06 Werner Lemberg + + s/set_instance/set_named_instance/ + + * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): Renamed + to... + (FT_Set_Named_Instance_Func): ...this. + (FT_Service_MultiMasters): Rename `set_instance` to `set_named_instance`. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * src/base/ftmm.c (FT_Set_Named_Instance): Updated. + + * src/cff/cffdrivr.c (cff_set_instance): Renamed to... + (cff_set_named_instance): ...this. + (cff_service_multi_masters): Updated. + * src/cff/cffobjs.c (cff_face_init): Updated. + + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + +2023-05-06 Werner Lemberg + + New Variation Font function `FT_Get_Default_Named_Instance`. + + * include/freetype/ftmm.h, src/base/ftmm.c (FT_Get_Default_Named_Instance): + New function. + + * include/freetype/internal/services/svmm.h + (FT_Get_Default_Named_Instance_Func): New typedef. + (FT_Service_MultiMasters): New field `get_default_named_instance`. + (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. + + * include/freetype/internal/tttypes.h (TT_Face): New field + `var_default_named_instance`. + + * src/sfnt/sfobjc.s (sfnt_init_face): Initialize + `var_default_named_instance`. + + * src/cff/cffdrivr.c (cff_get_default_named_instance): New function. + (cff_service_multi_masters): Updated. + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize + `var_default_named_instance`. + (TT_Get_Default_Named_Instance): New function. + * src/truetype/ttgxvar.h: Updated. + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + + * src/type1/t1driver.c (t1_service_multi_masters): Updated. + + * docs/CHANGES: Updated. + +2023-05-06 Werner Lemberg + + [cid] Improve tracing messages; formatting. + +2023-05-04 Alexei Podtelezhnikov + + * src/cache/ftccache.c (ftc_node_hash_unlink): Minor. + +2023-05-04 Alexei Podtelezhnikov + + * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Purge backwards. + +2023-05-04 Alexei Podtelezhnikov + + [cache] Revise list cleansing. + + * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Use one loop to + do it. + * src/cache/ftcmanag.c (FTC_Manager_Compress, FTC_Manager_FlushN): + Streamline loops. + +2023-05-03 suzuki toshiya + + [t1cid] Improve cid_get_cid_from_glyph_index(). + + Update cid_get_cid_from_glyph_index() to + return an error and CID=0 in the case that + the specified glyph index points to an invalid + entry. + + cidgload.h (cid_compute_fd_and_offsets): + Declare new helper function to set the + fd_select and 2 offsets to access the glyph + description data. + + cidgload.c (cid_compute_fd_and_offsets): + Move the part loading fd_select and 2 offsets + from cid_load_glyph() to here. If the loaded + parameters are broken, return the Invalid_Offset + error. This function does not load the glyph + data, only fills these parameters. + + (cid_load_glyph): Use new helper function in above. + + cidriver.c (cid_get_cid_from_glyph_index): + Check whether the requested glyph index points + to a valid entry, by calling cid_compute_fd_and_offsets(). + If it is valid, fill the cid by the glyph + index (=CID). If it is invalid, return an + error and fill the cid by 0. + +2023-04-30 Werner Lemberg + + API documentation: Re-organize chapters and sections + + * Split the very long 'Base Interface' section into smaller sections. + * Split the 'Core API' chapter into two chapters. + * Remove single enumeration values from `@order` fields since they have no + effect. + +2023-04-29 Alexei Podtelezhnikov + + * src/sfnt/pngshim.c (Load_SBit_Png): Remove FALL_THROUGH warning. + +2023-04-28 Werner Lemberg + + * src/sfnt/ttload.c (tt_face_load_font_dir): Add another guard. + + Reject 'OTTO' fonts with no valid tables. + +2023-04-28 Werner Lemberg + + * src/cff/cffdrivr/c (cff_get_ps_name): Avoid unnecessary crash. + + The situation can happen if `FT_New_Face` (or one of its siblings) is called + with a negative index to get the number of contained faces, followed + immediately by a call to `FT_Get_Postscript_Name`. While this is not a valid + use of the FreeType library there is no need for a crash. + + Fixes #1219. + +2023-04-28 Werner Lemberg + + * src/cff/cffdrivr.c (cff_ps_get_font_info): Reject 'CFF2' format. + +2023-04-28 Werner Lemberg + + * src/cid/cidgload.c (cid_load_glyph): Fix compiler warnings. + +2023-04-28 Werner Lemberg + + Minor documentation updates. + +2023-04-27 Werner Lemberg + + * src/ttgxvar.c: Minor changes. + + (TT_Get_MM_Var): Improve tracing messages. + (tt_set_mm_blend): Minor speed-up. + +2023-04-27 Werner Lemberg + + s/this is,/that is,/ + +2023-04-27 Alexei Podtelezhnikov + + [bdf] Clean up the atom property parsing. + + * src/bdflib.c (bdf_is_atom_): Refactor code with fewer checks. + (bdf_list_join_): Return NULL. + (bdf_add_comment_): Use const argument. + (bdf_get_property): Ditto, ditto, make the function static. + * src/bdf.h (bdf_get_property): Remove prototype. + +2023-04-25 Werner Lemberg + + Improve/add source comments and documentation. + +2023-04-25 Werner Lemberg + + [sfnt] Fix handling of PS names for Variation Fonts. + + * src/sfnt/sfdriver.c (get_win_string, get_apple_string): Continue + construction of string if an invalid character is encountered. + + Fixes #1218. + +2023-04-24 suzuki toshiya + + [t1cid] Change the trace messages of the charstrings retrieval errors. + + The t1cid driver catches 3 types of errors in + the charstrings retrieval; + A) The invalid FD number, there are 2 subtypes; + A-1) FD number is the maximum number fitting to FDBytes. + A-2) FD number is greater than num_dicts. + B) Declared length is overrunning. + C) Declared length is invalid (its end is before its head). + + Considering that some widely distributed fonts + (e.g., "CJKV" book by O'Reilly) have A-1 errors + in the unimplemented glyphs, the trace level for + A-1 is calmed to level 1. + + The errors A-2, B, and C would be irregular; + their trace levels are kept at level 0, but + the updated trace messages include the CID number. + +2023-04-24 suzuki toshiya + + [truetype] Fix `make multi'. + + * src/truetype/ttgxvar.c: Include freetype/internal/services/svmetric.h + for the FT_Service_MetricsVariations type definition. + +2023-04-19 Ben Wagner + + [services] FT_Size_Reset_Func to return FT_Error + + The `MetricsVariations` `FT_Size_Reset_Func` is currently defined to + return `void`, but the implementations return `FT_Error`. Even though + the pointers passed will be the same at runtime, calling a function + through a pointer of a different type from the original function pointer + type is undefined behavior. This may be caught at runtime by Control + Flow Integrity with something like clang's `cfi-icall`. + + Issue: https://crbug.com/1433651 + + * include/freetype/internal/services/svmetric.h (FT_Size_Reset_Func): + return `FT_Error` instead of `void`. + +2023-04-17 Ben Wagner + + [truetype] tt_size_reset_height to take FT_Size + + The `MetricsVariations` `FT_Size_Reset_Func` is defined to take an + `FT_Size`. Because `tt_size_reset_height` is to be used as such a + function, it must also take an `FT_Size` instead of a `TT_Size`. Even + though the pointers passed will be the same at runtime, calling a + function through a pointer of a different type from the original + function pointer type is undefined behavior. This may be caught at + runtime by Control Flow Integrity with something like clang's + `cfi-icall`. + + Issue: https://crbug.com/1433651 + + * src/truetype/ttobjs.h (tt_size_reset_height): take `FT_Size` + + * src/truetype/ttobjs.c (tt_size_reset_height): take `FT_Size` and + update documentation + +2023-04-13 Werner Lemberg + + * src/truetype/ttinterp.c: Remove outdated comments. + +2023-04-11 Ben Wagner + + [sfnt, truetype] Add `size_reset` to `MetricsVariations`. + + This is a generalization of commit + + ``` + commit e6699596af5c5d6f0ae0ea06e19df87dce088df8 + Author: Werner Lemberg + Date: Thu Feb 2 11:38:04 2017 +0100 + + [truetype] Fix MVAR post-action handling. + ``` + + It is also possible for plain `CFF ` style fonts to contain an `fvar` and + `MVAR` table and use `cff_metrics_adjust`. `tt_size_reset` should only be + called with `TT_Size` and never with `CFF_Size`. + + Allow the "metrics-variations" service to specify the correct function (if + any) to reset `FT_Size`s after adjusting metrics. + + * src/truetype/ttobjs.c (tt_size_reset): Split off some functionality + into... + (tt_size_reset_height): ... this new function. + + * src/truetype/ttdriver.c (tt_service_metrics_variations): Add + `size_reset`. + (tt_size_select, tt_size_request): Updated. + + * src/truetype/ttobjs.h: Updated. + + * include/freetype/internal/services/svmetric.h (MetricsVariations): Add + `size_reset`. + (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Updated. + + * include/freetype/internal/tttypes.h (TT_FaceRec_): Rename `var` to + `tt_var` and add `face_var`. + + * src/cff/cffdrivr.c (cff_service_metrics_variations): Add `size_reset`. + (cff_hadvance_adjust, cff_metrics_adjust): Updated. + + * src/cff/cffobjs.c (cff_face_init): Use `face_var`. + + * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `face_var`. + + * src/sfnt/ttmtx.c (tt_face_get_metrics): Use `tt_var`. + + * src/truetype/ttgxvar.c (tt_size_reset_iterator): Renamed to... + (ft_size_reset_iterator): ... this new function. + Call `size_reset`. + (tt_apply_mvar): Pass `size_reset` to `ft_size_reset_iterator`. + + Fixes #1211 + +2023-04-10 Alexei Podtelezhnikov + + * src/cff/cffcmap.c (cff_cmap_encoding_char_next): Abbreviate. + +2023-04-10 Alexei Podtelezhnikov + + Align `char_next` return types. + + This is mostly cosmetic because FT_UInt and FT_UInt32 are likely identical. + + * src/sfnt/ttcmap.c, src/cff/cffcmap.c, src/psaux/t1cmap.c, + src/psnames/psmodule.c, include/freetype/internal/service/svpcsmap.h, + src/pfr/pfrcmap.c, src/winfonts/winfnt.c (*_char_next): return FT_UInt. + +2023-04-09 Alexei Podtelezhnikov + + [sfnt] Clean up CMAP{4,12,13} handling. + + This moves the charcode overflow checks upstream and turns some + while-loops into the do-while ones to avoid the uninitialized warnings. + This should slightly reduce the number of checks and jumps. + + * src/sfnt/ttcmap.c (tt_cmap{4,12,13}_next, + tt_cmap{4.12.13}_char_map_linear): Remove the charcode overflow check. + (tt_cmap{4,12,13}_char_map_binary): Ditto and use do-while. + (tt_cmap{12,13}_char_next): Add the overflow check. + +2023-04-03 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (load_format_25): Do not abort frame reading. + +2023-04-03 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (load_format_*): Streamline frame reading. + +2023-04-02 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c: Formatting and comments. + +2023-04-02 Alexei Podtelezhnikov + + [sfnt] Consolidate POST version 2.0 and 2.5 (pt 2). + + * src/sfnt/ttpost.c (load_format_20, load_format_25): Update arguments + and move shared calls and checks upstream to... + (load_post_names): ... this function. + (tt_face_free_ps_names, tt_face_get_ps_name): Updated. + +2023-04-02 Alexei Podtelezhnikov + + [sfnt] Consolidate POST version 2.0 and 2.5 (pt 1). + + The deprecated POST version 2.5 can be handled using the data + structures of version 2.0. The goal is to reduce the footprint. + + * include/freetype/internal/tttypes.h (TT_Post_Names): Absorb and... + (TT_Post_20, TT_Post_25): ... remove these structures. + src/sfnt/ttpost.c (load_post_names, tt_face_get_ps_name, + tt_face_free_ps_names, load_format_20): Updated accordingly. + (load_format_25): ditto and convert offsets to glyph indices. + +2023-04-01 Alexei Podtelezhnikov + + [sfnt] Miscellaneous POST clean-ups. + + * src/sfnt/ttpost.c (load_format_20): Decrease casts. + (load_format_25): Check the table length and impose a theoretical + glyph number limit usable with 8-bit offset. Decrease casts. + (load_post_names): Pass the mapping data length without 2 bytes. + +2023-03-30 Alexei Podtelezhnikov + + * src/sfnt/ttpost.c (load_format_20): Simplify comutations. + +2023-03-29 Alexei Podtelezhnikov + + [sfnt] Streamline POST format 2.0 handing (cont'd). + + * src/sfnt/ttpost.c (load_format_20): Co-allocate the string data and + their pointers, which makes it easier to handle and free them. + (tt_face_free_ps_names): Updated. + * include/freetype/internal/tttypes.h (TT_Post_20): Update type. + +2023-03-20 Alexei Podtelezhnikov + + [cff] Simplify `t2_strings` management in the old engine. + + * src/cff/cffparse.c (cff_parser_run): Allocate the charstring buffers + and the list nodes together so that they can be freed at once. + (finalize_t2_strings): Removed as no longer needed. + (cff_parser_done): Updated. + +2023-03-19 Alexei Podtelezhnikov + + [cff] Rework the stream limit checks. + + The old stream limit checks, before 6986ddac1ece, were good but + pointless for the crafted t2_strings. Checking limits there is + not necessary as they are created to hold all data. By using two + conditions, we can detect the actual crossing of the stream boundary + as appropriate for the stream pointer only. The t2_strings parsing + will not be triggering these checks. + + * src/cff/cffparse.c (cff_parser_within_limits): Removed. + (cff_parse_real, cff_parse_integer): Redesign the stream limit check. + (cff_parse_num, do fixed, cff_parse_fixed_dynamic): Update callers. + +2023-03-18 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use for-loop. + + Even though we never call `TT_Load_Simple_Glyph` with zero contours, + out of abundance of precaution, let's handle this case properly. + +2023-03-18 Alexei Podtelezhnikov + + [truetype] Clean up zeroing and local variables. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Avoid zeroing. + (load_truetype_glyph): Avoid zeroing and clean local variables. + +2023-03-16 Werner Lemberg + + * include/freetype/ftsystem.h (FT_Stream_IoFunc): Improve documentation. + + Fixes #1208. + +2023-03-16 Alexei Podtelezhnikov + + * src/base/ftsynth.c (FT_GlyphSlot_AdjustWeight): New API. + +2023-03-16 Alexei Podtelezhnikov + + [truetype] Clean up glyph loading. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Clean space checking. + (TT_Hint_Glyph): Don't copy the outline structure. + (TT_Process_Simple_Glyph): Cosmetic update. + +2023-03-15 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Clean up. + +2023-03-13 Werner Lemberg + + builds/vms/apinames_vms.bash: Fix `unzip` artifact + + The problem occured when unpacking a zip file created on OpenVMS on Linux. + While OpenVMS knows many different file formats, Unix only knows stream-LF + and binary. In principle `zip` on Linux should have translated the file to + stream-LF but failed to do so. That caused the file to incorrectly contain + only one line with control-characters. + +2023-03-11 Alexei Podtelezhnikov + + [truetype] Fix recent fallout in memory management. + + * src/truetype/ttgload.c (TT_Process_Composite_Glyph, + TT_Load_Simple_Glyph): Clean up old instructions regardless of + new ones, postpone setting `control_len` and `control_data` until... + (TT_Load_Glyph): ... the exit from this function. + +2023-03-10 Jouk Jansen + + Update VMS installation support. + +2023-03-10 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Hint_Glyph): Mostly cosmetic update. + + The number of instructions is now taken from the executed context. + Technically, this means that `control_len` and `control_data` + values are no longer _used_ internally but only expose them. + +2023-03-08 Werner Lemberg + + apinames.c: Add comment. + +2023-03-07 Werner Lemberg + + [gzip] File `infback.c` is not needed. + + * src/gzip/infback.c: Remove. + * src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. + +2023-03-07 Werner Lemberg + + [apinames] Fix VMS handling of overly long function names. + + Based on ideas from Jouk Jansen . + + * src/tools/vms_shorten_symbol.c: New file, taken from + + https://sourceforge.net/p/vms-ports/vmsshortsym/ci/default/tree/vms_shorten_symbol.c + + with some minor edits to allow compilation with C++ and being included in + another source code file. + + * src/tools/apinames.c: Include `vms_shorten_symbol.c`. + (PROGRAM_VERSION): Set to '0.5'. + (names_dump) [OUTPUT_VMS_OPT]: Call `vms_shorten_symbol` to get unique function + identifiers not longer than 31 characters. + +2023-03-07 Werner Lemberg + + * src/tools/apinames.c (panic): Accept variable number of arguments. + +2023-03-07 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix leak too. + +2023-03-07 Alexei Podtelezhnikov + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Triage memory leak. + + This leak has been introduced in the previous commit and immediately + detected: + https://chromium-review.googlesource.com/c/chromium/src/+/4313202 + +2023-03-06 Alexei Podtelezhnikov + + [truetype] Simplify memory management. + + Instead of using `Update_Max`, switch to regular FreeType memory + allocation macros, stop pre-allocating the glyph instruction arrays. + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph, + TT_Process_Composite_Glyph): Switch to regular memory allocation. + * src/truetype/ttinterp.c (Update_Max): Removed. + (TT_Load_Context): Reallocate stack and free old instructions. + (Modify_CVT_Check, Ins_WS): Switch to regular memory allocation. + * src/truetype/ttinterp.h (Update_Max): Removed. + +2023-03-06 David PROVENT + + Added information about the zlib version update in the changelog + +2023-03-06 Alexei Podtelezhnikov + + Fix a couple of MSVC warnings. + + * src/base/ftcalc.c (FT_MulAddFix): Add cast. + * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Ditto. + +2023-03-05 Alexei Podtelezhnikov + + * builds/windows/vc2010/freetype.vcxproj: Suppress C4267 on _WIN64. + + This usually comes from `strlen` returning 64-bit `size_t`, which + we often assign to 32-bit `FT_ULong` on Windows-64 (LLP64). + +2023-03-05 Alexei Podtelezhnikov + + * src/cff/cffparse.c (cff_parser_run): Thinko. + +2023-03-05 Alexei Podtelezhnikov + + [cff] Clean up CharString number encoding. + + * src/cff/cffparser.c (cff_parser_run): Work with signed numbers. + +2023-03-05 Alexei Podtelezhnikov + + * src/cff/cffparse.c (cff_parser_run): Fix variable type. + +2023-03-04 Alexei Podtelezhnikov + + [cff] Clean up memory management in the old engine. + + * src/cff/cffparse.c (finalize_t2_strings): Fix NULL-dereferencing + in the out-of-memory situation, use `FT_FREE`. + (cff_parser_run): Use FreeType memory allocation macros and avoid + uninitialized pointers. + +2023-03-04 Alexei Podtelezhnikov + + * src/cff/cffobjs.c (cff_size_init): Synonymous change. + +2023-03-04 Alexei Podtelezhnikov + + * src/sfnt/sfobjs.c (sfnt_load_face): Shorten de-referencing. + +2023-03-04 Alexei Podtelezhnikov + + [pfr] Shorten de-referencing. + + * src/pfr/pfrobjs.c (pfr_face_done, pfr_face_init): Use closer `memory`. + * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove `loader`. + +2023-03-03 Alexei Podtelezhnikov + + * src/cff/cffobjs.c (cff_size_get_globals_funcs): Shorten de-referencing. + +2023-03-03 Alexei Podtelezhnikov + + [cff,cid,type1] Shorten de-referencing. + + * src/cff/cffobjs.c (cff_clot_init): Use immediate library reference. + * src/cid/cidobjs.c (cid_slot_init): Ditto. + * src/type1/t1objs.c (T1_GlyphSlot_Init): Ditto. + +2023-03-02 Alexei Podtelezhnikov + + * configure: Use `sed` instead of `grep`. + + This is more portable and consistent with `autogen.sh`. + +2023-03-02 Ben Wagner + + Avoid strtol on non-null-terminated data. + + Technically, `strtol` can only be used with C strings terminated with + `\0`. CID data is not generally null-terminated and often does not + contain a `\0` if it is hex-encoded. AddressSanitizer with `ASAN_OPTIONS` + containing `strict_string_checks=1` verifies this by using an adversarial + `strtol` that always reads to the terminating `\0`. + + To avoid undefined behavior from `strtol` in `cid_parser_new`, use the + parser to parse the tokens instead of attempting to parse them ad-hoc. + This will internally use `PS_Conv_Strtol` to parse the integer, which + respects the parser's limits and directly implements the PostScript + parsing rules for integers. + + * src/cid/cidparse.c (cid_parser_new): Use the parser to parse the + tokens. + + Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1420329 + +2023-03-02 Alexei Podtelezhnikov + + * src/cff/cffload.c (cff_subfont_load): Synonymous update. + +2023-03-01 ubawurinna + + * src/gzip/README.freetype: Update version. + +2023-03-01 ubawurinna + + [gzip] Fix static linking. + + Without this patch, static linking with MS Visual Studio causes linking + errors. + + * src/gzip/ftgzip.c: Set `ZEXPORT` to nothing and `ZEXTERN` to static for + all compilers. + +2023-03-01 Werner Lemberg + + * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. + + This follows + + https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00200.html + +2023-02-28 Alexei Podtelezhnikov + + [truetype] Treat 38 as 40 without Infinality. + + * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Reinstate. + * src/truetype/ttdriver.c (tt_property_set): Fallback from 38 to 40. + +2023-02-26 Werner Lemberg + + * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. + + This follows + + https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html + +2023-02-26 Werner Lemberg + + * src/*: Replace leading underscores with trailing ones in dummy variables. + + This is to avoid clang warnings. + +2023-02-26 Karl Berry + + * configure: Don't hardcode `grep -E`. + + TeXLive still supports Solaris 5.10, where the system's `grep` doesn't + accept the `-E` option. We thus introduce an `EGREP` variable that is set + to either `grep -E` or `-egrep`. + +2023-02-26 Alexei Podtelezhnikov + + * src/cff/cffload.c (cff_encoding_load): Optimize array zeroing. + + This is unnecessary for predefined standard and expert encodings. + Even for custom encodings the arrays might be already zeroed when + CFF_FontRec is created but we keep it just in case. + +2023-02-25 Alexei Podtelezhnikov + + * src/type1/t1load.c (T1_Get_MM_Var): Optimize array zeroing. + +2023-02-25 Tamir Duberstein + + * src/base/ftsystem.c (ft_ansi_stream_io): Avoid undefined behaviour. + Also short-circuit on `offset` to avoid checking `count` a second time when + `ft_ansi_stream_io` is used for reading. + + Per ISO/IEC 9899: + + If an argument to a function has an invalid value (such as a value outside + the domain of the function, or a pointer outside the address space of the + program, or a null pointer, or apointer to non-modifiable storage when the + corresponding parameter is not const-qualified) or a type (after + promotion) not expected by a function with variable number of arguments, + the behavior is undefined. If a function argument is described as being + an array, the pointer actually passed to the function shall have a value + such that all address computations and accesses to objects (that would be + valid if the pointer did point to the first element of such an array) are + in fact valid. + + Per IEEE Std 1003.1: + + size_t fread(void *restrict ptr, size_t size, size_t nitems, + FILE *restrict stream); + + The `fread` function shall read into the array pointed to by `ptr` up to + `nitems` elements whose size is specified by `size` in bytes, from the + stream pointed to by `stream`. + + Since the first argument to `fread` is described as being an array, its + behavior is undefined when that argument is a null pointer. + + Per the documentation on `ft_ansi_stream_io`: + + If `count' is zero (this is, the function is used for seeking), a non-zero + return value indicates an error. + + Thus the intent is clear, and the call to `fread` can be skipped, avoiding + undefined behaviour. + +2023-02-21 Alexei Podtelezhnikov + + [raster] Clean up contour indexing. + + * src/raster/ftraster.c (Decompose_Curve, Convert_Glyph): Use consistent + index types (Int) and compact iterations. + +2023-02-21 Alexei Podtelezhnikov + + [autofit] Clean up contour indexing. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Refactor. + * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Ditto. + +2023-02-21 Alexei Podtelezhnikov + + * src/base/ftoutln.c (FT_Outline_Check): Fix C4701 warning. + +2023-02-21 Alexei Podtelezhnikov + + * src/sdf/ftsdf.c (get_min_distance_cubic): Fix C4701, typos. + +2023-02-20 Alexei Podtelezhnikov + + * src/base/ftstroke.c (FT_Stroker_ParseOutline): Clean up contour indexing. + +2023-02-20 Alexei Podtelezhnikov + + [base] Clean up contour indexing. + + * src/base/ftoutln.c (FT_Outline_Reverse, FT_Outline_EmboldenXY, + FT_Outline_Get_Orientation): Set the first and last indexes together. + (FT_Outline_Decompose): Ditto and check them more stringently. + * src/smooth/ftgrays.c (FT_Outline_Decompose)[STANDALONE_]: Ditto. + +2023-02-20 Alexei Podtelezhnikov + + * src/base/ftoutln.c (FT_Outline_Check): Update error code, clean up. + +2023-02-17 Alexei Podtelezhnikov + + [truetype] Hide Infinality. + + Remove Infinality as an option before its complete extraction. + + * include/freetype/ftoption.h: Remove the Infinality option. + * devel/ftoption.h: Ditto. + * include/freetype/ftdriver.h (TT_INTERPRETER_VERSION_38): Is 40 now. + +2023-02-17 Alex Ringlein + + * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points. + + A cubic contour has to always start from an on-point. Therefore, we + should not swap the first with the last point, which might be off, and + obtain an invalid contour. This does not matter for conic contours. + If anything, it also saves one swap there. Fixes #1207. + +2023-02-16 Werner Lemberg + + Documentation improvement for `FT_Bitmap`. + + Fixes #1205. + +2023-02-10 Alexei Podtelezhnikov + + [type1/MM] Round design coordinates. + + The design coordinates for MM fonts were not rounded. For example, + `FT_Get_Var_Design_Coordinates` returned values with fractional part. + + * src/type1/t1load.c (mm_axis_unmap): Refactor with rounding. + + * include/freetype/ftmm.h (FT_Var_Axis, FT_Set_Var_Design_Coordinates, + FT_Get_Var_Design_Coordinates): Reword documentation. + +2023-02-09 Jan Alexander Steffens (heftig) + + * builds/meson/parse_modules_cfg.py: Handle `gxvalid` and `otvalid`. + + These need a name mapping similar to what was done for other modules, + or linking will fail. + +2023-02-09 Werner Lemberg + + * build/toplevel.mk (do_dist): Fix typo. + 2023-02-09 Werner Lemberg * Version 2.13 released. diff --git a/lib/freetype/Makefile b/lib/freetype/Makefile index 62680688..1ce70c89 100644 --- a/lib/freetype/Makefile +++ b/lib/freetype/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.58 2023/05/21 09:25:29 matthieu Exp $ +# $OpenBSD: Makefile,v 1.59 2024/08/04 17:17:23 matthieu Exp $ .include FREETYPESRC= ${.CURDIR}/src # Get it from builds/unix/configure.ac -FT_VERSION_INFO= 25.0.19 +FT_VERSION_INFO= 26.1.20 INSTALL_PROGRAM = ${INSTALL} ${INSTALL_COPY} -m 755 -o $(BINOWN) -g $(BINGRP) @@ -26,7 +26,7 @@ SRCS= ftbase.c ftbbox.c ftbdf.c ftbitmap.c ftdebug.c ftcache.c \ raster.c sdf.c sfnt.c smooth.c svg.c truetype.c type1.c type1cid.c \ type42.c winfnt.c -CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}/builds/unix -I${.CURDIR}/src/lzw -DFT2_BUILD_LIBRARY -DFT_CONFIG_CONFIG_H='' +CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}/builds/unix -I${.CURDIR}/src/lzw -DFT2_BUILD_LIBRARY=1 -DFT_CONFIG_CONFIG_H='' .if ${COMPILER_VERSION} != "gcc3" CFLAGS+= -fvisibility=hidden -std=gnu99 -Wall -Wdeclaration-after-statement -Werror=implicit-function-declaration -Werror=undef -Wextra -Winit-self -Winline -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wno-attributes -Wno-long-long -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wpacked -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-aliasing=2 -Wstrict-prototypes -Wwrite-strings diff --git a/lib/freetype/README b/lib/freetype/README index 327b94d8..cd4c1d7d 100644 --- a/lib/freetype/README +++ b/lib/freetype/README @@ -1,4 +1,4 @@ -FreeType 2.13.0 +FreeType 2.13.2 =============== Homepage: https://www.freetype.org @@ -32,9 +32,9 @@ sites. Go to and download one of the following files. - freetype-doc-2.13.0.tar.xz - freetype-doc-2.13.0.tar.gz - ftdoc2130.zip + freetype-doc-2.13.2.tar.xz + freetype-doc-2.13.2.tar.gz + ftdoc2132.zip To view the documentation online, go to diff --git a/lib/freetype/Symbols.map b/lib/freetype/Symbols.map index 506f745b..2801eb38 100644 --- a/lib/freetype/Symbols.map +++ b/lib/freetype/Symbols.map @@ -67,6 +67,7 @@ FT_Get_Color_Glyph_Layer; FT_Get_Color_Glyph_Paint; FT_Get_Colorline_Stops; + FT_Get_Default_Named_Instance; FT_Get_FSType_Flags; FT_Get_First_Char; FT_Get_Font_Format; @@ -104,6 +105,7 @@ FT_Get_Var_Design_Coordinates; FT_Get_WinFNT_Header; FT_Get_X11_Font_Format; + FT_GlyphSlot_AdjustWeight; FT_GlyphSlot_Embolden; FT_GlyphSlot_Oblique; FT_GlyphSlot_Own_Bitmap; @@ -220,6 +222,8 @@ FT_Vector_Unit; TT_New_Context; TT_RunIns; + _init; + _fini; local: *; }; diff --git a/lib/freetype/builds/freetype.mk b/lib/freetype/builds/freetype.mk index d96ded07..b3fac80f 100644 --- a/lib/freetype/builds/freetype.mk +++ b/lib/freetype/builds/freetype.mk @@ -299,7 +299,7 @@ refdoc: $(PUBLIC_DIR)/config/*.h \ $(PUBLIC_DIR)/cache/*.h @echo Building static site... - cd $(DOC_DIR) && mkdocs build + cd $(DOC_DIR) && $(PYTHON) -m mkdocs build @echo Done. # Variables for running `refdoc' with Python's `virtualenv'. The diff --git a/lib/freetype/builds/mac/README b/lib/freetype/builds/mac/README index 092487a8..06e3d51d 100644 --- a/lib/freetype/builds/mac/README +++ b/lib/freetype/builds/mac/README @@ -200,14 +200,6 @@ environment by Metrowerks. GCC for MPW and Symantec behaviours are not tested at all. Building ftdemos for classic MacOS and working test is required. - 4-3. Porting Jam onto MPW - ------------------------- - - FreeType uses Jam (and FT-Jam) for unified cross- - platform building tool. At present, Jam is not ported - to MPW. To update classic MacOS support easily, - building by Jam is expected on MPW. - APPENDIX I ---------- diff --git a/lib/freetype/builds/meson/parse_modules_cfg.py b/lib/freetype/builds/meson/parse_modules_cfg.py index 6030bb20..d48129fe 100644 --- a/lib/freetype/builds/meson/parse_modules_cfg.py +++ b/lib/freetype/builds/meson/parse_modules_cfg.py @@ -97,8 +97,12 @@ def generate_ftmodule(lists): for module in lists["AUX_MODULES"]: if module in ("psaux", "psnames", "otvalid", "gxvalid"): + name = { + "gxvalid": "gxv", + "otvalid": "otv", + }.get(module, module) result += ( - "FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % module + "FT_USE_MODULE( FT_Module_Class, %s_module_class )\n" % name ) result += "/* EOF */\n" diff --git a/lib/freetype/builds/toplevel.mk b/lib/freetype/builds/toplevel.mk index 5a3ff2ab..8d5063eb 100644 --- a/lib/freetype/builds/toplevel.mk +++ b/lib/freetype/builds/toplevel.mk @@ -198,27 +198,22 @@ modules: include $(TOP_DIR)/builds/modules.mk -# get FreeType version string, using a -# poor man's `sed' emulation with make's built-in string functions +# get FreeType version string using built-in string functions # +hash := \# + work := $(strip $(shell $(CAT) \ $(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h))) -work := $(subst |,x,$(work)) -work := $(subst $(space),|,$(work)) -work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work)) -work := $(word 2,$(work)) -major := $(subst |,$(space),$(work)) -major := $(firstword $(major)) -work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work)) -work := $(word 2,$(work)) -minor := $(subst |,$(space),$(work)) -minor := $(firstword $(minor)) +work := $(subst $(hash)define$(space)FREETYPE_MAJOR$(space),MAjOR=,$(work)) +work := $(subst $(hash)define$(space)FREETYPE_MINOR$(space),MInOR=,$(work)) +work := $(subst $(hash)define$(space)FREETYPE_PATCH$(space),PAtCH=,$(work)) -work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work)) -work := $(word 2,$(work)) -patch := $(subst |,$(space),$(work)) -patch := $(firstword $(patch)) +major := $(subst MAjOR=,,$(filter MAjOR=%,$(work))) +minor := $(subst MInOR=,,$(filter MInOR=%,$(work))) +patch := $(subst PAtCH=,,$(filter PAtCH=%,$(work))) + +work := # ifneq ($(findstring x0x,x$(patch)x),) # version := $(major).$(minor) diff --git a/lib/freetype/builds/unix/configure.ac b/lib/freetype/builds/unix/configure.ac index a98865a4..5df9d861 100644 --- a/lib/freetype/builds/unix/configure.ac +++ b/lib/freetype/builds/unix/configure.ac @@ -11,13 +11,13 @@ # indicate that you have read the license and understand and accept it # fully. -AC_INIT([FreeType], [2.13], [freetype@nongnu.org], [freetype]) +AC_INIT([FreeType], [2.13.2], [freetype@nongnu.org], [freetype]) AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='25:0:19' +version_info='26:1:20' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -966,14 +966,14 @@ esac AX_PTHREAD([have_pthread=yes], [have_pthread=no]) # Check for Python and docwriter - +PYTHON_MIN_VERSION=3.5 have_py3=no have_docwriter=no PIP=pip AC_CHECK_PROGS([PYTHON], [python3 python], [missing]) if test "x$PYTHON" != "xmissing"; then - AX_PROG_PYTHON_VERSION([3.5], [have_py3=yes], []) + AX_PROG_PYTHON_VERSION([$PYTHON_MIN_VERSION], [have_py3=yes], []) if test "x$have_py3" = "xyes"; then PIP="$PYTHON -m $PIP" @@ -1162,7 +1162,7 @@ if test $have_docwriter = no; then `make refdoc' will fail since pip package `docwriter' is not installed. To install, run `$PIP install docwriter', or to use a Python virtual environment, run `make refdoc-venv' (requires pip package - `virtualenv'). These operations require Python >= 3.5. + `virtualenv'). These operations require Python >= $PYTHON_MIN_VERSION. ]) fi diff --git a/lib/freetype/builds/unix/configure.raw b/lib/freetype/builds/unix/configure.raw index 8e982835..dc7426ee 100644 --- a/lib/freetype/builds/unix/configure.raw +++ b/lib/freetype/builds/unix/configure.raw @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.h.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='25:0:19' +version_info='26:1:20' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -966,14 +966,14 @@ esac AX_PTHREAD([have_pthread=yes], [have_pthread=no]) # Check for Python and docwriter - +PYTHON_MIN_VERSION=3.5 have_py3=no have_docwriter=no PIP=pip AC_CHECK_PROGS([PYTHON], [python3 python], [missing]) if test "x$PYTHON" != "xmissing"; then - AX_PROG_PYTHON_VERSION([3.5], [have_py3=yes], []) + AX_PROG_PYTHON_VERSION([$PYTHON_MIN_VERSION], [have_py3=yes], []) if test "x$have_py3" = "xyes"; then PIP="$PYTHON -m $PIP" @@ -1162,7 +1162,7 @@ if test $have_docwriter = no; then `make refdoc' will fail since pip package `docwriter' is not installed. To install, run `$PIP install docwriter', or to use a Python virtual environment, run `make refdoc-venv' (requires pip package - `virtualenv'). These operations require Python >= 3.5. + `virtualenv'). These operations require Python >= $PYTHON_MIN_VERSION. ]) fi diff --git a/lib/freetype/builds/vms/apinames_vms.bash b/lib/freetype/builds/vms/apinames_vms.bash new file mode 100644 index 00000000..e9b1b727 --- /dev/null +++ b/lib/freetype/builds/vms/apinames_vms.bash @@ -0,0 +1,2 @@ +src/tools/apinames -wV include/freetype/*.h > freetype_vms0.opt +mv freetype_vms0.opt freetype_vms.opt diff --git a/lib/freetype/builds/vms/vmslib.dat b/lib/freetype/builds/vms/vmslib.dat deleted file mode 100644 index 4c817da4..00000000 --- a/lib/freetype/builds/vms/vmslib.dat +++ /dev/null @@ -1,28 +0,0 @@ -! -! This is a simple driver file with information used by make.com to -! check if external libraries (like t1lib and freetype) are available on -! the system. -! -! Layout of the file: -! -! - Lines starting with ! are treated as comments -! - Elements in a data line are separated by # signs -! - The elements need to be listed in the following order -! 1.) Name of the Library -! 2.) Location where the object library can be found -! 3.) Location where the include files for the library can be found -! 4.) Include file used to verify library location -! 5.) CPP define to pass to the build to indicate availability of -! the library -! -! Example: The following lines show how definitions -! might look like. They are site specific and the locations of the -! library and include files need almost certainly to be changed. -! -! Location: All of the libaries can be found at the following addresses -! -! ZLIB: http://www.decus.de:8080/www/vms/sw/zlib.htmlx -! -BZ2LIB # sys$library:libbz2.olb # decc$user_include: # bzlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB -PNGLIB # sys$library:libpng.olb # sys$library: # png.h # FT_CONFIG_OPTION_SYSTEM_ZLIB -ZLIB # sys$library:libz.olb # sys$library: # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB diff --git a/lib/freetype/builds/wince/vc2005-ce/index.html b/lib/freetype/builds/wince/vc2005-ce/index.html index 0a8b3c66..8ea6cfde 100644 --- a/lib/freetype/builds/wince/vc2005-ce/index.html +++ b/lib/freetype/builds/wince/vc2005-ce/index.html @@ -21,7 +21,7 @@ the following targets:
  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.13.0 sources:

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

      diff --git a/lib/freetype/builds/wince/vc2008-ce/index.html b/lib/freetype/builds/wince/vc2008-ce/index.html
      index 747370aa..a6e74f89 100644
      --- a/lib/freetype/builds/wince/vc2008-ce/index.html
      +++ b/lib/freetype/builds/wince/vc2008-ce/index.html
      @@ -21,7 +21,7 @@ the following targets:
         
    • PPC/SP WM6 (Windows Mobile 6)
    -It compiles the following libraries from the FreeType 2.13.0 sources:

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