summaryrefslogtreecommitdiffstats
path: root/modules/freetype2/ChangeLog
diff options
context:
space:
mode:
Diffstat (limited to 'modules/freetype2/ChangeLog')
-rw-r--r--modules/freetype2/ChangeLog2816
1 files changed, 1531 insertions, 1285 deletions
diff --git a/modules/freetype2/ChangeLog b/modules/freetype2/ChangeLog
index 23f574823..806b8354a 100644
--- a/modules/freetype2/ChangeLog
+++ b/modules/freetype2/ChangeLog
@@ -1,15 +1,16 @@
-2016-09-08 Werner Lemberg <wl@gnu.org>
+2018-05-01 Werner Lemberg <wl@gnu.org>
- * Version 2.7.1 released.
+ * Version 2.9.1 released.
=========================
- Tag sources with `VER-2-7-1'.
+ Tag sources with `VER-2-9-1'.
- * docs/VERSION.TXT: Add entry for version 2.7.1.
+ * docs/VERSION.TXT: Add entry for version 2.9.1.
+ * docs/CHANGES: Updated.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2005/index.html,
+ src/base/ftver.rc, builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
@@ -23,2074 +24,2319 @@
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/.
+ builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
- * builds/unix/configure.raw (version_info): Set to 19:0:13.
+ * builds/unix/configure.raw (version_info): Set to 22:1:16.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
-2016-12-30 Werner Lemberg <wl@gnu.org>
+ * include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER.
+
+2018-04-26 Werner Lemberg <wl@gnu.org>
- [ftfuzzer] Replace `rand' with an xorshift algorithm.
+ Another fix for handling invalid format 2 cmaps.
- * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'.
- (Random): Implement and use a 32bit `xorshift' algorithm.
+ Sigh.
-2016-12-30 Werner Lemberg <wl@gnu.org>
+ Reported as
- [ftfuzzer] Restrict number of tested bitmap strikes.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003
- Malformed fonts often have large values for the number of bitmap
- strikes, and FreeType doesn't check the validity of all bitmap
- strikes in advance.
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
+ an endless loop.
- Reported as
+2018-04-24 Ben Wagner <bungeman@google.com>
+
+ [base] Avoid undefined behaviour in lcd filtering code (#53727).
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
+ Ensure `height > 0'.
- * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'.
- (Random): Small class to provide n randomly selected numbers
- (without repitition) out of the value set [1,N].
- (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap
- strikes.
+2018-04-22 Werner Lemberg <wl@gnu.org>
-2016-12-29 Werner Lemberg <wl@gnu.org>
+ * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing.
- [truetype] Variation font API stability issues.
+2018-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
- Make some functions work before a call to `TT_Set_MM_Blend'.
+ [base] Fix bitmap emboldening.
- * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
- we don't blend.
- (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
- don't blend.
+ Bug introduced after release 2.8.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+ * 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.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
+2018-04-22 Werner Lemberg <wl@gnu.org>
+
+ Another fix for handling invalid format 2 cmaps.
+
+ The previous commit was incomplete.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928
+
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
+ an endless loop.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+2018-04-19 Werner Lemberg <wl@gnu.org
- [truetype] Tracing fixes.
+ [autofit] Add support for Georgian Mtavruli characters.
- * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
- information.
- (TT_Set_Var_Design): Fix typo.
- (TT_Get_Var_Design): Fix typos.
+ This will be part of the forthcoming Unicode 11.0.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afblue.dat: Add blue zone data for Mtavruli.
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
- */*: Use `0.5f' for tracing 16.16 numbers.
+ * src/autofit/afscript.h: Add Mtavruli standard character.
-2016-12-29 Werner Lemberg <wl@gnu.org>
+2018-04-18 Werner Lemberg <wl@gnu.org>
- [pcf] Protect against gzip bombs.
+ Fix handling of invalid format 2 cmaps.
- Fix suggested by Kostya; reported as
+ The problem was introduced after the last release.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345
+ Reported as
- * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to
- 1024.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7828
-2016-12-28 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Avoid endless loop.
- [psnames] Only declare, not define, data in `pstables.h' (#49949).
+2018-04-17 Werner Lemberg <wl@gnu.org>
- Pdfium includes `pstables.h' a second time; moving the definition
- from `pstables.h' to `psmodule.c' saves more than 60kByte data
- segment space for this case.
+ [truetype] Integer overflow issues.
- * src/tools/glnames.py (StringTable::dump,
- StringTable::dump_sublist, dump_encoding, dump_array): Emit
- additional code to only define tables if `DEFINE_PS_TABLES' is set.
+ Reported as
- * src/psnames/pstables.h: Regenerated.
- * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7739
-2016-12-28 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_CEILING): Use FT_PIX_CEIL_LONG.
- [cff] Catch `blend' op in non-variant fonts.
+2018-04-16 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow issues.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7718
- * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't
- allow `blend' op for non-variant fonts.
+ * src/truetype/ttinterp.c (Ins_MIRP): Use ADD_LONG.
-2016-12-28 Werner Lemberg <wl@gnu.org>
+2018-04-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- [cff] Better check of number of blends.
+ [build] Use `info' function of make 3.81.
- * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>,
- src/cff/cffparse.c (cff_parse_blend): Compare number of blends with
- stack size.
+ * configure, docs/INSTALL, docs/INSTALL.CROSS, docs/INSTALL.GNU,
+ docs/INSTALL.UNIX, docs/MAKEPP: Bump make version requirements.
-2016-12-27 Werner Lemberg <wl@gnu.org>
+ * 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.
- Documentation updates.
+2018-04-15 Werner Lemberg <wl@gnu.org>
- * docs/CHANGES: Add missing information.
+ [truetype]: Limit `SLOOP' bytecode argument to 16 bits.
- * docs/formats.txt: Rewritten and updated.
+ This fixes
-2016-12-27 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7707
- [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'.
+ * src/truetype/ttinterp.c (Ins_SLOOP): Do it.
- * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement.
- (TT_Set_Var_Design): Fix tracing.
+2018-04-14 Werner Lemberg <wl@gnu.org>
- * src/type1/t1load.c (T1_Get_Var_Design): Implement.
+ [truetype] Integer overflow issues.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+ Reported as
- * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7652
- Problem reported by 張俊芝 <418092625@qq.com>.
+ * src/truetype/ttinterp.c (Ins_MDAP): Use SUB_LONG.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+2018-04-14 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values.
+ [autofit] Update to Unicode 11.0.0.
- Some fonts seem to have the `version' field in the wrong byte order.
+ But no support new scripts (volunteers welcomed).
- Problem reported by 張俊芝 <418092625@qq.com>.
+ * 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.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+2018-04-10 Nikolaus Waxweiler <madigens@gmail.com>
- * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length.
+ * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Extensive
+ modernization measures.
- This trivial fix allows us to accept more fonts.
+ This brings up the minimum required CMake version to 2.8.12.
- Problem reported by 張俊芝 <418092625@qq.com>.
+ 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.
-2016-12-24 Werner Lemberg <wl@gnu.org>
+ Symbols are hidden by default (e.g. `-fvisibility=hidden' on GCC).
- * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing.
+ CMake will no longer look for a C++ compiler.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+ Library and .so version now match the Autotools build.
- * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909).
+ Comments in the build file and informational messages now use platform
+ agnostic example commands.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+ ftoption.h and ftconfig.h are written directly without a redundant `-new'
+ copy.
- Ensure used preprocessor symbols are defined (#49790).
+ External dependencies are expressed as option()s and will turn up as such
+ in cmake-gui.
- * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
- include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__',
- and `__SUNPRO_C' correctly.
+ Internal: Properties such as dependencies and include directories are now
+ privately set on the freetype library instead of globally.
+
+ 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.
+
+ On Windows, src/base/ftver.rc is compiled to decorate the library with
+ version and copyright information.
+
+ A pkg-config file is now generated and installed.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+2018-04-09 Werner Lemberg <wl@gnu.org>
- * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'.
+ [truetype] Integer overflow issues.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7453
-2016-12-22 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Round_Super, Round_Super_45): Use
+ ADD_LONG and SUB_LONG.
- [cff] Protect against invalid `vsindex' and `blend' values.
+2018-04-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [windows, wince] Clean up legacy project files.
+
+ * 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.
+
+2018-04-04 Werner Lemberg <wl@gnu.org>
+
+ [cff, type1] Sanitize `BlueFuzz' and `BlueShift'.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7371
+
+ * src/cff/cffload.c (cff_load_private_dict): Sanitize
+ `priv->blue_shift' and `priv->blue_fuzz' to avoid overflows later
+ on.
+
+ * src/type1/t1load.c (T1_Open_Face): Ditto.
+
+2018-04-04 Ben Wagner <bungeman@google.com>
+
+ * 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.
+
+2018-04-01 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (work): Use $(SEP).
+
+ This fixes the `make refdoc' using Cygwin: $(CAT) is `type' on this
+ platform, and this program only understands backslashes in paths.
- * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX,
- cf2_cmdBLEND>: Implement it.
+ Reported by Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>.
-2016-12-22 Werner Lemberg <wl@gnu.org>
+2018-03-30 Werner Lemberg <wl@gnu.org>
- [ftfuzzer] Always use Adobe CFF engine.
+ [truetype] Fix memory leak (only if tracing is on).
- * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix
it.
-2016-12-21 Werner Lemberg <wl@gnu.org>
+2018-03-23 Ben Wagner <bungeman@google.com>
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+ [sfnt] Correctly handle missing bitmaps in sbix format (#53404).
- I should really stop coding late in the evening...
+ * src/sfnt/ttfsbit.c (tt_face_load_sbix_image): Fix return value.
- Thanks again to Ben for checking.
+2018-03-23 Ben Wagner <bungeman@google.com>
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ [truetype] Fix advance of empty glyphs in bitmap fonts (#53393).
- [autofit] Support variation fonts.
+ * src/truetype/ttgload.c (TT_Load_Glyph): Apply scaling to metrics
+ for empty bitmaps.
- (This ChangeLog entry was added later on.)
+2018-03-22 Werner Lemberg <wl@gnu.org>
- * src/autofit/afglobal.c (af_face_globals_free): Remove useless
- code.
+ Remove `ftlcdfil.c' and `ftfntfmt.c' from build files (#53415).
- * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
- * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
- FT_Set_Var_Blend_Coordinates): Finalize
- auto-hinter data to enforce recomputation. Note that this is a
- brute-force method which should be improved.
+ 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.
+
+2018-03-13 Werner Lemberg <wl@gnu.org>
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcmap.c (tt_cmap2_validate): Fix potential numeric
+ overflow.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+2018-03-13 Werner Lemberg <wl@gnu.org>
- Don't apply deltas twice for non-phantom points.
+ Fix cmap format 2 handling (#53320).
- Spotted by Ben Wagner.
+ The patch introduced for #52646 was not correct.
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition.
- [cff, truetype] Another try for #49829.
+2018-03-10 Nikolaus Waxweiler <madigens@gmail.com>
- * src/cff/cffdrivr.c: Don't include
- `FT_SERVICE_METRICS_VARIATIONS_H'.
- (cff_get_advances): Use `ttface->variation_support'.
+ * CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05.
- * src/truetype/ttdriver.c (tt_get_advances): Use
- `ttface->variation_support'.
+2018-03-09 Chun-wei Fan <fanc999@yahoo.com.tw>
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
- load_truetype_glyph): Use `ttface->variation_support'.
+ * CMakeLists.txt [win32]: Allow MSVC DLL builds (#53287).
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ Do not limit DLL builds to MinGW, since we already have
+ `__declspec(dllexport)' directives in `ftconfig.h'.
+ Also suppress more warnings for POSIX functions.
- [truetype, sfnt] Introduce font variation flags to `TT_Face'.
+2018-03-08 Hugh McMaster <hugh.mcmaster@outlook.com>
- * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
- New macros describing available functionality of various OpenType
- tables related to font variation.
- (TT_Face): New fields `variation_support' and `mvar_support',
- replacing and extending `use_fvar'.
+ Make installation of `freetype-config' optional (#53093).
- * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
- `variation_support'.
+ * 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/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
- field.
- (TT_Vary_Apply_Glyph_Deltas): Updated.
+2018-03-05 Werner Lemberg <wl@gnu.org>
-2016-12-21 Werner Lemberg <wl@gnu.org>
+ Make `ftlcdfil.c' part of the `base' module.
- [base] Improve sanity check for Mac resources (#49888).
+ `ftobjs.c' needs `ft_lcd_padding'.
- * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
- positive.
+ Problem reported by duhuanpeng <548708880@qq.com>.
-2016-12-20 Werner Lemberg <wl@gnu.org>
+ * modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'.
- [base] More sanity checks for Mac resources.
+ * src/base/ftbase.c: Include `ftlcdfil.c'.
+ * src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'.
+ * src/base/Jamfile (_sources): Adjusted.
- We use
+ * docs/INSTALL.ANY: Updated.
- https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
+2018-03-05 Werner Lemberg <wl@gnu.org>
- and
+ Make `ftfntfmt.c' part of the `base' module.
- https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151
+ `ftobjs.c' needs `FT_Get_Font_Format'.
- as references.
+ Problem reported by duhuanpeng <548708880@qq.com>.
- * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short
- for `res_id'.
+ * modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'.
- * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length
- and use it to improve sanity checks.
- Follow the specification more closely;in particular, all data types
- are signed, not unsigned.
- (FT_Raccess_Get_DataOffsets): Follow the specification more closely;
- in particular, all data types are signed, not unsigned.
- Add some sanity checks.
+ * src/base/ftbase.c: Include `ftfntfmt.c'.
+ * src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'.
+ * src/base/Jamfile (_sources): Adjusted.
-2016-12-20 Werner Lemberg <wl@gnu.org>
+ * docs/INSTALL.ANY: Updated.
- [truetype] Improve logic for getting fast advance widths.
+2018-03-01 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
- (tt_get_advances): Use `is_default_instance' for test; this gets
- recomputed after changing blend coordinates.
+ * src/truetype/ttinterp.c (TT_RunIns): Fix tracing arguments.
-2016-12-20 Ben Wagner <bungeman@google.com>
- Werner Lemberg <wl@gnu.org>
+2018-02-23 Werner Lemberg <wl@gnu.org>
- [truetype] Fix linear metrics of GX variation fonts (#49829).
+ * builds/unix/configure.raw: Need HarfBuzz 1.3.0 or newer.
- When asking for an unhinted non-default variations,
- `linearVertAdvance' is currently the value from the `hmtx' table
- instead of the actual value after applying the variation. `HVAR'
- support fixes this, but fonts will exist without that table and will
- need sane fallback.
+ Problem reported by Alan Coopersmith <alan.coopersmith@oracle.com>.
- Problem also reported as
+2018-02-17 Werner Lemberg <wl@gnu.org>
- https://bugs.chromium.org/p/skia/issues/detail?id=5917
+ [sfnt] Prefer `CBDT'/`CBLC' over `glyf' table (#53154).
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
- load_truetype_glyph): Implement linear advance adjustments if `HVAR'
- or `VVAR' tables are missing.
+2018-02-06 Werner Lemberg <wl@gnu.org>
-2016-12-20 Werner Lemberg <wl@gnu.org>
+ [truetype] Integer overflow issues.
- [cff, truetype] Fast advance width retrieval for fonts with HVAR.
+ Reported as
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6027
- * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM.
+ * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIAP, Ins_MIRP): Use
+ SUB_LONG; avoid FT_ABS.
- * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (cff_get_advances): Test for HVAR and VVAR.
+2018-02-04 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
+ [unix] Use -fvisibility=hidden.
-2016-12-18 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.
+
+ * 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.
- [base] Fix invalid mac font recursion.
+2018-01-27 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Better protection against invalid VF data.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739
- * src/base/ftobjs.c (FT_Open_Face): Code moved to...
- (ft_open_face_internal): ... this function.
- Add a parameter to control whether we try special Mac font handling
- in case of failure.
- (FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
- open_face_from_buffer): Use `ft_open_face_internal'.
+ Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize
+ `normalizedcoords'.
- * src/cff/cffobjs.c (cff_face_init): Make named instances work.
+2018-01-27 Werner Lemberg <wl@gnu.org>
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference.
- [truetype, cff] Extend `get_var_blend' function of MM service.
+ Reported as
- In particular, we need access to named instance data.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736
- * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
- Add argument for `FT_MM_Var'.
+2018-01-27 Werner Lemberg <wl@gnu.org>
- * src/cff/cffload.c (cff_get_var_blend): Updated.
- * src/cff/cffload.h: Updated.
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor.
- * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
+2018-01-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
- Accept value `NULL' for arguments.
- * src/truetype/ttgxvar.h: Updated.
+ [truetype] Better trace VF instances.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * 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.
- [sfnt] Handle `fvar' with zero axes as a non-MM font.
+2018-01-27 Werner Lemberg <wl@gnu.org>
- This is better behaviour than exiting with an error.
+ [truetype] Beautify tracing of VF axis records.
- * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
- field.
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a
+ table-like manner.
- * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
- updating the validation code.
- Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
+2018-01-26 Ben Wagner <bungeman@google.com>
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
- code.
+ [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955).
-2016-12-18 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Set
+ `face->blend->num_axis' in case we have to initialize the
+ `face->blend'.
- Minor GX code shuffling.
+2018-01-23 Alexei Podtelezhnikov <apodtele@gmail.com>
- * include/freetype/internal/tttypes.h (TT_Face): Move
- `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
- block.
+ [apinames] Anonymous version map for GNU linker.
- * src/sfnt/sfobjs.c (sfnt_init_face): Updated.
- * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
- (TT_Load_Glyph): Use it.
+ * 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'.
-2016-12-18 Werner Lemberg <wl@gnu.org>
+2018-01-21 Alexei Podtelezhnikov <apodtele@gmail.com>
- [cff] Better handling of non-CFF font formats.
+ [unix] Call libtool to clean up.
- * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a
- signature, so return `FT_Err_Unknown_File_Format' more often.
+ * builds/unix/install.mk (clean_project_unix, distclean_project_unix):
+ Use libtool.
+ * builds/freetype.mk: Minor.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
+ * src/base/ftver.rc: Fix mingw-w64 compilation.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
+ [build] Enable VERSIONINFO resource for Cygwin/MinGW.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+ * 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.
- [sfnt, truetype] Various sanitizing fixes.
+2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
- zero, set `num_instances' to zero.
+ [build] Move VERSIONINFO resource.
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with
- zero axes as invalid.
+ * builds/windows/vc2010/freetype.vcxproj: Updated.
+ * builds/windows/ftver.rc: Move file from here...
+ * src/base/ftver.rc: ... to here.
- * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading
- `loca', `cvt', `fpgm', and `prep' table.
+2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-12-17 Werner Lemberg <wl@gnu.org>
+ [build] Expand dllexport/dllimport to Cygwin/MinGW.
- Improve tracing of `FT_Open_Face'.
+ * include/freetype/config/ftconfig.h: Respect DLL_EXPORT,
+ s/_MSC_VER/_WIN32/.
+ * builds/unix/ftconfig.in: Replicate here.
+ * builds/vms/ftconfig.h: Replicate here.
- * src/base/ftobjs.c (FT_Open_Face): Return info on number of
- available faces and numbered instances, or the indices of the
- requested face and numbered instance.
+2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
+ [build] Improve and document MSVC build.
-2016-12-17 Werner Lemberg <wl@gnu.org>
+ * include/freetype/config/ftconfig.h: Guard dllexport/dllimport
+ attributes with _DLL and FT2_DLLIMPORT.
+ * builds/windows/vc2010/index.html: Update documentation.
- * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
+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=295
+2018-01-10 Ewald Hew <ewaldhew@gmail.com>
-2016-12-16 Werner Lemberg <wl@gnu.org>
+ [psaux] Correctly handle Flex features (#52846).
- [truetype] Fix `cvar' sanity test.
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO,
+ cf2_cmdHMOVETO>: Do not move if doing Flex.
- Reported by Dave Arnold.
+2018-01-09 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask.
+ * builds/windows/vc2010/freetype.sln: Synchronize with the project.
-2016-12-16 Werner Lemberg <wl@gnu.org>
+2018-01-08 Werner Lemberg <wl@gnu.org>
- [cff, truetype] Remove compiler warnings; fix `make multi'.
+ * Version 2.9 released.
+ =======================
- * src/cff/cf2font.h: Include `cffload.h'.
- * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and
- FT_SERVICE_MULTIPLE_MASTERS_H.
- (cff_vstore_load): Eliminate `vsSize'.
- (cff_load_private_dict): Tag as `FT_LOCAL_DEF'.
+ Tag sources with `VER-2-9'.
- * src/cff/cffload.h: Include `cffobjs.h'.
- Provide declaration for `cff_load_private_dict'.
+ * docs/VERSION.TXT: Add entry for version 2.9.
+
+ * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+ builds/windows/vc2005/index.html,
+ builds/windows/vc2008/freetype.vcproj,
+ builds/windows/vc2008/index.html,
+ builds/windows/vc2010/freetype.vcxproj,
+ builds/windows/vc2010/index.html,
+ builds/windows/visualc/freetype.dsp,
+ builds/windows/visualc/freetype.vcproj,
+ builds/windows/visualc/index.html,
+ builds/windows/visualce/freetype.dsp,
+ builds/windows/visualce/freetype.vcproj,
+ builds/windows/visualce/index.html,
+ builds/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/.
- * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate
- `minorVersion' and `map_offset'.
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9.
+ (FREETYPE_PATCH): Set to 0.
-2016-12-16 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (version_info): Set to 22:0:16.
+ * CMakeLists.txt (VERSION_PATCH): Set to 0.
- [cff] Fix heap buffer overflow (#49858).
+2018-01-07 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parser_run): Add one more stack size
- check.
+ Add check for librt, needed for `ftbench' (#52824).
-2016-12-15 Werner Lemberg <wl@gnu.org>
+ * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will
+ hold `-lrt' if necessary.
- Fix clang warnings.
+ * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable.
- * src/cff/cffload.c (cff_blend_doBlend): Add cast.
- (cff_subfont_load): Set `error' correctly.
+2018-01-07 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
+ [psaux] Fix Type 1 glyphs with too many stem hints.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ 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.
- [cff] Implement CFF2 support (2/2).
+ * 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.
- The font variation code. All parts dependent on the GX code in the
- `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
- In other words, you can still compile the `cff' module without
- defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2
- support without font variation).
+2018-01-06 Werner Lemberg <wl@gnu.org>
- * src/cff/cf2font.c (cf2_font_setup): Add support for font
- variation.
- * src/cff/cf2font.h (CF2_Font): Add fields for variation data.
+ Add `FT_Done_MM_Var'.
- * src/cff/cf2ft.c (cf2_free_instance): Free blend data.
- (cf2_getVStore, cf2_getNormalizedVector): New functions.
- * src/cff/cf2ft.h: Updated.
+ 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/cff/cf2intrp.c: Include `cffload.h'.
- (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with...
- (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values.
- (cf2_doBlend): New function.
- (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes.
+ * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare
+ and define.
- * src/cff/cffload.c (FT_fdot14ToFixed): New macro.
- (cff_vstore_done, cff_vstore_load): New functions.
- (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector,
- cff_blend_check_vector): New functions.
- (cff_load_private_dict): Add arguments for blend vector.
- Handle blend data.
- (cff_subfont_load, cff_subfont_done): Updated.
- (cff_font_load): Handle CFF2 variation store data.
- (cff_font_done): Updated.
- * src/cff/cffload.h: Include `cffparse.h'.
- Updated.
+ * docs/CHANGES: Updated.
- * src/cff/cffobjs.c (cff_face_done): Updated.
+2018-01-03 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c: Include `cffload.h'.
- (cff_parse_num): Handle internal value 255.
- (cff_parse_vsindex, cff_parse_blend): New functions.
- (CFF_FIELD_BLEND): New macro.
- (cff_parser_run): Updated.
- * src/cff/cffparse.h (cff_kind_blend): New enum value.
+ [truetype] Round offsets of glyph components only if hinting is on.
- * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend'
- dictionary values.
+ * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement
+ it.
- * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion,
- CFF_VStore, CFF_Blend): New structures.
- (CFF_FontRecDict): Add `vstore_offset' field.
- (CFF_Private): Add `vsindex' field.
- (CFF_SubFont): Add fields for blend data.
- (CFF_Font): Add `vstore' field.
+2018-01-03 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar',
- since glyph variation data is directly embedded.
- (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
+ * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ This is a better fix than the previous commit, which is now
+ reverted.
- [cff] Implement CFF2 support (1/2).
+2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- This commit does not contain the blend code for font variation
- support, which follows in another commit.
+ Move internal LCD-related declarations.
- You should ignore whitespace while inspecting this commit.
+ * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir):
+ Move from here...
+ * include/freetype/internal/ftobjs.h: ... to here.
- * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2'
- member.
+2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member.
+ * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
+ [_MSC_VER]: Limit Visual C++ attributes.
- * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2'
- flag.
- (cf2_getMaxstack): New function.
- * src/cff/cf2ft.h: Updated.
+2018-01-03 Werner Lemberg <wl@gnu.org>
- * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum.
- (cf2_interpT2CharString): Handle CFF2 differences.
- Add tracing message for errors.
+ [truetype] Make blend/design coordinate round-tripping work.
- * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index):
- Update for CFF2.
+ Behdad reported that setting blend coordinates, then getting design
+ coordinates did incorrectly return the default instance's
+ coordinates.
- * src/cff/cffload.c (FT_FIXED_ONE): New macro.
- (cff_index_init, cff_index_load_offsets, cff_index_access_element,
- cff_index_get_name, cff_ft_select_get, cff_load_private_dict,
- cff_subfont_load, cff_font_load): Handle CFF2.
- * src/cff/cffload.h: Updated.
+ * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it.
- * src/cff/cffobjs.c (cff_face_init): Handle CFF2.
+2017-12-31 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parse_maxstack): New function.
- (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed
- * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New
- macros.
- (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New
- macros.
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop.
- * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend
- stuff).
+ Reported as
- * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field.
- (CFF_FontRecDict): Add `maxstack' field.
- (CFF_Private): Add `subfont' field.
- (CFF_Font): Add `top_dict_length' and `cff2' fields.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838
- * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
+2017-12-31 Werner Lemberg <wl@gnu.org>
-2016-12-15 Werner Lemberg <wl@gnu.org>
- Dave Arnold <darnold@adobe.com>
+ Synchronize other Windows project files.
- [truetype] Provide HVAR advance width variation as a service.
+ * builds/windows/*: Add missing files.
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+2017-12-31 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
+ Update Visual C 2010 project files.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent
- double adjustment of advance width.
+ Problem reported by Hin-Tak.
- * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (tt_face_get_metrics): Apply metrics variations.
+ * 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.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+2017-12-30 Werner Lemberg <wl@gnu.org>
- [truetype] Provide function to apply `HVAR' advance width variation.
+ * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file.
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+2017-12-28 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function.
- * src/truetype/ttgxvar.h: Updated.
+ * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ Reported by Nikolaus.
- [truetype] Add `HVAR' table parsing.
+2017-12-27 Werner Lemberg <wl@gnu.org>
- Note that this is not complete yet; it only handles advance width
- variation.
+ Fix compiler warnings.
- Activation of the code follows in another commit.
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and
+ `new_pitch' unsigned.
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H.
- * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
+2017-12-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
- GX_HVStore, GX_WidthMap): New auxiliary structures for...
- (GX_HVarTable): ... HVAR main structure.
- (GX_BlendRec): Add data for HVAR loading.
+ Fixes for `make multi'.
- * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
- FT_intToFixed, FT_fixedToInt): New macros.
- (ft_var_load_hvar): New function.
- (TT_Get_MM_Var): Updated.
- (tt_done_blend): Deallocate HVAR data.
+ * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
+ (ps_property_get): Harmonize declaration with corresponding
+ function typedef.
-2016-12-15 Dave Arnold <darnold@adobe.com>
+ * include/freety[e/internal/fttrace.h: Add `trace_psprops'.
- [cff] Extend number parsing.
+ * 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.
- The forthcoming CFF2 support needs a dynamic parsing limit.
+2017-12-27 Werner Lemberg <wl@gnu.org>
- * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed,
- cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for
- parser.
- (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict,
- cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated.
+ Provide support for intra-module callback functions.
- * src/cff/cffparse.h (cff_parse_num): Export locally.
+ This is needed especially for `make multi' with C++.
-2016-12-15 Dave Arnold <darnold@adobe.com>
+ * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK,
+ FT_BASE_CALLBACK_DEF): New macros.
- [cff] Implement dynamic stack size for Adobe engine.
+2017-12-25 Ewald Hew <ewaldhew@gmail.com>
- This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for
- the forthcoming CFF2 support.
+ Move PostScript drivers' property handlers to `base'.
- * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size.
- (cf2_stack_free): Deallocate stack.
- (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed,
- cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal,
- cf2_stack_clear): Updated.
- (cf2_stack_setReal, cf2_stack_pop): New functions.
+ This reduces the amount of duplicated code across PostScript
+ drivers.
- * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member.
- Update function declarations.
+ * 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.
- * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated.
+ * src/base/ftpsprop.c: New file that implements above functions.
- * src/cff/cffparse.c (cff_parser_init): Add parameter for stack
- size; return error code.
- (cff_parser_done): New function.
- (cff_parser_run): Updated.
+ * include/freetype/internal/internal.h
+ (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro.
- * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make
- `stack' a pointer.
- Update function declarations.
+ * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c:
+ Updated.
- * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load):
+ * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c:
Updated.
-2016-12-15 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+2017-12-20 Werner Lemberg <wl@gnu.org>
- [cff] Code shuffling.
+ Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
- * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset'
- fields.
+ We exit early if the current design or blend coordinates are
+ identical to the new ones.
- * src/cff/cffload.c (cff_subfont_load): Change last argument to
- `CFF_Font'
- Split off parsing of private dictionary into...
- (cff_load_private_dict): ...this new function.
- (cff_font_load): Updated.
+ * src/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.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1load.c (t1_set_mm_blend): Ditto.
- [sfnt, truetype] Add framework for Metrics Variations service.
+ * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
- No effect yet; service functions will be implemented later on.
+2017-12-18 Werner Lemberg <wl@gnu.org>
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ [sfnt] Fix charmap type 2 iterator (#52646).
- * include/freetype/internal/services/svmetric.h: New file.
+ 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).
- * include/freetype/internal/ftserv.h
- (FT_SERVICE_METRICS_VARIATIONS_H): New macro.
+ Before this commit, the iterator wasn't able to correctly handle a
+ sub-header for higher byte 0x01.
- * include/freetype/internal/tttypes.h (TT_Face): New field `var'.
+ * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment
+ for outer loop.
- * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (sfnt_init_face): Initialize `face->var'.
+2017-12-18 Matthias Clasen <matthias.clasen@gmail.com>
- * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
- (tt_service_metrics_variations): New service.
- (tt_services): Updated.
+ [truetype] Fix clamping, minor tracing code beautification.
- * src/truetype/ttpic.h: Updated.
+ * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of
+ design coordinates.
+ Use clamped value.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+2017-12-18 Werner Lemberg <wl@gnu.org>
- [cff] Add Multiple Masters service.
+ * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
- The code simply uses the MM functions from the `truetype' module.
+2017-12-18 Werner Lemberg <wl@gnu.org>
- Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688).
- * include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
+2017-12-18 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
- (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
- cff_set_var_design, cff_get_var_design): New functions.
- (cff_service_multi_masters): New service.
- (cff_services): Updated.
+ [truetype] Fix previous commit.
- * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
- functions.
- * src/cff/cffload.h: Updated.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
+ unhinted phantom points, which must be properly scaled.
+
+2017-12-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Don't apply HVAR and VVAR deltas twice (#52683).
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
+ `pp1' to `pp4', except if we have an HVAR and/or VVAR table.
+
+ * 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.
+
+2017-12-17 Jonathan Kew <jfkthame@gmail.com>
+
+ [truetype] Correctly handle variation font phantom points (#52683).
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
+ point indices.
+
+2017-12-17 Jonathan Kew <jfkthame@gmail.com>
+
+ Fix incorrect advance width scaling (#52683).
+
+ * src/base/ftadvance.c (FT_Get_Advances): Always respect the
+ FT_LOAD_NO_SCALE flag if present.
+
+2017-12-16 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy.
+ * objs/.gitignore: Ignore almost everything.
+
+2017-12-11 Werner Lemberg <wl@gnu.org>
- * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
+ Fix compiler warning (#52640).
- * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
- (sfnt_init_face): Initialize `face->mm'.
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused
+ variable.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+2017-12-08 Azzuro <azzuro@team-mediaportal.com>
- Extend functionality of `ft_module_get_service'.
+ * builds/windows/vc2010/freetype.vcxproj: Adjust output directory.
- It can now differentiate between local and global searches.
+ This allows builds with different configurations in parallel.
- * src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
- (FT_Get_TrueType_Engine_Type): Updated.
+2017-12-08 Werner Lemberg <wl@gnu.org>
- * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
+ Fix `make setup dos', second try (#52622).
- * include/freetype/internal/ftobjs.h: Updated.
- * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
+ * 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.
+
+2017-12-08 Werner Lemberg <wl@gnu.org>
+
+ [docmaker] Fix code section parsing.
+
+ Stuff like
+
+ {
+ <bla>
+ }
+
+ confused the parser, which incorrectly treated `<bla>' as a markup
+ tag.
+
+ * src/tools/docmaker/content.py (ContentProcessor::process_content):
+ Apply `re_markup_tags' only outside of code sections.
+
+2017-12-08 Werner Lemberg <wl@gnu.org>
+
+ New `ftdriver.h' file, covering all driver modules.
+
+ This reduces redundancy and increases synergy; it also reduces the
+ number of header files.
+
+ * 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.
+
+ * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
+ include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h,
+ include/freetype/ftttdrv.h: Replaced with...
+ * include/freetype/ftdriver.h: ...this new file.
+ (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to...
+ (FT_HINTING_ADOBE): ... this new macro.
+ (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to...
+ (FT_HINTING_FREETYPE): ... this new macro.
+
+ * src/*/*: Updated accordingly.
+
+2017-12-08 Werner Lemberg <wl@gnu.org>
+
+ Move `ftdriver.h' to `ftdrv.h'.
+
+ * include/freetype/internal/ftdriver.h: Renamed to...
+ * include/freetype/internal/ftdrv.h: ... this name.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H):
Updated.
-2016-12-14 Werner Lemberg <wl@gnu.org>
+2017-12-08 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning.
+ Fix access to uninitalized memory (#52613).
-2016-12-14 Dave Arnold <darnold@adobe.com>
- Werner Lemberg <wl@gnu.org>
+ Also reported as
- [sfnt, cff] Minor preparations.
+ https://bugs.chromium.org/p/chromium/issues/detail?id=791317
- * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR,
- TTAG_VVAR): New SFNT table tags.
+ * 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.
- * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
+2017-12-08 Werner Lemberg <wl@gnu.org>
-2016-12-10 Werner Lemberg <wl@gnu.org>
+ Fix `make setup dos' (#52622).
- [truetype, type1] Add `get_var_blend' to MM service.
+ * builds/detect.mk (dos_setup): Properly escape literal `>'
+ character.
- For internal use; we want to share code between the forthcoming CFF2
- support and TrueType.
+2017-12-07 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
- New typedef.
- (MultiMasters): Add `get_var_blend'.
- (FT_Service_MultiMasters): Updated.
+ Fix C++ compilation.
- * src/truetype/ttgxvar.c (tt_get_var_blend): New function.
- * src/truetype/ttgxvar.h: Updated.
+ * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary.
- * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
- * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning.
-2016-12-10 Werner Lemberg <wl@gnu.org>
+2017-12-07 Werner Lemberg <wl@gnu.org>
- [truetype, type1] Add `done_blend' to MM service.
+ Fix `make multi'.
- For internal use; we want to share code between the forthcoming CFF2
- support and TrueType.
+ * include/freetype/internal/fttrace.h: Remove unused tracing macros.
+ s/pshalgo2/pshalgo/.
+ Add `trace_cffdecode'.
+ * src/pshinter/pshalgo.c (FT_COMPONENT): Updated.
- * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
- New typedef.
- (MultiMasters): Add `done_blend'.
- (FT_Service_MultiMasters): Updated.
+ * 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.
- * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
- * src/truetype/ttgxvar.h: Updated.
+ * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
- * src/truetype/ttobjs.c (TT_Face_Done): Updated.
+ * src/psaux/cffdecode.c: Include FT_FREETYPE_H and
+ FT_INTERNAL_DEBUG_H.
+ (FT_COMPONENT): Define.
+ * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
+ Declare `cff_builder_funcs' and `ps_builder_funcs'.
+ * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'.
+ * src/psaux/psobjs.c : Include `psauxmod.h'.
- * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
- * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+2017-12-07 Werner Lemberg <wl@gnu.org>
-2016-12-09 Werner Lemberg <wl@gnu.org>
+ * include/freetype/config/ftheader.h: Some clean-up.
- [sfnt] Revert change from 2016-12-08.
+ This commit removes documentation of deprecated macros and does some
+ minor streamlining.
- I missed the functionality of `ft_module_get_service', which makes
- the change unnecessary.
+2017-12-06 Werner Lemberg <wl@gnu.org>
-2016-12-08 Werner Lemberg <wl@gnu.org>
+ * builds/symbian/bld.inf: Updated.
- Add framework to support services with 8 functions.
+2017-12-06 Werner Lemberg <wl@gnu.org>
- We will need this for CFF variation font support.
+ New header file `ftparams.h' that collects all parameter tags.
- * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8):
- New macro.
+ * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
+ macro.
+ (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
+ `ftparams.h'.
-2016-12-08 Werner Lemberg <wl@gnu.org>
+ * 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.
- [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
+ * include/freetype/ttunpat.h: Remove. No longer needed.
- CFF2 fonts will need access to those two functions.
+2017-12-05 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
- (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
- (FT_DEFINE_SFNT_INTERFACE): Updated.
+ Improve tracing messages by using singular and plural forms.
- * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
- Fix signatures to exactly correspond to the glyph dict service
- function typedefs.
- (sfnt_interface): Updated.
+ * src/*/*.c: Implement it.
-2016-12-06 Dave Arnold <darnold@adobe.com>
+2017-12-04 Werner Lemberg <wl@gnu.org>
- Add `FT_Get_Var_Design_Coordinates' function.
+ [truetype] Allow shared points in `cvar' table (#52532).
- Note that the low-level functions aren't implemented yet.
+ * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying
+ and adjusting the corresponding code from
+ `TT_Vary_Apply_Glyph_Deltas'.
- * include/freetype/ftmm.h: Declare.
+2017-11-28 Werner Lemberg <wl@gnu.org>
- * include/freetype/internal/services/svmm.h
- (FT_Get_Var_Design_Func): New typedef.
- (MultiMasters): New MM service function `get_var_design'.
- (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- Update all callers.
+ [truetype] Improving tracing of composite glyphs.
- * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
+ * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
+ [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
- * src/truetype/ttdriver.c: Updated.
+2017-11-27 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
- handle `get_var_design' service.
- * src/truetype/ttgxvar.h: Updated.
+ [type1] Allow (again) `/Encoding' with >256 elements (#52464).
- * src/type1/t1driver.c: Updated.
+ 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/type1/t1load.c (T1_Get_Var_Design): New dummp function to
- handle `get_var_design' service.
- * src/type1/t1load.h: Updated.
+ * src/type1/t1load.c (parse_encoding): Implement it.
-2016-12-06 Werner Lemberg <wl@gnu.org>
+2017-11-27 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
- * src/type1/t1load.c (parse_subrs): Fix memory leak.
+ Fix last commit (#52522).
- The `subrs' keyword might erroneously occur multiple times.
+ * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG'
+ properly if we have `ftoption.h' in `BUILD_DIR'.
- Reported as
+2017-11-24 Werner Lemberg <wl@gnu.org>
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231
+ [unix] Install a massaged `ftoption.h' file (#51780).
-2016-12-01 Werner Lemberg <wl@gnu.org>
+ * 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).
- [gzip] Improve building with external zlib (#49673).
+ * builds/unix/install.mk (install): Install
+ `builds/unix/ftoption.h'.
- Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
- the following error.
+ * builds/unix/unix-def.in (DISTCLEAN): Updated.
- ftgzip.c
- zlib-1.2.8\zlib.h(86): error C2061:
- syntax error: identifier 'z_const'
- zlib-1.2.8\zlib.h(94): error C2054:
- expected '(' to follow 'z_const'
- zlib-1.2.8\zlib.h(94): error C2085:
- 'msg': not in formal parameter list
- ...
- zlib-1.2.8\zlib.h(877): fatal error C1003:
- error count exceeds 100; stopping compilation
+ * builds/unix/.gitignore: Updated.
- The error happens because FreeType keeps an own copy of zlib-1.1.4
- under `src/gzip'. When building `src/gzip/ftgzip.c' with
- FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
+2017-11-23 Tor Andersson <tor.andersson@artifex.com>
- #include <zlib.h>
+ Silence unused function warnings (#52465).
- which correctly finds an external `zlib.h', but `zlib.h' itself has
- a line
+ Some static function declarations cause unused function warnings if
+ certain config options are turned off via `ftoption.h'.
- #include "zconf.h"
+ * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
+ src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
- which makes Visual Studio 2015 find `src/gzip/zconf.h' while
- compiling the files in `src/gzip'.
+2017-11-22 Ewald Hew <ewaldhew@gmail.com>
- * src/gzip/zconf.h: Rename to...
- * src/gzip/ftzconf.h: ... this.
- * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
+ * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting.
-2016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com>
+ Reported as
- [autofit] Fix Emscripten crash (patch #9180).
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377
- Function calls through pointers must use a matching signature to
- work on Emscripten, since such calls are dispatched through lookup
- tables grouped by signature.
+2017-11-22 Ewald Hew <ewaldhew@gmail.com>
- * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
- typedef.
+ [psaux] Fix CFF advance widths. (#52466)
-2016-11-29 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.
- [smooth] Revert previous commit. Already fixed with 6ca54c64.
+ * 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.
-2016-11-29 Werner Lemberg <wl@gnu.org>
+2017-11-15 Vlad Tsyrklevich <vtsyrklevich@google.com>
- [smooth] Avoid conditional jump on uninitialized value (#49711).
+ * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type.
- * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
+2017-11-14 Nikolaus Waxweiler <madigens@gmail.com>
-2016-11-27 Nikolaus Waxweiler <madigens@gmail.com>
+ Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
- [autofit] Code shuffling.
+ 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.
- Also improve some comments and remove unused code.
+ 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.
- No functional change.
+ LIGHT NORMAL
+ -------------------------
+ TrueType Auto v40
+ CFF Adobe Adobe
+ Type 1 Adobe Adobe
- * src/autofit/afloader.c (af_loader_load_g): Merged with...
- (af_loader_load_glyph): ...this function.
- Split off emboldening code into...
- (af_loader_embolden_glyph_in_slot): ... this function.
+2017-11-10 Yuri Levchenko <yuri_levchenko@boolat.com>
-2016-11-17 Werner Lemberg <wl@gnu.org>
+ * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option.
- Better support of LLP64 systems with gcc (and clang).
+2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
- * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'.
+ * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition.
- * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and
- suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'.
+2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-11-10 Werner Lemberg <wl@gnu.org>
+ * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables.
- Fix `lcd_weights' array size.
+2017-11-03 Ewald Hew <ewaldhew@gmail.com>
- * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it.
+ [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251)
- Reported by Nikolaus.
+ 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.
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>:
+ Ensure we are on the top level charstring before rewinding.
- * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
+2017-11-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ [truetype] Add more tricky fonts.
- [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
+ See the report by Yang Yinsen.
+ https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html
- It's unavoidable to call the PNG engine, but to get the metrics it
- is sufficient to read the PNG image's header only.
+ * src/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.
- * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
- allocation of the glyph slot.
- * src/sfnt/pngshim.h: Updated.
- * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
- tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
+2017-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ [smooth] Fix complex rendering at high ppem.
- [sfnt] Speed up `sbix' lookup.
+ 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.
- This also fixes a bug introduced in 2016-10-01 which prevents
- display of embedded bitmap fonts that use the `sbix' format.
+ * src/smooth/ftgrays.c (gray_convert_glyph): Implement it.
- * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
- offset also in `ebdt_size' and `ebdt_start', respectively. This
- makes the test for an embedded bitmap data table succeed for this
- format.
+2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
- `ebdt_size' and `ebdt_start'
- (tt_face_load_sbix_image): Ditto.
+ [smooth] Improve complex rendering at high ppem.
-2016-11-06 Seigo Nonaka <nona@google.com>
- Werner Lemberg <wl@gnu.org>
+ 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.
- Introduce a way of quickly retrieving (embedded) bitmap metrics.
+ Reported, analyzed, and tested by Colin Fahey.
- `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
- until the user calls `FT_Render_Glyph'. However, it always
- allocates memory for bitmaps and copies or decodes the contents of a
- bitmap glyph, which can be quite slow for PNG data.
+ * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells.
- * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
- macro.
+2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
- FT_LOAD_BITMAP_METRICS_ONLY is used.
+ [base] Improve tracing in FT_Load_Glyph, FT_*_Size.
- * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
- tt_sbit_decoder_load_bitmap): Add argument to control allocation of
- the glyph slot.
- (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
- tt_face_load_sbit_image): Updated.
+ * src/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/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
- `FT_LOAD_BITMAP_METRICS_ONLY' is set.
+2017-10-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
- argument to control allocation of the glyph slot.
- * src/pfr/pfrobjs (pfr_slot_load): Updated.
+ [base] Improve tracing in FT_Render_Glyph.
- * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
+ * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage
+ calculations and downgrade Netpbm dump to bitmap:7.
- * docs/CHANGES: Updated.
+2017-10-15 Ewald Hew <ewaldhew@gmail.com>
-2016-11-06 Werner Lemberg <wl@gnu.org>
+ [cff] Fix segfault on missing `psaux' (#52218)
- Synchronize with gnulib (#49448).
+ * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr.
- * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
- builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
- current version of `intprops.h'.
- Other minor synchronization to reduce code differences between the
- three files.
+ * modules.cfg: Update dependency list.
-2016-11-03 Behdad Esfahbod <behdad@behdad.org>
+2017-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
- [truetype] Clamp variation requests to valid range.
+ [base, cff] Fix MSVC warnings.
- This is required by OpenType 1.8; it also avoids rounding surprises.
+ * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code.
+ (ft_glyphslot_preset_bitmap): C4244: possible loss of data.
+ * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data.
+ Turn `sum' into unsigned.
- * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
- outside of the allowed range to always stay within the range instead
- of producing an error.
+2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-10-29 Werner Lemberg <wl@gnu.org>
+ [base] Netpbm image tracing.
- [truetype] Remove clang warnings.
+ * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size.
+ (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format.
- * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
- loop counter handling.
+ * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
- * src/truetype/ttinterp.c: Updated.
- (Ins_SCANTYPE): Use signed constant.
- (TT_RunIns): Ensure `num_twilight_points' is 16bit.
+2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-10-27 Werner Lemberg <wl@gnu.org>
+ * builds/windows/ftdebug.c (FT_Message): Print to stderr.
+ * builds/wince/ftdebug.c (FT_Message): Ditto.
- [truetype] Fix commit from 2014-11-24.
+2017-10-14 Behdad Esfahbod <behdad@behdad.org>
- Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
+ [afshaper] Delay creating `hb_set' objects until needed.
- * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
- logic.
+ 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.
-2016-10-26 Werner Lemberg <wl@gnu.org>
+ * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it.
- Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
+2017-10-12 Ewald Hew <ewaldhew@gmail.com>
- * include/freetype/ftmm.h: Declare.
+ [type1, cid] Add hinting engine switch.
- * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
- New typedef.
- (MultiMasters): New MM service function `get_mm_blend'.
- (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- Update all callers.
+ Implement property service in `type1' and `cid' drivers to allow
+ switching between FreeType or Adobe hinting engine when both are
+ available.
- * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
- FT_Get_Var_Blend_Coordinates): Implement.
+ * src/cid/cidriver.c (cid_property_{set,get}, cid_services),
+ src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add
+ Properties service.
- * src/truetype/ttdriver.c: Updated.
+ * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c
+ (T1_Driver_Init): Add default property values.
- * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
- `get_mm_blend' service.
- * src/truetype/ttgxvar.h: Updated.
+2017-10-12 Ewald Hew <ewaldhew@gmail.com>
- * src/type1/t1driver.c: Updated.
+ Add T1_CONFIG_OPTION_OLD_ENGINE configuration option.
- * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
- `get_mm_blend' service.
- * src/type1/t1load.h: Updated.
+ This controls whether the old Type 1 engine gets compiled into FreeType.
+ It is disabled by default.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (T1_CONFIG_OPTION_OLD_ENGINE): New macro.
+
+ * 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.
+
+2017-10-12 Ewald Hew <ewaldhew@gmail.com>
+
+ Extract width parsing from Type 1 parser.
- * docs/CHANGES: Document.
+ Duplicate the fast advance width calculations from the old parser.
+ This is to facilitate adding options for compiling out the old parser.
-2016-10-26 Werner Lemberg <wl@gnu.org>
+ * 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.
- * src/type1/t1load.c (parse_subrs): Fix limit check.
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String),
+ src/cid/cidgload.c (cid_load_glyph): Separate
+ conditional for selecting engine.
+
+2017-10-09 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow.
Reported as
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
+ https://bugs.chromium.org/p/chromium/issues/detail?id=772775
-2016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-10-08 Werner Lemberg <wl@gnu.org>
- [cff] Correct cmap format reporting (#24819).
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows.
- * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
- charmap instead of guessing its format and language.
+ Reported as
-2016-10-22 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579
- [truetype] Fix SCANTYPE instruction (#49394).
+2017-10-07 Werner Lemberg <wl@gnu.org>
- * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
+ [sfnt] Adjust behaviour of PS font names for variation fonts.
-2016-10-22 Werner Lemberg <wl@gnu.org>
+ * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's
+ PS name only if no variation is applied.
- [sfnt] Improve handling of invalid post 2.5 tables [#49393].
+2017-10-07 Werner Lemberg <wl@gnu.org>
- * src/sfnt/ttpost.c (load_format_25): We need at least a single
- table entry.
+ [cff, truetype] Adjust behaviour of named instances.
-2016-10-14 Werner Lemberg <wl@gnu.org>
+ 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.
- [truetype] Fix handling of `cvar' table data.
+ As a side effect, variation functions no longer change the named
+ instance index.
- Reported as
+ * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance'
+ function.
+ Also apply `MVAR' table to named instances.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
+ * 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'.
- * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
- indices.
+2017-10-07 Werner Lemberg <wl@gnu.org>
-2016-10-11 Werner Lemberg <wl@gnu.org>
+ Make `FT_Set_Named_Instance' work.
- [psaux] Fix handling of invalid flex subrs.
+ * src/cff/cffdrivr.c (cff_set_instance): New function.
+ (cff_service_multi_masters): Register it.
- Problem reported as
+ * 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.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
+ * 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/psaux/t1decode.c (t1_decoder_parse_charstrings)
- <op_callothersubr>: Set `flex_state' after error checking.
+2017-10-07 Werner Lemberg <wl@gnu.org>
-2016-10-11 Werner Lemberg <wl@gnu.org>
+ Make `FT_FACE_FLAG_VARIATION' work.
- * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
+ * 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'.
-2016-10-08 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffdrivr.c (cff_get_advances): Updated.
- * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c
+ (sfnt_init_face): Updated.
-2016-10-08 Werner Lemberg <wl@gnu.org>
+ * 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'.
- [cid] Fix parsing of subr offsets.
+ * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle
+ `FT_FACE_FLAG_VARIATION'.
- Bug introduced 2016-05-16.
+2017-10-07 Werner Lemberg <wl@gnu.org>
- * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
+ New function `FT_Set_Named_Instance'.
-2016-10-01 Werner Lemberg <wl@gnu.org>
+ No effect yet.
- [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
+ * src/base/ftmm.c (FT_Set_Named_Instance): New function.
- * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
- a bitmap data table.
+ * include/freetype/ftmm.h: Updated.
-2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-10-07 Werner Lemberg <wl@gnu.org>
- [smooth] Remove impossibility.
+ Add macros for checking whether a font variation is active.
- * src/smooth/ftgrays.c (TWorker): Rearrange fields.
- (gray_convert_glyph): Remove impossible condition and clean up.
+ * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION,
+ FT_IS_VARIATION): New macros.
+ No effect yet.
-2016-09-29 Werner Lemberg <wl@gnu.org>
+2017-10-07 Werner Lemberg <wl@gnu.org>
- [pcf] Enrich family name with foundry name and glyph width info.
+ Add framework for setting named instance in MM service.
- This is a very old patch from openSuSE (from 2006, submitted to
- FreeType in 2011) that I forgot to apply.
+ * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func):
+ New function typedef.
+ (MultiMasters): Add `set_instance' member.
+ (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
- https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
+ * 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.
- Prepend the foundry name plus a space to the family name. There are
- many fonts just called `Fixed' which look completely different, and
- which have nothing to do with each other. When selecting `Fixed' in
- KDE or Gnome one gets results that appear rather random, the style
- changes often if one changes the size and one cannot select some
- fonts at all.
+2017-10-07 Werner Lemberg <wl@gnu.org>
- We also check whether we have `wide' characters; all put together,
- we get family names like `Sony Fixed' or `Misc Fixed Wide'.
+ [type1] Minor code shuffling.
- * src/pcf/pcfread.c (pcf_load_font): Implement it.
+ * 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'.
- * docs/CHANGES: Document it.
+2017-10-05 Werner Lemberg <wl@gnu.org>
-2016-09-29 Werner Lemberg <wl@gnu.org>
+ * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer
+ overflow.
- [ftfuzzer] Speed up.
+ Reported as
- * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
- check for embedded bitmaps if we have a non-default instance.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539
-2016-09-29 Werner Lemberg <wl@gnu.org>
+2017-10-05 Werner Lemberg <wl@gnu.org>
- [truetype] Disallow bitmap strokes for non-default instances.
+ Fix compiler warnings.
- Also speed up access of default instances if GX variations are
- active.
+ * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies
+ on numeric overflow.
+ Add cast.
- * include/freetype/internal/tttypes.h (TT_FaceRec): Add
- `is_default_instance' member.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable
+ types, add cast.
- * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
- `is_default_instance'.
+2017-10-04 John Tytgat <John.Tytgat@esko.com>
- * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
- load_truetype_glyph): Add test for default instance.
- (TT_Load_Glyph): Load embedded bitmaps for default instance only.
+ [cff] Add support for `FSType'.
- * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
- `is_default_instance'.
+ * include/freetype/internal/cfftypes.h (CFF_FontRec): Add
+ `font_extra' entry.
-2016-09-29 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.
- [truetype] Clean up `TT_Face' structure.
+ * src/cff/cffload.c (cff_font_done): Free `font_extra'.
- * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
- fields `horz_metrics' and `vert_metrics'.
- Update documentation.
+2017-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
+ Signedness fixes in bitmap presetting.
-2016-09-28 Werner Lemberg <wl@gnu.org>
+ Reported as
- More FT_ZERO usage.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514.
- * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
- s/ft_memset/FT_MEM_ZERO/.
+ * 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/t1decode.c (t1_decoder_parse_charstrings):
- s/ft_memset/FT_ARRAY_ZERO/.
+2017-09-29 Alexei Podtelezhnikov <apodtele@gmail.com>
- * src/raster/ftraster.c (FT_ZERO): Define.
- (ft_black_new): Use it.
- * src/raster/ftrend1.c (ft_raster1_get_cbox):
- s/FT_MEM_ZERO/FT_ZERO/.
+ Bitmap metrics presetting [2/2].
- * src/smooth/ftgrays.c (FT_ZERO): Define.
- (gray_raster_new): Use it.
- * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
- s/FT_MEM_ZERO/FT_ZERO/.
+ * src/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.
-2016-09-28 Werner Lemberg <wl@gnu.org>
+2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
- */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
+ [smooth, raster] Miscellaneous cleanups.
-2016-09-27 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'.
- [truetype] Trace number of executed opcodes.
+2017-09-28 Ben Wagner <bungeman@google.com>
- * src/truetype/ttinterp.c (TT_RunIns): Implement it.
+ [truetype] Really, really fix #52082.
-2016-09-27 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
- [truetype] Speed up `TT_Load_Glyph'.
+2017-09-28 Werner Lemberg <wl@gnu.org>
- This avoids additional calls to `tt_face_lookup_table' for the
- `glyf' table, which can be expensive.
+ * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow.
- * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
- `glyf_offset' field to ...
- (TT_FaceRec): ... this structure.
- * src/truetype/ttgload.c (load_truetype_glyph): Updated.
- (tt_loader_init): Move initialization of `glyf_offset' to ...
- * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
+ Reported as
-2016-09-27 Werner Lemberg <wl@gnu.org>
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510
- [truetype] Introduce dynamic limits for some bytecode opcodes.
+2017-09-28 Ewald Hew <ewaldhew@gmail.com>
- This speeds up FreeType's handling of malformed fonts.
+ * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak.
- * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
- of twilight points, the total number of negative jumps, and the
- total number of loops in LOOPCALL opcodes. The values are based on
- the number of points and entries in the CVT table.
- (Ins_JMPR): Test negative jump counter.
- (Ins_LOOPCALL): Test loopcall counter.
+ Reported as
- * src/truetype/ttinterp.h (TT_ExecContext): Updated.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489
- * docs/CHANGES: Updated.
+2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-09-25 Werner Lemberg <wl@gnu.org>
+ Bitmap metrics presetting [1/2].
- [truetype] Sanitize only last entry of `loca' table.
+ This mainly just extracts the code for presetting the bitmap metrics
+ from the monochrome, grayscale, and LCD renderers into a separate
+ function.
- Without this patch, a loca sequence like `0 100000 0 100000 ...',
- where value 100000 is larger than the `glyf' table size, makes
- FreeType handle the whole `glyf' table as a single glyph again and
- again, which is certainly invalid (and can be very slow, too).
+ * src/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/truetype/ttpload.c (tt_face_get_location): Implement.
- Improve tracing messages.
+ * 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.
-2016-09-25 Werner Lemberg <wl@gnu.org>
+ * src/raster/ftrend1.c (ft_raster1_render): Reworked to use
+ `ft_glyphslot_preset_bitmap'.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
+ (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting
+ is moved to `ft_glyphslot_preset_bitmap'.
- * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
+2017-09-28 Ewald Hew <ewaldhew@gmail.com>
-2016-09-24 Werner Lemberg <wl@gnu.org>
+ [psaux] Fix compiler warning.
- [autofit] Tracing fixes.
+ * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing
+ code.
- * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
- functions only if we actually do tracing.
+2017-09-27 Werner Lemberg <wl@gnu.org>
-2016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
- [smooth] Reduce divisions in the line renderer.
+2017-09-25 Werner Lemberg <wl@gnu.org>
- We don't need some divisions if a line segments stays within a single
- row or a single column of pixels.
+ [psaux] Fix compiler warnings.
- * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
- conditional.
+ * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
+ test.
-2016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psintrp.c (cf2_interpT2CharString)
+ <cf2_escCALLOTHERSUBR>: Add casts.
- * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
+ * src/psaux/psobjs.c (ps_decoder_init): Add cast.
-2016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [smooth] Another tiny speed-up.
+ [psaux] Minor fixes.
- * src/smooth/ftgrays.c (gray_find_cell): Merge into...
- (gray_record_cell): ... this function.
+ * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
+ Rearrange `ps_builder_init' arguments to conventional order.
-2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
+ notice for `SubFont' in Type 1 mode.
- * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [psaux] Move `psdecode' into `psobjs'.
- [smooth] Fix valgrind warning and reoptimize.
+ As the former only contains a single procedure, move it into
+ `psobjs' for simplicity. Also change the parameter order to the
+ conventional one.
- The algorithm calls `gray_set_cell' at the start of each new contour
- or when the contours cross the cell boundaries. Double-checking for
- that is wasteful.
+ * src/psaux/psdecode.c (ps_decoder_init): Moved to...
+ * src/psaux/psobjs.c: ...Here.
+ * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto.
- * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
- (gray_convert_glyph): Remove initialization introduced by 44b172e88.
+ * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update
+ `ps_decoder_init' function signature.
-2016-09-10 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c:
+ Update calls.
- [sfnt] Fix previous commit.
+ * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes.
- Problems reported as
+ * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC):
+ Update file references.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- We now map the strike index right before accessing the physical
- data, not earlier.
+ [psaux] Fix Type 1 hinting.
- * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
- after creating the map so that...
+ 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.
- * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
- can be used before and after setting up `sbit_strike_map'.
- (tt_face_set_sbit_strike): Revert change.
- (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
+ * src/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.
- * src/truetype/ttdriver.c (tt_size_select): Revert change.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-09 Werner Lemberg <wl@gnu.org>
+ [psaux] Add tracing for hints.
- [ftfuzzer] Minor improvements.
+ * 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/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
- invalid strikes.
- Use better values for call to `FT_Set_Char_Size'.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-09 Werner Lemberg <wl@gnu.org>
+ [psaux] Minor fixes.
- [sfnt] Don't provide (completely) broken strike data.
+ * 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.
- FreeType tries to sanitize strike header data; we now reject
- completely broken ones.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * include/freetype/internal/tttypes.h (TT_FaceRec): New
- `sbit_strike_map' array pointer.
+ [cid] Use the new engine.
- * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
- width or height would be zero.
- Add tracing message in case of error.
+ * src/cid/cidgload.c: Update includes.
+ (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph
+ loading code as with `type1' module.
- * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
- only using (more or less) valid strike header data for
- FT_Face's `available_sizes' array.
- (sfnt_done_face): Updated.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
- `sbit_strike_map'.
- (tt_face_load_strike_metrics): Improve tracing.
+ [cid] Add Adobe engine configuration.
- * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
+ This is similar to what was done in the `type1' module.
-2016-09-08 Werner Lemberg <wl@gnu.org>
+ * src/cid/cidriver.c (t1cid_driver_class): Update declaration.
+ * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H.
+ (cid_driver_init): Update code.
- * Version 2.7 released.
- =======================
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ [psaux] Change subfont synthesis for CID fonts.
- Tag sources with `VER-2-7'.
+ 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.
- * docs/VERSION.TXT: Add entry for version 2.7.
+ * 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.
- * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
- builds/windows/vc2005/index.html,
- builds/windows/vc2008/freetype.vcproj,
- builds/windows/vc2008/index.html,
- builds/windows/vc2010/freetype.vcxproj,
- builds/windows/vc2010/index.html,
- builds/windows/visualc/freetype.dsp,
- builds/windows/visualc/freetype.vcproj,
- builds/windows/visualc/index.html,
- builds/windows/visualce/freetype.dsp,
- builds/windows/visualce/freetype.vcproj,
- builds/windows/visualce/index.html,
- builds/wince/vc2005-ce/freetype.vcproj,
- builds/wince/vc2005-ce/index.html,
- builds/wince/vc2008-ce/freetype.vcproj,
- builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
+ * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update
+ declaration.
- * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
- (FREETYPE_PATCH): Set to 0.
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update
+ call.
- * builds/unix/configure.raw (version_info): Set to 18:6:12.
- * CMakeLists.txt (VERSION_MINOR): Set to 7.
- (VERSION_PATCH): Set to 0.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * docs/CHANGES: Updated.
+ [type1] Switch to Adobe engine.
-2016-09-08 Werner Lemberg <wl@gnu.org>
+ * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine.
- * src/truetype/ttinterp.c: Include `ttgxvar.h'.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- This fixes the `multi' build.
+ [psaux] Extend Adobe interpreter (seac).
-2016-09-08 Werner Lemberg <wl@gnu.org>
+ This concludes the changes needed to add Type 1 support.
- [autofit] Another improvement to Armenian support.
+ * src/psaux/psintrp.c: Update includes.
+ (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to
+ implied seac for CFF.
- Suggested by Hrant H Papazian <hpapazian@gmail.com>.
+ * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New
+ function to look up the glyph index.
- * src/autofit/afscript.h: Use better suited characters to derive
- default stem widths.
+ * src/psaux/psft.c (cf2_getT1SeacComponent,
+ cf2_freeT1SeacComponent): New functions to get the charstrings for
+ seac components.
-2016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations.
- * src/smooth/ftgrays.c (gray_hline): Microptimize.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [psaux] Extend Adobe interpreter (flex in callothersubr).
- [smooth] Operate in absolute bitmap coordinates.
+ * 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.
- Simpler bitmap addressing improves performance by 1.5%.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
- (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
- gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
+ [psaux] Extend Adobe interpreter (callothersubr).
-2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * 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.
- [smooth] Improve contour start (take 2).
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
- instead of...
- (gray_start_cell): ... this function, which is removed.
- (gray_convert_glyph): Make initial y-coordinate invalid.
+ [psaux] Extend Adobe interpreter (pop).
-2016-09-06 Werner Lemberg <wl@gnu.org>
+ * 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.
- [type1] MM fonts support exactly zero named instances (#48748).
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
+ [psaux] Extend Adobe interpreter (callsubr).
-2016-09-06 Jonathan Kew <jfkthame@gmail.com>
+ * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
+ Type 1 mode.
- [cff] Fix uninitialized memory.
+ * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
- Problem reported as
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
+ [psaux] Extend Adobe interpreter (div, four-byte numbers).
- * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage'
- array to handle a `get' opcode without a previous `put'.
+ * 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.
-2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
+ [psaux] Extend Adobe interpreter (hints).
-2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * 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.
- [smooth] Improve contour start.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
- instead of...
- (gray_start_cell): ... this function, which is removed.
+ [psaux] Extend Adobe interpreter (hsbw, sbw).
-2016-09-05 Werner Lemberg <wl@gnu.org>
+ * 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.
- [cff] Fix memory initialization.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
- variants of FreeType's memory allocation macros don't do zeroing.
+ [psaux] Extend Adobe interpreter (setcurrentpoint).
-2016-09-05 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psintrp.c (cf2_interpT2CharString)
+ <cf2_escSETCURRENTPT>: Fix stack access.
- [ftrandom] Minor improvements.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
- 500.
+ [psaux] Extend Adobe interpreter (closepath).
- * src/tools/ftrandom/Makefile (CFLAGS): Split off include
- directories to ...
- (INCLUDES): ... this new variable.
- (LDFLAGS): New variable.
- (ftrandom.o, ftrandom): Updated.
+ * 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'.
-2016-09-05 Werner Lemberg <wl@gnu.org>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [autofit] Improve Armenian support.
+ [psaux] Add Type 1 operations to Adobe CFF interpreter.
- Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
+ The following Type 1 specific ops have been added (copied from
+ `t1decode'):
- * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
- selection of characters.
+ closepath
+ vstem3
+ hstem3
+ seac
+ sbw
+ callothersubr
+ pop
+ setcurrentpoint
+ hsbw
- * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+ The following require a Type 1 mode, because of differences in
+ specification:
-2016-09-04 Werner Lemberg <wl@gnu.org>
+ hstem
+ vstem
+ vmoveto
+ callsubr
+ div
+ rmoveto
+ hmoveto
+ Numbers
- [ftrandom] Improve Makefile.
+ The subsequent commits will implement these changes and adapt
+ accesses of data and objects to the new interpreter.
- It now supports both a normal build (`./configure && make') and a
- development build (`make devel').
+ NOTE: Will not compile in the meantime!
- * src/tools/ftrandom/Makefile (VPATH): Set it so that
- `libfreetype.a' gets searched in both `objs' (for the development
- build) and `objs/.libs' (for a normal build which uses libtool).
- (LIBS): Add missing libraries.
- (ftrandom.o): New rule.
- (ftrandom): Use automatic variables.
+ * src/psaux/psintrp.c: Add opcodes to enum.
+ (cf2_interpT2CharString): Copy relevant code over from
+ `t1_decoder_parse_charstrings' (in `t1decode.c').
-2016-09-03 Werner Lemberg <wl@gnu.org>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [truetype] More fixes for handling of GX deltas.
+ [type1] Fixes for rendering.
- Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
+ The Type 1 advance width calculation passes null for glyph slot,
+ etc, which can cause null pointer access in the new interpreter.
+ Fall back to the old one for now.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
- sanity test for glyph variation array header size.
- Always set stream position before reading packed x and y deltas.
- Fix thinko w.r.t. `localpoints' array.
+ Fix the large glyph retry code and ensure hinting and scaling flags
+ are set properly.
-2016-09-03 Werner Lemberg <wl@gnu.org>
+ * 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.
- [ftrandom] Various fixes.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
- default.
- (error_fraction): Make it of type `double' to work as advertized –
- this was completely broken.
- Update all related code.
- (error_count, fcnt): Make it unsigned to fix compiler warnings.
- Update all related code.
- (fontlist): Change `len' member to `long' to fix compiler warnings.
- (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
- unused variables.
- (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
- (ExecuteTest): Ditto.
- Call `FT_Done_FreeType'.
- (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
- int'.
- (usage): Improve output.
- (main): Fix compiler warnings.
+ [psaux] Add missing objects (2/2).
- * src/tools/ftrandom/README: Updated.
+ 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.
-2016-09-03 Werner Lemberg <wl@gnu.org>
+ * 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.
- [base] Avoid negative bitmap stroke dimensions (#48985).
+ * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto.
+ Add this to the PSAux Service for future use with CID fonts.
- * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
- actually successful. For example, this can fail for value
- -32768 if the type is `signed short'. If there are problems,
- disable the stroke.
+ * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H.
+ (T1_Parse_Glyph_And_Get_Char_String): Add the call.
-2016-09-03 Werner Lemberg <wl@gnu.org>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
+ [psaux] Add missing objects for Type 1 (1/2).
- * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
+ 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.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New
+ `cf2_instance' field.
- [unix] Enable 64bit support in file system access (#48962).
+ * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to
+ `PS_Decoder'.
- * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
+ * src/psaux/t1decode.c (t1_decoder_done): Add finalization code.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses.
- [sfnt] Avoid left shift of negative value (#48980).
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
- constant.
+ Allow `type1' module to use the Adobe engine.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ Add the callback and some conditionals to switch between the two
+ engines.
- * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
+ * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change
+ function declarations.
+ * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the
+ callbacks.
-2016-09-02 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for
+ number conversion.
- Some preparations for the next release.
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code
+ to choose which renderer to use.
- * include/freetype/config/ftoption.h
- (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
+ * src/cid/cidgload.c (cid_load_glyph): Update call.
+ * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update
+ includes.
- * docs/CHANGES: Updated.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [type1] Add Adobe engine configuration.
- [smooth] Simplify span rendering more.
+ Use the previously changed PS_Driver in type1 module to store
+ hinting engine configuration.
- It turns out that there is significant cost associated with `FT_Span'
- creation and calls to `gray_render_span' because it happerns so
- frequently. This removes these steps from our internal use but leaves
- it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
- is about 5%.
+ * include/freetype/ftt1drv.h: New file.
+ Duplicate and rename config options from CFF.
+ * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro.
- * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
- migrated to...
- (gray_hline): ... here.
+ * src/type1/t1driver.c (t1_driver_class): Update declaration.
+ * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H.
+ (T1_Driver_Init): Update code.
-2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- [smooth] Streamline pixmap drawing a bit more.
+ [cff] Move and rename `CFF_Driver'.
- Zero coverage is unlikely (1 out of 256) to warrant checking. This
- gives 0.5% speed improvement in rendering simple glyphs.
+ This is so that we can use the same hinting engine parameters for
+ Type 1.
- * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
+ * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and
+ move to...
+ * include/freetype/internal/psaux.h (PS_Driver): ...here.
-2016-08-29 Alexei Podtelezhnikov <apodtele@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.
- [smooth] Streamline pixmap drawing.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- This gives 2% speed improvement in rendering simple glyphs.
+ [psaux, type1] Reorganize object fields.
- * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
- pointer to its bottom-left and pitch to be used in...
- (gray_TWorker): ... here.
- (gray_render_span): Move pixmap flow check from here...
- (gray_raster_render): .. to here.
+ Make some fields more generic, so that we can access them the same
+ way regardless of Type 1 or CFF.
-2016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face'
+ to `FT_Face'.
+ Remove unused fields.
- [smooth] Reduce stack of band boundaries.
+ * src/psaux/psft.c: Update all accesses of `PS_Builder.face'.
+ Add some asserts to guard against casting `T1_Face' as `TT_Face'.
- * src/smooth/ftgrays.c (gray_TBand): Removed.
- (gray_convert_glyph): Updated to stack band boundaries concisely.
+ * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow
+ `CFF_GlyphSlot', so that we can pretend they are the same in the
+ interpreter.
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point):
+ Updated with above changes.
- * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ [psaux] Prepare for Type 1 mode.
- [cid] Fix commit from 2016-05-16.
+ Add some checks for Type 1 data passing through.
- * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
+ * 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.
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing
+ `decoder->cff' in Type 1 mode.
+ Copy `is_t1' flag to `CF2_Font'.
- [sfnt] Cache offset and size to bitmap data table.
+2017-09-25 Ewald Hew <ewaldhew@gmail.com>
- This commit avoids `EBDT' and friends being looked up again and
- again while loading a single embedded bitmap.
+ [psaux, cff] Use the new objects.
- * include/freetype/internal/tttypes.h (TT_FaceRec)
- [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
- `ebdt_size'.
+ * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
+ switching between new and old engines.
- * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
- (tt_face_load_sbit): ... this function; also store the table size
- and offset.
+ * src/cff/cffgload.c, src/cff/cffparse.c: Update calls.
-2016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * 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.
- * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
-2016-08-26 Werner Lemberg <wl@gnu.org>
+ [psaux] Objects for new interpreter (part 2).
- [type1] Fix heap buffer overflow.
+ Make the new objects copy over values. They are essentially wrapper
+ types for the different decoders/builders.
- Reported as
+ * 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.
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
+ * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations.
- * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
- contain glyph names.
+ * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two
+ modes.
-2016-08-25 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux'
+ service.
- [sfnt] Fix previous commit (#48901).
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
+ [psaux] Add objects for new interpreter.
-2016-08-25 Werner Lemberg <wl@gnu.org>
+ Introduce `PS_Decoder' and `PS_Builder' which include all fields
+ from either Type 1 or CFF decoders/builders.
- [sfnt] Speed up handling of invalid format 4 cmaps.
+ * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New
+ structs.
- * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
- tests for `num_glyph' from `tt_cmap4_char_map_linear'.
+ * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder'
+ functions.
-2016-08-25 Werner Lemberg <wl@gnu.org>
+ * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold
+ `PS_Decoder' initialization functions.
- * include/freetype/internal/ftdriver.h: Remove unused typedefs.
+ * src/psaux/psaux.c, src/psaux/Jamfile (_sources),
+ src/psaux/rules.mk (PSAUX_DRV_SRC): Updated.
-2016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- [smooth] Simplify span rendering.
+ [psaux] Rename files.
- This removes unnecessary complexity of span merging and buffering.
- Instead, the spans are rendered as they come, speeding up the
- rendering by about 5% as a result.
+ 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.
- * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
- (gray_TWorker): Remove span buffer and related fields.
- (gray_sweep, gray_hline): Updated.
+ s/cf2/ps/ for all following.
- * include/freetype/ftimage.h: Remove documentation note about
- `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
+ * src/psaux/cf2*: Rename files.
+ * src/psaux/*: Update includes.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC,
+ PSAUX_DRV_H): Update file references.
- [truetype] Fix `MPS' instruction.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- According to Greg Hitchcock, MPS in DWrite really returns the point
- size.
+ [psaux] Minor fix.
- * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
+ Use `MultiMasters' service in `psaux' instead of a call to `cff'.
+ The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined.
- * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
+ * src/psaux/cf2ft.c: Update includes.
+ (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of
+ `cff_get_var_blend'.
- * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
- member.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/truetype/ttinterp.c (TT_Load_Context): Updated.
- (Ins_MPS): Fix instruction.
+ [psaux, cff] Move `cff_random' into `psaux' service.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ NOTE: Does not compile!
- [lzw] Optimize last commit.
+ Minor fix to allow both `cff' and `psaux' to use `cff_random'.
- * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
- conditional clause.
+ * 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'.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the
+ function here...
+ * src/psaux/psauxmod.c: And here.
- [lzw] Avoid invalid left shift.
+ * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code.
- Reported as
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
+ [cff] Move struct declarations to `freetype/internal'.
- * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
+ NOTE: Does not compile!
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ This is so that the CFF functions moved to `psaux' can access the
+ same structs that they need.
- [lzw] Avoid buffer overrun.
+ * src/cff/cfftypes.h: Moved to...
+ * include/freetype/internal/cfftypes.h: ...Here.
- Reported as
+ * src/cff/cffobjs.h: Moved the struct declarations to...
+ * include/freetype/internal/cffotypes.h: ... this new file.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
+ * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H,
+ FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros.
- * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
- underflow.
+ * 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.
-2016-08-16 Werner Lemberg <wl@gnu.org>
+ * src/cff/rules.mk (CFF_DRV_H): Updated.
- [truetype] Fix compiler warning.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
+ [psaux, cff] Add new service for inter-module calls.
-2016-08-13 Werner Lemberg <wl@gnu.org>
+ NOTE: Does not compile!
- [winfonts] Avoid zero bitmap width and height.
+ This is to allow CFF functions moved to `psaux' to call functions
+ declared in `src/cff/cffload.h'.
- Reported as
+ * include/freetype/internal/services/svcfftl.h: New file, setting up
+ a `CFFLoad' service.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
+ * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10,
+ FT_DEFINE_SERVICEDESCREC): New macros.
+ (FT_SERVICE_CFF_TABLE_LOAD_H): New macro.
- * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
- (FNT_Load_Glyph): Check for zero pitch.
+ * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service.
-2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h
+ (CF2_FontRec): Add service interface.
- * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
+ * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c,
+ src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service.
-2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
+ [psaux, cff] Add callbacks for inter-module calls.
-2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com>
+ NOTE: Does not compile!
- * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
+ * include/freetype/internal/psaux.h: Add function pointer
+ declarations.
-2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
+ * src/psaux/cffdecode.c (cff_decoder_init): Update to take in
+ callbacks.
+ * src/psaux/cffdecode.h: Ditto.
- * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
+ * 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.
-2016-08-10 Werner Lemberg <wl@gnu.org>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- [sfnt] Use correct type for `italicAngle' field (#48732).
+ [psaux, cff] Create new `PSAux' service interface entries.
- * src/sfnt/ttload.c (tt_face_load_post): Fix types.
+ NOTE: Does not compile!
-2016-08-06 Jon Spencer <jon@jonspencer.ca>
+ * 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'.
- [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
+ * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New
+ function tables.
+ (PSAux_Interface): Updated.
- `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
- advance value from the font table and then scales it by the
- `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
- set that value for bitmap fonts and the advance gets scaled to zero.
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux'
+ service interface.
- Taken from
+ * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update
+ function calls to use psaux service.
- https://github.com/behdad/harfbuzz/issues/252
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
- <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
+ [psaux, cff] Move CFF builder components into `psaux' module.
-2016-08-06 Behdad Esfahbod <behdad@behdad.org>
+ NOTE: Does not compile!
- [truetype] Fix GX variation handling of composites.
+ * src/cff/cffgload.c
+ (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour},
+ cff_check_points): Move to...
+ * src/psaux/psobjs.c: Here.
- * src/truetype/ttgload.c (load_truetype_glyph)
- [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
+ * src/cff/cffgload.h: Move corresponding declarations to
+ `src/psaux/psobjs.h'.
-2016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * src/cff/cffgload.h (CFF_Builder): Move struct declaration to...
+ * include/freetype/internal/psaux.h: Here.
- [smooth] Minor refactoring.
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
- Updated.
+ [psaux, cff] Move CFF decoder components into `psaux' module.
+
+ NOTE: Does not compile!
+
+ * 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.
-2016-07-29 Werner Lemberg <wl@gnu.org>
+ * src/cff/cffgload.h: Move corresponding declarations to...
+ * src/psaux/cffdecode.h: This new file.
- [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
+ * 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.
- Since 2016-05-16 we detect infinite recursion directly.
+ * src/psaux/cf2ft.h: Update include.
- * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
- `maxComponentDepth'.
- * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
- `maxComponentDepth' is not valid. Instead, simply adjust its value
- and emit a tracing message.
+ * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with
+ the new file.
-2016-07-26 Werner Lemberg <wl@gnu.org>
+2017-09-24 Ewald Hew <ewaldhew@gmail.com>
- * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
+ [psaux, cff] Move Adobe's engine components into `psaux' module.
- No functional change.
+ This is the first patch of a sequence to move the Type 2 charstring
+ processing capability from the `cff' module to the `psaux' module.
-2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net>
+ NOTE: Does not compile!
- [truetype] Record the end of IDEFs.
+ * src/cff/cf2*: Move these files to...
+ * src/psaux/cf2*: Here.
- To match the logic in FDEF. The value of the end is only used for
- bound-checking in `Ins_JMPR', so it may not have been obvious that
- it was not recorded. Tested (as part of Font Validator 2.0) all the
- fonts on Fedora and did not see any change.
+ * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC,
+ CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file
+ references.
- * src/truetype/ttinterp.c (Ins_IDEF): Updated.
+ * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c
+ (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references.
-2016-07-19 Werner Lemberg <wl@gnu.org>
+2017-09-24 Alexei Podtelezhnikov <apodtele@gmail.com>
- [truetype] Sanitizer fix, second try.
+ Tweak per-face LCD filtering controls.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
- tests and use only one slot more.
+ Thing are simpler with a NULL-function pointer.
-2016-07-19 Werner Lemberg <wl@gnu.org>
+ * 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.
- [truetype] Sanitizer fix.
+ * 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.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
- to fix nested loops.
+ * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter):
+ Minor.
-2016-07-18 Werner Lemberg <wl@gnu.org>
+2017-09-24 Jonathan Kew <jfkthame@gmail.com>
- [truetype] Make GETDATA work only for GX fonts.
+ [sfnt] Fix `premultiply_data' (#52092).
- * src/truetype/ttinterp.c (opcode_name): Updated.
- (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
- (TT_RunIns): Updated.
+ * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
+ if we have less than 16 bytes of data.
-2016-07-17 Werner Lemberg <wl@gnu.org>
+2017-09-24 Werner Lemberg <wl@gnu.org>
- [truetype] Add support for Apple's
+ [otvalid] Fix handling of ValueRecords.
- GETDATA[], opcode 0x92
+ 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.
- bytecode instruction. It always returns 17, and we have absolutely
- no idea what it is good for...
+ * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
+ (otv_PairPos_validate): Adjust.
- * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
- (Ins_GETDATA): New function.
- (TT_RunIns): Add it.
+2017-09-23 Werner Lemberg <wl@gnu.org>
-2016-07-16 Werner Lemberg <wl@gnu.org>
+ [otvalid] Handle `GSUB' and `GPOS' v1.1 tables.
- [truetype] Add bytecode support for GX variation fonts.
+ * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c
+ (otv_GPOS_validate): Implement it.
- This commit implements undocumented (but confirmed) stuff from
- Apple's old bytecode engine.
+2017-09-23 Werner Lemberg <wl@gnu.org>
- GETVARIATION[], opcode 0x91
- This opcode pushes normalized variation coordinates for all axes
- onto the stack (in 2.14 format). Coordinate of first axis gets
- pushed first.
+ [otvalid] Update common table handling to OpenType 1.8.2.
- GETINFO[], selector bit 3
- If GX variation support is enabled, bit 10 of the result is set
- to 1.
+ * src/otvalid/otvcommn.c (otv_Device_validate): Handle
+ VariationIndex subtable.
+ (otv_Lookup_validate): Handle MarkFilteringSet.
- * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
- (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
- (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
- bit 3, checking support for variation glyph hinting.
- (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
- to implement opcode 0x91.
- (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
+2017-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
-2016-07-16 Werner Lemberg <wl@gnu.org>
+ [build] Windows-style DLL versioning.
- [truetype] Fix GETINFO bytecode instruction.
+ * build/windows/ftver.rc: New VERSIONINFO resource.
+ * build/windows/vc2010/freetype.vcxproj: Further improvements.
- * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
- stretching information.
+2017-09-23 Ben Wagner <bungeman@google.com>
-2016-07-16 Behdad Esfahbod <behdad@behdad.org>
+ [truetype] Really fix #52082.
- [truetype] Make all glyphs in `Zycon' GX font work.
+ * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
- tests.
+2017-09-23 Werner Lemberg <wl@gnu.org>
-2016-07-16 Werner Lemberg <wl@gnu.org>
+ [otvalid] Handle `GDEF' v1.2 and v1.3 tables.
- [truetype] Fix GX delta tracing.
+ No validation of variation stuff yet.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
- relative point movements.
+ * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function.
+ (otv_GDEF_validate): Implement it.
-2016-07-16 Behdad Esfahbod <behdad@behdad.org>
+2017-09-22 Werner Lemberg <wl@gnu.org>
- [truetype] More fixes for GX.
+ [otvalid] Handle `BASE' v1.1 table.
- This finally fixes the rendering of the cyclist and the lizard in
- the `Zycon' font.
+ No validation of variation stuff yet.
- * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
- index is always cumulative.
+ * src/otvalid/otvbase.c (otv_BASE_validate): Implement it.
- (tt_handle_deltas): Rename to...
- (tt_interpolate_deltas): ... This.
- Add new parameter for output point array.
- Update caller.
+2017-09-22 Werner Lemberg <wl@gnu.org>
- (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
- the intermediate results of `tt_interpolate_deltas' that are to be
- added to `outline->points'.
+ [otvalid] Macros for 32bit offset support.
-2016-07-15 Werner Lemberg <wl@gnu.org>
+ * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32,
+ OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros.
+
+2017-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [build] Simplify Visual C++ 2010 project.
+
+ * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded
+ configurations and tweak.
+
+2017-09-21 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Integer overflow (#52082).
+
+ * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS.
+
+2017-09-21 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Fix postscript name for default instance of variation fonts.
+
+ Problem reported by Behdad.
+
+ * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test
+ `is_default_instance'.
- * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
+2017-09-21 Werner Lemberg <wl@gnu.org>
- `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
+ [truetype] Fix `mmvar' array pointers, part 2.
- Reported by Alexei.
+ The previous commit was incomplete.
-2016-07-16 Nikolaus Waxweiler <madigens@gmail.com>
+ * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for
+ `master' also.
- * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
+2017-09-21 Werner Lemberg <wl@gnu.org>
- Problem reported by Hin-Tak Leung.
+ [truetype] Fix `mmvar' array pointers.
-2016-07-15 Werner Lemberg <wl@gnu.org>
+ Without this change, clang's AddressSanitizer reports many runtime
+ errors due to misaligned addresses.
- [autofit] Update and improve segment and edge tracing.
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer
+ size for sub-array offsets into `mmvar'.
- * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
- `delta' also.
- Don't show first point of segment as a replacement for `pos'; this
- is (a) misleading, since the difference to `pos' can be almost
- arbitrarily large in corner cases, and (b) it is better to have all
- segment data in font units instead of a single value given in output
- space coordinates.
- Improve layout.
- (af_glyph_hints_dump_edges): Show px->units and units->px conversion
- values for convenience.
- Improve layout.
+2017-09-20 Werner Lemberg <wl@gnu.org>
-2016-07-15 Werner Lemberg <wl@gnu.org>
+ [truetype] Integer overflows.
- [autofit] For edges, reject segments wider than 1px (#41334).
+ Changes triggered by
- * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429
- * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
- `delta'.
- (af_latin_hints_compute_edges): Reject segments with a delta larger
- than 0.5px.
+ * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG.
+ (Ins_MIAP): Use SUB_LONG.
-2016-07-14 Werner Lemberg <wl@gnu.org>
+2017-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
- * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
+ [build] Fix DLL builds in Visual C++ project.
-2016-07-14 Werner Lemberg <wl@gnu.org>
+ * 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.
- [sfnt] Fix `face_index' value in `FT_Face' for named instances.
+2017-09-19 John Tytgat <John.Tytgat@esko.com>
- * src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
+ [cff] Fix family name logic of pure CFF fontdata (#52056).
-2016-07-14 Werner Lemberg <wl@gnu.org>
+ 1. If `FamilyName' is present in the CFF font, use this for
+ FT_Face's `family_name'.
+ 2. Otherwise, use the face name and chop off any subset prefix.
+ 3. If at this point FT_Face's `family_name' is set, use this
+ together with the full name to determine the style.
+ 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'.
+ 5. If we don't have a valid style, use "Regular".
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
+ 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).
-2016-07-14 Behdad Esfahbod <behdad@behdad.org>
+ * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it.
- [truetype] Fix gxvar delta interpolation.
+2017-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
- The coordinates of the base font should be used for interpolation
- purposes, NOT the current points (i.e., the result of accumulation
- of previous deltas).
+ [build] Declutter Visual C++ 2010-2017 project.
- * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
- `points_org' before looping over all tuples.
+ * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02)
+ optimization for Release configuration throughout the project.
----------------------------------------------------------------------------
-Copyright 2016 by
+Copyright 2017-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,