summaryrefslogtreecommitdiff
path: root/freetype/ChangeLog
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-11-26 14:39:02 +0000
committerChris Liddell <chris.liddell@artifex.com>2019-11-26 17:51:31 +0000
commit79ac3f84060fbd5447219264ab0bcf89c7caa2cf (patch)
treeeb80c656c8302f91fc140e4a23db608ef207ba0d /freetype/ChangeLog
parent36cbd382b160ee4951d1911f85a4fa0723dd8db3 (diff)
downloadghostpdl-79ac3f84060fbd5447219264ab0bcf89c7caa2cf.tar.gz
Update Freetype to 2.4.10
Plus makefile updates to support it Bug 701288: Handle SEAC ligature glyph metrics correctly. As originally intended, a Type 1 SEAC charstring would be used for an accented glyph (like an a-caron, or u-umlaut) where the advance with of the SEAC glyph is the same as that of the 'base' glyph ('a' or 'u'). It this case, it is not uncommon for the SEAC to skip using an (H)SBW op code and rely on the one from the base glyph. But out of spec fonts also use SEAC glyphs ligature glyphs (like 'oe' or 'fi'), and in those cases the overall advance width is greater than that of the 'base' glyph. In this case, we have to allow for the SEAC glyph having included an (H)SBW and if it has, retain those values, rather than those from the base glyph. Rename file and make file change to match Avoids file name clash with freetype 2.4.10 Work around a change in the zlib API for 1.2.11 where it's used in the Freetype/zlib interface debugging code.
Diffstat (limited to 'freetype/ChangeLog')
-rw-r--r--freetype/ChangeLog3670
1 files changed, 2219 insertions, 1451 deletions
diff --git a/freetype/ChangeLog b/freetype/ChangeLog
index 806b8354a..6450a60be 100644
--- a/freetype/ChangeLog
+++ b/freetype/ChangeLog
@@ -1,18 +1,14 @@
-2018-05-01 Werner Lemberg <wl@gnu.org>
+2019-07-01 Werner Lemberg <wl@gnu.org>
- * Version 2.9.1 released.
- =========================
+ * Version 2.10.1 released.
+ ==========================
- Tag sources with `VER-2-9-1'.
+ Tag sources with `VER-2-10-1'.
- * docs/VERSION.TXT: Add entry for version 2.9.1.
- * docs/CHANGES: Updated.
+ * docs/VERSION.TXT: Add entry for version 2.10.1.
- * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
- src/base/ftver.rc, builds/windows/vc2005/index.html,
- builds/windows/vc2008/freetype.vcproj,
- builds/windows/vc2008/index.html,
+ * README, Jamfile (RefDoc), src/base/ftver.rc,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
@@ -24,521 +20,572 @@
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/.
+ builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
- * builds/unix/configure.raw (version_info): Set to 22:1:16.
+ * builds/unix/configure.raw (version_info): Set to 23:1:17.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
- * include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER.
+ * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
-2018-04-26 Werner Lemberg <wl@gnu.org>
+2019-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
- Another fix for handling invalid format 2 cmaps.
+ * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality.
- Sigh.
+ Reported by Armin Hasitzka.
- Reported as
+2019-06-16 Werner Lemberg <wl@gnu.org>
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003
+ * src/tools/apinames.c: Formatting, minor edits.
- * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
- an endless loop.
+2019-06-16 Werner Lemberg <wl@gnu.org>
-2018-04-24 Ben Wagner <bungeman@google.com>
+ [autofit] Disable hinting if no blue zones are available (#56450).
- [base] Avoid undefined behaviour in lcd filtering code (#53727).
+ * src/autofit/afglobal.c (af_face_global_get_metrics): Start again
+ (with dummy hinter module) if no blue zones are present.
- * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
- Ensure `height > 0'.
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change
+ signature to return error code.
+ If no blue zones are found, update `glyph_styles' array to hold
+ AF_STYLE_NONE_DFLT instead of the current style.
+ (af_latin_metrics_init): Return internal error code if no blue zones
+ are found.
-2018-04-22 Werner Lemberg <wl@gnu.org>
+2019-06-16 Werner Lemberg <wl@gnu.org>
- * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing.
+ Towards better VMS support.
-2018-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+ More to come.
- [base] Fix bitmap emboldening.
+ * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64,
+ builds/vms/vmslib.dat: New files provided by Jouk Jansen
+ <joukj@hrem.nano.tudelft.nl>.
- Bug introduced after release 2.8.
+ * builds/vms/ftconfig.h: Update, also from Jouk.
- * src/base/ftbitmap.c (ft_bitmap_assure_buffer): We use
- `FT_QALLOC_MULT', which doesn't zero out the buffer. Adjust the
- bitmap copying code to take care of this fact.
+2019-06-13 Werner Lemberg <wl@gnu.org>
-2018-04-22 Werner Lemberg <wl@gnu.org>
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor.
- Another fix for handling invalid format 2 cmaps.
+2019-06-13 Alexei Podtelezhnikov <apodtele@gmail.com>
- The previous commit was incomplete.
+ [smooth] Restore the span buffering for direct mode only.
- Reported as
+ The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be
+ enough to cover the entire scanline for simple glyphs in most cases:
+ each slightly slanted edge needs up to two spans, plus a filling span
+ in-between. This is not new, we used to do it before cb4388783cecc.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928
+ * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'.
+ (gray_hline, gray_sweep): Implement the span buffering.
+ (gray_raster_render): Use negative `num_spans' to avoid the direct
+ mode.
- * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
- an endless loop.
+2019-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
-2018-04-19 Werner Lemberg <wl@gnu.org
+ * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error.
- [autofit] Add support for Georgian Mtavruli characters.
+ Fix a warning by adding a return value as in `TT_RunIns',
+ which should not be a compatibility issue.
- This will be part of the forthcoming Unicode 11.0.
+2019-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/autofit/afblue.dat: Add blue zone data for Mtavruli.
- * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+ * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'.
- * src/autofit/afscript.h: Add Mtavruli standard character.
+2019-06-11 Moazin Khatti <moazinkhatri@gmail.com>
-2018-04-18 Werner Lemberg <wl@gnu.org>
+ [gzip] Add support for `gzip' encoded header.
- Fix handling of invalid format 2 cmaps.
+ * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to
+ `inflateInit2' to enable support for `gzip' encoded headers.
- The problem was introduced after the last release.
+2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
- Reported as
+ [type1,type42] Use `const' for string literals.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7828
+ * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated.
+ * include/freetype/internal/t1types.h (T1_EncodingRec): Updated.
+ * src/psaux/psobjs.[ch] (ps_table_add): Updated.
+ * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated.
+ * src/type42/t42objs.c (T42_Open_Face): Updated.
+ * src/type42/t42parse.c (t42_parse_encoding): Updated.
- * src/sfnt/ttcmap.c (tt_cmap2_char_next): Avoid endless loop.
+ * src/cff/cffobjs.c (cff_face_init): Minor.
-2018-04-17 Werner Lemberg <wl@gnu.org>
+2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
- [truetype] Integer overflow issues.
+ [bdf,pcf] Use `const' for string literals.
- Reported as
+ * src/bdf/bdf.h (bdf_property_t): Updated `name'.
+ * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property,
+ _bdf_add_property,_bdf_ato*): Updated.
+ * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated.
+ * src/pcf/pcfread.c (pcf_intrpret_style): Ditto.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7739
+2019-06-07 Philip Race <philip.race@oracle.com>
- * src/truetype/ttinterp.c (Ins_CEILING): Use FT_PIX_CEIL_LONG.
+ * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash.
-2018-04-16 Werner Lemberg <wl@gnu.org>
+ Terminate loop at end of environment.
- [truetype] Integer overflow issues.
+2019-05-31 Alexei Podtelezhnikov <apodtele@gmail.com>
- Reported as
+ Solidify VC2005 builds.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7718
+ * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly
+ declare `_BitScanReverse' intrinsic.
+ * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
- * src/truetype/ttinterp.c (Ins_MIRP): Use ADD_LONG.
+2019-05-30 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
-2018-04-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [sfnt] Separate WOFF sources and headers.
- [build] Use `info' function of make 3.81.
+ Move WOFF sources and headers to separate files.
- * configure, docs/INSTALL, docs/INSTALL.CROSS, docs/INSTALL.GNU,
- docs/INSTALL.UNIX, docs/MAKEPP: Bump make version requirements.
+ * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
+ src/sfnt/sfwoff.h: New files.
- * builds/detect.mk (std_setup): Replace `echo' with `info'.
- (dos_setup): Removed.
- * builds/unix/install.mk, builds/modules.mk, builds/dos/detect.mk,
- builds/windows/detect.mk, builds/os2/detect.mk: Updated.
- * builds/newline: No longer needed.
+ * include/freetype/internal/fttrace.h: Register `sfwoff.c'.
-2018-04-15 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/internal.h: Define
+ FT_INTERNAL_WOFF_TYPES_H.
- [truetype]: Limit `SLOOP' bytecode argument to 16 bits.
+ * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.
- This fixes
+ * include/freetype/internal/tttypes.h: Move out WOFF structures.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7707
+ * src/sfnt/rules.mk: Add `sfwoff.c'.
- * src/truetype/ttinterp.c (Ins_SLOOP): Do it.
+ * src/sfnt/sfnt.c: Include `sfwoff.c'.
-2018-04-14 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
- [truetype] Integer overflow issues.
+2019-05-30 Werner Lemberg <wl@gnu.org>
- Reported as
+ [base] Fix `make multi'.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7652
+ Reported by Nikhil.
- * src/truetype/ttinterp.c (Ins_MDAP): Use SUB_LONG.
+ * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H.
-2018-04-14 Werner Lemberg <wl@gnu.org>
+2019-05-29 Ben Wagner <bungeman@google.com>
- [autofit] Update to Unicode 11.0.0.
+ [truetype] Fix copy-and-paste error (#56409).
- But no support new scripts (volunteers welcomed).
+ * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
+ into `unrounded' array for phantom points.
- * src/autofit/afranges.c (af_arab_nonbase_uniranges,
- af_beng_nonbase_uniranges, af_cakm_nonbase_uniranges,
- af_deva_nonbase_uniranges, af_geor_uniranges,
- af_gujr_nonbase_uniranges, af_mlym_nonbase_uniranges,
- af_nkoo_nonbase_uniranges, af_telu_nonbase_uniranges,
- af_hani_uniranges): Add new data.
+2019-05-29 Werner Lemberg <wl@gnu.org>
-2018-04-10 Nikolaus Waxweiler <madigens@gmail.com>
+ [truetype] Fix 32bit builds (#56404).
- * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Extensive
- modernization measures.
+ Patch suggested by Ben Wagner <bungeman@google.com>.
- This brings up the minimum required CMake version to 2.8.12.
+ * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
+ harmful cast to unsigned type.
- The installation paths follow the GNU defaults now, e.g. installing on a
- 64 bit host will place binaries into the lib64/ folder on e.g. Fedora.
+2019-05-26 Ben Wagner <bungeman@google.com>
- Symbols are hidden by default (e.g. `-fvisibility=hidden' on GCC).
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
- CMake will no longer look for a C++ compiler.
+2019-05-23 Werner Lemberg <wl@gnu.org>
- Library and .so version now match the Autotools build.
+ [truetype] Draw glyphs without deltas in variation font (#56374).
- Comments in the build file and informational messages now use platform
- agnostic example commands.
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
+ `unrounded' array.
- ftoption.h and ftconfig.h are written directly without a redundant `-new'
- copy.
+2019-05-21 Werner Lemberg <wl@gnu.org>
- External dependencies are expressed as option()s and will turn up as such
- in cmake-gui.
+ * src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
- Internal: Properties such as dependencies and include directories are now
- privately set on the freetype library instead of globally.
+2019-05-16 Werner Lemberg <wl@gnu.org>
- The CPack definitions have been cleaned up, the `make dist' has been
- removed. Source packages generated with CPack don't contain Autotools
- files and aren't used by the maintainters anyway.
+ [truetype] Actually scale varied CVT values.
- On Windows, src/base/ftver.rc is compiled to decorate the library with
- version and copyright information.
+ Up to now, only the unscaled CVT values were varied; in other words,
+ the `CVAR' data was never used for bytecode hinting.
- A pkg-config file is now generated and installed.
+ * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary
+ function.
+ (tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
-2018-04-09 Werner Lemberg <wl@gnu.org>
+2019-05-16 Werner Lemberg <wl@gnu.org>
- [truetype] Integer overflow issues.
+ [truetype] Use 26.6 format for storing unscaled CVT values.
- Reported as
+ If `CVAR' data is applied to variation fonts, fractional values are
+ possible.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7453
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
+ `cvt' from `FT_Short' to `FT_Int32'.
- * src/truetype/ttinterp.c (Round_Super, Round_Super_45): Use
- ADD_LONG and SUB_LONG.
+ * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
+ (tt_face_vary_cvt): Use it to update code to 26.6 format.
-2018-04-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
+ format.
- [windows, wince] Clean up legacy project files.
+ * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
+ format.
- * builds/wince/vc2005-ce/freetype.vcproj,
- builds/wince/vc2008-ce/freetype.vcproj,
- builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2008/freetype.vcproj,
- builds/windows/visualce/freetype.vcproj,
- builds/windows/visualce/freetype.dsp,
- builds/windows/visualc/freetype.vcproj,
- builds/windows/visualc/freetype.dsp: Remove per-file compile flags.
+2019-05-16 Werner Lemberg <wl@gnu.org>
-2018-04-04 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.
- [cff, type1] Sanitize `BlueFuzz' and `BlueShift'.
+ This fixes linear advance width values for spacing glyphs. Bug
+ introduced 2019-05-09.
- Reported as
+2019-05-16 Werner Lemberg <wl@gnu.org>
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7371
+ [truetype] Avoid code duplication.
- * src/cff/cffload.c (cff_load_private_dict): Sanitize
- `priv->blue_shift' and `priv->blue_fuzz' to avoid overflows later
- on.
+ * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this
+ function.
+ (tt_size_ready_bytecode): Updated.
+ * src/truetype/ttgload.c (tt_loader_init): Updated.
- * src/type1/t1load.c (T1_Open_Face): Ditto.
+2019-05-13 Jouk Jansen <joukj@hrem.nano.tudelft.nl>
-2018-04-04 Ben Wagner <bungeman@google.com>
+ * vms_make.com: Updated. Handle `bzip2' directory, too.
- * src/truetype/ttobjs.c (trick_names): Add 3 tricky fonts (#53554),
- `DFHei-Md-HK-BF', `DFKaiShu-Md-HK-BF' and `DFMing-Bd-HK-BF'.
- (tt_check_trickyness_sfnt_ids): Add checksums for 3 tricky fonts
- in above.
+2019-05-13 Werner Lemberg <wl@gnu.org>
-2018-04-01 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning.
- * builds/toplevel.mk (work): Use $(SEP).
+2019-05-12 Werner Lemberg <wl@gnu.org>
- This fixes the `make refdoc' using Cygwin: $(CAT) is `type' on this
- platform, and this program only understands backslashes in paths.
+ [truetype] Doh. Fix last commit to make it work.
- Reported by Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>.
+ Very embarassing :-)
-2018-03-30 Werner Lemberg <wl@gnu.org>
+ Reported as
- [truetype] Fix memory leak (only if tracing is on).
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710
- * src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix
- it.
+ * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add
+ argument; update all callers.
+ (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active
+ for variation fonts only, thus also enclose related code with
+ `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where
+ necessary.
+ Revert commit a113e5d from 2019-05-09, and don't use `extra_points2'
+ but allocate a temporary array.
+ Speed up the scaling of the `unrounded' array.
-2018-03-23 Ben Wagner <bungeman@google.com>
+ * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type
+ conversions and rounding. The unsigned type must have more or equal
+ bits to the signed type.
- [sfnt] Correctly handle missing bitmaps in sbix format (#53404).
+2019-05-09 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttfsbit.c (tt_face_load_sbix_image): Fix return value.
+ [truetype] Increase precision of font variation (#54371).
-2018-03-23 Ben Wagner <bungeman@google.com>
+ This patch makes FreeType use font units in 26.6 format internally
+ instead of integers.
- [truetype] Fix advance of empty glyphs in bitmap fonts (#53393).
+ * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
+ (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
+ coordinates.
+ * src/truetype/ttgxvar.h: Updated.
- * src/truetype/ttgload.c (TT_Load_Glyph): Apply scaling to metrics
- for empty bitmaps.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
+ `extra_points2' array to temporarily hold unrounded point
+ coordinates; use them to compute scaled coordinates and linear
+ advance width and height.
+ (load_truetype_code): Adjust similarly.
-2018-03-22 Werner Lemberg <wl@gnu.org>
+2019-05-09 Werner Lemberg <wl@gnu.org>
- Remove `ftlcdfil.c' and `ftfntfmt.c' from build files (#53415).
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor.
- builds/amiga/makefile, builds/amiga/makefile.os4,
- builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
- builds/mac/FreeType.m68k_far.make.txt,
- builds/mac/FreeType.ppc_carbon.make.txt,
- builds/mac/FreeType.ppc_classic.make.txt,
- builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
- builds/wince/vc2008-ce/freetype.vcproj,
- builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2008/freetype.vcproj,
- builds/windows/vc2010/freetype.vcxproj,
- builds/windows/vc2010/freetype.vcxproj.filters,
- builds/windows/visualc/freetype.dsp,
- builds/windows/visualc/freetype.vcproj,
- builds/windows/visualce/freetype.dsp,
- builds/windows/visualce/freetype.vcproj, vms_make.com: Do it.
+2019-05-08 Alexei Podtelezhnikov <apodtele@gmail.com>
-2018-03-13 Werner Lemberg <wl@gnu.org>
+ [smooth] Faster fractions.
- * src/sfnt/ttcmap.c (tt_cmap2_validate): Fix potential numeric
- overflow.
+ * src/smooth/ftgrays.c (SUBPIXELS): Replace with...
+ (FRACT): A fractional coordinate macro to use in...
+ (gray_render_line, gray_render_scanline): ... here.
-2018-03-13 Werner Lemberg <wl@gnu.org>
+2019-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
- Fix cmap format 2 handling (#53320).
+ * src/raster/ftraster.c (Draw_Sweep): Unbreak.
- The patch introduced for #52646 was not correct.
+2019-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition.
+ * src/raster/ftraster.c: Clean-ups.
-2018-03-10 Nikolaus Waxweiler <madigens@gmail.com>
+2019-05-05 Werner Lemberg <wl@gnu.org>
- * CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05.
+ * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.
-2018-03-09 Chun-wei Fan <fanc999@yahoo.com.tw>
+2019-05-04 Alexei Podtelezhnikov <apodtele@gmail.com>
- * CMakeLists.txt [win32]: Allow MSVC DLL builds (#53287).
+ * src/smooth/ftgrays.c (gray_render_line): Small shortcut.
- Do not limit DLL builds to MinGW, since we already have
- `__declspec(dllexport)' directives in `ftconfig.h'.
- Also suppress more warnings for POSIX functions.
+2019-05-04 Werner Lemberg <wl@gnu.org>
-2018-03-08 Hugh McMaster <hugh.mcmaster@outlook.com>
+ Various clang 8.0 static analyzer fixes.
- Make installation of `freetype-config' optional (#53093).
+ Reported by Sender Ghost <lightside@gmx.com>.
- * builds/unix/configure.raw: Add option `--enable-freetype-config'
- and set `INSTALL_FT2_CONFIG'.
- * builds/unix/unix-def.in (INSTALL_FT2_CONFIG): Define.
- * builds/unix/install.mk (install): Handle it.
+ * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner
+ case where `edge->first' could be NULL.
-2018-03-05 Werner Lemberg <wl@gnu.org>
+ * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of
+ `size'.
- Make `ftlcdfil.c' part of the `base' module.
+ * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where
+ `draw_right' might be NULL.
- `ftobjs.c' needs `ft_lcd_padding'.
+ * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for
+ `aadvance'.
+ Ensure `abearing' always hold a meaningful result.
- Problem reported by duhuanpeng <548708880@qq.com>.
+ * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is
+ not NULL before accessing it.
+ * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary
+ test of `namedstyle'.
- * modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'.
+ * src/type42/t42parse.c (t42_parser_done): Ensure
+ `parser->root.funcs.done' is not NULL before accessing it.
- * src/base/ftbase.c: Include `ftlcdfil.c'.
- * src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'.
- * src/base/Jamfile (_sources): Adjusted.
+2019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- * docs/INSTALL.ANY: Updated.
+ Miscellaneous macro updates.
-2018-03-05 Werner Lemberg <wl@gnu.org>
+ * src/base/ftoutln.c (SCALED): Updated.
+ * src/smooth/ftgrays.c (SCALED): Ditto.
+ (FLOOR, ROUND, CEILING): Removed.
+ * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
- Make `ftfntfmt.c' part of the `base' module.
+2019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
- `ftobjs.c' needs `FT_Get_Font_Format'.
+ Tweak LCD filtering.
- Problem reported by duhuanpeng <548708880@qq.com>.
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
+ Choose direction from bitmap's pixel_mode.
+ * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc):
+ Updated.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
- * modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'.
+2019-05-02 Werner Lemberg <wl@gnu.org>
- * src/base/ftbase.c: Include `ftfntfmt.c'.
- * src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'.
- * src/base/Jamfile (_sources): Adjusted.
+ * vms_make.com: Updated (#56253).
- * docs/INSTALL.ANY: Updated.
+ Remove no longer existing directories (`autohint', `otlayout').
+ Update used base extensions.
+ Activate `autofit' module.
+ Add `gxvalid' module.
+ Update copyright notices.
-2018-03-01 Werner Lemberg <wl@gnu.org>
+2019-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttinterp.c (TT_RunIns): Fix tracing arguments.
+ [smooth] Simplify cubic Bézier flattening.
-2018-02-23 Werner Lemberg <wl@gnu.org>
+ The previous implementation is correct but it is too complex.
+ The revised algorithm is based on the fact that each split moves
+ the control points closer to the trisection points on the chord.
+ The corresponding distances are good surrogates for the curve
+ deviation from the straight line.
- * builds/unix/configure.raw: Need HarfBuzz 1.3.0 or newer.
+ This cubic flattening algorithm is somewhat similar to the conic
+ algorithm based the distance from the control point to the middle of
+ the chord. The cubic distances, however, decrease less predictably
+ but are easy enough to calculate on each step.
- Problem reported by Alan Coopersmith <alan.coopersmith@oracle.com>.
+ The new algorithm produces slightly larger number of splits, which is
+ compensated by its simplicity. The overall rendering performance is
+ improved by 1-2%. The larger number of splits does not necessarily
+ result in higher quality, which stays comparable.
-2018-02-17 Werner Lemberg <wl@gnu.org>
+ * src/smooth/ftgrays.c (gray_render_cubic): Replace the split
+ condition.
- [sfnt] Prefer `CBDT'/`CBLC' over `glyf' table (#53154).
+2019-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
-2018-02-06 Werner Lemberg <wl@gnu.org>
+ [smooth] Bithacks and cosmetics.
- [truetype] Integer overflow issues.
+ * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline,
+ gray_render_conic, gray_convert_glyph_inner): Updated.
- Reported as
+2019-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6027
+ Optimize Bézier bisections.
- * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIAP, Ins_MIRP): Use
- SUB_LONG; avoid FT_ABS.
+ This change makes bisections faster by 20-30%. When inlined into
+ `gray_render_cubic', this makes the function faster by 10% and is
+ noticeable in the overall rendering performance.
-2018-02-04 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and
+ refactor.
+ * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto.
+ * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto.
+ * src/base/ftbbox.c (cubic_peak): Use shifts.
- [unix] Use -fvisibility=hidden.
+2019-04-23 Werner Lemberg <wl@gnu.org>
- It is now widely recommended that ELF shared libraries hide symbols
- except those with explicit __attribute__((visibility("default"))).
- This is supported by all major compilers and should rather be an
- option in libtool.
+ * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code.
- * builds/unix/configure.raw: Add -fvisibility=hidden to CFLAGS.
- * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
- include/freetype/config/ftconfig.h (FT_EXPORT): Use visibility
- attribute.
+ Found by clang 8.0's static analyzer and reported by Sender Ghost
+ <lightside@gmx.com>.
-2018-01-27 Werner Lemberg <wl@gnu.org>
+2019-04-23 Werner Lemberg <wl@gnu.org>
- [truetype] Better protection against invalid VF data.
+ [base] Fix thinko in previous commit.
- Reported as
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not
+ target pitch.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739
+ Problem reported by Sender Ghost <lightside@gmx.com>.
- Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7.
+2019-04-22 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize
- `normalizedcoords'.
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
-2018-01-27 Werner Lemberg <wl@gnu.org>
+ Problem reported by Sender Ghost <lightside@gmx.com>.
- * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
+2019-04-22 Werner Lemberg <wl@gnu.org>
- Reported as
+ Fix return value of `FT_Set_Named_Instance' (#56186).
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736
+ * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
+ internal return value -1 of `TT_Set_Var_Design'.
-2018-01-27 Werner Lemberg <wl@gnu.org>
+2019-04-18 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
+ [pcf] Fix handling of undefined glyph (#56067).
-2018-01-27 Werner Lemberg <wl@gnu.org>
+ This commit fixes the changes from 2018-07-21, which broke charmap
+ iteration. We now add the default character as a new glyph with
+ index 0, thus increasing the number of glyphs by one (as before).
- [truetype] Better trace VF instances.
+ * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial
+ glyph with index 0.
+ Limit number of elements to 65534.
+ (pcf_get_bitmaps): Ditto.
+ Unify two loops into one; this avoids allocation of an intermediate
+ array.
+ (pcf_get_encodings): Don't flip indices but copy glyph metrics of
+ default character to index 0.
+ Also handle invalid default character.
- * src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number
- of coordinates.
- (TT_Get_MM_Var): Trace instance indices names.
- (TT_Set_Var_Design): Updated.
+ * docs/CHANGES: Updated.
-2018-01-27 Werner Lemberg <wl@gnu.org>
+2019-04-15 Minmin Gong <gongminmin@msn.com>
- [truetype] Beautify tracing of VF axis records.
+ * CMakeLists.txt: Avoid rewriting of unchanged configuration files.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a
- table-like manner.
+ Reported as
-2018-01-26 Ben Wagner <bungeman@google.com>
+ https://savannah.nongnu.org/patch/index.php?9755
- [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955).
+2019-04-15 JDG <JonathanG@iQmetrix.com>
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Set
- `face->blend->num_axis' in case we have to initialize the
- `face->blend'.
+ * src/tools/apinames.c (main): Fix error message.
-2018-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+ Reported as
- [apinames] Anonymous version map for GNU linker.
+ https://savannah.nongnu.org/patch/?9796
- * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.3.
- (OutputFormat): Add `OUTPUT_GNU_VERMAP'.
- (names_dump): Handle it.
- (usage): Updated.
- (main): Handle new command line flag `-wL'.
+2019-04-11 Alexei Podtelezhnikov <apodtele@gmail.com>
-2018-01-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [smooth] Fix segfault in direct mode (#56092).
- [unix] Call libtool to clean up.
+ * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for
+ direct mode.
+ * src/smooth/ftgrays.c (gray_raster_render): Use it.
- * builds/unix/install.mk (clean_project_unix, distclean_project_unix):
- Use libtool.
- * builds/freetype.mk: Minor.
+2019-04-06 Werner Lemberg <wl@gnu.org>
-2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).
- * src/base/ftver.rc: Fix mingw-w64 compilation.
+ This is for Visual Studio 2019 on ARM.
-2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+2019-04-06 Werner Lemberg <wl@gnu.org>
- [build] Enable VERSIONINFO resource for Cygwin/MinGW.
+ For distribution, replace `.tar.bz2' with `.tar.xz' bundles.
- * builds/unix/configure.raw: Check for resource compiler.
- * builds/unix/unix-cc.in: Conditionally set up resource compiler.
- * builds/freetype.mk: Add conditional rule for `ftver.rc'.
- * src/base/ftver.rc: Copyright notice and year update.
+ * builds/toplevel.mk (build): Do it.
-2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * README, docs/CHANGES, docs/release: Updated.
- [build] Move VERSIONINFO resource.
+2019-04-06 Antony Lee <anntzer.lee@gmail.com>
- * builds/windows/vc2010/freetype.vcxproj: Updated.
- * builds/windows/ftver.rc: Move file from here...
- * src/base/ftver.rc: ... to here.
+ Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.
-2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * include/freetype/freetype.h (FT_Get_Name_Index),
+ include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc),
+ include/freetype/internal/services/svgldict.h
+ (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index),
+ src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c
+ (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index),
+ src/type42/t42drivr.c (t42_get_name_index): Add `const' to second
+ argument.
- [build] Expand dllexport/dllimport to Cygwin/MinGW.
+2019-03-31 Armin Hasitzka <prince.cherusker@gmail.com>
- * include/freetype/config/ftconfig.h: Respect DLL_EXPORT,
- s/_MSC_VER/_WIN32/.
- * builds/unix/ftconfig.in: Replicate here.
- * builds/vms/ftconfig.h: Replicate here.
+ [cff] Fix boundary checks.
-2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
+ 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically
+ allocated memory when parsing CFF files with the "old" engine. Bounds
+ checks have never been updated, however, leading to pointless
+ comparisons of pointers in some cases. This commit presents a
+ solution for bounds checks in the CFF module with an extended logic
+ for the "old" engine while staying as concise as possible for the
+ "new" one.
- [build] Improve and document MSVC build.
+ * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and
+ the additional field `t2_strings' within `CFF_ParserRec'.
- * include/freetype/config/ftconfig.h: Guard dllexport/dllimport
- attributes with _DLL and FT2_DLLIMPORT.
- * builds/windows/vc2010/index.html: Update documentation.
+ * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary
+ checks into this new function and update the rest of `cffparse.c' to
+ use it.
-2018-01-10 Steve Robinson <ssrobins@gmail.com>
+ Reported as
- * CMakeLists.txt [win32]: Suppress warnings for POSIX functions.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137
-2018-01-10 Ewald Hew <ewaldhew@gmail.com>
+2019-03-20 Werner Lemberg <wl@gnu.org>
- [psaux] Correctly handle Flex features (#52846).
+ [autofit] Fix Mongolian blue zone characters.
- * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO,
- cf2_cmdHMOVETO>: Do not move if doing Flex.
+ * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters
+ to get medial forms for some Mongolian characters.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
-2018-01-09 Alexei Podtelezhnikov <apodtele@gmail.com>
+2019-03-19 Werner Lemberg <wl@gnu.org>
- * builds/windows/vc2010/freetype.sln: Synchronize with the project.
+ [autofit] Add support for Mongolian script.
-2018-01-08 Werner Lemberg <wl@gnu.org>
+ As a de-facto standard, layouts using this script are constructed
+ horizontally line by line, then the lines are rotated clockwise for
+ vertical display.
- * Version 2.9 released.
- =======================
+ * src/autofit/afblue.dat: Add blue zone data for Mongolian.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+ * src/autofit/afscript.h: Add Mongolian standard characters.
- Tag sources with `VER-2-9'.
+ * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian
+ data.
- * docs/VERSION.TXT: Add entry for version 2.9.
+2019-03-15 Werner Lemberg <wl@gnu.org>
- * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2005/index.html,
- builds/windows/vc2008/freetype.vcproj,
- builds/windows/vc2008/index.html,
+ * Version 2.10.0 released.
+ ==========================
+
+
+ Tag sources with `VER-2-10-0'.
+
+ * docs/VERSION.TXT: Add entry for version 2.10.0.
+ * docs/CHANGES: Updated.
+
+ * README, Jamfile (RefDoc), src/base/ftver.rc,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
@@ -547,1796 +594,2517 @@
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
- builds/windows/ftver.rc,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/.
+ builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/.
- * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9.
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10.
(FREETYPE_PATCH): Set to 0.
- * builds/unix/configure.raw (version_info): Set to 22:0:16.
- * CMakeLists.txt (VERSION_PATCH): Set to 0.
+ * builds/unix/configure.raw (version_info): Set to 23:0:17.
+ * CMakeLists.txt (VERSION_MINOR): Set to 10.
+ (VERSION_PATCH): Set to 0.
-2018-01-07 Werner Lemberg <wl@gnu.org>
+ * builds/toplevel.mk (version, winversion): Since the minor version
+ number has two digits now, never omit the patch number. We would
+ get ambiguous zip file names otherwise.
+ (dist): Remove remnants of `docmaker' tool.
+ (do-dist): Remove unused intermediate files.
- Add check for librt, needed for `ftbench' (#52824).
+ * src/cff/cffparse.c (destrict_c2s_item): Guard function with
+ CFF_CONFIG_OPTION_OLD_ENGINE macro.
- * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will
- hold `-lrt' if necessary.
+2019-03-07 Andrei Alexeyev <0x416b617269@gmail.com>
+ Werner Lemberg <wl@gnu.org>
- * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable.
+ Fix invalid function pointer casts.
-2018-01-07 Ewald Hew <ewaldhew@gmail.com>
+ This change should allow Freetype to work on WASM/Emscripten without
+ needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'.
- [psaux] Fix Type 1 glyphs with too many stem hints.
+ * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature.
- According to the CFF specification, charstrings can have up to 96 stem
- hints. Due to hint replacement routines in Type 1 charstrings, some
- glyphs are rejected by the Adobe engine, which implements the above
- limit. This fix turns off hinting for such glyphs.
+ * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array,
+ parse_expansion_factor, parse_font_name): Return `void', not
+ `FT_Error'.
- * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling
- `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off
- hinting.
+ * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc):
+ Fix signature.
-2018-01-06 Werner Lemberg <wl@gnu.org>
+2019-03-05 Werner Lemberg <wl@gnu.org>
- Add `FT_Done_MM_Var'.
+ [base] Handle numeric overflow (#55827).
- This is necessary in case the application's memory routines differ
- from FreeType. A typical example is a Python application on Windows
- that calls FreeType compiled as a DLL via the `ctypes' interface.
+ * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'.
- * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare
- and define.
+2019-03-05 Sebastian Rasmussen <sebras@gmail.com>
- * docs/CHANGES: Updated.
+ [psaux] Fix use of uninitialized memory (#55832).
-2018-01-03 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_interpT2CharString): The call to
+ `cf2_arrstack_setCount' may fail because the allocator ran out of
+ memory. When this happens the stack is still written to before the
+ error condition is checked. This means that FreeType writes outside
+ of allocated memory. This commit moves the error check prior to the
+ stack assignment, hence the function now properly returns with an
+ error condition.
- [truetype] Round offsets of glyph components only if hinting is on.
+2019-02-23 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement
- it.
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets.
-2018-01-03 Werner Lemberg <wl@gnu.org>
+ The function only provided a framework without an actual
+ implementation, which this commit removes.
- * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
+2019-02-23 Werner Lemberg <wl@gnu.org>
- This is a better fix than the previous commit, which is now
- reverted.
+ * src/tools/update-copyright-year: Insert `(C)'.
-2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
- Move internal LCD-related declarations.
+ [truetype] Mask numeric overflows.
- * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir):
- Move from here...
- * include/freetype/internal/ftobjs.h: ... to here.
+ * src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP):
+ Mask numeric overflows.
-2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+ Reported as
- * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
- [_MSC_VER]: Limit Visual C++ attributes.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734
-2018-01-03 Werner Lemberg <wl@gnu.org>
+2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
- [truetype] Make blend/design coordinate round-tripping work.
+ [psaux] Mask numeric overflow.
- Behdad reported that setting blend coordinates, then getting design
- coordinates did incorrectly return the default instance's
- coordinates.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
+ overflow.
- * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it.
+ Reported as
-2017-12-31 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
- * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop.
+2019-02-16 Wink Saville <wink@saville.com>
- Reported as
+ * src/autofit/afwarp.h (af_warper_compute): Fix declaration.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838
+2019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
-2017-12-31 Werner Lemberg <wl@gnu.org>
+ [truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics.
- Synchronize other Windows project files.
+ Instead of setting typo or win metrics as the new `FT_Face' metrics
+ indiscriminately, apply only typo deltas to the currently active
+ `FT_Face' metrics. This prevents line height differences when the
+ default outlines were used as the regular face and instances for
+ everything else, for example.
- * builds/windows/*: Add missing files.
+ * src/truetype/ttgxvar.c (tt_apply_mvar): Implement.
-2017-12-31 Werner Lemberg <wl@gnu.org>
+2019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
- Update Visual C 2010 project files.
+ [sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set.
- Problem reported by Hin-Tak.
+ If the `OS/2' table exists and `fsSelection' bit 7
+ (USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute
+ the `FT_Face's ascender, descender, and height. Otherwise, fall
+ back to old behavior.
- * builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and
- `ftcid.c'.
- Sort entries.
- * builds/windows/vc2010/freetype.vcxproj.filter: Ditto.
- Fix members of `FT_MODULE' group.
+ * src/sfnt/sfobjs.c (sfnt_load_face): Implement.
-2017-12-30 Werner Lemberg <wl@gnu.org>
+2019-01-18 John Tytgat <John.Tytgat@esko.com>
- * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file.
+ [sfnt] Handle TT fonts having two PostScript font names (#55471).
-2017-12-28 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
+ other language found for PostScript font names.
- * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file.
+2019-01-08 Chris Liddell <chris.liddell@artifex.com>
- Reported by Nikolaus.
+ [psaux] Fix closepath (#55414).
-2017-12-27 Werner Lemberg <wl@gnu.org>
+ All of the Type 1 path building is done with code common to the
+ revised CFF engine, with the exception of closepath, which was still
+ calling ps_builder_close_contour(), thus previously cached segments
+ were not always written to the path, and glyph corruption, or even
+ invalid outlines were possible.
- Fix compiler warnings.
+ * src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>:
+ Switch to calling `cf2_glyphpath_closeOpenPath'.
- * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and
- `new_pitch' unsigned.
+2018-12-29 Werner Lemberg <wl@gnu.org>
- * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H.
+ * src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310).
-2017-12-27 Werner Lemberg <wl@gnu.org>
+2018-12-25 Werner Lemberg <wl@gnu.org>
- Fixes for `make multi'.
+ * src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
- * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
- (ps_property_get): Harmonize declaration with corresponding
- function typedef.
+ Reported as
- * include/freety[e/internal/fttrace.h: Add `trace_psprops'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
- * src/base/ftpsprop.c: Include necessary header files.
- (FT_COMPONENT): Define.
- (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'.
- (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'.
- Harmonize declaration with corresponding function typedef.
+2018-12-12 Werner Lemberg <wl@gnu.org>
-2017-12-27 Werner Lemberg <wl@gnu.org>
+ [gxvalid] Fix compiler warnings.
- Provide support for intra-module callback functions.
+ * src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
+ src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
- This is needed especially for `make multi' with C++.
+2018-12-11 Werner Lemberg <wl@gnu.org>
- * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK,
- FT_BASE_CALLBACK_DEF): New macros.
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test.
-2017-12-25 Ewald Hew <ewaldhew@gmail.com>
+ `control_len' only gets its value from `n_ins' (and vice versa),
+ which is always read as `unsigned short' and thus can't be larger
+ than 0xFFFF.
- Move PostScript drivers' property handlers to `base'.
+2018-12-04 Werner Lemberg <wl@gnu.org>
- This reduces the amount of duplicated code across PostScript
- drivers.
+ [bdf] Ignore data after `ENDFONT'.
- * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c
- ({cff,cid,t1}_property_{get,set}): Moved to...
- * include/freetype/internal/ftpsprop.h: ...this new file.
- (ps_property_{get,set}): New functions to replace moved ones.
+ Reported as
- * src/base/ftpsprop.c: New file that implements above functions.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798
- * include/freetype/internal/internal.h
- (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro.
+ * src/bdf/bdflib.c (_bdf_parse_end): New function.
+ (_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has
+ been encountered.
- * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c:
- Updated.
+2018-12-02 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c:
- Updated.
+ * builds/windows/visualc/freetype.dsp: Dust off.
-2017-12-20 Werner Lemberg <wl@gnu.org>
+2018-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
- Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
+ * builds/windows/vc2010/freetype.vcxproj: Simplify.
- We exit early if the current design or blend coordinates are
- identical to the new ones.
+2018-11-27 Chris Liddell <chris.liddell@artifex.com>
- * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design):
- Implement it, returning internal error code -1 if there will be no
- variation change.
+ [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.
- * src/type1/t1load.c (t1_set_mm_blend): Ditto.
+ For multiple master fonts, common usage (in Postscript) is to modify
+ the WeightVector of an existing font instance, this addition
+ supports that use.
- * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
- FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
+ * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
+ FT_Get_MM_WeightVector): New API functions.
-2017-12-18 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internalservices/svmm.h
+ (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
+ function types.
+ (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
+ members.
+ (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- [sfnt] Fix charmap type 2 iterator (#52646).
+ * src/cffcffdrivr.c (cff_set_mm_weightvector,
+ cff_get_mm_weightvector): New functions.
+ (cff_service_multi_masters): Register them.
- The subsetted demo font of the report that exhibits the bug has a
- very unusual type 2 cmap for Unicode(!): It contains only two
- sub-headers, one for one-byte characters (covering the range 0x20 to
- 0xFA), and a second one for higher byte 0x01 (just for character
- code U+0131).
+ * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
+ This driver doesn't use the new interface.
- Before this commit, the iterator wasn't able to correctly handle a
- sub-header for higher byte 0x01.
+ * src/type1/t1load.c (T1_Set_MM_WeightVector,
+ T1_Get_MM_WeightVector): New functions.
+ * src/type1/t1driver.c (t1_service_multi_masters): Register them.
+ * src/type1/t1load.h: Updated.
- * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment
- for outer loop.
+2018-11-27 Ben Wagner <bungeman@google.com>
-2017-12-18 Matthias Clasen <matthias.clasen@gmail.com>
+ [cff] Fix compiler warning (#55105).
- [truetype] Fix clamping, minor tracing code beautification.
+ * src/cff/cffparse.c (cff_parser_run): Guard label only used if
+ CFF_CONFIG_OPTION_OLD_ENGINE is active.
- * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
- design coordinates.
- Use clamped value.
+2018-11-27 Ben Wagner <bungeman@google.com>
-2017-12-18 Werner Lemberg <wl@gnu.org>
+ [truetype] Fix numeric overflow (#55103).
- * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
+ * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
-2017-12-18 Werner Lemberg <wl@gnu.org>
+2018-11-25 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
+ [builds] Belated DLL support with vc2002-vc2008.
-2017-12-18 Werner Lemberg <wl@gnu.org>
+ The solution and project files should be automatically upgraded for
+ the approriate Visual C++ version.
- [truetype] Fix previous commit.
+ * builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades.
+ * builds/windows/visualc/index.html: Document the change.
+ * builds/windows/vc2005, builds/windows/vc2008: Removed as redundant.
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
- unhinted phantom points, which must be properly scaled.
+2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
-2017-12-18 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffparse.c: Please the compiler.
- [truetype] Don't apply HVAR and VVAR deltas twice (#52683).
+2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
- `pp1' to `pp4', except if we have an HVAR and/or VVAR table.
+ [cff] Fix memory overflow.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle
- alternative code branch identically w.r.t. presence of an HVAR
- and/or VVAR table.
+ Reported as
-2017-12-17 Jonathan Kew <jfkthame@gmail.com>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869
- [truetype] Correctly handle variation font phantom points (#52683).
+ * src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store
+ evaluated T2 charstrings in separately allocated memory.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
- point indices.
+2018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-12-17 Jonathan Kew <jfkthame@gmail.com>
+ * builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it.
- Fix incorrect advance width scaling (#52683).
+2018-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftadvance.c (FT_Get_Advances): Always respect the
- FT_LOAD_NO_SCALE flag if present.
+ [smooth] Placeholder only for library-enabled LCD filtering.
-2017-12-16 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/smooth/ftsmooth.c (ft_smooth_init): Add disabled
+ `FT_Library_SetLcdFilter' call.
- * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy.
- * objs/.gitignore: Ignore almost everything.
+2018-11-09 Young Xiao <yangx92@hotmail.com>
-2017-12-11 Werner Lemberg <wl@gnu.org>
+ [psaux] Add safety guard (#54985).
- Fix compiler warning (#52640).
+ * src/psaux/psobjs.c (cff_builder_close_contour): Do it.
- * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused
- variable.
+2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-12-08 Azzuro <azzuro@team-mediaportal.com>
+ * builds/unix/configure.raw: Require `windows.h' for windres.
- * builds/windows/vc2010/freetype.vcxproj: Adjust output directory.
+2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
- This allows builds with different configurations in parallel.
+ [ftstroke] Fix unpredictable failures (#54986).
-2017-12-08 Werner Lemberg <wl@gnu.org>
+ * src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
- Fix `make setup dos', second try (#52622).
+2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
- * builds/detect.mk (dos_setup): Don't use literal `>' character at
- all. Mixing the different escaping rules from make, dos, and
- windows is too fragile.
+ [ftstroke] Fix unpredictable failures (#54976).
-2017-12-08 Werner Lemberg <wl@gnu.org>
+ * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
- [docmaker] Fix code section parsing.
+2018-11-07 Ben Wagner <bungeman@google.com>
- Stuff like
+ [truetype] Fix VF check from 2018-09-12 (#54973).
- {
- <bla>
- }
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
+ offsets for estimates.
- confused the parser, which incorrectly treated `<bla>' as a markup
- tag.
+2018-11-06 Werner Lemberg <wl@gnu.org>
- * src/tools/docmaker/content.py (ContentProcessor::process_content):
- Apply `re_markup_tags' only outside of code sections.
+ [pshinter] Fix numeric overflow.
-2017-12-08 Werner Lemberg <wl@gnu.org>
+ Reported as
- New `ftdriver.h' file, covering all driver modules.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242
- This reduces redundancy and increases synergy; it also reduces the
- number of header files.
+ * src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it.
- * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro.
- (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H,
- FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to
- FT_DRIVER_H.
+2018-11-06 Werner Lemberg <wl@gnu.org>
- * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
- include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h,
- include/freetype/ftttdrv.h: Replaced with...
- * include/freetype/ftdriver.h: ...this new file.
- (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to...
- (FT_HINTING_ADOBE): ... this new macro.
- (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to...
- (FT_HINTING_FREETYPE): ... this new macro.
+ [psaux] Fix timeout in old CFF engine.
- * src/*/*: Updated accordingly.
+ Reported as
-2017-12-08 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
- Move `ftdriver.h' to `ftdrv.h'.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
+ <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
+ loop.
- * include/freetype/internal/ftdriver.h: Renamed to...
- * include/freetype/internal/ftdrv.h: ... this name.
+2018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
- * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H):
- Updated.
+ * src/truetype/ttgxvar.c: Use enum definitions.
+
+2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
-2017-12-08 Werner Lemberg <wl@gnu.org>
+2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- Fix access to uninitalized memory (#52613).
+ * src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
- Also reported as
+2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- https://bugs.chromium.org/p/chromium/issues/detail?id=791317
+ Revert due to specs: [truetype] Speed up variation IUP.
- * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the
- bitmap size needs a larger bitmap buffer, assure that the new memory
- areas are initialized also.
+2018-11-02 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-12-08 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
- Fix `make setup dos' (#52622).
+ Reported and tested by Behdad.
- * builds/detect.mk (dos_setup): Properly escape literal `>'
- character.
+2018-11-02 Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
-2017-12-07 Werner Lemberg <wl@gnu.org>
+ [autofit] Prevent SEGV.
- Fix C++ compilation.
+ See
- * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary.
+ https://bugs.ghostscript.com/show_bug.cgi?id=697545
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning.
+ for more details on how the bug was found.
-2017-12-07 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afloader.c (af_loader_load_glyph): Propagate error
+ code.
+
+2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
- Fix `make multi'.
+ [truetype] Speed up variation IUP.
- * include/freetype/internal/fttrace.h: Remove unused tracing macros.
- s/pshalgo2/pshalgo/.
- Add `trace_cffdecode'.
- * src/pshinter/pshalgo.c (FT_COMPONENT): Updated.
+ * src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
+ snapping to the same position from true interpolation.
- * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
- * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and
- FT_SERVICE_CFF_TABLE_LOAD_H.
+2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ * src/type1/t1load.c (t1_set_mm_blend): Optimized.
- * src/psaux/cffdecode.c: Include FT_FREETYPE_H and
- FT_INTERNAL_DEBUG_H.
- (FT_COMPONENT): Define.
- * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
- * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
- Declare `cff_builder_funcs' and `ps_builder_funcs'.
- * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'.
- * src/psaux/psobjs.c : Include `psauxmod.h'.
+2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-12-07 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
- * include/freetype/config/ftheader.h: Some clean-up.
+2018-10-29 Werner Lemberg <wl@gnu.org>
- This commit removes documentation of deprecated macros and does some
- minor streamlining.
+ [base] Fix numeric overflow.
-2017-12-06 Werner Lemberg <wl@gnu.org>
+ Reported as
- * builds/symbian/bld.inf: Updated.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080
-2017-12-06 Werner Lemberg <wl@gnu.org>
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'.
- New header file `ftparams.h' that collects all parameter tags.
+2018-10-29 Werner Lemberg <wl@gnu.org>
- * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
- macro.
- (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
- `ftparams.h'.
+ [cff] Fix numeric overflow.
- * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
- include/freetype/ftincrem.h, include/freetype/ftlcdfil.h,
- include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include
- FT_PARAMETER_TAGS_H.
- Move FT_PARAM_TAG_XXX definitions to...
- * include/freetype/ftparams.h: ...this new file.
+ Reported as
- * include/freetype/ttunpat.h: Remove. No longer needed.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988
-2017-12-05 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffparse.c (cff_parser_run)
+ [CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'.
- Improve tracing messages by using singular and plural forms.
+2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/*/*.c: Implement it.
+ [sfnt] Make `head' timestamps unsigned.
-2017-12-04 Werner Lemberg <wl@gnu.org>
+ It's been more than 2^31 seconds since 1904.
- [truetype] Allow shared points in `cvar' table (#52532).
+ * include/freetype/tttables.h (TT_Header): Change field types.
+ * src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
- * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying
- and adjusting the corresponding code from
- `TT_Vary_Apply_Glyph_Deltas'.
+2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-11-28 Werner Lemberg <wl@gnu.org>
+ Revert: Align FreeType with standard C memory management.
- [truetype] Improving tracing of composite glyphs.
+2018-10-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
- [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
+ [psaux] Fix numeric overflow.
-2017-11-27 Werner Lemberg <wl@gnu.org>
+ Triggered by
- [type1] Allow (again) `/Encoding' with >256 elements (#52464).
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157
- In version 2.6.1, this has been disallowed to better reject
- malformed fonts; however, this restriction was too strong. This
- time, we only take the first 256 elements into account, since
- encoding arrays are always accessed with a 8bit integer, according
- to the PostScript Language Reference.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend>
+ [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow.
- * src/type1/t1load.c (parse_encoding): Implement it.
+2018-10-20 Werner Lemberg <wl@gnu.org>
-2017-11-27 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+ Avoid endless loop while tracing (#54858).
- Fix last commit (#52522).
+ * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
+ FT_DEBUG_LEVEL_TRACE.
- * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG'
- properly if we have `ftoption.h' in `BUILD_DIR'.
+2018-10-17 David Demelier <markand@malikania.fr>
-2017-11-24 Werner Lemberg <wl@gnu.org>
+ * CMakeLists.txt: Specify `RUNTIME DESTINATION'.
- [unix] Install a massaged `ftoption.h' file (#51780).
+ This is needed for DLL builds.
- * builds/unix/configure.raw (ftoption_set, ftoption_unset): New
- auxiliary functions to construct...
- (FTOPTION_H_SED): ... this new variable.
- Apply it as a sed argument while copying `ftoption.h' to the
- `builds/unix' directory (using `AC_CONFIG_FILES').
- Simplify code of test that checks cpp's computation of bit length
- (the test previously created an empty `ftoption.h' file and deleted
- it immediately afterwards); without this change, it can happen on my
- GNU/Linux box that `configure's execution of `config.status' doesn't
- create `ftoption.h' (no idea why this happens).
+2018-10-07 Werner Lemberg <wl@gnu.org>
- * builds/unix/install.mk (install): Install
- `builds/unix/ftoption.h'.
+ A missing Unicode cmap is not a fatal error.
- * builds/unix/unix-def.in (DISTCLEAN): Updated.
+ This is a follow-up to the previous commit.
- * builds/unix/.gitignore: Updated.
+ * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
+ (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
+ src/type42/t42objs.c (T42_Face_Init): Implement it.
-2017-11-23 Tor Andersson <tor.andersson@artifex.com>
+2018-10-07 Werner Lemberg <wl@gnu.org>
- Silence unused function warnings (#52465).
+ Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794).
- Some static function declarations cause unused function warnings if
- certain config options are turned off via `ftoption.h'.
+ * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
+ (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
+ Check `unicodes_init' field.
- * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
- src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
+2018-10-03 Werner Lemberg <wl@gnu.org>
-2017-11-22 Ewald Hew <ewaldhew@gmail.com>
+ [ftgrays] Fix typo in stand-alone mode (#54771).
- * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
+ * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ &&
+ FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
+
+2018-10-02 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix segfault.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
-2017-11-22 Ewald Hew <ewaldhew@gmail.com>
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
+ <cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check
+ argument.
- [psaux] Fix CFF advance widths. (#52466)
+2018-10-02 Werner Lemberg <wl@gnu.org>
- Glyph advance widths were being written to the new `PS_Decoder' but not
- saved to the underlying format specific decoder. This caused pure CFF
- fonts to have bad advance width.
+ [psaux] Fix numeric overflow.
- * include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width'
- field to pointer.
- Remove unused fields.
- * src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy
- to reference.
- Remove unused.
- * src/psaux/psft.c (cf2_setGlyphWidth): Update code.
+ Reported as
-2017-11-15 Vlad Tsyrklevich <vtsyrklevich@google.com>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740
- * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
+ [CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT.
-2017-11-14 Nikolaus Waxweiler <madigens@gmail.com>
+2018-10-02 Werner Lemberg <wl@gnu.org>
- Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
+ [pshinter] Handle numeric overflow.
- Since Ewald Hew factored the Adobe hinting engine out of the CFF
- driver code, we can now use it on Type 1 (and CID) font formats, as
- both have the same hinting philosophy.
+ Reported as
- This change activates the Adobe hinter when in LIGHT mode, and
- therefore always unless explicitly asking for the auto-hinter. This
- makes LIGHT behavior consistent with CFF fonts. As of this commit,
- the hinting engine table looks as follows.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550
- LIGHT NORMAL
- -------------------------
- TrueType Auto v40
- CFF Adobe Adobe
- Type 1 Adobe Adobe
+ * src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric
+ overflow.
-2017-11-10 Yuri Levchenko <yuri_levchenko@boolat.com>
+2018-09-27 Alexei Podtelezhnikov <apodtele@gmail.com>
- * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option.
+ Align FreeType with standard C memory management.
-2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * include/freetype/ftsystem.h: Include FT_TYPES_H.
+ (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
+ * src/raster/ftmisc.h: Ditto.
- * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition.
+ * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
+ * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
+ Use size_t for the size arguments.
-2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
+ FT_Offset, aka size_t, for the size arguments.
- * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables.
+2018-09-25 Werner Lemberg <wl@gnu.org>
-2017-11-03 Ewald Hew <ewaldhew@gmail.com>
+ Fix handling of `FT_Bool'.
- [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251)
+ Before this commit we had code like
- The interpreter in Type 1 mode rewinds the charstring after collecting
- all hints for building the initial hintmap (commit d52dd7f). However,
- some charstrings use `endchar' in a final subroutine call, rewinding to
- the start of that subroutine, and only a small section of the actual
- glyph is drawn.
+ (FT_Bool)( globals->glyph_styles[gindex] & 0x8000)
- * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>:
- Ensure we are on the top level charstring before rewinding.
+ Since `FT_Bool' is defined to be an `unsigned char', the code
+ evaluated to something like
-2017-11-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ (unsigned char)( 0x8532 & 0x8000)
- [truetype] Add more tricky fonts.
+ which in turn expanded to
- See the report by Yang Yinsen.
- https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html
+ (unsigned char)( 0x8000)
- * src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB',
- `DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'.
- (tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB,
- DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7. Also
- add checksums for DLCLiShu and DLCHayBold which their family names
- were already listed but their checksums were previously unknown.
+ and finally yielded 0x00 – i.e., false – not as expected.
-2017-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+ Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.
- [smooth] Fix complex rendering at high ppem.
+ * include/freetype/fttypes.h (FT_BOOL): Add a comparison against
+ zero so that we always have a Boolean expression.
- We used to split large glyphs into horizontal bands and continue
- bisecting them still horizontally if that was not enough. This is
- guaranteed to fail when a single scanline cannot fit into the
- rendering memory pool. Now we bisect the bands vertically so that
- the smallest unit is a column of the band height, which is guranteed
- to fit into memory.
+ */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
+ possible.
- * src/smooth/ftgrays.c (gray_convert_glyph): Implement it.
+2018-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [bdf] Speed up charmap access.
- [smooth] Improve complex rendering at high ppem.
+ This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster.
- At large sizes almost but not exactly horizontal segments can quickly
- drain the rendering pool. This patch at least avoids filling the pool
- with trivial cells. Beyond this, we can only increase the pool size.
+ * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search
+ with continuous prediction.
- Reported, analyzed, and tested by Colin Fahey.
+2018-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak.
-2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
+ This one should be clearer. When the rounded monochrome bbox collapses
+ we add a pixel that covers most if not all original cbox.
- [base] Improve tracing in FT_Load_Glyph, FT_*_Size.
+2018-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with
- function name, glyph index, and load flags.
- (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing.
- (FT_Select_Size, FT_Request_Size): Improve tracing.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak.
-2017-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-09-21 Ben Wagner <bungeman@google.com>
- [base] Improve tracing in FT_Render_Glyph.
+ Improve auto-hinter handling of bitmap fonts (#54681).
- * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage
- calculations and downgrade Netpbm dump to bitmap:7.
+ For bitmap fonts, `FT_Load_Glyph' should either return an error or
+ not set the format to `FT_GLYPH_FORMAT_OUTLINE'. However, in this
+ case `FT_Load_Glyph' calls into the auto-hinter which calls back
+ into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which
+ marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path
+ (even though it doesn't have any path). It appears that the
+ auto-hinter should not be called when the face doesn't have
+ outlines. The current test for using the auto-hinter in
+ `FT_Load_Glyph' checks whether the driver supports scalable
+ outlines, but not if the face supports scalable outlines.
-2017-10-15 Ewald Hew <ewaldhew@gmail.com>
+ * src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have
+ scalable outlines.
- [cff] Fix segfault on missing `psaux' (#52218)
+2018-09-21 Werner Lemberg <wl@gnu.org>
- * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.
+ [raster] Fix disappearing vertical lines (#54589).
- * modules.cfg: Update dependency list.
+ * src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
+ where both left and right outline exactly pass pixel centers.
-2017-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- [base, cff] Fix MSVC warnings.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak.
- * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code.
- (ft_glyphslot_preset_bitmap): C4244: possible loss of data.
- * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data.
- Turn `sum' into unsigned.
+ This adds pixels in case a contour goes through the center
+ and they need to be turned on in the b/w rasterizer.
-2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- [base] Netpbm image tracing.
+ [pcf] Replace charmap implementation.
- * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size.
- (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format.
+ PCF comes with charmap lookup table, aka PCF encodings. Using it
+ directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times
+ faster than the original BDF-like binary searches.
- * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
+ * src/pcf/pcf.h (PCF_EncodingRec): Removed.
+ (PCF_FaceRec): Remove `nencodings' and `encodings'.
+ * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced.
+ * src/pcf/pcfread.c (pcf_get_encodings): Store data differently.
-2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-09-20 Werner Lemberg <wl@gnu.org>
- * builds/windows/ftdebug.c (FT_Message): Print to stderr.
- * builds/wince/ftdebug.c (FT_Message): Ditto.
+ [base] Remove unused function `FT_GlyphLoader_CopyPoints'.
-2017-10-14 Behdad Esfahbod <behdad@behdad.org>
+ * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c
+ (FT_GlyphLoader_CopyPoints): Do it.
- [afshaper] Delay creating `hb_set' objects until needed.
+2018-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
- In runs on Noto Naskh Arabic, this results in 89 sets created
- instead of 340 before. Makes auto-hinter setup with HarfBuzz
- enabled 20% to 30% faster.
+ [pcf] Prepare to replace charmap implementation.
- * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it.
+ * src/pcf/pcf.h (PCF_FaceRec): Updated to include...
+ (PCF_EncRec): ... this new structure to store charmap geometry.
-2017-10-12 Ewald Hew <ewaldhew@gmail.com>
+ * src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry.
- [type1, cid] Add hinting engine switch.
+2018-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- Implement property service in `type1' and `cid' drivers to allow
- switching between FreeType or Adobe hinting engine when both are
- available.
+ Remove unused fields.
- * src/cid/cidriver.c (cid_property_{set,get}, cid_services),
- src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add
- Properties service.
+ * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'.
+ * src/bdfdrvr.h (BDF_FaceRec): Ditto.
+ * src/winfonts/winfnt.h (FNT_FaceRec): Ditto.
- * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c
- (T1_Driver_Init): Add default property values.
+2018-09-17 Werner Lemberg <wl@gnu.org>
-2017-10-12 Ewald Hew <ewaldhew@gmail.com>
+ [pshinter] Handle numeric overflow.
- Add T1_CONFIG_OPTION_OLD_ENGINE configuration option.
+ Reported as
- This controls whether the old Type 1 engine gets compiled into FreeType.
- It is disabled by default.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396
- * devel/ftoption.h, include/freetype/config/ftoption.h
- (T1_CONFIG_OPTION_OLD_ENGINE): New macro.
+ * src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H.
+ (psh_blues_snap_stem): Mask numeric overflow.
+
+2018-09-13 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Some fixes for VF checks.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317
+
+ * src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory
+ frame if we have invalid glyph variation data offsets.
+ (tt_face_vary_cvt): Protect against missing `tuplecoords' array.
+ Fix typo.
+
+2018-09-13 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit.
+
+2018-09-13 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'.
+
+ Reported as
- * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field.
- * include/freetype/internal/psaux.h, src/cid/cidgload.c
- (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c
- (ps_builder_add_point), src/psaux/t1decode.c
- (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph,
- t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h,
- src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround
- relevant code with macro.
- Minor code changes.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316
-2017-10-12 Ewald Hew <ewaldhew@gmail.com>
+2018-09-12 John Tytgat <John.Tytgat@esko.com>
- Extract width parsing from Type 1 parser.
+ [sfnt] Better PS name handling (#54629).
- Duplicate the fast advance width calculations from the old parser.
- This is to facilitate adding options for compiling out the old parser.
+ * src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks.
+ (get_win_string, get_apple_string): Return NULL when the PostScript
+ font name characters is not according to specification.
+ (get_win_string): Make trace output work if the high byte if
+ non-zero.
+ (sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred
+ Win PS name (when there is also an Apple PS name); change this into
+ a fallback to Apple PS name in case the Win PS name is invalid.
- * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function.
- * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry
- `parse_metrics'.
- * src/psaux/psauxmod.c: Set the new entry.
+2018-09-12 Werner Lemberg <wl@gnu.org>
- * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String),
- src/cid/cidgload.c (cid_load_glyph): Separate
- conditional for selecting engine.
+ [truetype] Improve VF check.
-2017-10-09 Werner Lemberg <wl@gnu.org>
+ Triggered by
- * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255
+
+ * src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check
+ for `tupleCount'.
+
+2018-09-12 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'.
+
+2018-09-10 Armin Hasitzka <prince.cherusker@gmail.com>
+
+ * src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow.
Reported as
- https://bugs.chromium.org/p/chromium/issues/detail?id=772775
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215
+
+2018-09-09 Ben Wagner <bungeman@google.com>
+
+ * builds/freetype.mk (refdoc-venv): Ensure python version (#54631).
+
+2018-09-07 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix assertion failure.
+
+ Triggered by
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Reintroduce
+ `opened_frame' (removed in a change from 2018-08-26) to handle
+ deallocation of the second frame.
+
+2018-09-05 Werner Lemberg <wl@gnu.org>
+
+ Synchronize `ftdebug.c' files.
+
+ * builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c,
+ builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'.
-2017-10-08 Werner Lemberg <wl@gnu.org>
+2018-09-05 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
- * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows.
+ Add documentation guidelines file.
+
+ * docs/DOCGUIDE: New file.
+
+2018-09-04 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h: Synchronize with master `ftoption.h'.
+
+2018-09-03 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
+
+ [docwriter] Don't break code snippets accross lines.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579
+ https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html
+
+ * docs/reference/markdown/stylesheets/extra.css (.md-typeset code):
+ Add rule `white-space'.
+
+2018-09-03 Werner Lemberg <wl@gnu.org>
+
+ */*: s/PSNames/psnames/.
+
+ Only tracing messages are affected.
+
+2018-09-03 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix heap buffer overflow in CPAL handling.
+
+ * src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test.
+ (tt_face_load_cpal): Updated.
+
+2018-09-01 Werner Lemberg <wl@gnu.org>
+
+ Remove `FT_Outline_{New,Done}_Internal'.
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ These public API functions(!) were always undocumented and have
+ escaped all clean-up efforts until now.
- [sfnt] Adjust behaviour of PS font names for variation fonts.
+ * include/freetype/ftoutln.h (FT_Outline_New_Internal,
+ FT_Outline_Done_Internal): Removed.
- * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's
- PS name only if no variation is applied.
+ * src/base/ftoutln.h (FT_Outline_New_Internal,
+ FT_Outline_Done_Internal): Merge into...
+ (FT_Outline_New, FT_Outline_Done): ... these functions.
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ * docs/README: Updated.
- [cff, truetype] Adjust behaviour of named instances.
+2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
- This commit completely separates the interaction between named
- instances and variation functions. In particular, resetting the
- variation returns to the current named instance (if set) and not to
- the base font.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
- As a side effect, variation functions no longer change the named
- instance index.
+2018-08-31 Armin Hasitzka <prince.cherusker@gmail.com>
- * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance'
+ [errors] Refine the macro logic surrounding `FT_Error_String'.
+
+ * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS,
+ FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after
+ checking it and introduce a new macro that takes proper care of
+ multiple-inclusion protection.
+
+2018-08-31 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls.
+
+2018-08-31 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftdebug.c (FT_Throw): Reduce chattiness.
+
+2018-08-31 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization.
+
+2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Consolidate bitmap presetting and size assessment.
+
+ * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
+ Change return type.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap
+ size assessment.
+
+ * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the
+ rendering of enourmous or far-fetched outlines.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
+
+2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono.
+
+2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
+
+ [errors] Introduce a macro to control `FT_Error_String'.
+
+ * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS),
+ include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS):
+ New macro.
+
+2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
+
+ [errors] Introduce `FT_Error_String'.
+
+ * include/freetype/fterrors.h (FT_Error_String),
+ src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'.
+
+ * src/base/ftbase.c, src/base/Jamfile (_source),
+ src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic.
+
+ * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
+
+2018-08-30 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Trace `before' and `after' edges of strong points.
+
+ * src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays
+ `before' and `after'.
+
+ * src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary
function.
- Also apply `MVAR' table to named instances.
+ (af_glyph_hints_dump_points): Trace `before' and `after' edges.
+ (af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set
+ `before' and `after' information.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast.
- (tt_set_mm_blend): No longer check whether requested variation
- coincides with a named instance.
- (TT_Set_Var_Design): Use current named instance for default
- coordinates.
- * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'.
+2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ [base] Overflow-resistant bitmap presetting.
- Make `FT_Set_Named_Instance' work.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it.
- * src/cff/cffdrivr.c (cff_set_instance): New function.
- (cff_service_multi_masters): Register it.
+2018-08-29 Armin Hasitzka <prince.cherusker@gmail.com>
- * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function.
- * src/truetype/ttgxvar.h: Updated.
- * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register
- it.
+ Fix numeric overflows.
- * src/type1/t1load.c (T1_Reset_MM_Blend): New function.
- * src/type1/t1load.h: Updated.
- * src/type1/t1driver.c (t1_service_multi_masters): Register it.
+ * src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light,
+ psh_hint_table_find_strong_points): Fix numeric overflows.
+
+ Reported as
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083
- Make `FT_FACE_FLAG_VARIATION' work.
+2018-08-29 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/tttypes.h (TT_Face): Remove
- `is_default_instance'; this can be replaced with a combination of
- `FT_IS_VARIATION' and `FT_IS_INSTANCE'.
+ [cff] Fix handling of `roll' op in old engine.
- * src/cff/cffdrivr.c (cff_get_advances): Updated.
+ Reported as
- * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c
- (sfnt_init_face): Updated.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080
- * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c
- (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE),
- src/truetype/ttgxvar.c (tt_set_mm_blend): Updated.
- * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
- Handle `FT_FACE_FLAG_VARIATION'.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
+ [CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as
+ documented in the specification.
- * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle
- `FT_FACE_FLAG_VARIATION'.
+2018-08-26 Werner Lemberg <wl@gnu.org>
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values.
- New function `FT_Set_Named_Instance'.
+2018-08-26 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
- No effect yet.
+ * configure: Copy assets required by docwriter.
- * src/base/ftmm.c (FT_Set_Named_Instance): New function.
+ Copy directory `docs/reference/markdown' when FreeType is compiled in a
+ different directory.
- * include/freetype/ftmm.h: Updated.
+ Fixes `make refdoc' if builddir != srcdir.
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ Reported as
- Add macros for checking whether a font variation is active.
+ https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html
- * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION,
- FT_IS_VARIATION): New macros.
- No effect yet.
+2018-08-26 Werner Lemberg <wl@gnu.org>
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
- Add framework for setting named instance in MM service.
+ Reported as
- * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func):
- New function typedef.
- (MultiMasters): Add `set_instance' member.
- (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
- * src/cff/cffdrivr.c (cff_service_multi_masters),
- src/truetype/ttdriver (tt_service_gx_multi_masters),
- src/type1/t1driver.c (t1_service_multi_masters): Updated.
+2018-08-26 Werner Lemberg <wl@gnu.org>
-2017-10-07 Werner Lemberg <wl@gnu.org>
+ Minor tracing adjustments.
- [type1] Minor code shuffling.
+ * src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
+ Trace.
- * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of...
- (t1_set_mm_blend): ...this new function.
- (T1_Set_MM_Design): Use `t1_set_mm_blend'.
+ * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing.
-2017-10-05 Werner Lemberg <wl@gnu.org>
+2018-08-26 Werner Lemberg <wl@gnu.org>
- * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer
- overflow.
+ [truetype] Avoid nested frames.
+
+ Triggered by
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Don't use variable
+ `opened_frame' to trace whether a frame must be closed at the end of
+ function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which
+ gets called for space glyphs) uses a frame by itself. Instead,
+ close the frame after loading the header, then use another frame for
+ the remaining part of the glyph later on.
+
+ Also avoid calling `tt_get_metrics' twice under some circumstances.
+
+2018-08-26 Werner Lemberg <wl@gnu.org>
+
+ Various minor clean-ups.
+
+ * src/base/ftapi.c: Remove. Unused.
+ * src/base/Jamfile (_sources): Updated.
+
+ * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant
+ code.
+
+2018-08-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
+
+ Convert documentation markup to Markdown.
+
+ It is the result of a GSoC 2018 project; this separate ChangeLog
+ commit covers the last four commits
+
+ ae5d1a4cec37557f31aec270332cfe886a62f9a0
+ 53c69ce04faed3dcc68ca0f54cb8d703d8babf69
+ 195728d5ba38f34fb2c2c20807c01656f2f59b66
+ c962db28ea59225f0105c03d907d4a9b71765687
+
+ * docs/reference/markdown/images/favico.ico,
+ docs/reference/markdown/javascripts/extra.js,
+ docs/reference/markdown/stylesheets/extra.css: New files.
+
+ * docs/reference/.gitignore, docs/reference/README: Updated.
+
+ * src/tools/docmaker/*: Removed. It has been replaced with
+ `docwriter', a python package available at
+
+ https://pypi.org/project/docwriter/
+
+ * Jamfile: Updated.
+ * builds/ansi/ansi-def.mk, builds/beos/beos-def.mk,
+ builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN),
+ builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable.
+
+ * builds/unix/configure.raw: Check for `python' and `pip'.
+ If not present, warn that `make refdoc' will fail.
+ * builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables.
+
+ * builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON,
+ ENV_PIP): New variables.
+ (refdoc): Updated.
+ (refdoc-venv): New target.
+ (.PHONY): Updated.
+
+2018-08-23 Werner Lemberg <wl@gnu.org>
+
+ Add macros for handling over-/underflowing `FT_Int64' values.
+
+ * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64,
+ MUL_INT64, DIV_INT64) [FT_LONG64]: New macros.
+
+ * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use
+ `SUB_INT64' and `MUL_INT64'.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
-2017-10-05 Werner Lemberg <wl@gnu.org>
+2018-08-22 Werner Lemberg <wl@gnu.org>
- Fix compiler warnings.
+ [truetype] Improve legibility of `glyf' parsing.
- * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies
- on numeric overflow.
- Add cast.
+ * src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR,
+ Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y,
+ OVERLAP_SIMPLE): New macros.
+ (TT_Load_Simple_Glyph): Use new macros to make code more readable.
+ Remove useless adjustment of `outline->tags' elements.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable
- types, add cast.
+2018-08-21 Werner Lemberg <wl@gnu.org>
-2017-10-04 John Tytgat <John.Tytgat@esko.com>
+ * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
- [cff] Add support for `FSType'.
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
- * include/freetype/internal/cfftypes.h (CFF_FontRec): Add
- `font_extra' entry.
+2018-08-18 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to
- retrieve FSType info from the embedded PostScript data.
- (cff_service_ps_info): Register function.
+ [psaux] Avoid slow PS font parsing in case of error.
+
+ Reported as
- * src/cff/cffload.c (cff_font_done): Free `font_extra'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955
-2017-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even
+ in case of error to avoid potential re-scanning.
- Signedness fixes in bitmap presetting.
+2018-08-18 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix heap buffer overflow in old engine.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967
- * src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
- * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned
- subtraction.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
+ <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be
+ non-zero.
+
+2018-08-16 Young Xiao <yangx92@hotmail.com>
+
+ * builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
+
+ Reported as bug #54515, duplicate of #43540.
+
+2018-08-16 Werner Lemberg <wl@gnu.org>
+
+ * builds/*/ftsystem.c (FT_COMPONENT): Updated also.
-2017-09-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- Bitmap metrics presetting [2/2].
+ [bdf] Don't track duplicate encodings.
- * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when
- appropriate but `FT_Render_Glyph' is not called.
- * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change.
+ There is no harm except some umbiguity in broken fonts with duplicate
+ encodings.
-2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking.
+ (_bdf_parse_t): Remove large `have' bitfield.
- [smooth, raster] Miscellaneous cleanups.
+2018-08-15 Werner Lemberg <wl@gnu.org>
- * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce
- translations and clean up the exit.
- (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'.
+ Don't use `trace_' prefix for FT_COMPONENT arguments.
-2017-09-28 Ben Wagner <bungeman@google.com>
+ * include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
+ FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
+ (FT_TRACE): Use `FT_TRACE_COMP'.
- [truetype] Really, really fix #52082.
+ */* (FT_COMPONENT): Updated.
- * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
+2018-08-14 Werner Lemberg <wl@gnu.org>
-2017-09-28 Werner Lemberg <wl@gnu.org>
+ Use formatting string in FT_TRACEX calls for non-simple arguments.
- * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow.
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
+ <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>:
+ Do it.
+
+ * src/psaux/pshints.c (cf2_hintmap_build): Ditto.
+
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
+ cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR,
+ cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Ditto.
+
+2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [bdf] Remove unused fields.
+
+ * src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified',
+ which were set but never used.
+ * src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font):
+ Updated accordingly.
+
+2018-08-14 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix another segv in old engine.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872
-2017-09-28 Ewald Hew <ewaldhew@gmail.com>
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
+ [CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in
+ dictionaries.
- * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak.
+2018-08-14 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix missing error handling.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
-2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/cffparse.c (cff_parser_run)
+ [CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
+ `parse_charstrings_old'.
- Bitmap metrics presetting [1/2].
+2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
- This mainly just extracts the code for presetting the bitmap metrics
- from the monochrome, grayscale, and LCD renderers into a separate
- function.
+ [bdf] Remove unused overflow storage.
- * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that
- calculates prospective bitmap metrics for the given rendering mode.
- * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
- Declare it.
+ * src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
+ (bdf_font_t): Remove `overflow' field.
+ * src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
+
+2018-08-14 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix segv in old engine.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864
+
+ * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
+ <cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's
+ `random' field directly if parsing dictionaries.
+
+2018-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [bdf] Use unsigned types.
+
+ * src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'.
+ (bdf_font_t): Unsign `default_char'.
+ * src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'.
+
+ * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs,
+ _bdf_parse_start): Updated accordingly.
+ * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto.
+
+2018-08-13 Werner Lemberg <wl@gnu.org>
+
+ * src/type42/t42parse.c (t42_parse_sfnts): One more format check.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832
+
+2018-08-11 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
+
+2018-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs.
+
+2018-08-10 Ben Wagner <bungeman@google.com>
+
+ * src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435).
+
+2018-08-10 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
+
+2018-08-10 Werner Lemberg <wl@gnu.org>
+
+ Fix clang warnings.
+
+ * src/base/ftdebug.c (ft_trace_level_enabled,
+ ft_trace_level_disabled): Add `static' keyword.
+
+2018-08-09 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [raster, smooth] Reinstate bitmap size limits.
- * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds
- padding to CBox taking into account pecularities of LCD rendering.
- * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it.
+ This again moves outline and bitmap size checks one level up.
- * src/raster/ftrend1.c (ft_raster1_render): Reworked to use
- `ft_glyphslot_preset_bitmap'.
+ * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
+ outlines.
+ * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
+ and, therefore, outlines that require them.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
- (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting
- is moved to `ft_glyphslot_preset_bitmap'.
-2017-09-28 Ewald Hew <ewaldhew@gmail.com>
+ * src/raster/ftraster.c (ft_black_render): Remove outline size checks.
+ * src/smooth/ftgrays.c (gray_raster_render): Ditto.
+ [STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
- [psaux] Fix compiler warning.
+2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing
- code.
+ [pcf] Revert massive unsigning.
-2017-09-27 Werner Lemberg <wl@gnu.org>
+2018-08-08 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
+ [smooth] Improve tracing.
-2017-09-25 Werner Lemberg <wl@gnu.org>
+ * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
+ if called the first time.
+ (gray_convert_glyph): Updated.
- [psaux] Fix compiler warnings.
+2018-08-08 Werner Lemberg <wl@gnu.org>
- * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
- test.
+ Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
- * src/psaux/psintrp.c (cf2_interpT2CharString)
- <cf2_escCALLOTHERSUBR>: Add casts.
+ It sometimes makes sense to suppress tracing informations, for
+ example, if it outputs identical messages again and again.
- * src/psaux/psobjs.c (ps_decoder_init): Add cast.
+ * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
+ pointer.
+ (FT_Trace_Disable, FT_Trace_Enable): New declarations.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/base/ftdebug.c (ft_trace_levels): Rename to...
+ (ft_trace_levels_enabled): ... this.
+ (ft_trace_levels_disabled): New array.
+ (ft_trace_levels): New pointer.
+ (FT_Trace_Disable, FT_Trace_Enable): Implement.
+ (ft_debug_init): Updated.
- [psaux] Minor fixes.
+2018-08-08 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
- Rearrange `ps_builder_init' arguments to conventional order.
+ Debugging improvements.
- * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
- notice for `SubFont' in Type 1 mode.
+ * src/base/ftobjs.c (pixel_modes): Move this array to top level
+ from ...
+ (FT_Load_Glyph): ... here.
+ (FT_Render_Glyph_Internal): Use `width' x `height' in trace message.
+ Use `pixel_modes'.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
- [psaux] Move `psdecode' into `psobjs'.
+ [pcf] Massive unsigning (part 2).
- As the former only contains a single procedure, move it into
- `psobjs' for simplicity. Also change the parameter order to the
- conventional one.
+ Treat all size related properties as unsigned values.
- * src/psaux/psdecode.c (ps_decoder_init): Moved to...
- * src/psaux/psobjs.c: ...Here.
- * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto.
+ * src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and
+ `value'.
+ * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated
+ parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
+ RESOLUTION_X and RESOLUTION_Y.
- * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update
- `ps_decoder_init' function signature.
+2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c:
- Update calls.
+ [pcf] Massive unsigning (part 1).
- * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes.
+ Unofficial specifications hesitate to use unsigned 32-bit integers.
+ Negative values caused a lot of trouble in the past and it is safer
+ and easier to treat some properties as unsigned.
- * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC):
- Update file references.
+ * src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent',
+ `fontDescent', and `maxOverlap'.
+ * src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated.
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select,
+ PCF_Size_Request): Updated.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-08-07 Alexei Podtelezhnikov <apodtele@gmail.com>
- [psaux] Fix Type 1 hinting.
+ * src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and
+ `bitmapSizes'.
- Type 1 hinting breaks sometimes when mid-charstring hints should
- have been in the initial hintmap. This fix adds a preprocessing
- pass that reads all hints and builds the correct initial hintmap
- first, before proceeding to build the glyph outline.
+2018-08-06 Werner Lemberg <wl@gnu.org>
- * src/psaux/psintrp.c (cf2_interpT2CharString): New
- `initial_map_ready' boolean flag.
- Ignore outline commands and hint changes on first pass.
- <cf2_cmdENDCHAR>: Add section to build hintmap and rewind.
+ * devel/ftoption.h: Synchronize with main `ftoption.h'.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
- [psaux] Add tracing for hints.
+ [pcf] Use unsigned types.
- * src/psaux/pshints.c (cf2_hintmap_dump): New function.
- (cf2_hintmap_insertHint): Trace incoming and inserted hints.
- (cf2_hintmap_build): Dump hintmap before and after hint adjustment.
+ * src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'.
+ * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto.
+ * src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-08-05 Werner Lemberg <wl@gnu.org>
- [psaux] Minor fixes.
+ * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
- * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop
- results.
- s/font->decoder/decoder/ where necessary.
- <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_escHSTEM3, cf2_escVSTEM3>: Use
- offset parameter in `cf2_doStems' instead of doing correction for
- left-sidebearing.
+ Reported as
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ https://bugs.chromium.org/p/chromium/issues/detail?id=777151
- [cid] Use the new engine.
+2018-08-04 Werner Lemberg <wl@gnu.org>
- * src/cid/cidgload.c: Update includes.
- (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph
- loading code as with `type1' module.
+ * src/truetype/ttinterp.c (opcode_name): Fix typos.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-08-04 Werner Lemberg <wl@gnu.org>
- [cid] Add Adobe engine configuration.
+ Fix clang warnings.
- This is similar to what was done in the `type1' module.
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
+ `orientation'.
- * src/cid/cidriver.c (t1cid_driver_class): Update declaration.
- * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H.
- (cid_driver_init): Update code.
+ * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
+ Add cast.
- [psaux] Change subfont synthesis for CID fonts.
+ * src/type1/t1load.c (parse_weight_vector): Fix cast.
- Change `t1_make_subfont' to take in the Private dict record as an
- argument. This is because Type 1 and CID font records in FreeType
- have this in different places.
+2018-07-31 Werner Lemberg <wl@gnu.org>
- * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to
- `FT_Face' so that CID is also accepted.
- Take `PS_Private' as an argument and let caller figure out where the
- Private dict actually is.
- Update references.
+ * src/cid/cidtoken.h: Handle `XUID' keyword.
- * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update
- declaration.
+2018-07-31 Werner Lemberg <wl@gnu.org>
- * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update
- call.
+ [cid] Trace PostScript dictionaries.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ (cid_load_keyword, cid_parse_font_matrix, parse_fd_array,
+ parse_expansion_factor, cid_parse_dict): Add tracing calls.
+ (parse_font_name): New function to trace `/FontName' keywords in
+ /FDArray dict.
+ (cid_field_records): Register `parse_font_name'.
- [type1] Switch to Adobe engine.
+2018-07-30 Werner Lemberg <wl@gnu.org>
- * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine.
+ [cff] Fix typo.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ Reported as
- [psaux] Extend Adobe interpreter (seac).
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409
- This concludes the changes needed to add Type 1 support.
+ * src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary
+ check.
- * src/psaux/psintrp.c: Update includes.
- (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to
- implied seac for CFF.
+2018-07-29 Werner Lemberg <wl@gnu.org>
- * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New
- function to look up the glyph index.
+ * src/pcf/pcfread.c (pcf_get_encodings): Another thinko.
- * src/psaux/psft.c (cf2_getT1SeacComponent,
- cf2_freeT1SeacComponent): New functions to get the charstrings for
- seac components.
+ Reported as
- * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
- [psaux] Extend Adobe interpreter (flex in callothersubr).
+ [smooth] Fix Harmony memory management.
- * src/psaux/psintrp.c (cf2_interpT2CharString)
- <cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1,
- 2).
- <cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing
- flex. This is to avoid closing the current contour.
+ Reported as
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501
- [psaux] Extend Adobe interpreter (callothersubr).
+ * src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer
+ after each rendering in case of failure.
- * src/psaux/psintrp.c (cf2_interpT2CharString)
- <cf2_escCALLOTHERSUBR>: Copy code from
- `t1_decoder_parse_charstrings' (in `t1decode.c').
- OtherSubr 3 (change hints) should reset the hintmask, so that the
- new hints are applied.
- Fix function calls and stack access.
+2018-07-28 Werner Lemberg <wl@gnu.org>
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ [type1] Avoid segfaults with `FT_Get_PS_Font_Value'.
- [psaux] Extend Adobe interpreter (pop).
+ Reported as
- * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled
- OtherSubr results are stored. Implement the PostScript stack using
- an array.
- <cf2_escPOP>: Ensure that the stack is not cleared after getting
- `OtherSubr' results.
- Fix stack access.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
- [psaux] Extend Adobe interpreter (callsubr).
+2018-07-27 Werner Lemberg <wl@gnu.org>
- * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
- Type 1 mode.
+ [truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
- * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
+ `face->doblend' if the current call to the function yields the same
+ blend coordinates as the previous call.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-07-27 Werner Lemberg <wl@gnu.org>
- [psaux] Extend Adobe interpreter (div, four-byte numbers).
+ [psaux, type1]: More tracing improvements.
- * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add
- Type 1 mode. Type 1 requires large integers to be followed by
- `div'; cf. `Adobe Type 1 Font Format', section 6.2.
- <op == 255>: Push Type 1 four-byte numbers as `Int' always. This is
- to ensure `div' and `callsubr' get values they can use.
+ * src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped
+ outline commands.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix
+ missing case.
+ (t1_decoder_parse_metrics): Make tracing output more compact.
- [psaux] Extend Adobe interpreter (hints).
+ * src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose.
+ (T1_Get_Advances): Add tracing.
- * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
- cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode.
- Allow adding hints mid-charstring.
- <cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands
- for three normal stem hints. This requires some recalculation of
- stem positions.
- Correction for left sidebearing.
+2018-07-25 Werner Lemberg <wl@gnu.org>
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ [psaux, type1] Trace PostScript dictionaries and other things.
- [psaux] Extend Adobe interpreter (hsbw, sbw).
+ The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary
+ right now.
- * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the
- first operation in a Type 1 charstring.
- (cf2_interpT2CharString): Remove unused variables.
- <cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw'
- must be the first operation in a Type 1 charstring.
- <cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for
- left sidebearing.
+ * src/psaux/psobjs.c (ps_parser_load_field,
+ ps_parser_load_field_table): Add tracing calls.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing
+ output more compact.
- [psaux] Extend Adobe interpreter (setcurrentpoint).
+ * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add
+ tracing messages.
- * src/psaux/psintrp.c (cf2_interpT2CharString)
- <cf2_escSETCURRENTPT>: Fix stack access.
+ * src/type1/t1load.c (parse_blend_axis_types,
+ parse_blend_design_positions, parse_blend_design_map,
+ parse_weight_vector, t1_load_keyword, t1_parse_font_matrix,
+ parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add
+ tracing calls.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/type1/t1objs.c (T1_Face_Init): Add tracing call.
- [psaux] Extend Adobe interpreter (closepath).
+ * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more
+ verbose.
- * src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>:
- Use the right builder function. We can use the `haveWidth' boolean
- already present, instead of implementing `parse_state'.
+2018-07-25 Werner Lemberg <wl@gnu.org>
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ Fix minor ASAN run-time warnings.
- [psaux] Add Type 1 operations to Adobe CFF interpreter.
+ * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
+ `FT_MEM_ZERO' if we actually have a buffer.
+ (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
- The following Type 1 specific ops have been added (copied from
- `t1decode'):
+2018-07-24 Alexei Podtelezhnikov <apodtele@gmail.com>
- closepath
- vstem3
- hstem3
- seac
- sbw
- callothersubr
- pop
- setcurrentpoint
- hsbw
+ [build] Fortify dllexport/dllimport attributes (#53969,#54330).
- The following require a Type 1 mode, because of differences in
- specification:
+ We no longer use predefined _DLL, which can be defined for static
+ builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
+ following libtool convention.
- hstem
- vstem
- vmoveto
- callsubr
- div
- rmoveto
- hmoveto
- Numbers
+ * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
+ Define DLL_EXPORT manually.
- The subsequent commits will implement these changes and adapt
- accesses of data and objects to the new interpreter.
+ * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
+ builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
+ src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
- NOTE: Will not compile in the meantime!
+2018-07-24 Werner Lemberg <wl@gnu.org>
- * src/psaux/psintrp.c: Add opcodes to enum.
- (cf2_interpT2CharString): Copy relevant code over from
- `t1_decoder_parse_charstrings' (in `t1decode.c').
+ [type1] Check relationship between number of axes and designs.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ For Multiple Masters fonts we don't support intermediate designs;
+ this implies that
- [type1] Fixes for rendering.
+ number_of_designs == 2 ^^ number_of_axes
- The Type 1 advance width calculation passes null for glyph slot,
- etc, which can cause null pointer access in the new interpreter.
- Fall back to the old one for now.
+ Reported as
- Fix the large glyph retry code and ensure hinting and scaling flags
- are set properly.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
- * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a
- check for metrics_only.
- Set the `force_scaling' flag.
- (T1_Parse_Glyph): Updated.
- (T1_Load_Glyph): Add `hinting' and `scaled' flags.
+ * src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
+ (T1_Get_MM_Var): Remove now redundant test.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-07-24 Hin-Tak Leung <htl10@users.sourceforge.net>
- [psaux] Add missing objects (2/2).
+ [truetype] Match ttdebug's naming of instruction mnemonics.
- Synthesize a `SubFont' object for Type 1 fonts. This is used in the
- interpreter to access Private dict data, which are stored in
- different places for Type 1 and CFF. This allows the same data to
- be used in either mode.
+ * src/truetype/ttinterp.c: The form used in ttdebug,
+ "MDRP[G,B,W,?]", etc., is slightly more readable than
+ "MDRP[00,01,02,03]".
- * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy
- required values to a dummy `CFF_SubFont' object. This is similar to
- `cff_make_private_dict'.
- * src/psaux/psobjs.h: Add the new declaration.
+2018-07-24 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto.
- Add this to the PSAux Service for future use with CID fonts.
+ * src/pcf/pcfread.c (pcf_get_encodings): Thinko.
- * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H.
- (T1_Parse_Glyph_And_Get_Char_String): Add the call.
+ Reported as
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
- [psaux] Add missing objects for Type 1 (1/2).
+2018-07-22 Werner Lemberg <wl@gnu.org>
- Move `CF2_Font' instance to `PS_Decoder'. This is the context for
- the interpreter and since it is currently stored in `CFF_Font', is
- unavailable in Type 1 mode.
+ * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
- * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New
- `cf2_instance' field.
+ Reported as
- * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to
- `PS_Decoder'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
- * src/psaux/t1decode.c (t1_decoder_done): Add finalization code.
+2018-07-22 Werner Lemberg <wl@gnu.org>
- * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses.
+ * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ This is an oversight of the module change 2018-07-21.
- Allow `type1' module to use the Adobe engine.
+ Reported as
- Add the callback and some conditionals to switch between the two
- engines.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
- * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change
- function declarations.
- * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the
- callbacks.
+2018-07-22 Werner Lemberg <wl@gnu.org>
- * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for
- number conversion.
+ [cid] Sanitize `BlueShift' and `BlueFuzz'.
- * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code
- to choose which renderer to use.
+ This code is taken from the type1 module.
- * src/cid/cidgload.c (cid_load_glyph): Update call.
- * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update
- includes.
+ Reported as
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
- [type1] Add Adobe engine configuration.
+ * src/cid/cidload.c (parse_fd_array): Set some private dict default
+ values.
+ (cid_face_open): Do the sanitizing.
+ Fix some tracing messages.
- Use the previously changed PS_Driver in type1 module to store
- hinting engine configuration.
+2018-07-21 Werner Lemberg <wl@gnu.org>
- * include/freetype/ftt1drv.h: New file.
- Duplicate and rename config options from CFF.
- * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro.
+ [pcf] Fix handling of the undefined glyph.
- * src/type1/t1driver.c (t1_driver_class): Update declaration.
- * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H.
- (T1_Driver_Init): Update code.
+ This change makes the driver use the `defaultChar' property of PCF
+ files.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
+ unsigned.
- [cff] Move and rename `CFF_Driver'.
+ * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
+ unsigned.
+ Validate `defaultChar'.
+ If `defaultChar' doesn't point to glyph index zero, swap glyphs with
+ index zero and index `defaultChar' and adjust the encodings
+ accordingly.
- This is so that we can use the same hinting engine parameters for
- Type 1.
+ * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
+ PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
+ the first character in the font to be the default character.
- * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and
- move to...
- * include/freetype/internal/psaux.h (PS_Driver): ...here.
+2018-07-20 Armin Hasitzka <prince.cherusker@gmail.com>
- * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c,
- src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c,
- src/psaux/psobjs.c: Update references.
+ Move the legacy fuzz target to the `freetype-testing' repository.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ It can now be found at
- [psaux, type1] Reorganize object fields.
+ https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy
- Make some fields more generic, so that we can access them the same
- way regardless of Type 1 or CFF.
+ * src/tools/ftfuzzer: Remove this folder and its contents from the
+ repository.
- * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face'
- to `FT_Face'.
- Remove unused fields.
+2018-07-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Avoid left-shift of negative numbers (#54322).
+
+ * src/cff/cffgload.c (cff_slot_load): Use multiplication.
+
+2018-07-17 Werner Lemberg <wl@gnu.org>
+
+ Allow FT_ENCODING_NONE for `FT_Select_Charmap'.
+
+ This is a valid encoding tag for BDF, PCF, and Windows FNT, and
+ there is no reason to disallow it for these formats.
+
+ * src/base/ftobjs.c (FT_Select_Charmap): Implement it.
+
+2018-07-17 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.
+
+2018-07-16 Armin Hasitzka <prince.cherusker@gmail.com>
+
+ * include/freetype/internal/ftcalc.h: Add macros for handling
+ harmless over-/underflowing `FT_Int' values.
+
+ * src/sfnt/sfdriver.c (fixed2float): Fix negation of
+ `(int)(-2147483648)'.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
+
+2018-07-16 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
+
+2018-07-12 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.
+
+ Taken from patch #9667, written by Steve Langasek
+ <vorlon@debian.org>.
+
+ This fixes a build failure (most probably a bug in gcc) on ppc64el
+ when building with -O3.
+
+2018-07-05 Werner Lemberg <wl@gnu.org>
+
+ Fix typo (#54238).
+
+ * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color)
+ [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
+
+2018-07-05 Werner Lemberg <wl@gnu.org>
+
+ Adjust table size comparisons (#54242).
+
+ * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
+
+2018-07-05 Werner Lemberg <wl@gnu.org>
+
+ Fix more 32bit issues (#54208).
+
+ * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
+ run-time error.
+
+ * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
+ numeric overflow.
+
+2018-07-04 Werner Lemberg <wl@gnu.org>
+
+ Fix 32bit build warnings (#54239).
+
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed
+ vs. unsigned comparisons.
+
+ * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
+
+2018-07-02 Jeff Carey <Jeff.Carey@monotype.com>
+
+ * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.
+
+2018-07-02 Werner Lemberg <wl@gnu.org>
+
+ s/palette_types/palette_flags/.
+
+ Suggested by Behdad.
+
+2018-07-02 Werner Lemberg <wl@gnu.org>
+
+ Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
+
+ * include/freetype/freetype.h, src/base/ftobjs.c
+ (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.
+
+ * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
+ src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
+ Updated.
+
+2018-07-01 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
+
+ Reported by Behdad.
+
+2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/fttrigon.c (FT_Tan): Improve accuracy.
+ (FT_Vector_Rotate): Simplify.
+
+2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * src/base/ftobjs.c (FT_Set_Charmap): Robustify.
+
+2018-06-25 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix memory leak.
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
+ Fix typo in `goto' destination.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
+
+2018-06-25 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
+
+2018-06-24 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Increase precision while applying VF deltas.
+
+ It turned out that we incorrectly round CVT and glyph point deltas
+ before accumulation, leading to severe positioning errors if there
+ are many delta values to sum up.
+
+ Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
+ by Behdad.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
+ 16.16 format.
+ (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
+ format array, and add the accumulated values to the CVT at the end
+ of the function.
+ (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
+ `points_out' in 16.16 format.
+ Collect deltas in `point_deltas_x' and `point_deltas_y', which are
+ 16.16 format arrays, and add the accumulated values to the glyph
+ coordinates at the end of the function.
+
+2018-06-24 Werner Lemberg <wl@gnu.org>
+
+ New base function `FT_Matrix_Check' (#54019).
+
+ * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
+ reject degenerate font matrices.
+
+ * include/freetype/internal/ftcalc.h: Updated.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
+ (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
+ src/type42/t42parse.c (t42_parse_font_matrix): Use
+ `FT_Matrix_Check'.
+
+2018-06-23 Werner Lemberg <wl@gnu.org>
+
+ Fix typo.
+
+ Reported by Behdad.
+
+ * src/base/ftcolor.c (FT_Palette_Data_Get)
+ [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
+
+2018-06-21 Werner Lemberg <wl@gnu.org>
+
+ s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
+
+ * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
+ src/sfnt/ttcolr.c: Do it.
+
+2018-06-19 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix CPAL heap buffer overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
+
+ * src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
+ offsets.
+
+2018-06-19 Werner Lemberg <wl@gnu.org>
+
+ Doh. Don't use CPAL or COLR data if tables are missing.
+
+ Reported by Alexei.
+
+ * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
+ `colr' is NULL.
+
+ * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
+ `cpal' is NULL.
+
+2018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Introduce `FT_New_Glyph'.
+
+ This function facilitates access to full capabilities of FreeType
+ rendering engine for custom glyphs. This can be quite useful for
+ consistent rendering of mathematical and chemical formulas, e.g.
+
+ https://bugs.chromium.org/p/chromium/issues/detail?id=757078
+
+ * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New
+ function.
+
+2018-06-17 Armin Hasitzka <prince.cherusker@gmail.com>
+
+ [bdf] Fix underflow of an unsigned value.
+
+ bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That
+ caused an underflow of the unsigned value which results in undefined
+ behaviour.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before
+ if the `ENCODING' keyword cannot be found.
- * src/psaux/psft.c: Update all accesses of `PS_Builder.face'.
- Add some asserts to guard against casting `T1_Face' as `TT_Face'.
+2018-06-17 Werner Lemberg <wl@gnu.org>
- * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow
- `CFF_GlyphSlot', so that we can pretend they are the same in the
- interpreter.
+ [base] Add tracing for `FT_Bitmap_Blend'.
- * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point):
- Updated with above changes.
+ * include/freetype/internal/fttrace.h (trace_bitmap): New
+ enumeration.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ * src/base/ftbitmap.c (FT_COMPONENT): Define.
+ (FT_Bitmap_Blend): Add `FT_TRACE5' calls.
- [psaux] Prepare for Type 1 mode.
+2018-06-17 Werner Lemberg <wl@gnu.org>
- Add some checks for Type 1 data passing through.
+ s/trace_bitmap/trace_checksum/.
- * src/psaux/psfont.h (CF2_Font): Add `isT1' flag.
- * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend
- code which is not applicable for Type 1.
+ * include/freetype/internal/fttrace.h: s/bitmap/checksum/.
- * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing
- `decoder->cff' in Type 1 mode.
- Copy `is_t1' flag to `CF2_Font'.
+ * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/.
+ Adjust code.
-2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+2018-06-16 Werner Lemberg <wl@gnu.org>
- [psaux, cff] Use the new objects.
+ [sfnt] Fix color glyph layer loading.
- * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
- switching between new and old engines.
+ * src/sfnt/ttcolr.c (Colr): Add `table_size' field.
+ (tt_face_load_colr): Set it.
+ (tt_face_get_colr_layer): Check pointer limit for layer entries.
- * src/cff/cffgload.c, src/cff/cffparse.c: Update calls.
+2018-06-16 Werner Lemberg <wl@gnu.org>
- * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h,
- src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all
- to use new objects.
+ [sfnt] Fix color palette loading.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933
+
+ * src/sfnt/ttcpal.c (Cpal): Add `table_size' field.
+ (tt_face_load_cpal): Set it.
+ (tt_face_palette_set): Check pointer limit for color entries.
+
+2018-06-16 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
+
+2018-06-16 Werner Lemberg <wl@gnu.org>
+
+ Add `FT_Bitmap_Blend' API.
+
+ Still missing: Support for negative bitmap pitch and subpixel offset
+ of source bitmap.
+
+ * include/freetype/ftbitmap.h, src/base/ftbitmap.c
+ (FT_Bitmap_Blend): New function.
+
+2018-06-14 Werner Lemberg <wl@gnu.org>
+
+ Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
+
+ This avoids any additional allocation of COLR related structures in
+ a glyph slot.
+
+ * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
+ FT_Get_GlyphLayers): Removed.
+
+ * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
+ (FT_Slot_InternalRec): Remove `color_layers'.
+
+ * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
+ Removed.
+ (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
+ `load_colr_layer'.
- [psaux] Objects for new interpreter (part 2).
+ * src/base/ftobjs.c (ft_glyph_slot_done): Updated.
+ (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
+ (FT_Get_GlyphLayers): Removed.
- Make the new objects copy over values. They are essentially wrapper
- types for the different decoders/builders.
+ * src/sfnt/sfdriver.c (sfnt_interface): Updated.
- * include/freetype/internal/psaux.h: Update declarations.
- (PS_Builder): Add `is_t1' flag.
- (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to...
- (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this.
- (PS_Decoder): Updated.
- Add `t1_parse_callback' member.
- (PSAux_ServiceRec): Add `ps_decoder_init' member.
+ * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
+ * src/sfnt/ttcolr.h: Updated.
- * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations.
+ * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
- * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two
- modes.
+2018-06-14 Werner Lemberg <wl@gnu.org>
- * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux'
- service.
+ Provide iterative API to access `COLR' data.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ This solution doesn't store any data in an `FT_GlyphSlot' object.
- [psaux] Add objects for new interpreter.
+ * include/freetype/freetype.h (FT_LayerIterator): New structure.
+ (FT_Get_Color_Glyph_Layer): New function.
- Introduce `PS_Decoder' and `PS_Builder' which include all fields
- from either Type 1 or CFF decoders/builders.
+ * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
+ function type.
+ (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
- * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New
- structs.
+ * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.
+
+ * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
+ * src/sfnt/ttcolr.h: Updated.
+
+ * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+
+2018-06-14 Werner Lemberg <wl@gnu.org>
+
+ Add glyph index and glyph load flags to glyph slot.
+
+ * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
+ `reserved' field to `glyph_index'.
+
+ * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
+ `load_flags' field.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
+
+2018-06-14 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Move `CPAL' stuff into separate files.
+
+ * src/sfnt/sfdriver.c: Include `ttcpal.h'.
+ * src/sfnt/sfnt.c: Include `ttcpal.c'.
+
+ * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
+ * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.
+
+ * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
+ Updated.
+
+ * include/freetype/internal/fttrace.h: Add support for `colr' and
+ `cpal'.
+ Sort entries.
- * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder'
+2018-06-13 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Separate `CPAL' and `COLR' table handling.
+
+ Later on we want to support the `SVG' table also, which needs `CPAL'
+ (but not `COLR').
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
+ and `free_cpal' fields.
+ (FT_DEFINE_SFNT_INTERFACE): Updated.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Replace
+ `colr_and_cpal' fields with `cpal' and `colr'.
+
+ * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.
+
+ * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
+ (ColrCpal): Removed.
+ (tt_face_load_colr): Split off CPAL handling into...
+ (tt_face_load_cpal): ... this new function.
+ (tt_face_free_colr): Split off CPAL handling into...
+ (tt_face_free_cpal): ... this new function.
+ (tt_face_load_colr_layers, tt_face_palette_set): Updated.
+
+ * src/sfnt/ttcolr.h: Updated.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
+
+2018-06-12 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix `sizeof' thinko.
+
+ * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
+ use `sizeof' for computing array limit.
+
+2018-06-12 Werner Lemberg <wl@gnu.org>
+
+ Finish CPAL/COLR support (4/4).
+
+ * src/sfnt/ttcolr.c (tt_face_find_color): Removed.
+ (tt_face_colr_blend_layer): Use `face->palette' instead of calling
+ `tt_face_find_color'.
+ Use and set text foreground color.
+
+2018-06-12 Werner Lemberg <wl@gnu.org>
+
+ Finish CPAL/COLR support (3/4).
+
+ * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
+ (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
functions.
- * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold
- `PS_Decoder' initialization functions.
+2018-06-12 Werner Lemberg <wl@gnu.org>
+
+ Finish CPAL/COLR support (2/4).
+
+ * src/sfnt/ttcolr.c (tt_face_palette_set): New function.
+ (tt_face_load_colr): Allocate `face->palette' and call
+ `tt_face_palette_set'.
+ Adjust return error code in case of error.
+
+ * src/sfnt/ttcolr.h: Updated.
+
+ * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
+ function type.
+ (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
- * src/psaux/psaux.c, src/psaux/Jamfile (_sources),
- src/psaux/rules.mk (PSAUX_DRV_SRC): Updated.
+ * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
+ (sfnt_done_face): Updated.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+2018-06-12 Werner Lemberg <wl@gnu.org>
- [psaux] Rename files.
+ Finish CPAL/COLR support (1/4).
- Replace the `cf2' file name prefix with `ps' as the Adobe engine
- will be used for both PostScript Types 1 and 2 (CFF) instead of just
- CFF.
+ * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
+ `palette_index', `palette', `have_foreground_color' and
+ `foreground_color'.
- s/cf2/ps/ for all following.
+2018-06-12 Werner Lemberg <wl@gnu.org>
- * src/psaux/cf2*: Rename files.
- * src/psaux/*: Update includes.
+ [sfnt] Minor.
- * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC,
- PSAUX_DRV_H): Update file references.
+ * src/sfnt/ttcolr.c (tt_face_load_colr_layers):
+ s/palette_index/palette_entry_index/ for consistency.
+ Adjust return error code in case of error.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+2018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
- [psaux] Minor fix.
+ [raster] Clean up.
- Use `MultiMasters' service in `psaux' instead of a call to `cff'.
- The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined.
+ * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision):
+ Clean up after 5-level gray removal (8dc8635874).
+ (Vertical_Sweep_Span): Be brief.
- * src/psaux/cf2ft.c: Update includes.
- (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of
- `cff_get_var_blend'.
+2018-06-10 Werner Lemberg <wl@gnu.org>
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ [sfnt] Fix compiler warnings.
- [psaux, cff] Move `cff_random' into `psaux' service.
+ * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers,
+ tt_face_colr_blend_layer): Add `NULL' initializers.
- NOTE: Does not compile!
+2018-06-10 Werner Lemberg <wl@gnu.org>
- Minor fix to allow both `cff' and `psaux' to use `cff_random'.
+ s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
- * src/cff/cffload.c (cff_random): Move to...
- * src/psaux/psobjs.c: Here.
- * src/cff/cffload.h: Move corresponding declaration to
- `src/psaux/psobjs.h'.
+ * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
+ src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
- * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the
- function here...
- * src/psaux/psauxmod.c: And here.
+2018-06-10 Nikolaus Waxweiler <madigens@gmail.com>
- * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code.
+ CMakeLists: also accept IOS_PLATFORM=SIMULATOR64
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ This might be needed to build FreeType for the iOS simulator. See
+ https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed
+ by Steve Robinson.
- [cff] Move struct declarations to `freetype/internal'.
+ * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
- NOTE: Does not compile!
+2018-06-10 Werner Lemberg <wl@gnu.org>
- This is so that the CFF functions moved to `psaux' can access the
- same structs that they need.
+ Implement `FT_Palette_Get'.
- * src/cff/cfftypes.h: Moved to...
- * include/freetype/internal/cfftypes.h: ...Here.
+ * src/base/ftcolor.c: New file.
- * src/cff/cffobjs.h: Moved the struct declarations to...
- * include/freetype/internal/cffotypes.h: ... this new file.
+ * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
+ src/base/ftbase.c: Add `ftcolor.c'.
- * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H,
- FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros.
+2018-06-10 Werner Lemberg <wl@gnu.org>
- * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c,
- src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c,
- src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h,
- include/freetype/internal/psaux.h,
- include/freetype/internal/services/svcfftl.h: Update includes.
+ * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.
- * src/cff/rules.mk (CFF_DRV_H): Updated.
+2018-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ [raster] Deal with pitch sign earlier.
- [psaux, cff] Add new service for inter-module calls.
+ * src/raster/ftraster.c (black_TWorker): Remove unused `traceG',
+ s/bTarget/bOrigin/.
+ (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner.
+ (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}):
+ Updated accordingly.
- NOTE: Does not compile!
+2018-06-09 Werner Lemberg <wl@gnu.org>
- This is to allow CFF functions moved to `psaux' to call functions
- declared in `src/cff/cffload.h'.
+ [sfnt] Read `CPAL' version 1 tables.
- * include/freetype/internal/services/svcfftl.h: New file, setting up
- a `CFFLoad' service.
+ * include/freetype/internal.tttypes.h: Include FT_COLOR_H.
+ (TT_FaceRec): Add `palette' field.
- * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10,
- FT_DEFINE_SERVICEDESCREC): New macros.
- (FT_SERVICE_CFF_TABLE_LOAD_H): New macro.
+ * src/sfnt/ttcolr.c: Include FT_COLOR_H.
+ (Cpal): Remove all data covered by the new `palette' field in
+ `TT_FaceRec'.
+ (tt_face_load_colr): Updated.
+ Read `CPAL' version 1 data.
+ (tt_face_load_colr_layers, tt_face_find_color): Updated.
- * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service.
+ * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
- * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h
- (CF2_FontRec): Add service interface.
+2018-06-07 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c,
- src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service.
+ [base] API for Harmony LCD rendering.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
+ LCD subpixel geometry including non-striped patterns.
- [psaux, cff] Add callbacks for inter-module calls.
+ * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
+ * include/freetype/ftlcdfil.h: Document it.
+ * include/freetype/freetype.h: Minor.
+ * include/freetype/ftchapters.h: Minor.
- NOTE: Does not compile!
+2018-06-06 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/psaux.h: Add function pointer
- declarations.
+ ftcolor.h: Redesign API.
- * src/psaux/cffdecode.c (cff_decoder_init): Update to take in
- callbacks.
- * src/psaux/cffdecode.h: Ditto.
+ While going to implement it I noticed that I need access to most of
+ the `CPAL' elements; I thus plan to add a `cpal' field to
+ `TT_FaceRec', which makes most of the previously suggested API
+ functions obsolete because the fields will be directly accessible.
- * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load):
- Update calls to pass in callbacks.
- * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them.
+2018-06-06 Parth Wazurkar <parthwazurkar@gmail.com>
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
- [psaux, cff] Create new `PSAux' service interface entries.
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated
+ FT_FACE_FLAG_FAST_GLYPHS flag.
- NOTE: Does not compile!
+ * src/pcf/pcfread.c (pcf_load_font): Remove deprecated
+ FT_FACE_FLAG_FAST_GLYPHS flag.
- * include/freetype/internal/psaux.h: Include
- FT_INTERNAL_TRUETYPE_TYPES_H.
- (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables.
- (CFF_Builder): Updated.
- Fix for forward declaration.
- (PSAux_ServiceRec): New field `cff_decoder_funcs'.
+2018-06-06 Werner Lemberg <wl@gnu.org>
- * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New
- function tables.
- (PSAux_Interface): Updated.
+ [smooth, raster] Limit bitmap size (#54019).
- * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux'
- service interface.
+ * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add
+ function.
+ [!STANDALONE]: Include FT_OUTLINE_H.
+ (ft_black_render): Compute CBox and reject glyphs larger than
+ 0xFFFF x 0xFFFF.
+
+ * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger
+ than 0xFFFF x 0xFFFF.
- * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update
- function calls to use psaux service.
+2018-06-03 Armin Hasitzka <prince.cherusker@gmail.com>
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
- [psaux, cff] Move CFF builder components into `psaux' module.
+2018-06-03 Werner Lemberg <wl@gnu.org>
- NOTE: Does not compile!
+ * src/tools/glnames.py (main): Emit header in `light' comment style.
- * src/cff/cffgload.c
- (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour},
- cff_check_points): Move to...
- * src/psaux/psobjs.c: Here.
+2018-06-02 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cffgload.h: Move corresponding declarations to
- `src/psaux/psobjs.h'.
+ [smooth] Attempt to mitigate bug #54019.
- * src/cff/cffgload.h (CFF_Builder): Move struct declaration to...
- * include/freetype/internal/psaux.h: Here.
+ The robust rendering of estra large glyphs came with unbearable cost.
+ The old way of bisecting should fail but fail faster.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting
+ in y-direction.
- [psaux, cff] Move CFF decoder components into `psaux' module.
+2018-06-02 Werner Lemberg <wl@gnu.org>
- NOTE: Does not compile!
+ * src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS.
+
+ Reported as
- * src/cff/cffgload.c (CFF_Operator,
- CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts,
- cff_operator_seac, cff_compute_bias,
- cff_lookup_glyph_by_stdcharcode,
- cff_decoder_{parse_charstrings,init,prepare}): Move to...
- * src/psaux/cffdecode.c: This new file.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706
- * src/cff/cffgload.h: Move corresponding declarations to...
- * src/psaux/cffdecode.h: This new file.
+2018-06-02 Werner Lemberg <wl@gnu.org>
- * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS},
- CFF_Decoder_Zone, CFF_Decoder): Move declarations to...
- * include/freetype/internal/psaux.h: Here.
+ * src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033).
- * src/psaux/cf2ft.h: Update include.
+2018-05-31 Werner Lemberg <wl@gnu.org>
- * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with
- the new file.
+ * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field.
-2017-09-24 Ewald Hew <ewaldhew@gmail.com>
+ This is no longer used.
- [psaux, cff] Move Adobe's engine components into `psaux' module.
+2018-05-31 Werner Lemberg <wl@gnu.org>
- This is the first patch of a sequence to move the Type 2 charstring
- processing capability from the `cff' module to the `psaux' module.
+ [sfnt] Get colors from `CPAL' table in right order (#54015).
- NOTE: Does not compile!
+ * src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
- * src/cff/cf2*: Move these files to...
- * src/psaux/cf2*: Here.
+2018-05-30 Werner Lemberg <wl@gnu.org>
- * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC,
- CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file
- references.
+ ftcolor.h: Improve API design, fix typos (#54011, #54014).
- * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c
- (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references.
+ * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with...
+ (FT_Palette_Get_Name_IDs): ... this function.
+ (FT_Palette_Get_Entry_Names): Replace with...
+ (FT_Palette_Get_Entry_Name_IDs): ... this function
+ s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
-2017-09-24 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
- Tweak per-face LCD filtering controls.
+ Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b.
- Thing are simpler with a NULL-function pointer.
+ * src/autofit/afloader.c (af_loader_load_glyph): Move the
+ initialisationand declaration of variables into the if-block.
- * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
- pointer to the filter function.
- (FT_LibraryRec): Remove unused `lcd_filter'.
- (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here...
- * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc,
- ft_lcd_filter_fir): ... to here.
+2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
- * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the
- per-face filter.
- (FT_Face_Properties): Set it.
- * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify.
+ Fix pointer underflow.
- * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter):
- Minor.
+ The declaration of `edge2' can be reached with `edge1 == NULL' and
+ `axis->edges == 0' which results in undefined behaviour.
-2017-09-24 Jonathan Kew <jfkthame@gmail.com>
+ * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2'
+ after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed.
- [sfnt] Fix `premultiply_data' (#52092).
+2018-05-30 Werner Lemberg <wl@gnu.org>
- * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
- if we have less than 16 bytes of data.
+ Various minor color fixes.
-2017-09-24 Werner Lemberg <wl@gnu.org>
+ * include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
- [otvalid] Fix handling of ValueRecords.
+ * include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
+ type of `load_flags' to `FT_Int32'.
- For GPOS pair positioning format 1 the description of ValueRecords
- in the OpenType specification (1.8.2, from today) is wrong – the
- offset has to be taken from the parent structure; in this case the
- `PairSet' table.
+ * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
+ type of `idx' to `FT_UInt'.
+ (TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
- * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
- (otv_PairPos_validate): Adjust.
+ * src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
+ `load_flags' to `FT_Int32'.
-2017-09-23 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcolr.c (find_base_glyph_record,
+ tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
+ (tt_face_find_color, tt_face_colr_blend_layer): Change type of
+ `color_index' to `FT_UInt'.
+ Fix signedness and type issues.
- [otvalid] Handle `GSUB' and `GPOS' v1.1 tables.
+ * src/sfnt/ttcolr.h: Updated.
- * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c
- (otv_GPOS_validate): Implement it.
+2018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
-2017-09-23 Werner Lemberg <wl@gnu.org>
+ [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
- [otvalid] Update common table handling to OpenType 1.8.2.
+ This platform uses backslashes for paths, which docmaker didn't
+ understand correctly.
- * src/otvalid/otvcommn.c (otv_Device_validate): Handle
- VariationIndex subtable.
- (otv_Lookup_validate): Handle MarkFilteringSet.
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
+ `os.path.normpath' to normalize the path for the platform being
+ used.
-2017-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+2018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com>
- [build] Windows-style DLL versioning.
+ [smooth] Formalize Harmony LCD rendering.
- * build/windows/ftver.rc: New VERSIONINFO resource.
- * build/windows/vc2010/freetype.vcxproj: Further improvements.
+ This generalizes magic outline shifts that make Harmony LCD
+ rendering work in terms of precise two-dimensional RGB subpixel
+ positions. These coordinates are now set in time of the `smooth'
+ module initialization and later used to shift a glyph outline for
+ rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
+ coordinates. The letter, however, rotates them before using.
+ The LCD bitmap padding is also calculated using these coordinates.
-2017-09-23 Ben Wagner <bungeman@google.com>
+ * include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
+ `lcd_geometry'.
+ * src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
- [truetype] Really fix #52082.
+ * src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
+ (ft_smooth_init): Initialize `lcd_geometry'.
+ (ft_smooth_render_generic): Formalize outline shifts.
- * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
+2018-05-22 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Reject elements of composites with invalid glyph indices.
+
+ Reported as
-2017-09-23 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413
- [otvalid] Handle `GDEF' v1.2 and v1.3 tables.
+ * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
- No validation of variation stuff yet.
+2018-05-22 Werner Lemberg <wl@gnu.org>
- * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function.
- (otv_GDEF_validate): Implement it.
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points.
-2017-09-22 Werner Lemberg <wl@gnu.org>
+2018-05-20 Werner Lemberg <wl@gnu.org>
- [otvalid] Handle `BASE' v1.1 table.
+ * include/freetype/ftcolor.h: New file.
- No validation of variation stuff yet.
+ This is an interface to the `CPAL' OpenType table. No
+ implementation yet.
- * src/otvalid/otvbase.c (otv_BASE_validate): Implement it.
+2018-05-18 Alexei Podtelezhnikov <apodtele@gmail.com>
-2017-09-22 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'.
+
+ Actually `_BitScanReverse' is available since VS2005.
+
+2018-05-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value.
+
+ Older VC versions don't provide `_BitScanReverse'. We test for VC
+ 2013.
+
+ Reported by John Emmas <john@creativepost.co.uk>.
+
+2018-05-17 Werner Lemberg <wl@gnu.org>
+
+ s/inline/__inline/ for MSVC.
+
+ Reported by John Emmas <john@creativepost.co.uk>.
+
+ * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
+
+2018-05-16 Werner Lemberg <wl@gnu.org>
+
+ Add function `FT_Get_GlyphLayers' to access `COLR' table data.
+
+ * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
+ structure to...
+ * include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
+ header file.
+ (FT_Glyph_Layer): New typedef.
+ Update code to use it where appropriate.
+
+ * src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
+
+2018-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [base] Fix mono bitmap presetting (#53896).
+
+ It is rather fundamental to set monochrome bitmap based on rounded
+ CBox because the b/w rasterizer turns on pixels when their centers are
+ inside the glyph outline. The dropout control is unpredictable and can
+ distort narrow glyphs if the bitmap is too wide.
+
+ Reported by Chris Liddell.
+
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
+ are too close, adjust them before rounding.
+
+2018-05-15 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Fix compiler warning (#53915).
+
+ * src/psaux/psft.c (cf2_freeT1SeacComponent): Do it.
+
+2018-05-15 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix memory leak in handling `COLR' data.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array
+ before reassigning allocated memory.
+ Only allocate `color_layers' if we don't have one already.
+
+2018-05-15 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] If `COLR' is present, don't assume that all glyphs use it.
+
+ * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
+ current glyph is not a `COLR' base glyph.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
+ `color_layers' if there are no color layers.
+
+2018-05-14 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
+
+2018-05-14 Werner Lemberg <wl@gnu.org>
+
+ Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
+
+ * src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
+
+2018-05-13 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
+
+2018-05-13 Shao Yu Zhang <shaozhang@fb.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Preliminary support of coloured layer outlines (#44689).
+
+ This commit enables OpenType's COLR/CPAL table handling; a typical
+ application are color emojis that can be scaled to any size.
+
+ If the color palette does not exist or is invalid, the rendering
+ step rasterizes the outline instead. The current implementation
+ assumes that the foreground is black.
+
+ Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
+
+ There are still some issues with metrics; additionally, an API to
+ fetch color layers is missing.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
+
+ * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
+ FT_Colr_InternalRec): New structures.
+ (FT_Slot_InternalRec): Add `color_layers' field.
+
+ * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
+ TT_Blend_Colr_Func): New function types.
+ (SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
+ and `colr_blend' fields.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add
+ `colr_and_cpal' field.
+
+ * include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
+ macros.
+
+ * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
+
+ * src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
+ Handle glyph color layers.
+
+ * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
+ `ttcolr.c'.
+
+ * src/sfnt/sfdriver.c: Include `ttcolr.h'.
+ (PUT_COLOR_LAYERS): New macro.
+ Update call to `FT_DEFINE_SFNT_INTERFACE'.
+
+ * src/sfnt/sfnt.c: Include `ttcolr.c'.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
+ (sfnt_done_face): Updated.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
+
+2018-05-12 Arkady Shapkin <arkady.shapkin@gmail.com>
+
+ Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636).
+
+ * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement
+ it.
- [otvalid] Macros for 32bit offset support.
+2018-05-10 Alan Coopersmith <alan.coopersmith@oracle.com>
- * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32,
- OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros.
+ Fix DLL compilation on Solaris.
-2017-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+ AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'. The
+ Solaris Studio 12.1 through 12.5 compilers see the
+ `-fvisibility=hidden' flag, but ignore it with a warning of:
- [build] Simplify Visual C++ 2010 project.
+ cc: Warning: Option -fvisibility=hidden passed to ld,
+ if ld is invoked, ignored otherwise
- * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded
- configurations and tweak.
+ AC_LINK_IFELSE does the compile and then tries to link the result,
+ at which point the Solaris linker will issue an error:
-2017-09-21 Werner Lemberg <wl@gnu.org>
+ ld: fatal: option '-fvisibility=hidden' is incompatible with
+ building a dynamic executable
- [truetype] Integer overflow (#52082).
+ If we don't use AC_LINK_IFELSE to catch the error, then configure
+ will fail further tests which attempt to link, such as those testing
+ dependencies like `libbz2'.
- * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS.
+ Also, don't try adding `-fvisibility' if we have already added
+ `-xldscope', just use one of them, since Sun Studio 12 and earlier
+ compilers only issue a warning, and don't try passing through to the
+ linker to generate an error, so AC_LINK_IFELSE doesn't catch them.
-2017-09-21 Werner Lemberg <wl@gnu.org>
+ Tested on Solaris 11.4 beta with compiler versions:
- [sfnt] Fix postscript name for default instance of variation fonts.
+ Sun Studio 8 (Sun C 5.5)
+ Sun Studio 10 (Sun C 5.7)
+ Sun Studio 11 (Sun C 5.8)
+ Sun Studio 12 (Sun C 5.9)
+ Sun Studio 12.1 (Sun C 5.10)
+ Oracle Solaris Studio 12.2 (Sun C 5.11)
+ Oracle Solaris Studio 12.3 (Sun C 5.12)
+ Oracle Solaris Studio 12.4 (Sun C 5.13)
+ Oracle Developer Studio 12.5 (Sun C 5.14)
+ Oracle Developer Studio 12.6 (Sun C 5.15)
+ gcc 5.5.0
+ gcc 7.3.0
- Problem reported by Behdad.
+ and verified the libfreetype.so.6 generated by each of those
+ compilers exported the same set of symbols.
- * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test
- `is_default_instance'.
+ * builds/unix/configure.raw: Implement it.
-2017-09-21 Werner Lemberg <wl@gnu.org>
+2018-05-08 Werner Lemberg <wl@gnu.org>
- [truetype] Fix `mmvar' array pointers, part 2.
+ [autofit] Avoid potential SEGV if running out of memory.
- The previous commit was incomplete.
+ Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>.
- * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for
- `master' also.
+ * src/autofit/afshaper.c (af_shaper_buf_create,
+ af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't
+ allocate and free a four-byte buffer. Instead, make those functions
+ no-ops; the calling functions will provide a pointer to a buffer
+ instead.
-2017-09-21 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
+ af_cjk_metrics_init_blues, af_cjk_metrics_check_digits),
+ src/autofit/aflatin.c (af_latin_metrics_init_widths,
+ af_latin_metrics_init_blues, af_latin_metrics_check_digits)
+ [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for
+ `shaper_buf'.
- [truetype] Fix `mmvar' array pointers.
+2018-05-07 Nikolaus Waxweiler <madigens@gmail.com>
- Without this change, clang's AddressSanitizer reports many runtime
- errors due to misaligned addresses.
+ [cmake] Allow using project as subfolder in other project.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer
- size for sub-array offsets into `mmvar'.
+ * CMakeLists.txt: Test for CMake build directory being different
+ from source directory. Provide other parts of the build system
+ access the full include directory.
-2017-09-20 Werner Lemberg <wl@gnu.org>
+2018-05-07 Werner Lemberg <wl@gnu.org>
- [truetype] Integer overflows.
+ [build] Suppress configure's `nothing to be done' message.
- Changes triggered by
+ This is due to calling the configure script via `make' (within the
+ top-level `configure' wrapper script). The same can happen for all
+ other secondary make targets that are used to only modify the
+ primary one, e.g., `make setup devel'.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429
+ * builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16),
+ builds/os2/detect (visualage, watcom, borlandc, devel),
+ builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk
+ (visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc,
+ devel-gcc): Use no-op recipe.
- * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG.
- (Ins_MIAP): Use SUB_LONG.
+2018-05-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2017-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
+ Support symbol visibility features of Sun / Oracle C compilers.
- [build] Fix DLL builds in Visual C++ project.
+ Reported by Kiyoshi Kanazawa:
+ https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
+ Thanks to the suggestions by Alexei and Alan Coopersmith.
- * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug
- and Release configurations.
- * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
- [_DLL]: Use Visual C++ extensions.
+ * builds/unix/configure.raw: Check if "-xldscope=hidden" is
+ accepted, and if so, it is added to CFLAGS. This is the option
+ making Sun / Oracle C compilers hide the symbols from global
+ scope.
+ * include/freetype/config/ftconfig.h: Use "__global" prefix
+ for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
+ Studio 8 (2003).
+ * builds/unix/ftconfig.in: Ditto.
+ * builds/vms/ftconfig.h: Ditto.
-2017-09-19 John Tytgat <John.Tytgat@esko.com>
+2018-05-02 Nikolaus Waxweiler <madigens@gmail.com>
- [cff] Fix family name logic of pure CFF fontdata (#52056).
+ Unbreak CMake Windows installation
- 1. If `FamilyName' is present in the CFF font, use this for
- FT_Face's `family_name'.
- 2. Otherwise, use the face name and chop off any subset prefix.
- 3. If at this point FT_Face's `family_name' is set, use this
- together with the full name to determine the style.
- 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'.
- 5. If we don't have a valid style, use "Regular".
+ * CMakeLists.txt: Generate ftconfig.h on non-UNIX.
- Previously, FT_Face's `family_name' entry for pure CFF fontdata
- nearly always was the fontname itself, instead of the `FamilyName'
- entry in the CFF font (assuming there is one).
+2018-05-02 Werner Lemberg <wl@gnu.org>
- * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it.
+ Remove FT_CONFIG_OPTION_PIC and related code.
-2017-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
+ */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
+ preprocessor symbol.
- [build] Declutter Visual C++ 2010-2017 project.
+ */*: Replace `XXX_GET' macros (which could be either a function in
+ PIC mode or an array in non-PIC mode) with `xxx' arrays.
- * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02)
- optimization for Release configuration throughout the project.
+ * include/freetype/internal/ftpic.h, src/autofit/afpic.c,
+ src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
+ src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
+ src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
+ src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
+ src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
+ src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
+ Removed.
----------------------------------------------------------------------------
-Copyright 2017-2018 by
+Copyright (C) 2018-2019 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,