From: Youngbok Shin Date: Tue, 11 Jul 2017 09:49:15 +0000 (+0900) Subject: Imported Upstream version 2.8 X-Git-Tag: upstream/2.8^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e74d2367d958be080aba74a5653db640a351cf6c;p=platform%2Fupstream%2Ffreetype2.git Imported Upstream version 2.8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cd492a..d1b053e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt # -# Copyright 2013-2016 by +# Copyright 2013-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written originally by John Cary @@ -153,8 +153,8 @@ endif () set(VERSION_MAJOR "2") -set(VERSION_MINOR "6") -set(VERSION_PATCH "5") +set(VERSION_MINOR "8") +set(VERSION_PATCH "0") set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}) @@ -362,7 +362,7 @@ if (BUILD_FRAMEWORK) ) endif () -if (NOT CMAKE_VERSION VERSION_LESS 2.8.11) +if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) target_include_directories(freetype PUBLIC $) endif () diff --git a/ChangeLog b/ChangeLog index a8cba88..b81af15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,102 +1,14 @@ -2016-07-12 Werner Lemberg +2017-05-13 Werner Lemberg - * Version 2.6.5 released. - ========================= - - - Tag sources with `VER-2-6-5'. - - * include/freetype/config/ftoption.h - (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out. - - * docs/VERSION.TXT: Add entry for version 2.6.5. - - * 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.4/2.6.5/, s/264/265/. + * Version 2.8 released. + ======================= - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. - * builds/unix/configure.raw (version_info): Set to 18:5:12. - * CMakeLists.txt (VERSION_PATCH): Set to 5. + Tag sources with `VER-2-8'. + * docs/VERSION.TXT: Add entry for version 2.8. * docs/CHANGES: Updated. -2016-07-09 suzuki toshiya - - [mac] Fix ftexport.sym target in Jamfile. - - * Jamfile: Update the directories of the header files scanned for - ftexport.sym. They were incorrect since the migration of the - header files, on 2015-06-22. Either inexisting include/cache - (removed on 2006-03-20) is not needed to be listed explicitly. - Now ftmac.h is scanned only in the case of Mac OS & Mac OS X. - -2016-07-08 Alexei Podtelezhnikov - - [smooth] Sub-banding protocol revision. - - Rasterization sub-banding is utilized at large sizes while using a - rather small fixed memory pool. Indeed it is possible to make an - educated guess how much memory is necessary at a given size for a - given glyph. It turns out that, for a large majority of European - glyphs, you should store about 8 times more boundary pixels than - their height. Or, vice versa, if your memory pool can hold 800 - pixels the band height should be 100 and you should sub-band - anything larger than that. Should you still run out of memory, - FreeType bisects the band but you have wasted some time. This is - what has been implemented in FreeType since the beginning. - - It was overlooked, however, that the top band could grow to twice - the default band size leading to unnecessary memory overflows there. - This commit fixes that. Now the bands are distributed more evenly - and cannot exceed the default size. - - Now the magic number 8 is really suitable for rather simple European - scripts. For complex Chinese logograms the magic number should be - 13 but that is subject for another day. - - * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding - protocol. - -2016-07-07 suzuki toshiya - - [mac] Fix Savannah bug #48417. - - Mac OS X linker throws errors when `-exported_symbol_list' input - file includes non-existing symbols. Reported by Ryan Schmidt. - - * builds/exports.mk: Exclude ftmac.h from the headers for apinames - by default. Include it when ftmac.c would be compiled. - -2016-07-06 Werner Lemberg - - * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused. - -2016-07-05 Werner Lemberg - - * Version 2.6.4 released. - ========================= - - - Tag sources with `VER-2-6-4'. - - * docs/VERSION.TXT: Update documentation and bump version number to - 2.6.4. - * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, @@ -112,5510 +24,4089 @@ 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.3/2.6.4/, s/263/264/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. - - * builds/unix/configure.raw (version_info): Set to 18:4:12. - * CMakeLists.txt (VERSION_PATCH): Set to 4. - - * docs/CHANGES: Updated. - -2016-07-05 Werner Lemberg - - * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning. - -2016-07-04 Alexei Podtelezhnikov - - [smooth] Variable type revision (part 2). - - * src/smooth/ftgrays.c (TArea): Restore original definition as `int'. - (gray_render_line) [FT_LONG64]: Updated. - (gray_convert_glyph): 32-bit band bisection stack should be 32 bands. - (gray_convert_glyph_inner): Trace successes and failures. - -2016-07-04 Werner Lemberg - - [autofit] Handle single-point contours as segments. - - Doing so allows us to link them to edges – some fonts like - `NotoSansGurmukhi-Regular' have such isolated points sitting exactly - on other outlines. - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't - ignore one-point contours but handle them specially as one-point - segments. - (af_latin_hints_compute_edges): Append one-point segments to edges - if possible. - -2016-07-02 Werner Lemberg - - [autofit] Remove unused structure members. - - * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove - `num_linked'. - - * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated. - -2016-07-02 Werner Lemberg - - [autofit] Update to Unicode 9.0.0. - - * src/autofit/afranges.c (af_arab_nonbase_uniranges, - af_cyrl_uniranges): Add new data. + builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/. -2016-07-01 Alexei Podtelezhnikov - - [smooth] Variable type revision (part 1). - - This patch restores original `TCoord' definition as `int' so that the - rendering pool is used more efficiently on LP64 platforms (unix). - - * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some - fields to `TCoord'. - (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline, - gray_sweep, gray_convert_glyph): Updated. - -2016-06-28 Alexei Podtelezhnikov - - [smooth] Minor clean-ups. - - * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'. - (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated. - -2016-06-27 Alexei Podtelezhnikov - - [smooth] Minor clean-ups. - - * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile - qualifier. - (gray_raster_render): Move span initializations from here. - (gray_sweep): ... to here and remove unused `target' argument. - -2016-06-26 Alexei Podtelezhnikov - - [pcf] Fix handling of very large fonts (#47708). - - * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an - unsigned short. - Only reject `0xFFFF' as an invalid encoding offset. - -2016-06-25 Werner Lemberg - - [truetype] Really fix deallocation in case of error (#47726). - - * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize - `outline.points' also. - -2016-06-23 Alexei Podtelezhnikov - - [smooth] Consolidate memory management. - - * src/smooth/ftgrays.c (gray_init_cells): Remove function. - (gray_TWorker): Remove fields that become local variables. - (gray_raster_render): Move rendering buffer declaration from here. - (gray_convert_glyph): ... to here and update accordingly. - -2016-06-22 Alexei Podtelezhnikov - - [smooth] Consolidate boundary checks. - - Removing the checks from `gray_hline' shaves 1% off rendering speed. - - * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'. - (gray_TWorker): No need to store `clip_box'. - (gray_hline): Remove unnecessary boundary checks. - (gray_convert_glyph): Move boundary checks from here. - (gray_raster_render): ... to here and consolidate. - -2016-06-21 Alexei Podtelezhnikov - - [smooth] Use `FT_Outline_Get_CBox'. - - * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'. - (gray_compute_cbox): Remove this function. - (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'. - -2016-06-20 Werner Lemberg - - [smooth] Remove compiler warnings. - - * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang. - -2016-06-20 Alexei Podtelezhnikov - - [smooth] Sanitize memory managenent. - - * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up. - -2016-06-18 Alexei Podtelezhnikov - - [smooth] Remove `band_shoot' that never worked. - - * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'. - (gray_convert_glyph): Updated. - -2016-06-17 Alexei Podtelezhnikov - - [raster, smooth] Handle FT_RENDER_POOL_SIZE better. - - * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro. - (ft_black_render): Updated. - * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro. - (gray_raster_render): Updated. - -2016-06-16 Werner Lemberg + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. + (FREETYPE_PATCH): Set to 0. - * src/base/md5.c: Updated to recent version. + * builds/unix/configure.raw (version_info): Set to 20:0:14. + * CMakeLists.txt (VERSION_MINOR): Set to 8. + (VERSION_PATCH): Set to 0. -2016-06-14 Alexei Podtelezhnikov +2017-05-12 Hin-Tak Leung - * src/smooth/ftgrays.c (gray_hline): Optimize if-condition. + Fix `FT_UINT_TO_POINTER' macro for Windows. -2016-06-13 Werner Lemberg + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: + Fix definition. - [autofit] Add support for Cherokee script. +2017-05-11 Sascha Brawer + Werner Lemberg - - [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files. - - * CMakeLists.txt: Each time cmake is run those files are - modified and the whole FreeType library is recompiled. With this - change we change the files only if there are real modifications, so - we can avoid recompilations. - -2016-06-09 Werner Lemberg - - [bdf] Check number of properties (#48166). - - * src/bdf/bdflib.c (_bdf_parse_start): Implement. + * src/autofit/afscript.h: Add Chakma standard character. -2016-06-08 Alexei Podtelezhnikov + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data. - [smooth] Re-enable new line renderer on 64-bit archs. +2017-05-10 Sascha Brawer + Werner Lemberg - - [smooth] Minor clean-ups. - - * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way. - (gray_render_span): Remove spurious casts and streamline. - -2016-06-07 Werner Lemberg - - [autofit] Add support for Ethiopic script. - - * src/autofit/afblue.dat: Add blue zone data for Ethiopic. + [autofit] Add support for Kayah Li script. + * src/autofit/afblue.dat: Add blue zone data for Kayah Li. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/autofit/afscript.h: Add Ethiopic standard characters. - - * src/autofit/afranges.c: Add Ethiopic data. - - * src/autofit/afstyles.h: Add Ethiopic data. - -2016-06-07 Werner Lemberg - - [autofit] Fix compilation with VS2016 (#48126). - - This compiler doesn't recognize the end-of-comment sequence `*/' if - it immediately follows non-ASCII characters. - - * src/autofit/afscript.h: Ensure whitespace before `*/'. - -2016-06-04 Werner Lemberg - - Fix a test for named instances (#48122). - - This was missed while giving negative face indices an extended - meaning. - - * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement. + * src/autofit/afscript.h: Add Kayah Li standard character. -2016-05-31 Nikolaus Waxweiler + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data. - [truetype] Let SHPIX move points in the twilight zone in v40. +2017-05-10 Sascha Brawer + Werner Lemberg - - [type42] Support `CharStrings' entry format as created by LilyPond. - - * src/type42/t42parse.c (t42_parse_charstrings): Handle entries - having the format - - (foo) cvn 12345 def - -2016-05-28 Werner Lemberg - - * src/autofit/afranges.c: Remove `UL' postfix from hex numbers. - - Suggested by Alexei. `UL' is only needed for 16bit compilers, but - it seems noone is using this anymore (and we no longer test whether - FreeType compiles in such an environment). Otherwise, it is easy to - add the postfix to the `AF_UNICODE_RANGE' macro. - -2016-05-26 Alexei Podtelezhnikov - - [smooth] Shrink bisection stack. - - The convergence of Bézier flatteners is fast with the deviation - from straight line being assymptotically cut 4-fold on each bisection. - This justifies smaller bisection stack size. - - * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'. - (gray_render_conic): Create and use conic `bez_stack'. Move back the - band analysis from... - (gray_conic_to): ... here. - (gray_render_cubic): Create and use cubic `bez_stack'. Move back the - band analysis from... - (gray_cubic_to): ... here. - (gray_move_to): Updated. - -2016-05-25 Werner Lemberg - - [autofit] Fixes for Armenian and Gujarati ranges. - - * src/autofit/afranges.c (af_armn_uniranges): Corrected. - (af_guru_nonbase_uniranges): Make U+0A3E a base character. - -2016-05-24 Werner Lemberg - - [autofit] Add support for Armenian script. - - * src/autofit/afblue.dat: Add blue zone data for Armenian. + [autofit] Add support for Bamum script. + * src/autofit/afblue.dat: Add blue zone data for Bamum. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/autofit/afscript.h: Add Armenian standard characters. - - * src/autofit/afranges.c: Add Armenian data. - - * src/autofit/afstyles.h: Add Armenian data. - -2016-05-23 Werner Lemberg - - * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'. - - This was commented about 10 years ago – I think the reason then to - disable libtool's `-export-symbols' option was to give some badly - programmed applications access to internal FreeType functions. - - I believe that we should no longer take care of such programs; the - number of symbols exported should be rather restricted as much as - possible. - -2016-05-22 Werner Lemberg + * src/autofit/afscript.h: Add Bamum standard character. - [autofit] Add blue-zone support for Gurmukhi script. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data. - This essentially moves the Gurmukhi script from the `Indic' hinter to - the `Latin' hinter. +2017-05-10 Sascha Brawer + Werner Lemberg - - Minor clang++ fixes. - - * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c - (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add - initializer. - - * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit - conversion from NULL to boolean. - -2016-05-21 Werner Lemberg - - Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955). - - * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use - braces for `extern "C++"'. - -2016-05-17 Nikolaus Waxweiler - - [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3]. - - * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with... - (tt_loader_set_pp): ... this new function. - Update all callers. - -2016-05-17 Nikolaus Waxweiler - - [truetype] New implementation of v38 bytecode interpreter [2/3]. - - This patch actually modifies the bytecode interpreter. - - See added comments in `ttinterp.h' for more information on this and - the following commit in the series. - - * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by... - (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY, - SUBPIXEL_HINTING_MINIMAL): ...new macros. - (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards - compatibility. - Updated. - (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD): - Updated. - (Ins_INSTCTRL): Handle native ClearType mode flag. - Updated. - (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards - compatibility. - (Move_Zp2_Point): Ditto. - (Ins_SHP): Updated. - (Ins_SHPIX): Handle backwards compatibility. - Updated. - (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated. - (Ins_ALIGNRP): Updated. - (Ins_IUP, Ins_DELTAP): Handle backwards compatibility. - Updated. - (Ins_GETINFO): Handle v38 flags. - Updated. - (TT_RunIns): Handle backwards compatibility mode. - Updated. - -2016-05-17 Nikolaus Waxweiler - - [truetype] New implementation of v38 bytecode interpreter [1/3]. - - This patch prepares data structures and the like. - - See added comments in `ttinterp.h' for more information on this and - the following commits in the series. - - * devel/ftoption.h, include/freetype/config/ftoption.h - (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate - between subpixel versions. - (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY, - TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros. - - * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro. - - * include/freetype/internal/tttypes.h (TT_FaceRec): Updated. - - * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields - `subpixel_hinting_lean', `vertical_lcd_lean', - `backwards_compatibility', `iupx_called', iupy_called', and - `grayscale_cleartype' for new hinting mode. - - * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40 - interpreters conditionally. - - * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless - in v38 backwards compatibility mode. - Updated. - (compute_glyph_metrics): Add v38 backwards compatibility mode - constraint for adjusting advance widths. - Updated. - (tt_loader_init): Handle new flags `subpixel_hinting_lean', - `grayscale_cleartype', and `vertical_lcd_lean'. - Updated. - (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP): - Updated. - - * src/truetype/ttobjs.c (tt_driver_init): Conditionally set - default interpreter version number. - - * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated. - -2016-05-17 Werner Lemberg - - [cff] Fix matrix scaling (#47848). - - * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro. - - * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling - value of all matrix coefficients to scale matrix. - - * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for - matrix normalization if `matrix->yy' is zero. - -2016-05-16 Werner Lemberg - - [base] Reject invalid sfnt Mac resource (#47891). - - * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity - of `CID ' and `TYPE1' table offset and length. - -2016-05-16 Werner Lemberg - - [cid] Fix scanning for `StartData' and `/sfnts' (#47892). - - * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN): - New macros. - (cid_parser_new): Fix and document algorithm. - -2016-05-16 suzuki toshiya - - [truetype] Improve the recursive reference detector. - - The previous fix for #46372 misunderstood a composite glyph referring - same component twice as a recursive reference. See the discussion - - http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html - - Thanks to Khaled Hosny for finding this issue. - - * src/truetype/ttgload.c (ft_list_get_node_at): A function to get - the i-th node from FT_List. - (load_truetype_glyph): In the traversal scan of the reference tree - in the composite glyph, we clear the nodes filled by previous - sibling chain. - -2016-05-07 Werner Lemberg - - [cache] Allow value 0 for face ID. - - We never dereference `face_id', and some implementations might use a - running number instead of a pointer. Additionally, disallowing - value zero was undocumented. - - * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c - (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for - `face_id'. - -2016-05-05 Alexei Podtelezhnikov - - [smooth] More efficient accounting of conic splits and draws. - - A single decrement counter of segments to draw, instead of an array, - contains all the information necessary to decide when to split and - when to draw a conic segment. The number of splits before each draw is - equal to the number of trailing zeros in the counter. - - * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'. - (gray_render_conic): Updated to use decrement counter of segments. - -2016-05-05 Werner Lemberg - - [cff, truetype] Fix logic for `FT_Property_Set'. - - Otherwise some properties could be set to arbitrary values, which is - harmless, but querying could give wrong positive results. + * src/autofit/afscript.h: Add Saurashtra standard character. - * src/cff/cffdrivr.c (cff_property_set) [hinting-engine], - * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]: - Only allow defined values. - -2016-04-25 Werner Lemberg - - [autofit] Add blue-zone support for Gujarati script. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra + data. - This essentially moves the Gujarati script from the `Indic' hinter to - the `Latin' hinter. +2017-05-10 Sascha Brawer + Werner Lemberg - - Minor. - - * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro - argument with parentheses. - -2016-04-24 Werner Lemberg - - [truetype] Fix deallocation in case of error (#47726). - - * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in - `outline' that are going to be deallocated in case of error. - -2016-04-23 Werner Lemberg - - [autofit] Improve Georgian blue zone characters. + * src/autofit/afscript.h: Add Buhid standard character. - Suggested by Akaki Razmadze . + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data. - * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM): - Updated. - - * src/autofit/afblue.c: Regenerated. +2017-05-08 Sascha Brawer + Werner Lemberg + [autofit] Add support for Shavian script. - [cmake] Honor SKIP_INSTALL_* settings (as used in zlib). - - As FreeType depends on zlib, if we don't install zlib (e.g., because - we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too - (cmake triggers an error saying that FreeType cannot be installed - because zlib target isn't in the export set). + * src/autofit/afblue.dat: Add blue zone data for Shavian. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS', - `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings. + * src/autofit/afscript.h: Add Shavian standard character. -2016-04-16 Behdad Esfahbod + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data. - [truetype] Another fix for non-intermediate GX tuples. +2017-05-08 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Vai. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - Remove forgotten macro. + * src/autofit/afscript.h: Add Vai standard character. - * include/freetype/internal/internal.h - [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data. -2016-04-09 Werner Lemberg +2017-05-08 Sascha Brawer + Werner Lemberg + Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data. - [autofit] Provide dummy blue zone for pseudo script `none'. +2017-05-08 Sascha Brawer + Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data. - * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567). +2017-05-07 Werner Lemberg -2016-03-30 Werner Lemberg + [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). - * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate. + Reported by Roy Tam . -2016-03-30 Werner Lemberg + * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. - * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567). - -2016-03-29 Werner Lemberg +2017-05-07 Roy Tam + Werner Lemberg - * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift. + [truetype] More tricky fonts (mainly from Dynalab). -2016-03-29 Werner Lemberg + * src/truetype/ttobjs.c (tt_check_trickyness_family, + tt_check_trickyness_sfnt_ids): Add them. - [pfr] Fix binary search (#47514). +2017-05-07 Werner Lemberg - * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border - conditions correctly. + [truetype] Add tricky font `DLCHayMedium' (from Dynalab). -2016-03-29 Werner Lemberg + Reported by Roy Tam . - [pfr] Minor. + * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. - * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left', - `right', and `middle' with `min', `max', and `mid' as used in other - FreeType binary search code. - (pfr_load_bitmap_metrics): Fix invalid left shift. +2017-05-03 Werner Lemberg -2016-03-29 Werner Lemberg + */*: s/backwards compatibility/backward compatibility/. - * src/pfr/pfrtypes.h: Replace all enums with macros. +2017-05-03 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Unified Canadian + Syllabics. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [pfr] Robustify bitmap strike handling (#47514). + * src/autofit/afscript.h: Add Unified Canadian Syllabics standard + character. - We did a binary search for a charcode without ensuring that the - searched data is ordered. Validating the order is now done lazily, - this is, the first access to a bitmap glyph triggers the order check - in the corresponding bitmap strike. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified + Canadian Syllabics data. - * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values - `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'. +2017-05-03 Sascha Brawer + Werner Lemberg - * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument - a pointer. Handle new PFR_BITMAP_XXX flags. - (pfr_slot_load_bitmap): Updated. + [autofit] Add blue-zone support for Sundanese script. -2016-03-26 Werner Lemberg + This essentially moves the Sundanese script from the `Indic' hinter + to the `Latin' hinter. - [pfr] Fix handling of compound glyphs. + * src/autofit/afblue.dat: Add blue zone data for Sundanese. - Extra items are indicated with different bit positions. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace - `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and - `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'. + * src/autofit/afscript.h: Add Sundanese standard character and move + data out of AF_CONFIG_OPTION_INDIC block. - * src/pfr/pfrgload.c (pfr_glyph_load_simple, - pfr_glyph_load_compound): Use them. - -2016-03-25 Werner Lemberg - - [pfr] Minor. - - * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of - bare numbers. - -2016-03-25 Werner Lemberg - - [pfr] Various clang sanitizer fixes. - - * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle - signed nibbles. - (pfr_slot_load_bitmap): Correctly exit frame in case of error. - Fix invalid left shifts. - -2016-03-23 Werner Lemberg - - Rename `VERSION.DLL' (#47472). - - * docs/VERSION.DLL: Renamed to... - * docs/VERSIONS.TXT: ...this. - -2016-03-23 Werner Lemberg - - [raster, smooth] Directly test outline size (#47500). - - This improves stand-alone compilation. - - * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to... - - * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c - (gray_raster_render): ...these functions. - -2016-03-23 Werner Lemberg - - [raster, smooth] Fix some clang sanitizer runtime issues. - - * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode, - ft_black_render): Harmonize signatures with `ftimage.h'. - - * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset): - Ditto. - -2016-03-22 Werner Lemberg - - * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor. - - This fixes an AddressSanitizer issue: - - ttgload.c:430:7: runtime error: null pointer passed as argument 1, - which is declared to never be null - -2016-03-21 Werner Lemberg - - * src/autofit/afhints.c (af_glyph_hints_reload): Thinko. - - This fixes the previous commit to this file. - -2016-03-21 Alexei Podtelezhnikov - - [smooth] Partly revert recent changes. - - * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework - conditions to fix rendering issues. - -2016-03-20 Werner Lemberg - - [autofit] Show `near' points in tracing. - - * src/autofit/afhints.h (AF_FLAG_NEAR): New macro. - - * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it. - (af_glyph_hints_reload): Handle AF_FLAG_NEAR. - -2016-03-18 Alexei Podtelezhnikov - - [smooth] Minor refactoring and microoptimizations. - - * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move - band clipping from here. - (gray_conic_to, gray_cubic_to): ... to here. - (gray_rander_line, gray_render_scanline): Initialize variables closer - to their use. - -2016-03-17 Alexei Podtelezhnikov - - [smooth] Minor refactoring. - - * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move - upscaling from here. - (gray_conic_to, gray_cubic_to): ... to here. - -2016-03-15 Werner Lemberg - - * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize. - -2016-03-14 Alexei Podtelezhnikov - - [smooth] Temporarily revert 6eb6158dd787 (#47114). - - * src/smooth/ftgrays.c (gray_render_line): Old implementation. - -2016-03-12 Werner Lemberg - - [ftfuzzer] Improve coverage of rasterfuzzer. - - * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use - input data for `tags' array also. - Trim input data to get more positive hits. - -2016-03-11 Pavlo Denysov - - Fix CMake issues for iOS (patch #8941). - - * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory. - * builds/cmake/iOS.cmake: No longer enforce gcc. - -2016-03-09 Behdad Esfahbod - - [truetype] Fix handling of non-intermediate GX tuples. - - We probably did not notice this as all fonts we tested had only - tuple_coords[i] be +1 or -1 for non-intermediate tuples. - - * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it. - -2016-03-06 Alexei Podtelezhnikov - - [base] Refuse to render enormous outlines (#47114). - - The goal is to avoid integer overflows in the rendering algorithms. - The limit is chosen arbitrarily at some 2^18 pixels, which should be - enough for modern devices including printers. - - * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject - enormous outlines. - -2016-03-06 Alexei Podtelezhnikov - - [smooth] Replace left shifts with multiplications (#47114). - - * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it. - -2016-03-05 Werner Lemberg - - [autofit] Avoid excessive stem length rounding (#25392). - - * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument - to pass difference between hinted and unhinted position of base - point; use this to adjust the stem width depending on the PPEM so - that it doesn't become too large under certain circumstances. - Update all callers using value 0 for this argument except... - (af_latin_align_linked_edge): Pass position delta of base point to - `af_latin_compute_stem_width'. - -2016-03-05 J Raynor - - Make FreeType compile on AIX out of the box. - - * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on - AIX. - -2016-03-01 Werner Lemberg - Kostya Serebryany - - [ftfuzzer] Add unit for testing smooth and black rasterizers. - - * src/tools/ftfuzzer/rasterfuzzer.cc: New file. - -2016-03-01 Werner Lemberg - - [autofit] Fix reallocation error introduced in 2016-02-27 (#47310). - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign - `prev_segment' after reallocation. - -2016-03-01 Werner Lemberg - - Fix clang warnings. - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use - FT_UShort for `min_flags' and `max_flags'. - Initialize `prev_*' variables. - - * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix - types of local variables. - - * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]: - Update `printf' format string. - - * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast. - (LLVMFuzzerTestOneInput): Fix loop type. - -2016-02-29 Werner Lemberg - - [autofit] Add blue-zone support for Sinhala script. - - This essentially moves the Sinhala script from the `Indic' hinter to - the `Latin' hinter. - - * src/autofit/afblue.dat: Add blue zone data for Sinhala. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Sinhala standard character and move data - out of AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afranges.c: Move Sinhala data out of - AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afstyles.h: Update Sinhala data; in particular, use - AF_WRITING_SYSTEM_LATIN. - -2016-02-27 Werner Lemberg - - [autofit] Properly handle spikes pointing to the x-axis. - - An example that gets better rendered is glyph `uusignTaml' (glyph - index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem. - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly - handle segments where the last point of the first segment is - identical to the first point in the second one. This can happen for - malformed fonts or spikes. We either merge the new segment with the - previous one (both segments point into the same direction), or we - discard the shorter segment if they point into different directions. - -2016-02-27 Werner Lemberg - - [autofit] Minor code clean-up. - - * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change - some local variable names to better differentiate between values - along a segment and values orthogonal to it. - -2016-02-26 Werner Lemberg - - [autofit] Improve BOUND action. - - In complex glyph shapes, the original logic was too simple to cater - for situations that would actually need something similar to PS Hint - masks. This fix should alleviate the worst cases. - - * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow - complete disappearance of stems. - -2016-02-25 Werner Lemberg - - [autofit] Add blue-zone support for Tamil script. - - This essentially moves the Tamil script from the `Indic' hinter to - the `Latin' hinter. - - * src/autofit/afblue.dat: Add blue zone data for Tamil. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Tamil standard character and move data - out of AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afranges.c: Move Tamil data out of - AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afstyles.h: Update Tamil data; in particular, use - AF_WRITING_SYSTEM_LATIN. - -2016-02-18 Werner Lemberg - - [autofit] Add blue-zone support for Malayalam script. - - This essentially moves the Malayalam script from the `Indic' hinter - to the `Latin' hinter. - - * src/autofit/afblue.dat: Add blue zone data for Malayalam. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Malayalam standard characters and move - data out of AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afranges.c: Move Malayalam data out of - AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afstyles.h: Update Malayalam data; in particular, use - AF_WRITING_SYSTEM_LATIN. - -2016-02-16 Alexei Podtelezhnikov - - [smooth] Fix integer overflow (#47114). - - * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'. - -2016-02-15 Werner Lemberg - - * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing. - -2016-02-15 Werner Lemberg - - [cff] Handle T2 operator only with old CFF engine (#47157). - - * src/cff/cffparse.c (cff_parser_run) : Enclose with - #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif. - -2016-02-15 Werner Lemberg - - [cff] Partially handle `load' and `store' ops in old CFF engine. - - Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be - displayed. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) : Partially implement it. - - * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass - the number of Multiple Master axes. - Update all callers. - (cff_parse_multiple_master): Get number of axes. - (cff_parser_run) : Updated. - * src/cff/cffparse.h: Updated. - (CFF_ParserRec): Add `num_axes' field. - - * src/cff/cffload.c: Updated. - - * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field. - -2016-02-15 Werner Lemberg - - [cff] Correctly trace SIDs that contain NULL bytes. - - We need this to properly trace Multiple Master CFFs, which contain - two SIDs that are charstrings. - - This commit makes FreeType also show the last SID, omitted - previously due to a bug. - - * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field. - - * src/cff/cffload.c (cff_index_get_pointers): Add argument to return - the pool size. - Update all callers. - - * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly - access `cff->strings' to display the non-default strings. - -2016-02-14 Werner Lemberg - - * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H. - -2016-02-14 Werner Lemberg - - * src/cff/cffparse.c: Include `cffgload.h'. - - Problem reported by Colin Walters . - -2016-02-14 Werner Lemberg - - [cff] Make old CFF engine show MM CFFs (without variations). - - The new code only displays the first master in the font. - - * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new - parameter to allow function calls from dictionaries also. - : Partially implement it. - Update all callers. - * src/cff/cffgload.h: Updated. - - * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the - number of Multiple Master designs. - Update all callers. - (cff_parse_multiple_master): New function to rudimentarily parse - operator. - (cff_parser_run): Handle `T2' operator. - * src/cff/cffparse.h: Updated. - (CFF_ParserRec): Add `num_designs' field. - - * src/cff/cffload.c: Updated. - - * src/cff/cfftoken.h: Handle `MultipleMaster' operator. - - * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field. - - * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for - MM CFFs. - -2016-02-09 Werner Lemberg - - [docmaker] Don't emit trailing newlines. - - * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code): - Use `rstrip'. - -2016-02-07 Werner Lemberg - - * Version 2.6.3 released. - ========================= - - - Tag sources with `VER-2-6-3'. - - * docs/VERSION.DLL: Update documentation and bump version number to - 2.6.3. - - * 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.2/2.6.3/, s/262/263/. - - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. - - * builds/unix/configure.raw (version_info): Set to 18:3:12. - * CMakeLists.txt (VERSION_PATCH): Set to 3. - - * docs/CHANGES: Updated. - -2016-02-07 Werner Lemberg - - Fix another runtime error found by clang's sanitizer (#47082). - - * src/base/ftstroke.c (ft_stroke_border_export): Properly handle - empty input buffer. - -2016-02-07 Werner Lemberg - - Fix runtime errors found by clang's sanitizer (#47082). - - * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c - (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): - Properly handle empty input buffer. - -2016-02-07 Werner Lemberg - - [cff] Minor. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings) : - Remove dead code. - -2016-02-07 Werner Lemberg - - [cff] Implement missing operators in new engine (except `random'). - - * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro. - - * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the - following operators: abs, add, and, div, drop, dup, eq, exch, get, - ifelse, index, mul, neg, not, or, put, roll, sqrt, sub. - - * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New - auxiliary function for `roll' operator. - -2016-02-06 Werner Lemberg - - [cff] Fix some Type 2 operators in old CFF engine. - - * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq' - operator, add `not' and (unsupported) `blend' operators. - -2016-02-05 Sebastian Rasmussen - - Make direct call of `make install' work (#47072). - - * builds/unix/unix-def.in (freetype-config): Make sure - `freetype-config' is generated for both make targets (`all' and - `install'). - -2016-02-05 Werner Lemberg - - [base] Fix advance width loading for MM and GX fonts (#47064). - - * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for - MM and GX fonts. - Update callers. - -2016-02-03 Werner Lemberg - - [cff] Fix handling of face_index == -1 for pure CFF. - - * src/cff/cffobjs.c (cff_face_init): Return correct number of faces. - -2016-01-30 Werner Lemberg - - [autofit] Minor tracing improvement. - - * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline - at the start of a new contour. - -2016-01-28 Nikolaus Waxweiler - - Remove unpatented hinter (3/3). - - * include/freetype/config/ftoption.h - (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. - - * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove - `ignore_unpatented_hinter' field. - Update users. - (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove. - Update users. - - * include/freetype/internal/tttypes.h (TT_FaceRec): Remove - `unpatented_hinting' field. - Update users. - - * src/base/ftpatent.c (_tt_check_patents_in_range, - _tt_check_patents_in_table, _tt_face_check_patents): Remove. - (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting): - Replace code with dummies. - - * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code. - * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis' - field. - -2016-01-28 Nikolaus Waxweiler - - Remove unpatented hinter (2/3). - - * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. - -2016-01-28 Nikolaus Waxweiler - - Remove unpatented hinter (1/3). - - * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]: - Remove all code related to this macro. - -2016-01-28 Werner Lemberg - - [autofit] Add blue-zone support for Kannada script. - - This essentially moves the Kannada script from the `Indic' hinter to - the `Latin' hinter. - - * src/autofit/afblue.dat: Add blue zone data for Kannada. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Kannada standard characters and move - data out of AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afranges.c: Move Kannada data out of - AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afstyles.h: Update Kannada data; in particular, use - AF_WRITING_SYSTEM_LATIN. - -2016-01-22 Alexei Podtelezhnikov - - Better access to 64-bit integers for C99 compilers. - - * include/freetype/config/ftconfig.h [FT_LONG64]: Use - __STDC_VERSION__ to define 64-bit integers. - * builds/unix/ftconfig.in [FT_LONG64]: Ditto. - * builds/vms/ftconfig.h [FT_LONG64]: Ditto. - -2016-01-21 Werner Lemberg - - [gxvalid] Remove commented out code. - - * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it. - -2016-01-20 Werner Lemberg - - [autofit] Complete last autofit commit. - - Problem reported by Kostya Serebryany . - - * src/autofit/afshaper.c (af_shaper_get_coverage) - [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature. - -2016-01-20 Werner Lemberg - - Still handle `__FTERRORS_H__'. - - We need this for backwards compatibility. - - Problem reported by John Emmas . - - * include/freetype/fterrors.h: Fix inclusion guard so that - undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as - expected. - -2016-01-19 Werner Lemberg - - [autofit] Fix handling of default script. - - Patch taken from ttfautohint, commit - 071ae2c00e0d67f9d19418f4fade1c23d27dc185. - - There were two bugs. - - - We now use non-standard script tags like `khms' for special - purposes. However, HarfBuzz maps such tags to `DFLT', and - without this commit the associated lookups were incorrectly - assigned to the non-standard tags. - - - Let's assume we have a Bengali font, and the font's `DFLT' - script tag handles the necessary lookups for Bengali, too. - Without this commit, the `DFLT' lookups were assigned to - ttfautohint's default script (usually `latn') before the - standard lookups for Bengali were handled. - - We now have the following order while searching for covered - glyph indices. - - special features of scripts (e.g. `sups' for Cyrillic) - Unicode mappings of scripts - remaining features of scripts (especially important for Indic - scripts) - default features of default script - - * src/autofit/afshaper.c, src/autofit/afshaper.h - (af_shaper_get_coverage): Add boolean parameter to indicate default - script. - Update all callers. - - * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): - Fix search order for coverages. - -2016-01-19 Werner Lemberg - - Various minor clang fixes. - - * src/autofit/afcjk.c (af_cjk_metrics_init_widths), - src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize - `ch'. - - * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast. - - * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast. - - * src/base/fthash.c (hash_num_lookup): Add cast. - - * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast. - - * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out - redundant code. - - * src/type1/t1driver.c (t1_get_ps_font_value) : Add - cast. - - * src/type1/t1load.c (parse_subrs): Fix type of `count'. - -2016-01-19 Derek B. Noonburg - - [truetype] Add another tricky font. - - * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase. - (sfnt_id): Add variant of `DFKaiShu'. - -2016-01-14 Alexei Podtelezhnikov - - [base] Empower `FT_Library_SetLcdFilterWeights'. - - * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter - in addition to setting weights. - (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and - FT_FORCE_LEGACY_LCD_FILTER. - * include/freetype/ftlcdfil.h: Documentation update. - -2016-01-12 Werner Lemberg - - Don't use macro names that start with `_[A-Z]' [3/3]. - - Such macro names are reserved for both C and C++. - - * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/. - Update all callers. - (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'. - * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto. - -2016-01-12 Werner Lemberg - - Don't use macro names that start with `_[A-Z]' [2/3]. - - Such macro names are reserved for both C and C++. - - * include/freetype/ftimage.h, src/raster/ftraster.c, - src/smooth/ftgrays.c, src/smooth/ftgrays.h: - s/_STANDALONE_/STANDALONE_/. - -2016-01-12 Werner Lemberg - - Don't use macro names that start with `_[A-Z]' [1/3]. - - Such macro names are reserved for both C and C++. - - * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with - `BDF_XXX_'. - -2016-01-12 Werner Lemberg - - Don't use macro names that contain `__' [2/2]. - - Such macro names are reserved for both C and C++. - - * src/cache/*: s/__/_/. - -2016-01-12 Werner Lemberg - - Don't use macro names that contain `__' [1/2]. - - Such macro names are reserved for both C and C++. - - * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'. - -2016-01-10 Jered Gray - - [cff] Fix usage of `|' operator. - - * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR, - default]: `|' is not guaranteed to be processed from left to right - by the compiler. However, the code repeatedly calls - `cf2_buf_readByte' to get the arguments to `|' ... Fix this. - -2015-12-25 Werner Lemberg - - [autofit] Make top-to-bottom hinting work in latin auto-hinter. - - This improves rendering of scripts like Bengali or Devanagari. - - * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to - pass top-to-bottom hinting flag. This makes the function sort edges - in descending vertical position. - - * src/autofit/afhints.c: Updated. - - * src/autofit/aflatin.c (af_latin_hints_compute_edges, - af_latin_hint_edges): Use `top_to_bottom_hinting' flag. - - * src/autofit/afcjk.c (af_cjk_hints_compute_edges), - src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated. - -2015-12-24 Werner Lemberg - - [autofit] Add hinting direction to `AF_ScriptClassRec'. - - Still unused. - - * src/autofit/afglobal.c (SCRIPT): Handle hinting direction. - - * src/autofit/aftypes.h (AF_ScriptClassRec): Add - `top_to_bottom_hinting' field. - (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros. - (AF_DEFINE_SCRIPT_CLASS): Updated. - -2015-12-23 Werner Lemberg - - [autofit] Start implementing hinting direction (up/down, down/up). - - Right now, it does nothing. - - * src/autofit/afscript.h: Add another parameter to `SCRIPT', - specifying hinting direction. - - * src/autofit/afglobal.c, src/autofit/afglobal.h, - src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c, - src/autofit/aftypes.h: Extend `SCRIPT' definitions. - -2015-12-22 Werner Lemberg - - * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744). - -2015-12-22 Werner Lemberg - - [base] Make hash interface symmetric. - - Use `num' and `str' infixes everywhere. - - * src/base/fthash.c (ft_hash_init): Renamed to... - (hash_init): ... This. - (ft_hash_str_init, ft_hash_num_init): New functions. - (ft_hash_free): Renamed to... - (ft_hash_str_free): ... This. - - * include/freetype/internal/fthash.h: Updated. - - * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated. - -2015-12-21 Werner Lemberg - - [type1] Avoid shift of negative numbers (#46732). - - * src/type1/t1load.c (parse_subrs): Do it. - -2015-12-20 Werner Lemberg - - [type1, psaux] Handle large values of num_subrs correctly (#46692). - - We now use a hash to map from subr indices to array elements holding - the subroutines, if necessary. - - * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H. - (T1_FontRec): Add `subrs_hash' field. - - * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H. - (T1_DecoderRec): Add `subrs_hash' field. - - * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field. - - * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H. - (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary. - - * src/type1/t1load.c: Include FT_INTERNAL_HASH_H. - (parse_subrs): Use hash for subr indices that exceed the allocated - number of subr slots. - (t1_init_loader): Remove unnecessary code. - (t1_done_loader, T1_Open_Face): Updated. - - * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances, - T1_Load_Glyph): Updated. - - * src/type1/t1objs.c (T1_Face_Done): Updated. - - * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H. - (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if - necessary. - - * src/cid/cidgload.c (cid_load_glyph): Updated. - -2015-12-20 Werner Lemberg - - [base] Thinko: Remove free function pointer. - - We don't copy keys or values while hashing. - - * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed. - (FT_HashRec): Remove `free' field. - - * src/base/fthash.c (hash_str_free): Removed. - (ft_hash_init, ft_hash_free): Updated. - -2015-12-20 Werner Lemberg - - [base, bdf] Don't expose `FT_Hashnode' in hash functions. - - * src/base/fthash.c (hash_lookup, ft_hash_str_lookup, - ft_hash_num_lookup): Return pointer to `size_t' instead of - `FT_Hashnode'. - - * include/freetype/internal/fthash.h: Updated. - - * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property, - bdf_get_font_property): Updated. - -2015-12-20 Werner Lemberg - - [base, bdf] Add number hashing. - - * src/base/fthash.c (hash_num_lookup, hash_num_compare): New - functions. - (ft_hash_init): Add argument to select between number and string - hashing. - (ft_hash_num_insert, ft_hash_num_lookup): New functions. - - * include/freetype/internal/fthash.h: Updated. - - * src/bdf/bdflib.c (_bdf_parse_start): Updated. - -2015-12-20 Werner Lemberg - - [base] Introduce hash lookup, compare, and free function pointers. - - * include/freetype/internal/fthash.c (FT_Hash_LookupFunc, - FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs. - (FT_HashRec): Add `lookup', `compare', and `free' fields. - - * src/base/fthash.c (hash_str_lookup, hash_str_compare, - hash_str_free): New functions. - (ft_hash_init): Set function pointers. - (hash_bucket, ft_hash_free): Use them. - -2015-12-20 Werner Lemberg - - [base, bdf] Use a union as a hash key. - - We want to support both an integer and a string key later on. - - * include/freetype/internal/fthash.h (FT_Hashkey): New union. - (FT_HashnodeRec): Updated. - (ft_hash_insert, ft_hash_lookup): Renamed to ... - (ft_hash_str_insert, ft_hash_str_lookup): ... this. - - * src/base/fthash.c (hash_bucket): Updated. - (ft_hash_insert, ft_hash_lookup): Renamed to ... - (hash_insert, hash_lookup): ... this. - (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions. - - * src/bdf/bdflib.c: Updated. - -2015-12-19 Werner Lemberg - - [bdf] Use new hash functions. - - * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H. - (hashnode, hashtable): Removed. - (bdf_font_t): Use `FT_HashRec' type for `proptbl'. - - * src/bdf/bdflib.c: Remove all hash functions. - Update code for new hash structure and function names. - -2015-12-19 Werner Lemberg - - [bdf, base] Lift hash functions from bdf driver to base module. - - * src/base/fthash.c, include/freetype/internal/fthash.h: New files, - containing (massaged) code from `bdflib.c' and `bdf.h'. - - * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New - macro. - - * src/base/ftbase.c: Include `fthash.c'. - - * src/base/Jamfile (_sources): Add `fthash'. - - * src/base/rules.mk (BASE_SRC): Add `fthash.c'. - - * docs/LICENSE.TXT: Updated. - -2015-12-15 Werner Lemberg - - [autofit] Add blue-zone support for Bengali script. - - This essentially moves the Bengali script from the `Indic' hinter to - the `Latin' hinter. - - * src/autofit/afblue.dat: Add blue zone data for Bengali. - - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - - * src/autofit/afscript.h: Add Bengali standard characters and move - data out of AF_CONFIG_OPTION_INDIC block. - - * src/autofit/afranges.c: Move Bengali data out of + * src/autofit/afranges.c: Move Sundanese data out of AF_CONFIG_OPTION_INDIC block. - * src/autofit/afstyles.h: Update Bengali data; in particular, use - AF_WRITING_SYSTEM_LATIN. - -2015-12-14 Ben Wagner - - [bdf] Remove dead code (#46625). - - The BDF specification only allows decimal numbers, no octal or - hexadecimal decoding is needed. - - * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, - _bdf_atos): Remove unused code and parameters. - Update all callers. - (odigits): Remove. - -2015-12-14 Werner Lemberg - - [base] Fix calls to `FT_Stream_Seek'. - - * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set - `error'. + * src/autofit/afstyles.h: Update Sundanese data; in particular, use + AF_WRITING_SYSTEM_LATIN. -2015-12-14 Ben Wagner +2017-05-03 Sascha Brawer + Werner Lemberg + * src/autofit/afscript.h: Add Avestan standard character. - [autofit] Add support for Myanmar script. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data. - * src/autofit/afblue.dat: Add blue zone data for Myanmar. +2017-05-02 Behdad Esfahbod - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). - * src/autofit/afscript.h: Add Myanmar standard characters. + When points are not touched by gvar interpolation deltas, FreeType + gave a slightly different result than Apple's CoreText. - * src/autofit/afranges.c: Add Myanmar data. + The OpenType working group will update the specification to document + the following behaviour: If the two points with deltas to the `left' + and `right' of the untouched point have the same coordinate, then + the inferred delta for the untouched point should be zero. - * src/autofit/afstyles.h: Add Myanmar data. + * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new + behaviour. -2015-12-12 Werner Lemberg +2017-05-02 Werner Lemberg - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor. + [autofit] Remove `slight' auto-hint mode again. -2015-12-12 Werner Lemberg + A poll on freetype-devel favoured changes directly applied to + `light'. - * src/autofit/afscript.h: Avoid potential crash. + * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, + FT_RENDER_MODE_SLIGHT): Removed. -2015-12-10 Werner Lemberg + * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c + (af_latin_hints_init), src/autofit/aflatin2.c + (af_latin2_hints_init): Revert change from 2017-04-22. - [autofit] Restore OpenType feature check. + * src/autofit/afloader.c (af_loader_load_glyph) Remove references to + FT_RENDER_MODE_SLIGHT. + [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics + unconditionally. - This was removed while rewriting the HarfBuzz interface. + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from + 2017-04-22. - * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to - hold internal HarfBuzz buffer, needed for feature comparison. + * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. - * src/autofit/afglobal.c (af_face_globals_new, - af_face_globals_free): Initialize and destroy `hb_buf'. + * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from + 2017-04-22. - * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character - (cluster) with and without applied feature. + * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from + 2017-04-22. - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing - message. + * docs/CHANGES: Updated. -2015-12-10 Werner Lemberg +2017-04-30 Werner Lemberg - [autofit] Remove redundant code. + [autofit] Fix metrics computation. - * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it. + Problem reported by Markus Trippelsdorf and + Nikolaus Waxweiler . -2015-12-09 Werner Lemberg + * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of + auto-hinter metrics. Without this change, multiple size changing + calls for a single face fail. - [autofit] Thinko. +2017-04-29 Werner Lemberg - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count - empty blue zones (bug introduced 2015-12-06). + * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. -2015-12-09 Werner Lemberg + Reported by Earnestly in - [autofit] Introduce subscript top blue zones. + http://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html - This feature is mainly for Khmer: The idea is to avoid a clash - between the top of subscript glyphs and the bottom of normal - baseline glyphs. +2017-04-27 Werner Lemberg - This only works for character clusters mapped to multiple glyphs. + Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. - * src/autofit/afblue.dat: Add subscript top blue zone for Khmer. + * include/freetype/config/ftoption.h + (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by + default. - * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New - macro. + * src/autofit/afloader.c (af_loader_load_glyph): Use + AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2017-04-26 Werner Lemberg - * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE, - AF_LATIN_BLUE_SUB_TOP): New macros. + * include/freetype/freetype.h (FT_Render_Mode): Fix order. - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new - blue zone property. - Update tracing messages. - (af_latin_metrics_scale_dim): Handle new blue zone property. - (af_latin_hints_compute_blue_edges): Updated. + This retains backward compatibility. -2015-12-09 Werner Lemberg + Noted by Alexei. - [autofit] Fix tracing message. +2017-04-22 Werner Lemberg - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display - inactive blue zones also. + [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). -2015-12-06 Werner Lemberg + * src/truetype/ttobs.h (TT_SizeRec): Add field `hinted_metrics' to + hold hinted metrics. + Make `metrics' a pointer so that `tt_glyph_load' can easily switch + between metrics. - * src/autofit/afblue.dat: Add more Khmer clusters. + * src/truetype/ttdriver.c (tt_size_request): Updated. + (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is + used. - Some fonts have incorrect ligatures; we need more samples to get a - good mean value. + * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, + TT_Process_Composite_Component, load_truetype_glyph, + compute_glyph_metrics, TT_Load_Glyph): Updated. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * src/truetype/ttinterp.c (TT_Load_Context): Updated. -2015-12-06 Werner Lemberg + * src/truetype/ttobjs.c (tt_size_reset): Updated. - [autofit] Typos. + * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. - * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem) - [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile. +2017-04-22 Werner Lemberg -2015-12-06 Werner Lemberg + Add new `slight' auto-hinting mode. - [autofit] Add support for Khmer script. + This mode uses fractional advance widths and doesn't scale glyphs + horizontally, only applying vertical scaling and hinting. - We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and - `Khmer symbols' (`khms', U+19E0-U+19FF). + At the same time, the behaviour of the `light' auto-hinter gets + restored for backward compatibility: Both vertical and horizontal + scaling is again based on rounded metrics values (this was changed + in a commit from 2017-03-30 as a side effect). To be more precise, + the behaviour is restored for TrueType fonts only; for other font + formats like Type 1, this is a new feature of the `light' hinting + mode. - * src/autofit/afblue.dat: Add blue zone data for Khmer. + * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. + (FT_RENDER_MODE_SLIGHT): New render mode. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add + `autohint_mode' and `autohint_metrics' fields. - * src/autofit/afscript.h: Add Khmer standard characters. + * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c + (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): + Updated. - * src/autofit/afranges.c: Add Khmer data. + * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use + `autohint_metrics'. + (af_loader_load_glyph): s/internal/slot_internal/. + Initialize `autohint_metrics' and `autohint_mode' depending on + current auto-hint mode. + Use `autohint_metrics'. + Updated. - * src/autofit/afstyles.h: Add Khmer data. + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. -2015-12-06 Werner Lemberg + * src/base/ftobjs.c (FT_Load_Glyph): Updated. + (FT_New_Size): Allocate `internal' object. - [autofit] Rewrite HarfBuzz interface to support character clusters. + * src/pshinter/pshalgo.c (ps_hints_apply): Updated. - Scripts like Khmer have blue zones that can't be directly - represented by Unicode characters. Instead, it is necessary to let - HarfBuzz convert character clusters into proper glyph representation - forms, then deriving the blue zone information from the resulting - glyphs. + * src/smooth/ftsmooth.c (ft_smooth_render): Updated. - * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by... - * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new - files, providing a new API to access HarfBuzz. +2017-04-22 Werner Lemberg - The new API manages a HarfBuzz buffer with `af_shaper_buf_create' - and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded - string with function `af_shaper_get_cluster', and the resulting - glyph data (indices, advance widths, vertical offsets) can be - iteratively accessed with function `af_shaper_get_elem'. + Introduce `FT_Size_InternalRec' structure. - * src/autofit/afcjk.c (af_cjk_metrics_init_widths, - af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. + We are going to extend this later on. - * src/autofit/aflatin.c (af_latin_metrics_init_widths, - af_latin_metrics_init_blues, af_latin_metrics_check_digits): - Updated. + * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New + structure with a single field `module_data'. - * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/. + * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of + `FT_Size' structure. - * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/. - (af_face_globals_compute_style_coverage): Updated. + * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use + `size->internal->module_data' instead of `size->internal'. - * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/. + * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. + (cff_size_init, cff_size_select, cff_size_request): Use + `size->internal->module_data' instead of `size->internal'. - * src/autofit/autofit.c: s/hbshim.c/afshaper.c/. + * src/cif/cidobjs.c (cid_size_done, cid_size_init, + cid_size_request): Use `size->internal->module_data' instead of + `size->internal'. - * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC): - Updated. + * src/psaux/psobjs.c (t1_builder_ini): Use + `size->internal->module_data' instead of `size->internal'. -2015-12-06 Werner Lemberg + * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): + Use `size->internal->module_data' instead of `size->internal'. - [autofit] Prepare forthcoming changes. +2017-04-21 Alexei Podtelezhnikov - This makes it easier to control the commits. + * src/smooth/ftsmooth.h: Remove unused guards and declaration. - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy - loop. No functional change. +2017-04-16 Hin-Tak Leung -2015-12-06 Werner Lemberg + Fix tracing messages. - [autofit] Use string of standard characters. + * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, + FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print + correct function name. - This is more flexible; additionally, it would allow character - clusters. +2017-04-08 Sascha Brawer + Werner Lemberg +2017-04-08 Sascha Brawer + Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data. - * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces. +2017-04-08 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Cypriot. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'. + * src/autofit/afscript.h: Add Cypriot standard characters. - * src/autofit/afblue.h: Regenerated. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data. -2015-12-05 Werner Lemberg +2017-04-08 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Deseret. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * builds/unix/install.mk (install): Remove stale `ft2build.h'. + * src/autofit/afscript.h: Add Deseret standard characters. -2015-12-01 Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data. - [type1] Avoid dangling pointer (#46572). +2017-04-07 Werner Lemberg - * src/type1/t1afm.c (T1_Read_Metrics): Properly reset - `face->afm_data'. + [autofit] Fix invalid character range description (#50745). -2015-11-28 Alexei Podtelezhnikov + Also reported as - * include/freetype/ftlcdfil.h: Documentation tweak. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 -2015-11-28 Werner Lemberg + * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in + recent commit. - * Version 2.6.2 released. - ========================= +2017-04-07 Werner Lemberg + [ftfuzzer] Fix clang warnings. - Tag sources with `VER-2-6-2'. + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add + casts. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.6.2. +2017-04-06 Sascha Brawer + Werner Lemberg +2017-04-06 Sascha Brawer + Werner Lemberg + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data. - Change default LCD filter to be normalized and color-balanced. +2017-04-06 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Glagolitic. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [docmaker] Allow references to section names. + * src/autofit/afscript.h: Add Glagolitic standard characters. - In the reference, we show the section's title enclosed in single - quotes. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data. - * src/tools/docmaker/formatter.py (Formatter::__init__): Collect - section names as identifiers. +2017-04-06 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Tai Viet. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [cmake] Add script to test the config module. + * src/autofit/afscript.h: Add Tai Viet standard characters. - * builds/cmake/testbuild.sh: New file. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data. -2015-11-27 Tamas Kenez +2017-04-06 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for Tifinagh. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'. + * src/autofit/afscript.h: Add Tifinagh standard characters. -2015-11-27 Tamas Kenez + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data. - [cmake] Add better control of library dependencies. +2017-04-06 Sascha Brawer + Werner Lemberg + * src/autofit/afblue.dat: Add blue zone data for N'Ko. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - [cmake] Make `FindHarfBuzz' observe the REQUIRED option. + * src/autofit/afscript.h: Add N'Ko standard characters. - * builds/cmake/FindHarfBuzz.cmake: Implement it. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data. -2015-11-27 Werner Lemberg +2017-04-06 Sascha Brawer - [cmake] Collect files specific to cmake in `builds/cmake'. + [autofit] Add support for Adlam script. - * builds/FindHarfBuzz.cmake: Move to ... - * builds/cmake/FindHarfBuzz.cmake: ... this place. + * src/autofit/afblue.dat: Add blue zone data for Adlam. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - * CMakeLists.txt (CMAKE_MODULE_PATH): Updated. + * src/autofit/afscript.h: Add Adlam standard characters. -2015-11-27 Alexander Bock + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. - CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'. +2017-04-06 Sascha Brawer -2015-11-26 Werner Lemberg + [autofit] Add support for Ol Chiki script. - [docmaker] Allow `foo[bar]' as identifier. + * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - We need this to handle equally named properties in different - modules. + * src/autofit/afscript.h: Add Ol Chiki standard character. - * src/tools/docmaker/content.py (re_identifier), - src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'. + * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. - * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word, - HtmlFormatter::index_exit, HtmlFormatter::section_enter, - HtmlFormatter::block_enter): Handle `foo[bar]'. +2017-04-03 Werner Lemberg -2015-11-25 Werner Lemberg + [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. - * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480). + Reported as - (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its - contents. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 -2015-11-21 Werner Lemberg + * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New + error code. - * include/freetype/internal/ftcalc.h: Don't use `register' keyword. + * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution + of these two opcodes in `glyf' bytecode. + (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode + in case of error since function tables can no longer be modified + (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can + enormously speed up handling of broken fonts. - This fixes compiler warnings. +2017-04-02 Alexei Podtelezhnikov - Reported by Behdad. + [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. -2015-11-20 Werner Lemberg + * src/autofit/aflatin.c (af_latin_hints_init): Updated. + * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. - Add `FT_LCD_FILTER_LEGACY1' enum value. +2017-04-01 Werner Lemberg - This does the same as `FT_LCD_FILTER_LEGACY'. + * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. - See + Otherwise FT_UINT_TO_POINTER might not be defined. - https://bugs.freedesktop.org/show_bug.cgi?id=92981 + Problem reported by Alexei. - for the reasoning. +2017-03-31 Alexei Podtelezhnikov - * include/freetype/ftlcdfil.h (FT_LcdFilter): New value - `FT_LCD_FILTER_LEGACY1'. + [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. - * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it. + * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. + * src/autofit/afcjk.c (af_cjk_hints_init): Updated. + * src/autofit/aflatin.c (af_latin_hints_init): Ditto. + * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. -2015-11-15 Werner Lemberg +2017-03-31 Werner Lemberg - * src/autofit/afhints.c (af_get_segment_index): Fix it. + * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. - The old code was too simple, returning invalid values in most cases - where a segment crosses the contour start. + Allow CFFs containing a single font to have an empty font name. -2015-11-15 Werner Lemberg + Problem reported by 張俊芝 <418092625@qq.com> in - * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439). + http://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html -2015-11-11 Werner Lemberg +2017-03-30 Werner Lemberg - [cff, autofit] Switch off stem darkening by default. + * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. - * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c - (cff_driver_init): Do it. + Requested by Dave Arnold. -2015-11-10 Jan Alexander Steffens (heftig) +2017-03-30 Werner Lemberg - Allow native CFF hinter in FT_RENDER_MODE_LIGHT. + [truetype] Fix HVAR and VVAR handling (#50678). - Both the native CFF hinter and the auto-hinter now have a very - similar rendering style. + * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle + glyph indices larger than `mapCount' as described in the + specification. - * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no - longer implies FT_LOAD_FORCE_AUTOHINT. +2017-03-30 Werner Lemberg - * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New - macro. + [truetype] Allow linear scaling for unhinted rendering (#50470). - * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New - macro. + * src/truetype/ttdriver.c (tt_size_request): Revert change from + 2011-07-16; the intended metrics fix seems now to be implemented in + a different way, making the patch unnecessary. Note that this + change was usually patched out by all major GNU/Linux distributions + due to heavy side effects. - * src/cff/cffdrivr.c (cff_driver_class): Use it. + * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): + Refer to the metrics of the `TT_Size' object. - * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection - logic. +2017-03-29 Werner Lemberg -2015-11-09 Werner Lemberg + [truetype] Fix thinko related to PS name of default named instance. - * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408). + * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are + name ID values, not indices into the array of name entries. -2015-11-09 Werner Lemberg +2017-03-27 Werner Lemberg - [truetype] Remove integer to pointer conversion compiler warning. + [cid, truetype] Don't use `index' as a variable name. - Problem reported by Alexei. + At least on FreeBSD there is a global declaration of `index' in file + `/usr/include/strings.h'. - * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found - in the glib library to fix the issue. + * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where + appropriate. -2015-11-08 Behdad Esfahbod +2017-03-27 Wojciech Mamrak - [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also. + [sfnt] Minor improvement for handling kern tables. - * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it. + * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for + cross-stream kerning tables since we reject format 2 tables later + on anyways. + Modify code for limit test... + (tt_face_get_kerning): ... to avoid a limit test here. -2015-11-08 Philipp Knechtges +2017-03-27 Werner Lemberg - [autofit] Don't distort (latin) glyphs too much (#46195). + [pcf] Fix compiler warnings. - * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and - `descender' fields. + Reported by Alexander Hedges . - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect - ascender and descender data for blue zones. - (af_latin_metrics_scale_dim): Reject vertical scaling values that - change the result by more than two pixels. + * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag + `property_name' with `FT_UNUSED' where necessary. -2015-11-05 Werner Lemberg +2017-03-26 Werner Lemberg - [sfnt] Ignore embedded bitmaps with zero size (#46379). + * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement - it. + Reported as -2015-11-04 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 - [truetype] Catch infinite recursion in subglyphs (#46372). +2017-03-23 Werner Lemberg - * include/freetype/internal/tttypes.h (TT_LoaderRec): New field - `composites'. + [psaux] Better protect `flex' handling. - * src/truetype/ttgload.c: Include FT_LIST_H. - (load_truetype_glyph): Add composite subglyph index to a list; - abort if index is already in list. - (tt_loader_init): Updated. - (tt_loader_done): New function. - (TT_Load_Glyph): Call `tt_loader_done'. + Reported as -2015-11-04 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 - [truetype] Better tracing of composite glyphs. + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Since there is not a single flex operator but a + series of subroutine calls, malformed fonts can call arbitrary other + operators after the start of a flex, possibly adding points. For + this reason we have to check the available number of points before + inserting a point. - * src/truetype/ttgload.c (TT_Load_Composite_Glyph, - load_truetype_glyph): Implement it. +2017-03-23 Werner Lemberg -2015-11-03 Werner Lemberg + [sfnt] Fix check for default named instance. - [sfnt] Protect against zero-size bitmaps (#46345). + * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four + bytes, not two... - * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check - `glyph_size'. +2017-03-23 Werner Lemberg -2015-11-02 Nikolaus Waxweiler + Make MM fonts work (again). - * src/autofit/afloader.c (af_loader_load_g): Implement emboldening. + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore + return value of `ft_face_get_mvar_service'; instead, check whether a + service is actually returned. -2015-11-02 Nikolaus Waxweiler +2017-03-20 Werner Lemberg - [autofit] Implement darkening computation function. + [truetype] Some variable renamings. - This is a crude adaption of the original `cf2_computeDarkening' - function. + Too much local variables holding different structures were called + `metrics'. - * src/autofit/afloader.c (af_intToFixed, af_fixedToInt, - af_floatToFixed): New macros, taken from `cf2fixed.h'. - (af_loader_compute_darkening): New function. - * src/autofit/afloader.h: Updated. + * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. -2015-11-02 Nikolaus Waxweiler + * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, + compute_glyph_metrics): s/metrics/incr_metrics/. + (load_sbit_image): s/metrics/sbit_metrics/. - [autofit] Add functions to get standard widths for writing systems. + * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. + (tt_size_init_bytecode): s/metrics/tt_metrics/. + (tt_size_reset): s/metrics/size_metrics/. - We need the computed standard horizontal and vertical widths for the - emboldening calculation. This method provides a convenient way to - extract it from writing-system-specific metrics structures, which - all script definitions must implement. +2017-03-20 Werner Lemberg - * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New - function type. - (AF_WritingSystemClassRec): New member `style_metrics_getstdw'. - (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated. + [sfnt] Don't add instances to non-variation fonts. - * src/autofit/afcjk.c (af_cjk_get_standard_width): New function. - (af_cjk_writing_system_class): Updated. - * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated. - * src/autofit/afindic.c (af_cjk_get_standard_width): New function. - (af_indic_writing_system_class): Updated. - * src/autofit/aflatin.c (af_latin_get_standard_width): New function. - (af_indic_writing_system_class): Updated. - * src/autofit/aflatin.c (af_latin_get_standard_width): New function. - (af_indic_writing_system_class): Updated. + * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. -2015-11-02 Nikolaus Waxweiler +2017-03-20 Werner Lemberg - [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data. + * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). - * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields. +2017-03-18 Werner Lemberg - * src/autofit/afglobal.c (af_face_globals_new): Initialize new - fields. - (af_face_globals_free): Reset new fields. + Introduce FT_UINT_TO_POINTER macro (#50560). -2015-11-02 Nikolaus Waxweiler + We have to make a separate case for Windows 64's LLP64 data model. - [autofit] Add stem-darkening properties. + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. - Actual code follows in a later commit. + * src/truetype/ttgload.c (load_truetype_glyph): Use it. - * include/freetype/ftautoh.h: Document `no-stem-darkening' and - `darkening-parameters'. +2017-03-18 Werner Lemberg - * src/autofit/afmodule.h: New fields `no_stem_darkening' and - `darken_params'. + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). - * src/autofit/afmodule.c (af_property_set, af_property_get): - Handle them. - (af_autofitter_init): Initialize them. + The problematic font that exceeds the old limit is Lato-Regular, + version 2.007, containing bytecode generated by a buggy version of + ttfautohint. -2015-11-02 Ben Wagner +2017-03-18 Werner Lemberg - [ftfuzzer] Add support for multiple files (patch #8779). + [truetype] Another limitation for bytecode loop count maximum. - Currently, libFuzzer only supports mutation of a single file. We - circumvent this problem by using an uncompressed tar archive as - multiple-file input for the fuzzer. + Reported as - This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing; - a constructed tarball should contain a font file as the first - element, and files to be attached as further elements. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 - * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers. - (archive_read_entry_data, parse_data): New functions. - (LLVMFuzzerTestOneInput): Updated. + * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' + by number of glyphs also. - * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom - mutator for libFuzzer that can mutate tarballs in a sensible way. +2017-03-18 Werner Lemberg -2015-10-31 Werner Lemberg + [ftfuzzer] Minor improvement. - [sfnt] Fix cmap 14 validation (#46346). + * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if + bitmap strikes are active. - * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before - accessing `numRanges' and `numMappings'. - Fix size check for non-default UVS table. +2017-03-18 Werner Lemberg -2015-10-31 Werner Lemberg + Improve `make multi'. - [sfnt] Handle infinite recursion in bitmap strikes (#46344). + * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. - * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc, - tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned, - tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add - argument for recursion depth. - (tt_sbit_decoder_load_compound): Add argument for recursion depth. - Increase recursion counter for recursive call. - (tt_sbit_decoder_load_image): Add argument for recursion depth. - Check recurse depth. - (tt_face_load_sbit_image): Updated. + * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. -2015-10-29 Werner Lemberg + * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. - * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor. + * src/sfnt/pngshim.c: Guard file with + TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. -2015-10-29 Werner Lemberg + * src/sfnt/ttbdf.c: Avoid empty source file. + * src/sfnt/ttpost.c: Guard file with + TT_CONFIG_OPTION_POSTSCRIPT_NAMES. + * src/sfnt/ttsbit.c: Guard file with + TT_CONFIG_OPTION_EMBEDDED_BITMAPS. - * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch. + * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty + source file. - Problem reported by David Capello ; see + * src/truetype/ttsubpix.c: Guard file with + TT_USE_BYTECODE_INTERPRETER also. - http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html + * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. - for details. + * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, + src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, + src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, + src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, + src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, + src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort + entries. -2015-10-27 Werner Lemberg +2017-03-17 Werner Lemberg - [pfr] Add some safety guards (#46302). + Fixes for conditional compilation. - * src/pfr/pfrload.h (PFR_CHECK): Rename to... - (PFR_CHECK_SIZE): ... this. - (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE. + * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' + earlier. - * src/pfr/pfrload.c (pfr_log_font_count): Check `count'. - (pfr_extra_item_load_kerning_pairs): Remove tracing message. - (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate. - Allocate `chars' after doing a size checks. + * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into + TT_CONFIG_OPTION_GX_VAR_SUPPORT block. + (sfnt_done_face): Protect some code with + TT_CONFIG_OPTION_GX_VAR_SUPPORT. - * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid - bitmap format to... - (pfr_slot_load_bitmap): ... this function. - Check bitmap size. + * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler + warning. -2015-10-26 Werner Lemberg + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable + into TT_USE_BYTECODE_INTERPRETER block. - [truetype] Fix sanitizing logic for `loca' (#46223). + (tt_loader_init): Put `error' variable into + TT_USE_BYTECODE_INTERPRETER block. - * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an - incorrect adjustment of the number of glyphs, most often using far - too large values. +2017-03-17 Werner Lemberg -2015-10-25 Werner Lemberg + Fix preprocessor warning. - [autofit] Improve tracing. + * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether + TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its + value. - * src/autofit/afhints.c (af_print_idx, af_get_segment_index, - af_get_edge_index): New functions. +2017-03-17 Werner Lemberg - (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'. - Add segment and edge index for each point. - Slightly change printing order of some elements. - Don't print `-1' but `--' for missing elements. + `make multi' fixes; compiler warnings. - (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove - unnecessary `|', `[', and `]'. - Don't print `-1' but `--' for missing elements. + * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. -2015-10-24 Werner Lemberg + * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include + FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. - [sfnt] Sanitize bitmap strike glyph height. + * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include + FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. + (get_win_string, get_apple_string): Initialize `result'. - Problem reported by Nikolay Sivov . +2017-03-17 Dave Arnold - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value - for `metrics->height' by applying some heuristics. + [cff] Fix potential bugs in default NDV for CFF2. -2015-10-22 Werner Lemberg + * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend + vector when `lenNDV' is zero; don't rely on zero-init. + Save `lenNDV' as part of cache key even when `lenNDV' is zero. - [sfnt, type42] Fix clang compiler warnings. +2017-03-17 Dave Arnold - * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'. + [cff] Fix CFF2 stack allocation. - * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast. + * src/cff/cffparse.c (cff_parser_init) add 1 for operator. -2015-10-22 Dave Arnold - Werner Lemberg +2017-03-16 Werner Lemberg - [cff] Avoid overflow/module arithmetic. + * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. - This modifies the addition of subroutine number to subroutine bias - from unsigned to signed, but does not change any results. + Reported as - * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer, - cf2_initLocalRegionBuffer): Change variable names from (unsigned) - `idx' to (signed) `subrNum', since it is not an index until after - the bias is added. - * src/cff/cf2ft.h: Updated. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 - * src/cff/cf2intrp.c (cf2_interpT2CharString) : - Updated similarly. +2017-03-15 Werner Lemberg -2015-10-22 Werner Lemberg + Remove clang compiler warnings (#50548). - [cid] Better check of `SubrCount' dictionary entry (#46272). + * include/freetype/internal/tttypes.h (TT_FaceRec): Make + `var_postscript_prefix_len' unsigned. - * src/cid/cidload.c (cid_face_open): Add more sanity tests for - `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'. + * src/autofit/afwarp.c (af_warper_compute_line_best): Remove + redundant assignment. -2015-10-21 Werner Lemberg + * src/cff/cffload.c (cff_subfont_load): Add casts. - [base] Pacify compiler (#46266). + * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. - * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and - `anchor'. + * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' + keyword. + Add casts. + (fixed2float): Add cast. + (sfnt_get_var_ps_name): Make `p' always initialized. + Add casts. -2015-10-21 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. - [type42] Fix heap buffer overflow (#46269). +2017-03-15 Werner Lemberg - * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in - bounds checking. + [ftfuzzer] Limit number of tested faces and instances. -2015-10-21 Dave Arnold + This is inspired by the discussion in and analysis of - [cff] Fix limit in assert for max hints. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 - * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the - limit (96 bits). + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only + up to 20 face indices. + Use only up to 20 instance indices. -2015-10-21 Dave Arnold +2017-03-15 Werner Lemberg - [cff] Remove an assert (#46107). + * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. - * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges - in wrong order. +2017-03-14 Werner Lemberg -2015-10-21 Werner Lemberg + [sfnt] Implement PS names for font instances [3/3]. - [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257). + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize' - only after thorough checks. - Add tracing messages. + * include/freetype/internal/tttypes.h (TT_FaceRec): New fields + `var_postscript_prefix' and `var_postscript_prefix_len'. -2015-10-21 Werner Lemberg + * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. + (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. + (get_win_string, get_apple_string): Remove `const' from return + value. + (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. + (hexdigits): New array. + (sfnt_get_var_ps_name): New function, implementing Adobe TechNote + 5902 to construct a PS name for a variation font instance. + (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. - [type42] Better check invalid `sfnts' array data (#46255). + * src/sfnt/sfobjs.c (sfnt_done_face): Updated. - * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be - checked individually against available data size. + * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset + `face->postscript_name' to trigger recalculation for new instance + parameters. -2015-10-20 Werner Lemberg +2017-03-14 Werner Lemberg - [cid] Add a bunch of safety checks. + [sfnt] Implement PS names for font instances [2/3]. - * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against - stream size. - (cid_read_subrs): Check largest offset against stream size. - (cid_parse_dict): Move safety check to ... - (cid_face_open): ... this function. - Also test length of binary data and values of `SDBytes', - `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'. + * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: + New function to find the shortest representation of a 16.16 + fractional number. -2015-10-20 Werner Lemberg +2017-03-14 Werner Lemberg - [cid] Avoid segfault with malformed input (#46250). + [sfnt] Implement PS names for font instances [1/3]. - * src/cid/cidload.c (cid_read_subrs): Return a proper error code for - unsorted offsets. + Add 128bit MurmurHash 3 function. -2015-10-20 StudioEtrange + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - * CMakeLists.txt: Enable shared library builds on MinGW (#46233). + * src/sfnt/sfdriver.c (ROTL32): New macro. + (fmix32, murmur_hash_3_128): New functions. -2015-10-20 Werner Lemberg +2017-03-13 Werner Lemberg - * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229). + [truetype] Ignore invalid MVAR tags. -2015-10-19 Ben Wagner + Reported as - [cid] Better handle invalid glyph stream offsets (#46221). + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 - * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph - length. + * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit + warning for invalid tags. + (tt_apply_mvar): Ignore invalid tags. -2015-10-18 Werner Lemberg +2017-03-12 Werner Lemberg - [psaux] Fix tracing of negative numbers. + [truetype] Store and use design coordinates also. - Due to incorrect casting negative numbers were shown as very large - (positive) integers on 64bit systems. + * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): + Add `normalizedcoords' argument. - * src/psaux/t1decode.c (t1_decoder_parse_charstrings) : - Use division instead of shift. + * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store + the design coordinates of the current instance. + Updated. -2015-10-18 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... + (tt_set_mm_blend): ... New function. + Convert data in `normalizedcoords' array to `coords' array on + demand. + (TT_Set_Var_Design): Store argument data in `coords' array. + (TT_Get_Var_Design): Get data from `coords' array. + (tt_get_var_blend): Updated. + (tt_done_blend): Updated. - [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223). + * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. - * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it - with #ifndef ... #endif, as suggested in the tracker issue. + * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. -2015-10-18 Werner Lemberg + * src/cff/cffobjs.c (cff_face_init): Updated. - [truetype] Better protection against malformed `fpgm' (#46223). +2017-03-12 Werner Lemberg - * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a - malformed `fpgm' table more than once. + src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. -2015-10-17 Werner Lemberg +2017-03-08 Werner Lemberg - * src/cid/cidgload.c (cid_load_glyph): Fix memory leak. + [sfnt] Another fix for buggy variation fonts. - Reported by Kostya Serebryany . + Reported as -2015-10-17 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 - [bdf] Prevent memory leak (#46217). + * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of + instances to zero for `CFF' fonts table, ensure that there is no + `CFF2' present also (which gets priority). - * src/bdf/bdflib.c (_bdf_parse_glyphs) : Check - _BDF_GLYPH_BITS. +2017-03-07 Werner Lemberg -2015-10-17 Werner Lemberg + [sfnt] Improve handling for buggy variation fonts. - [bdf] Use stream size to adjust number of glyphs. + Reported as - * src/bdf/bdflib.c (ACMSG17): New message macro. - (_bdf_parse_t): Add member `size'. - (bdf_load_font): Set `size'. - (_bdf_parse_glyphs): Adjust `cnt' if necessary. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 -2015-10-17 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of + instances to zero for `CFF' fonts table, ensure that there is no + `glyf' table present also (which gets priority). - * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size. +2017-03-06 Werner Lemberg -2015-10-17 Werner Lemberg + [sfnt, truetype] Always provide default instance. - * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222). + As documented in the OpenType specification, an entry for the + default instance may be omitted in the named instance table. In + particular this means that even if there is no named instance table + in the font we actually do have a named instance, namely the default + instance. -2015-10-17 Werner Lemberg + For consistency, we always want the default instance in our list of + named instances. If it is missing, we try to synthesize it. - [psaux] Fix heap buffer overflow (#46221). + * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default + instance is in the table of named instances. Otherwise adjust + number of instances. - * src/psaux/t1decode.c (t1_decoder_parse_charstring) : - Fix limit check. + * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. + (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named + instances. + Sythesize a named instance entry if necessary. + (tt_done_blend): Free `normalized_stylecoords'. -2015-10-17 Werner Lemberg +2017-03-05 Werner Lemberg - * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220). + [sfnt] Remove redundant code. -2015-10-15 Kostya Serebryany + * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for + `num_instances', which will always succeed. - [ftfuzzer] Add README. +2017-03-04 Werner Lemberg - * src/tools/ftfuzzer/README: New file. + [sfnt] Add `get_name_id' service. -2015-10-15 Ben Wagner + * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New + typedef. + (SFNT_Interface): Add `get_name_id' field. + (FT_DEFINE_SFNT_INTERFACE): Updated. - [bdf] Fix memory leak (#46213). + * src/sfnt/sfdriver.c (search_name_id): Rename to... + (sfnt_get_name_id): ... this. + (sfnt_get_ps_name, sfnt_interface): Udpated. - * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in - case of error. +2017-03-04 Werner Lemberg -2015-10-15 Werner Lemberg + [truetype] Make `TT_Set_MM_Blend' set named instance index. - [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208). + * src/truetype/ttgxvar.h (GX_Blend): New array + `normalized_stylecoords'. - * devel/ftoption.h, include/freetype/config/ftoption.h - (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro. + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill + `normalized_stylecoords'. + (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' + accordingly. - * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed. - (TT_RunIns): Updated. +2017-03-02 Werner Lemberg -2015-10-15 Werner Lemberg + [truetype] Split off designer/normalized conversion routines. - * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing. + * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion + code designer->normalized coordinates to... + (ft_var_to_normalized): ... New function. + (TT_Get_Var_Design): Split off conversion code normalized->designer + coordinates to... + (ft_var_to_design): ... New function. - The used indices were off by 1. +2017-02-28 Werner Lemberg -2015-10-15 Ben Wagner - Werner Lemberg + [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. - * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211). + * src/sfnt/sfdriver.c (sfnt_ps_map): New array. + (sfnt_is_postscript): New function. + (char_type_func): New typedef. + (get_win_string, get_apple_string): Add argument to specify + character checking function. + Add argument whether argument checking failures should be reported. + Update callers. + (search_name_id): Fix return value. -2015-10-15 Werner Lemberg +2017-02-23 Werner Lemberg - [base] Compute MD5 checksums only if explicitly requested. + [sfnt] Split off another bit of `sfnt_get_ps_name'. - This improves profiling accuracy. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some + functionality into... + (search_name_id): ... New function. - * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it. +2017-02-23 Werner Lemberg -2015-10-14 Werner Lemberg + [sfnt] Modularize `sfnt_get_ps_name'. - [base] Use `FT_' namespace for MD5 functions (#42366). + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some + functionality into... + (IS_WIN, IS_APPLE): ... New macros. + (get_win_string, get_apple_string): ... New functions. - * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'. - Undefine HAVE_OPENSSL. +2017-02-23 Werner Lemberg -2015-10-13 Werner Lemberg + [truetype] Minor improvement. - [type1] Correctly handle missing MM axis names (#46202). + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Remove unnecessary tests. - * src/type1/t1load.c (T1_Get_MM_Var): Implement it. +2017-02-23 Werner Lemberg -2015-10-13 Werner Lemberg + * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. - [pcf] Quickly exit if font index < 0. + For orthogonality with other structure field names. - Similar to other font formats, this commit makes the parser no - longer check the whole PCF file but only the header and the TOC if - we just want to get the number of available faces (and a proper - recognition of the font format). + Update all users. - * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. - Exit quickly if face_index < 0. +2017-02-22 Alexei Podtelezhnikov - * src/pcfread.c (pcf_load_font): Add `face_index' argument. - Exit quickly if face_index < 0. + * src/smooth/ftgrays.c (gray_hline): Improve code. - * src/pcf/pcf.h: Updated. +2017-02-20 Dominik Röttsches -2015-10-13 Werner Lemberg + Fix some `ttnameid.h' entries (#50313). - [ftfuzzer] Handle TTCs and MM/GX variations. + * include/freetype/ttnameid.h: + s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, + s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. - This patch also contains various other improvements. +2017-02-20 Werner Lemberg - * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject - pre-C++11 compilers. - (FT_Global): New class. Use it to provide a global constructor and - destructor for the `FT_Library' object. - (setIntermediateAxis): New function to select an (arbitrary) - instance. - (LLVMFuzzerTestOneInput): Loop over all faces and named instances. - Also call `FT_Set_Char_Size'. + [cff] Finish support for `random' operator. -2015-10-13 Werner Lemberg + * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. - [truetype] Refine some GX sanity tests. + * src/cff/cffobjs.c: Updated. + (cff_driver_init): Initialize random seed value. - Use the `gvar' table size instead of the remaining bytes in the - stream. + * src/cff/cffload.c (cff_random): New function. + (cff_subfont_load): Add `face' argument. + Update all callers. + Initialize random number generator with a proper seed value. + (cff_font_load): Add `face' argument. + Update all callers. - * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'. + * src/cff/cffload.h: Updated. - * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'. - (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument - `size'. - (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated. + * src/cff/cf2intrp.c (CF2_FIXME): Removed. + (cf2_interpT2CharString) : Implement opcode. -2015-10-13 Werner Lemberg + * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't + initialize random seed value. + : Use new random seed framework. - [truetype] Another GX sanity test. +2017-02-20 Werner Lemberg - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check - `tupleCount'. - Add tracing message. + [cff] Sanitize `initialRandomSeed'. -2015-10-13 Werner Lemberg + * src/cff/cffload.c (cff_load_private_dict): Make + `initial_random_seed' value always positive. - [truetype] Fix memory leak for broken GX fonts (#46188). +2017-02-20 Werner Lemberg - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of - deallocation. + [cff] Introduce `random-seed' property (2/2). -2015-10-13 Werner Lemberg + * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. + (open_face): Initialize `face->internal->random_seed'. + (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. - [truetype] Fix commit from 2015-10-10. + * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' + property. - * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error - handling body to condition. +2017-02-20 Werner Lemberg -2015-10-12 Werner Lemberg + [cff] Introduce `random-seed' property (1/2). - [unix] Make MKDIR_P actually work. + We need this for support of the `random' operator. - * builds/unix/configure.raw: Fix underquoting of `INSTALL' and - `MKDIR_P'. + * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. - Problem reported by Dan Liddell . + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New + field `random_seed'. -2015-10-11 Werner Lemberg + * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'. - [sfnt] Improve extraction of number of named instances. +2017-02-17 Werner Lemberg - * src/sfnt/sfobjs.c (sfnt_init_face) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against - `fvar' table size. + Remove clang warnings. -2015-10-10 Alexei Podtelezhnikov + * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' + keyword. - * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow - (#46149). + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): + Initialize some variables. -2015-10-10 Werner Lemberg +2017-02-16 Nikolaus Waxweiler + Werner Lemberg - [sfnt] Fix infinite loops with broken cmaps (#46167). + Add face property for stem darkening. - * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care - of border conditions (i.e., if the loops exit naturally). + * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New + macro. -2015-10-10 Werner Lemberg + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add + `no_stem_darkening' field. - [truetype] More sanity tests for GX handling. + * src/autofit/afloader.c (af_loader_load_glyph), + src/autofit/afmodule.c (af_property_set): Updated. - These tests should mainly help avoid unnecessarily large memory - allocations in case of malformed fonts. + * src/base/ftobjs.c: Include FT_AUTOHINTER_H. + (ft_open_face_internal): Updated. + (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. - * src/truetype/ttgxvar.c (ft_var_readpackedpoints, - ft_var_readpackeddeltas): Check number of points against stream - size. - (ft_var_load_avar): Check `pairCount' against table length. - (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount' - against table length. - (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'. - Fix trace. - (TT_Vary_Apply_Glyph_Deltas): Fix trace. - Free `sharedpoints' to avoid memory leak. + * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. -2015-10-10 Werner Lemberg + * src/cff/cffdrivr.c (cff_property_set): Updated. - [truetype] Better protection against malformed GX data (#46166). +2017-02-16 Nikolaus Waxweiler + Werner Lemberg - * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly - handle empty `localpoints' array. + Add face property for LCD filter weights. -2015-10-10 Werner Lemberg + * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, + FT_LCD_FILTER_FIVE_TAPS): New macros. + (FT_LcdFiveTapFilter): New typedef. - * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162). + * include/freetype/ftobjs.h (FT_Face_InternalRec) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. + (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. + (ft_lcd_filter_fir): New prototype. + (FT_LibraryRec): Updated. -2015-10-09 Werner Lemberg + * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... + (ft_lcd_filter_fir): ... this base function. + Updated. + (_ft_lcd_filter_legacy): Updated. + (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. - * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size. + * src/base/ftobjs.c (ft_open_face_internal): Updated. + (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. -2015-10-08 Werner Lemberg + * src/smooth/ftsmooth.c (ft_smooth_render_generic) + [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from + `FT_Face_Internal'. - [pcf] Protect against invalid number of TOC entries (#46159). +2017-02-14 Nikolaus Waxweiler + Werner Lemberg - * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries - against size of data stream. + Add new function `FT_Face_Properties'. -2015-10-08 Werner Lemberg + This commit provides the framework, to be filled with something + useful in the next commits. - [type42] Protect against invalid number of glyphs (#46159). + * include/freetype/freetype.h (FT_Face_Properties): Declare. - * src/type42/t42parse.c (t42_parse_charstrings): Check number of - `CharStrings' dictionary entries against size of data stream. + * src/base/ftobjs.c (FT_Face_Properties): New function. -2015-10-08 Werner Lemberg +2017-02-13 Werner Lemberg - [sfnt] Fix some signed overflows (#46149). + [autofit] Prevent overlapping blue zones. - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) - : Use `FT_MulDiv'. + Problem reported as -2015-10-08 Werner Lemberg + https://github.com/google/fonts/issues/632 - [type1] Protect against invalid number of subroutines (#46150). + The font in question (Nunito) has values 705 and 713 for the + reference and overshoot values, respectively, of the first blue + zone. Blue zone 2, however, has value 710 for both the reference + and overshoot. At 12ppem, reference and overshoot of blue zone 0 + becomes 8px, while blue zone 2 becomes 9px. - * src/type1/t1load.c (parse_subrs): Check number of - `Subrs' dictionary entries against size of data stream. + A peculiarity of this font is that the tops of isolated vertical + stems like `N' have a slight overshoot also. The auto-hinter tries + to find the nearest blue zone using the *original* coordinates. For + vertical stems, this is value 713. For normal horizontal tops like + in character `E', this is value 710. Since value 713 is mapped to + 8px but value 710 to 9px, `N' and similar characters are one pixel + higher than `E', which looks very bad. -2015-10-07 Kostya Serebryany + This commit sanitizes blue zones to avoid such a behaviour. - [ftfuzzer] Add support for LLVM's LibFuzzer. + * src/autofit/aflatin.c (af_latin_sort_blue): New function. + (af_latin_metrics_init_blues): Sort blue values and remove overlaps. - * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files. +2017-02-12 Alexei Podtelezhnikov -2015-10-06 Alexei Podtelezhnikov + * src/smooth/ftgrays.c (gray_sweep): Improve code. - [smooth] Faster alternative line renderer. +2017-02-06 Werner Lemberg - This implementation renders the entire line segment at once without - subdividing it into scanlines. The main speed improvement comes from - reducing the number of divisions to just two per line segment, which - is a bare minimum to calculate cell coverage in a smooth rasterizer. - Notably, the progression from cell to cell does not itself require any - divisions at all. The speed improvement is more noticeable at larger - sizes. + [truetype] Implement `VVAR' table support. - * src/smooth/ftgrays.c (gray_render_line): New implementation. + * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... + (GX_HVVarTable): ...This. + (GX_Blend): Add fields for `VVAR' table handling. + Other minor updates. -2015-10-06 Werner Lemberg + * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... + (ft_var_load_hvvar): ...This. + Handle VVAR loading also (controlled by an additional parameter). + (tt_hadvance_adjust): Renamed to... + (tt_hvadvance_adjust): ...This. + Handle application of advance height also (controlled by an + additional parameter). + (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for + `tt_hvadvance_adjust'. - [cff] Return correct PS names from pure CFF (#46130). + * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. - * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for - SFNT. +2017-02-05 Werner Lemberg -2015-10-04 Werner Lemberg + [autofit] Use better blue zone characters for lowercase latin. - [base] Replace left shifts with multiplication (#46118). + The number of lowercase characters for computing the top flat blue + zone value was too small (in most cases only `x' and `z'). If one + of the two characters has a large serif, say, it can happen that + FreeType must select between two different values, having a 50% + chance to use the wrong one. As a result, rendering at larger PPEM + values could yield uneven lowercase glyph heights. - * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it. + Problem reported by Christoph Koeberlin . -2015-10-04 Werner Lemberg + * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced + with... + (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): + ... New, extended sets. + (AF_BLUE_STRINGSET_LATN): Updated. - * Version 2.6.1 released. - ========================= + * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. +2017-02-04 Werner Lemberg - Tag sources with `VER-2-6-1'. + Make `freetype-config' a wrapper of `pkg-config' if possible. - * docs/VERSION.DLL: Update documentation and bump version number to - 2.6.1. + Based on ideas taken from - * 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/2.6.1/, s/26/261/. + http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch + http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch - * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to + set output variables if program is available. - * builds/unix/configure.raw (version_info): Set to 18:1:12. - * CMakeLists.txt (VERSION_PATCH): Set to 1. + * docs/CHANGES, docs/freetype-config.1: Updated. - * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for - dumping functions. +2017-02-04 Werner Lemberg -2015-10-04 Werner Lemberg + * builds/unix/unix-def.in (freetype-config): Fix permissions. - [bzip2, gzip] Avoid access of uninitialized memory (#46109). +2017-02-03 Werner Lemberg - * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c - (ft_gzip_file_fill_input): In case of an error, adjust the limit to - avoid copying uninitialized memory. + * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. -2015-10-03 Werner Lemberg +2017-02-03 Werner Lemberg - [bzip2, gzip] Avoid access of uninitialized memory (#46109). + * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. - * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c - (ft_gzip_file_fill_output): In case of an error, adjust the limit to - avoid copying uninitialized memory. + Reported by Behdad. -2015-10-01 Alexei Podtelezhnikov +2017-02-02 Werner Lemberg - [smooth] Clean up worker. + [truetype] Fix MVAR post-action handling. - * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields. + Reported as -2015-10-01 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 - [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078). + * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This + is important to make `tt_size_reset_iterator' (called in + `tt_apply_mvar') always work. - * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of - border conditions (i.e., if the loop exits naturally). +2017-02-02 Werner Lemberg -2015-10-01 Werner Lemberg + Make compilation with FT_CONFIG_OPTION_PIC work again. - * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges. - They should be a subset of `af_deva_uniranges'. + All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. -2015-10-01 Werner Lemberg + * include/freetype/internal/services/svmetric.h + (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. - [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078). + * src/autofit/aflatin.c (af_latin_hints_compute_edges, + af_latin_hint_edges): Provide `globals' variable. - * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to - reject too large glyph indices. + * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing + variable. -2015-09-30 Alexei Podtelezhnikov + * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, + AF_STYLE_CLASSES_GET): Redefine. - [smooth] Clean up worker. + * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. - * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'. - (gray_start_cell, gray_render_line): Update. + * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. -2015-09-30 Werner Lemberg + * src/cff/cffpic.h (CffModulePIC): Fix typo. - [autofit] Replace `no-base' with `non-base'. +2017-01-31 Alexei Podtelezhnikov - * src/autofit/*: Do it. + * src/smooth/ftgrays.c (gray_render_scanline): Improve code. -2015-09-30 Werner Lemberg +2017-01-31 Werner Lemberg - [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078). + [cff] Provide metrics variation service interface (#50196). - * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better - skip invalid segments. - If searching the next character, provide a more efficient logic to - speed up the code. + Only now I've got an OTF with an HVAR table for testing... -2015-09-30 Werner Lemberg + The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the + metrics variations interface. However, this didn't work with + `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. - [truetype] Adjust number of glyphs for malformed `loca' tables. + * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for + metric service functions from the `truetype' module. + (cff_service_metrics_variations): New service. + (cff_services): Updated. - * src/truetype/ttpload.c (tt_face_load_loca): Implement it. + * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. + [FT_CONFIG_OPTION_PIC]: Synchronize code. -2015-09-29 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to + FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always + load the service from the `truetype' module. - [pshinter] Avoid harmless overflow (#45984). +2017-01-31 Werner Lemberg - * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it. + Add framework to support services with 9 functions. -2015-09-28 Werner Lemberg + * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): + New macro. - [autofit] Add support for Lao script. +2017-01-31 Werner Lemberg - Thanks to Danh Hong for guidance with blue zone - characters! + [base] Fix error handing in MM functions. - * src/autofit/afblue.dat: Add blue zone data for Lao. + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): + Implement it. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2017-01-31 Werner Lemberg - * src/autofit/afscript.h: Add Lao standard characters. + [truetype] Fix sanity check for `gvar' table (#50184). - * src/autofit/afranges.c: Add Lao data. + * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing + variation data for some glyphs. - * src/autofit/afstyles.h: Add Lao data. +2017-01-31 Werner Lemberg -2015-09-27 suzuki toshiya + [autofit] Avoid uninitialized jumps (#50191). - [base] Fix a leak by broken sfnt-PS or resource fork (#46028). + * src/autofit/afcjk.c (af_cjk_metrics_check_digits), + src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize + `advance'. - open_face_from_buffer() frees passed buffer if valid font - is not found. But if copying to the buffer is failed, - the allocated buffer should be freed within the caller. +2017-01-27 Werner Lemberg - * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free - the buffer `sfnt_ps' if an error caused before calling - open_face_from_buffer(). - (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if - an error caused before calling open_face_from_buffer(); + s/GB2312/PRC/. -2015-09-27 suzuki toshiya + * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. + (FT_ENCODING_GB2312): Deprecated. - [mac] Fix buffer size calculation for LWFN font. + * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. + (TT_MS_ID_GB2312): Deprecated. - * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong - to prevent confused copy by too large chunk size. + * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. -2015-09-26 Alexei Podtelezhnikov + * docs/CHANGES: Updated. - * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro. +2017-01-26 Werner Lemberg -2015-09-26 Werner Lemberg + [base] Add `FT_Get_Sfnt_LangTag' function. - [autofit] Minor tracing improvement. + * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. + (FT_Get_Sfnt_LangTag): New declaration. - * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit - blue zones header line if there are no blue zones. + * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New funtion. -2015-09-26 Werner Lemberg + * docs/CHANGES: Updated. - [bzip2, gzip, lzw] Harmonize function signatures with prototype. +2017-01-26 Werner Lemberg - Suggested by Hin-Tak Leung. + [sfnt] Support `name' table format 1. - * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c - (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it. + * include/freetype/internal/tttypes.h (TT_LangTagRec): New + structure. + (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. -2015-09-26 Hin-Tak Leung + * src/sfnt/ttload.c (tt_face_load_name): Add support for language + tags. + Reduce array size of name strings in case of invalid entries. + (tt_face_free_name): Updated. - Add new FT_LOAD_COMPUTE_METRICS load flag. + * docs/CHANGES: Updated. - * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro. - * src/truetype/ttgload.c (compute_glyph_metrics): Usage. +2017-01-25 Werner Lemberg -2015-09-26 Werner Lemberg + [sfnt] s/TT_NameEntry/TT_Name/. - * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast. + * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed + to... + (TT_NameRec): This. + (TT_NameTableRec): Updated. -2015-09-25 Werner Lemberg + * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. - [type1] Protect against invalid number of glyphs (#46029). + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. - * src/type1/t1load.c (parse_charstrings): Check number of - `CharStrings' dictionary entries against size of data stream. + * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, + tt_name_entry_ascii_from_other): Renamed to... + (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, + respectively. + (TT_NameEntry_ConvertFunc): Renamed to... + (TT_Name_ConvertFunc): This. + (tt_face_get_name): Updated. -2015-09-23 Werner Lemberg + * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): + Updated. - [sfnt] Better checks for invalid cmaps (2/2) (#46019). +2017-01-24 Werner Lemberg - While the current code in `FT_Get_Next_Char' correctly rejects - out-of-bounds glyph indices, it can be extremely slow for malformed - cmaps that use 32bit values. This commit tries to improve that. + [sfnt] Fix Postscript name service for symbol fonts. - * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next, - tt_cmap12_char_map_binary, tt_cmap13_next, - tt_cmap13_char_map_binary): Reject glyph indices larger than or - equal to the number of glyphs. + * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 + entries also. -2015-09-23 Werner Lemberg +2017-01-24 Werner Lemberg - [base, sfnt] Better checks for invalid cmaps (1/2). + [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. - * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds - glyph indices. - (FT_Get_First_Char): Updated. + * include/freetype/ftsnames.h + (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. + (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, + FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. - * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character - codes greater than 0xFFFF. + * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. + (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): + Deprecated. - (tt_cmap8_char_index): Avoid integer overflow in computation of - glyph index. - (tt_cmap8_char_next): Avoid integer overflows in computation of - both next character code and glyph index. + * src/sfnt/sfobjs.c (sfnt_load_face): Updated. - (tt_cmap10_char_index): Fix unsigned integer logic. - (tt_cmap10_char_next): Avoid integer overflow in computation of - next character code. + * docs/CHANGES: Updated. - (tt_cmap12_next): Avoid integer overflows in computation of both - next character code and glyph index. - (tt_cmap12_char_map_binary): Ditto. - (tt_cmap12_char_next): Simplify. +2017-01-23 Werner Lemberg - (tt_cmap13_char_map_binary): Avoid integer overflow in computation - of next character code. - (tt_cmap13_char_next): Simplify. + [base] Add `FT_Set_Default_Properties' (#49187). -2015-09-21 suzuki toshiya + * include/freetype/ftmodapi.h: Add declaration. - [base] Check too long POST and sfnt resource (#45919). + * src/base/ftinit.c (ft_set_default_properties): Renamed to... + (FT_Set_Default_Properties): ... this. + (FT_Init_FreeType): Updated. - * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the - resource fork for Mac OS. Resource forks larger than 16 MB can be - written but can't be handled correctly, at least in Carbon routine. - See https://support.microsoft.com/en-us/kb/130437. + * docs/CHANGES: Updated. - * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x' - prefix for `%p' formatter. +2017-01-23 Werner Lemberg - * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and - total size of the concatenated POST resource before buffer - allocation. - (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource - before buffer allocation. + [truetype] Minor updates for OpenType 1.8.1. - * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the - total resource size before buffer allocation. + * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been + removed from the specification; it is now reserved. -2015-09-19 Werner Lemberg + * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. + (GX_FVar_Head): Remove `countSizePairs'; the corresponding data + field in the `MVAR' table is now reserved. + (fvar_fields): Updated. - [sfnt] Improve handling of invalid SFNT table entries (#45987). +2017-01-23 Werner Lemberg - This patch fixes weaknesses in function `tt_face_load_font_dir'. + [truetype] Avoid segfault for invalid variation data. - - It incorrectly assumed that valid tables are always at the - beginning. As a consequence, some valid tables after invalid - entries (which are ignored) were never seen. + * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure + `itemCount' is not zero. - - Duplicate table entries (this is, having the same tag) were not - rejected. + Reported as - - The number of valid tables was sometimes too large, leading to - access of invalid tables. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 - * src/sfnt/ttload.c (check_table_dir): Add argument to return number - of valid tables. - Add another tracing message. - (tt_face_load_font_dir): Only allocate table array for valid - entries as returned by `check_table_dir'. - Reject duplicate tables and adjust number of valid tables - accordingly. +2017-01-20 Werner Lemberg -2015-09-19 Werner Lemberg + * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. - [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999). +2017-01-17 Werner Lemberg - * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short, - then take the absolute value. - Also apply FT_ABS to `height'. + * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. -2015-09-17 Werner Lemberg + (TT_APPLE_ID_FULL_UNICODE): New macro. - [type42] Fix memory leak (#45989). + (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, + TT_MS_LANGID_UPPER_SORBIAN_GERMANY, + TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, + TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, + TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, + TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, + TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, + TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, + TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, + TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, + TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New + macros. - * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single - `CharStrings' array. + (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. -2015-09-17 Werner Lemberg + (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, + TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, + TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, + TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, + TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, + TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, + TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, + TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, + TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, + TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, + TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, + TT_MS_LANGID_UIGHUR_PRC): New aliases. - [psaux] Fix memory leak (#45986). + Remove commented out code. - * src/psaux/psobjs.c (ps_parser_load_field) : - Free `temp' in case of error. + (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, + TT_NAME_ID_VARIATIONS_PREFIX): New macros. -2015-09-17 Werner Lemberg + (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many + years), use guarded long macros by default and define short versions + as aliases for the long ones. - [psaux] Improve tracing message. +2017-01-15 Werner Lemberg - * src/psaux/psobjs.c (ps_parser_load_field) : - Handle plural correctly. + * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters + also. -2015-09-17 Werner Lemberg +2017-01-11 Werner Lemberg - [pcf] Fix integer overflows (#45985). + * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. - * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv. +2017-01-11 Werner Lemberg -2015-09-17 Werner Lemberg + [truetype] Actually use metrics variation service. - [pcf] Use FT_ABS for some property values (#45893). + * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (ft_face_get_mvar_service): New auxiliary function to look up + metrics variation service. + (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, + FT_Set_Var_Blend_Coordinates): Call metrics variation service. - * src/pcf/pcfread.c (pcf_load_font): Take absolute values for - AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and - RESOLUTION_Y. In tracing mode, add warnings. + * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for + named instances. -2015-09-16 Werner Lemberg +2017-01-11 Werner Lemberg - Minor fixes for some clang warnings. + [truetype] Provide metrics variation service. - * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing - initialization. + * include/freetype/internal/services/svmetric.h + (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. - * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast. + * src/truetype/ttgxvar.c: Include FT_LIST_H. + (tt_size_reset_iterator): New auxiliary function for... + (tt_apply_var): New function. -2015-09-15 Werner Lemberg + * src/truetype/ttgxvar.h: Updated. - [type1, type42] Fix memory leaks (#45966). + * src/truetype/ttdriver.c (tt_service_metrics_variations): Add + `tt_apply_mvar'. - * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis - names. - (parse_blend_design_map): Allow only a single design map. - (parse_encoding): Handle multiple encoding vectors. + * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics + variation service. - * src/type42/t42parse.c (t42_parse_encoding): Handle multiple - encoding vectors. +2017-01-11 Werner Lemberg -2015-09-15 Werner Lemberg + [truetype] Parse `MVAR' table. - [truetype] Fix integer type (#45965). + * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. + (GX_Value, GX_MVarTable): New structures. + (GX_Blend): Add it. - * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it. + * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, + GX_GASP_CASE): New macros. + (ft_var_get_value_pointer): New auxiliary function to get a pointer + to a value from various SFNT tables already stored in `TT_Face'. + (ft_var_load_mvar): New function. + (TT_Get_MM_Var): Call it. + (tt_done_blend): Updated. -2015-09-15 Werner Lemberg +2017-01-11 Werner Lemberg - * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964). + [truetype] More preparations for MVAR support. -2015-09-15 Werner Lemberg + * src/truetype/ttobjs.c (tt_size_reset): Add argument to make + function only recompute ascender, descender, and height. - [type1, type42] Check encoding array size (#45961). + * src/truetype/ttobjs.h: Updated. - * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c - (t42_parse_encoding): Do it. + * src/truetype/ttdriver.c (tt_size_select, tt_size_request): + Updated. -2015-09-14 Alexei Podtelezhnikov +2017-01-09 Werner Lemberg - * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve. + [pcf] Disable long family names by default. -2015-09-14 Werner Lemberg + * include/freetype/config/ftoption.h + (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. - [type1] Fix another potential buffer overflow (#45955). +2017-01-09 Werner Lemberg - * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for - `eexec' doesn't exceed `limit'. + [pcf] Make long family names configurable. -2015-09-13 Werner Lemberg + The change from 2016-09-29 was too radical (except for people using + the openSuSE GNU/Linux distribution). To ameliorate the situation, + PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls + the feature; if set, a new PCF property option + `no-long-family-names' can be used to switch this feature off. - Replace `mkinstalldirs' with AC_PROG_MKDIR_P. + * include/freetype/config/ftoption.h, devel/ftoption.h + (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. - * builds/unix/mkinstalldirs: Removed, no longer needed. + * include/freetype/ftpcfdrv.h: New header file (only containing + comments currently, used for building the documentation). - * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'. - Update pwd call for `$INSTALL'. + * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. - * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'. + * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. - * autogen.sh: Updated. + * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and + FT_PCF_DRIVER_H. + (pcf_property_set, pcf_property_get): New functions. + (pcf_service_properties): New service. + (pcf_services): Updated. + (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle + `no_long_family_names'. -2015-09-13 Werner Lemberg + * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' + and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. - [winfonts] Check alignment shift count for resource data (#45938). + * docs/CHANGES: Updated. - * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it. +2017-01-09 Werner Lemberg -2015-09-13 Werner Lemberg + [pcf] Introduce a driver structure. - [type1] Fix potential buffer overflow (#45923). + To be filled later on with something useful. - * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't - point to end of file buffer. + * src/pcf/pcf.h (PCF_Driver): New structure. -2015-09-13 Werner Lemberg + * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy + functions. + (pcf_driver_class): Updated. - [gzip] Fix access of small compressed files (#45937). +2017-01-08 Werner Lemberg - * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak. + [truetype] Again some GX code shuffling. - (ft_gzip_get_uncompressed_file): Correct byte order while reading - unsigned long value. Without this change, the whole optimization of - accessing small files in `FT_Stream_OpenGzip' is never executed! As - a consequence, access to PCF files in general (which are normally - small files) should be much improved now as originally intended. + We need this later on for MVAR also. -2015-09-11 Werner Lemberg + * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing + an item store variation delta into... + (ft_var_get_item_delta): ...new function. - [psaux] Fix potential buffer overflow (#45922). +2017-01-08 Werner Lemberg - * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is - enclosed in balanced expressions, ensure that the cursor position - doesn't get larger than the current limit. + [truetype] Adjust font variation flags for MVAR. -2015-09-11 Werner Lemberg + * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): + Remove all flags related to MVAR; replace it with... + (TT_FACE_FLAG_VAR_MVAR): ...this new macro. + (TT_Face): Remove `mvar_support' field (which was still unused). - [base] Avoid crash while tracing `load_mac_face'. +2017-01-06 Werner Lemberg - Reported in Savannah bug #45919. + [truetype] More GX code shuffling. - * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while - tracing. + We need this later on for MVAR also. -2015-09-11 Werner Lemberg + * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item + variation store into... + (ft_var_done_item_variation_store): ...new function. - [type42] Fix endless loop (#45920). +2017-01-06 Werner Lemberg - * src/type42/t42parse.c (t42_parse_encoding): Synchronize with - type1's `parse_encoding'. + [truetype] More generalization of GX stuff. -2015-09-10 Werner Lemberg + We need this later on for MVAR also. - [docmaker] Allow `-' in bold and italic markup. + * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add + parameters for delta-set index mapping and item variation store. + (ft_var_load_item_variation_store): Add parameter for item variation + store. + s/hvarData/varData/. + Move allocation of `hvar_table' to... + (ft_var_load_hvar): ...this function. + Updated. - * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust - accordingly. +2017-01-06 Werner Lemberg -2015-09-09 Alexei Podtelezhnikov + [truetype] Some GX structure renames for generalization. - * src/base/ftcalc.c (FT_RoundFix): Improve. + We need this later on for MVAR also. -2015-09-09 Wojciech Mamrak + * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... + (GX_ItemVarData): ...this. + (GX_HVarRegion): Renamed to... + (GX_VarRegion): ...this. + (GX_HVStore): Renamed to... + (GX_ItemVarStore): ...this. + (GX_WidthMap): Renamed to... + (GX_DeltaSetIdxMap): ...this. - * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize. + (GX_HVarTable): Updated. - This commit makes the functions behave as expected, this is, - rounding towards plus or minus infinity. + * src/truetype/ttgxvar.c: Updated. -2015-09-07 Alexei Podtelezhnikov +2017-01-06 Werner Lemberg - * src/smooth/ftgrays.c (gray_render_line): Simplify clipping. + [truetype] Code shuffling. -2015-09-04 Alexei Podtelezhnikov + * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of + item variation store and delta set index mapping into... + (ft_var_load_item_variation_store, + ft_var_load_delta_set_index_mapping): ...new functions. - [raster,smooth] Microoptimizations. +2017-01-06 Werner Lemberg - * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table, - Bezier_Up, ): Use do-while loops. + [truetype] Add HVAR access without advance width map. - * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line, - gray_convert_glyph): Ditto. + * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where + `offsetToAdvanceWidthMapping' is zero. + (tt_hadvance_adjust): Implement direct deltaSet access by glyph + index. -2015-09-04 Werner Lemberg +2017-01-06 Werner Lemberg - [autofit] Redesign code ranges (2/2). + [pcf] Revise driver. - This commit adds two fallback scripts (`latb', `latp') and - implements support for the no-base character ranges introduced in - the previous commit. + This commit improves tracing and handling of malformed fonts. In + particular, the changes to `pcf_get_properties' fix - * src/autofit/aftypes.h (AF_ScriptClassRec): Add - `script_uni_nobase_ranges' field. - (AF_DEFINE_SCRIPT_CLASS): Updated. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 - * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and - `latp' fallback scripts. + * src/pcf/pcfread.c (tableNames): Use long names for better + readability. + (pcf_read_TOC): Allow at most 9 tables. + (pcf_get_properties): Allow at most 256 properties. + Limit strings array length to 256 * (65536 + 1) bytes. + Better tracing. + (pcf_get_metric): Trace metric data. + (pcf_get_metrics): Allow at most 65536 metrics. + Fix comparison of `metrics->ascent' and `metrics->descent' to avoid + potential overflow. + Better tracing. + (pcf_get_bitmaps): Allow at most 65536 bitmaps. + Better tracing. + (pcf_get_encodings, pcf_get_accel): Better tracing. - * src/autofit/afblue.dat: Add blue zones for Latin subscript and - superscript fallback scripts. + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. + These are now shown by `pcf_get_bitmaps'. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2017-01-04 Werner Lemberg - * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base - characters. - (AF_STYLE_MASK): Updated. + * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. - * src/autofit/afglobal.c (SCRIPT): Updated. - (af_face_globals_compute_style_coverage): Handle new style flag. +2017-01-04 Werner Lemberg - * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style - flag. + [cff] More consistency checks for pure CFFs. - * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges. + Reported as -2015-09-04 Werner Lemberg + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 - [autofit] Redesign code ranges (1/2). + * src/cff/cffload.c (cff_font_load): Check element number and size + of Name and Top DICT indices. - This patch introduces auxiliary code ranges that identify no-base - characters; they refer to glyphs of a script that should be hinted - without alignments to blue zones (mostly diacritics). +2017-01-04 Werner Lemberg - It also splits off ranges for fallback scripts that handle subscript - and superscript characters not covered by OpenType features. For - example, this greatly helps improve the hinting of various phonetic - alphabets, which contain a large amount characters that look like - superscript glyphs. + [cff, truetype] Minor tracing improvement. - Finally, code ranges are updated to Unicode 8.0, and enclosed - characters are removed in general since they normally look better if - they stay unhinted. + * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c + (tt_face_init): Indent first tracing message from SFNT driver. - * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode - 8.0. - Split off superscript-like and subscript-like glyphs into... +2017-01-03 Werner Lemberg - (af_latb_uniranges, af_latp_uniranges): ... these two new arrays. + [truetype] Various minor fixes. - (af_xxxx_nobase_uniranges): New arrays that hold no-base characters - of the corresponding character ranges. + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction + size only if we do native hinting. + (TT_Load_Glyph): Trace returned error code. -2015-09-03 Werner Lemberg + * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace + returned error code. + (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is + invalid. - [autofit] Pass glyph index to hinting function. +2017-01-03 Werner Lemberg - No functionality change yet. + [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. - * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass - glyph index. + These tables are optional. - * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply), - src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c - (af_indic_hints_apply), src/autofit/aflatin.c - (af_latin_hints_apply), src/autofit/aflatin2.c - (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g): - Updated. + * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. -2015-08-30 Werner Lemberg +2017-01-03 Werner Lemberg - [autofit] Code clean-up. + * src/cff/cffparse.c (cff_parse_num): Simplify. - * src/autofit/afglobal.h (AF_STYLE_MASK): New macro. - (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition. +2017-01-03 Werner Lemberg - * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): - Updated. + Various fixes for clang's undefined behaviour sanitizer. -2015-08-30 Werner Lemberg + * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. + (cff_blend_doBlend): Don't left-shift negative numbers. + Handle 5-byte numbers byte by byte to avoid alignment issues. - [autofit] Make glyph style array use 16bit values. + * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by + byte to avoid alignment issues. - * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use - `FT_UShort' for `map' field. + * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any + subrs. - * src/autofit/afglobal.c (af_face_globals_compute_style_coverage, - af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h - (af_get_coverage): Use FT_UShort for `glyph_styles' array. + * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. - * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to - 16 bits. - (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field. + * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around + definition of `ft_get_adobe_glyph_index'. -2015-08-26 Werner Lemberg + * src/psnames/pstables.h: Regenerated. - * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828). + * src/psnames/psmodule.c: Include `pstables.h' twice to get both + declaration and definition. -2015-08-25 Werner Lemberg + * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix + casting. - [base] Improve kerning tracing and documentation. +2017-01-01 Werner Lemberg - * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if - scaled-down kerning values differ. + [cff] Handle multiple `blend' operators in a row correctly. -2015-08-18 Werner Lemberg + Reported as - [raster] Remove last remnants of `raster5' driver. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 - * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed. + * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' + pointers into `subFont->blend_stack' after reallocation. - * src/raster/rastpic.c, src/raster/rastpic.h - (ft_raster5_renderer_class_pic_init, - ft_raster5_renderer_class_pic_free): Removed. +2017-01-01 Werner Lemberg -2015-08-17 Alexei Podtelezhnikov + [sfnt] Return correct number of named instances for TTCs. - [base] Improve emboldener (#45596). + Without this patch, requesting information for face index N returned + the data for face index N+1 (or index 0). - * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement - of zero-length segments. + * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' + for negative `face_instance_index' values. -2015-08-16 Alexei Podtelezhnikov +2016-12-31 Werner Lemberg - [base] Reoptimize arithmetic. + */*: Use hex numbers for errors in tracing messages. - * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove - special cases that slow down the general use. +2016-12-31 Werner Lemberg -2015-08-15 pazer + [truetype] Check axis count in HVAR table. - Fix C++ compilation (#45762). + Reported as - * src/base/ftstroke.c (ft_outline_glyph_class): Use - FT_CALLBACK_TABLE. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 -2015-08-14 Alexei Podtelezhnikov + * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. + (ft_var_load_avar): Fix tracing message. - [truetype] Clean up. +2016-12-30 Werner Lemberg - * src/truetype/ttgload.c (TT_Process_Composite_Component): Use - `FT_Outline_Transform' and `FT_Outline_Translate'. - (translate_array): Dropped. + * Version 2.7.1 released. + ========================= -2015-08-14 Andreas Enge - * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261). + Tag sources with `VER-2-7-1'. -2015-08-13 Werner Lemberg + * docs/VERSION.TXT: Add entry for version 2.7.1. - [truetype] Introduce named instance access to GX fonts. + * 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.7/2.7.1/, s/27/271/. - For functions querying a face, bits 16-30 of the face index can hold - the named instance index if we have a GX font. The indices start - with value 1; value 0 indicates font access without GX variation - data. + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. - * include/freetype/freetype.h (FT_FaceRec): Update documentation. - * include/freetype/internal/sfnt.h: Ditto. + * builds/unix/configure.raw (version_info): Set to 19:0:13. + * CMakeLists.txt (VERSION_PATCH): Set to 1. - * src/sfnt/sfobjs.c (sfnt_init_face) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and - do argument checks. - (sfnt_load_face): Updated. +2016-12-30 Werner Lemberg - * src/truetype/ttobjs.c (tt_face_init) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting - the style name. + [ftfuzzer] Replace `rand' with an xorshift algorithm. - * src/base/ftobjs.c (open_face_from_buffer, - open_face_PS_from_sfnt_stream): Updated. - * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated. - * src/cff/cffload.c (cff_font_load): Updated. + * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'. + (Random): Implement and use a 32bit `xorshift' algorithm. - * src/cff/cffobjs.c (cff_face_init): Make function exit early for - pure CFF fonts if `font_index < 0'. - Updated. +2016-12-30 Werner Lemberg - * src/cid/cidobjs.c (cid_face_init): Updated. - * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. - * src/pfr/pfrobjs.c (pfr_face_init): Updated. - * src/type1/t1objs.c (T1_Face_Init): Updated. - * src/type42/t42objs.c (T42_Face_Init): Updated. - * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): - Updated. + [ftfuzzer] Restrict number of tested bitmap strikes. - * docs/CHANGES: Updated. + 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. -2015-08-12 Alexei Podtelezhnikov + Reported as - [type1,cff,cid] Streamline font matrix application. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353 - * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only - if font matrix is not trivial. - * src/cff/cffgload.c (cff_slot_load): Ditto. - * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the - entire outline. + * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. + (Random): Small class to provide n randomly selected numbers + (without repetition) out of the value set [1,N]. + (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap + strikes. -2015-08-11 Werner Lemberg +2016-12-29 Werner Lemberg - [builds/unix] Minor. + [truetype] Variation font API stability issues. - * builds/unix/configure.raw: - s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with - similarly named uppercase variables. + Make some functions work before a call to `TT_Set_MM_Blend'. -2015-08-10 Alexei Podtelezhnikov + * 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. - [type1,cid,type42] Minor improvements. +2016-12-29 Werner Lemberg - * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only - when necessary. Refresh comments. - * src/cid/cidload.c (cid_parse_font_matrix): Ditto. - * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments. + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data. -2015-08-08 Werner Lemberg + Reported as - [type42] Fix glyph access. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348 - This is a severe bug: We've missed one level of indirection, as - described in the Type 42 specification. As a result, ftview - sometimes showed incorrect glyphs for given glyph names, and even - displayed `error 0x0006' (invalid argument!) in case the number of - glyph indices differed between the Type 42 font and the embedded - TTF. +2016-12-29 Werner Lemberg - Apparently, noone ever noticed it; this shows how much Type 42 fonts - are in use... + [truetype] Tracing fixes. - * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index - to embedded TTF's glyph index. + * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct + information. + (TT_Set_Var_Design): Fix typo. + (TT_Get_Var_Design): Fix typos. -2015-08-08 Werner Lemberg +2016-12-29 Werner Lemberg - [type42] Minor clean-up. + */*: Use `0.5f' for tracing 16.16 numbers. - * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused - variable. +2016-12-29 Werner Lemberg -2015-08-06 Alexei Podtelezhnikov + [pcf] Protect against gzip bombs. - [type42] Parse FontMatrix according to specifications. + Fix suggested by Kostya; reported as - * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix - does not need scaling by 1000. Units_per_EM are taken from the - embedded TrueType. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345 -2015-08-06 Werner Lemberg + * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to + 1024. - [autofit] Improve Arabic hinting. +2016-12-28 Werner Lemberg - Problem reported by Titus Nemeth (by using - ttfautohint). + [psnames] Only declare, not define, data in `pstables.h' (#49949). - * src/autofit/afblue.dat: Add neutral blue zone for the tatweel - character. + 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. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * 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. -2015-08-05 Alexei Podtelezhnikov + * src/psnames/pstables.h: Regenerated. + * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define. - [truetype] Clean up types. +2016-12-28 Werner Lemberg - * src/truetype/ttobjs.c (TT_Size): Move declaration from here. - * include/freetype/internal/tttypes.h (TT_Size): ... to here. - (TT_LoaderRec): Switch to appropriate types for `face' and `size'. - * src/truetype/ttgload.c: Remove corresponding type casts. - * src/truetype/ttsubpix.c: Ditto. + [cff] Catch `blend' op in non-variant fonts. -2015-08-05 Werner Lemberg + Reported as - [autofit] Improve recognition of flat vs. rounded segments. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 - Lower the flatness threshold from upem/8 to upem/14, making the - auto-hinter accept shorter elements. + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Don't + allow `blend' op for non-variant fonts. - Synchronize flat/round stem selection algorithm with blue zone code. +2016-12-28 Werner Lemberg - * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro. - (af_latin_metrics_init_blues): Use it. - (af_latin_hints_compute_segments): Collect information on maximum - and minimum coordinates of `on' points; use this to add a constraint - for the flat/round decision similar to - `af_latin_metrics_init_blues'. + [cff] Better check of number of blends. -2015-08-04 Werner Lemberg + * src/cff/cf2intrp.c (cf2_interpT2CharString) , + src/cff/cffparse.c (cff_parse_blend): Compare number of blends with + stack size. - Another left-shift bug (#45681). +2016-12-27 Werner Lemberg - * src/base/ftobjs.c (IsMacBinary): Only accept positive values for - `dlen'. + Documentation updates. -2015-08-03 Alexei Podtelezhnikov + * docs/CHANGES: Add missing information. - [base] Fix `ft_corner_orientation'. + * docs/formats.txt: Rewritten and updated. - Remove casting from `FT_Long' to `FT_Int' that might change the sign - of the return value and make it faster too. +2016-12-27 Werner Lemberg - * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay - with 32-bit arithmetic when safe. Use plain math on 64-bit systems. - * src/pshinter/pshalgo.c: Remove old unused code. + [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'. -2015-08-03 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement. + (TT_Set_Var_Design): Fix tracing. - * src/truetype/ttgload.c (load_truetype_glyph) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs - having a depth greater than 1. + * src/type1/t1load.c (T1_Get_Var_Design): Implement. -2015-08-03 Werner Lemberg +2016-12-24 Werner Lemberg - Fix typo in clang bug from 2015-07-31 (#45678). + * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'. - * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality. + Problem reported by 張俊芝 <418092625@qq.com>. -2015-08-02 Werner Lemberg +2016-12-24 Werner Lemberg - * CMakeLists.txt: Improve shared library support. + * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values. - Based on a patch from John Cary . + Some fonts seem to have the `version' field in the wrong byte order. -2015-08-02 Werner Lemberg + Problem reported by 張俊芝 <418092625@qq.com>. - * builds/unix/freetype-config.in (enable_shared): Remove. Unused. +2016-12-24 Werner Lemberg -2015-08-02 Werner Lemberg + * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length. - Fix more invalid left-shifts. + This trivial fix allows us to accept more fonts. - * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication, - not left-shift. + Problem reported by 張俊芝 <418092625@qq.com>. - * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar, - tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication, - not left-shift. +2016-12-24 Werner Lemberg -2015-07-31 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing. - Fix some bugs found by clang's `-fsanitize=undefined' (#45661). +2016-12-22 Werner Lemberg - * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept - positive values from header. - Check overflow. + * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909). - * src/base/ftoutln.c (SCALED): Correctly handle left-shift of - negative values. +2016-12-22 Werner Lemberg - * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified, - _bdf_clear_glyph_modified): Use unsigned long constant. + Ensure used preprocessor symbols are defined (#49790). - * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't - left-shift values that can be negative. + * builds/unix/ftconfig.in, builds/vms/ftconfig.h, + include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__', + and `__SUNPRO_C' correctly. - * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't - left-shift values that can be negative. +2016-12-22 Werner Lemberg - * src/raster/ftraster.c (SCALED): Correctly handle left-shift of - negative values. + * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'. - * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift - values that can be negative. + Reported as - * src/truetype/ttgload.c (TT_Load_Composite_Glyph, - compute_glyph_metrics, load_sbit_image): Don't left-shift values - that can be negative. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308 -2015-07-31 Werner Lemberg +2016-12-22 Werner Lemberg - Define FT_LONG_MAX. + [cff] Protect against invalid `vsindex' and `blend' values. - * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro. - * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it. + Reported as -2015-07-28 Alexei Podtelezhnikov + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 - * src/base/ftcalc.c (FT_Vector_NormLen): Clarify. + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Implement it. -2015-07-27 Alexei Podtelezhnikov +2016-12-22 Werner Lemberg - * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions. + [ftfuzzer] Always use Adobe CFF engine. -2015-07-26 Matthias Clasen + * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement + it. - [cff] Don't use `hmtx' table for LSB (#45520). +2016-12-21 Werner Lemberg - * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance - width only. Bug introduced 2015-04-10. + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. -2015-07-09 Werner Lemberg + I should really stop coding late in the evening... - Better support of user-supplied C++ namespaces. + Thanks again to Ben for checking. - See +2016-12-21 Werner Lemberg - http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html + [autofit] Support variation fonts. - for a rationale. + (This ChangeLog entry was added later on.) - * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, - src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, - src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h - (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose - header files that contain FT_{BEGIN,END}_HEADER macros by - themselves. + * src/autofit/afglobal.c (af_face_globals_free): Remove useless + code. - * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include - FT_CONFIG_STANDARD_LIBRARY_H earlier. + * 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. - * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H. +2016-12-21 Werner Lemberg -2015-07-07 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. - [sfnt] Make `tt_face_get_name' member of the SFNT interface. + Don't apply deltas twice for non-phantom points. - * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New - prototype. - (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'. + Spotted by Ben Wagner. - * src/sfnt/sfdriver.c (sfnt_interface): Updated. +2016-12-21 Werner Lemberg - * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'. - * src/sfnt/sfobjs.h: Add prototype for it. + [cff, truetype] Another try for #49829. -2015-06-30 Werner Lemberg + * src/cff/cffdrivr.c: Don't include + `FT_SERVICE_METRICS_VARIATIONS_H'. + (cff_get_advances): Use `ttface->variation_support'. - Fix some clang compiler warnings. + * src/truetype/ttdriver.c (tt_get_advances): Use + `ttface->variation_support'. - * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c - (cf2_interpT2CharString), src/truetype/ttgload.c - (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas), - src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues. + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Use `ttface->variation_support'. -2015-06-29 Alexei Podtelezhnikov +2016-12-21 Werner Lemberg - [truetype] Speed up bytecode interpreter. + [truetype, sfnt] Introduce font variation flags to `TT_Face'. - * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'. + * 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'. -2015-06-29 Alexei Podtelezhnikov + * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use + `variation_support'. - [base] Speed up emboldening. + * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support' + field. + (TT_Vary_Apply_Glyph_Deltas): Updated. - * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use - `FT_Vector_NormLen'. +2016-12-21 Werner Lemberg -2015-06-29 Alexei Podtelezhnikov + [base] Improve sanity check for Mac resources (#49888). - [base] Implement fast vector normalization. + * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not + positive. - The function uses Newton's iterations instead of dividing vector - components by its length, which needs a square root. This is, - literally, a bit less accurate but a lot faster. +2016-12-20 Werner Lemberg - * src/base/ftcalc.c (FT_Vector_NormLen): New function. + [base] More sanity checks for Mac resources. -2015-06-28 Werner Lemberg + We use - * CMakeLists.txt: Always create `ftconfig.h'. + https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format - For non-UNIX builds, the file stays unmodified. However, it's - better to have the main configuration files at the same place - regardless of the OS. + and -2015-06-28 Werner Lemberg + https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 - * CMakeLists.txt: Improve MSVC support (#43737). + as references. -2015-06-28 Werner Lemberg + * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short + for `res_id'. - [cmake] Check for libraries and create `ftoption.h'. + * 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. - * builds/FindHarfBuzz.cmake: New file, taken from +2016-12-20 Werner Lemberg - https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake + [truetype] Improve logic for getting fast advance widths. - * CMakeLists.Txt: Add path to local cmake modules. - Find dependencies for zlib, bzip2, libpng, and harfbuzz. - Create `ftoption.h' file. - Set up include and linker stuff for libraries. + * 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. -2015-06-28 Werner Lemberg +2016-12-20 Ben Wagner + Werner Lemberg - * CMakeLists.txt: Fix creation of `ftconfig.h'. - Check for UNIX header files using `check_include_file'. - Set up correct header include directories. + [truetype] Fix linear metrics of GX variation fonts (#49829). -2015-06-28 Werner Lemberg + 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. - * CMakeLists.txt: Disallow in-source builds. + Problem also reported as -2015-06-27 Werner Lemberg + https://bugs.chromium.org/p/skia/issues/detail?id=5917 - * src/tools/docmaker/utils.py (check_output): Add missing `\n'. + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Implement linear advance adjustments if `HVAR' + or `VVAR' tables are missing. -2015-06-26 Werner Lemberg +2016-12-20 Werner Lemberg - * CMakeLists.txt: Select platform-dependent `ftdebug.c'. + [cff, truetype] Fast advance width retrieval for fonts with HVAR. -2015-06-25 Werner Lemberg + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'. - Additionally, do this for UNIX only. + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. -2015-06-25 Werner Lemberg + * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (cff_get_advances): Test for HVAR and VVAR. - * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'. + * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR. -2015-06-25 Werner Lemberg +2016-12-18 Werner Lemberg - Another adjustment to header locations. + [base] Fix invalid mac font recursion. - This change is a result of a discussion thread on freetype-devel + Reported as - http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304 - Re-introduce the `freetype2' subdirectory for all FreeType header - files after installation, and rename the `freetype2' subdirectory in - the git repository to `freetype'. + * 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'. - * include/freetype2: Renamed to... - * include/freetype: This. +2016-12-18 Werner Lemberg - * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, - PRIVATE_HEADERS): Updated. - Update creation of `ftconfig.h'. - Install generated `ftconfig.h'. + * src/cff/cffobjs.c (cff_face_init): Make named instances work. - * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. +2016-12-18 Werner Lemberg - * builds/amiga/include/config/ftconfig.h, builds/freetype.mk - (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), - builds/unix/freetype2.in: Updated. + [truetype, cff] Extend `get_var_blend' function of MM service. - * builds/unix/freetype-config.in: Updated. - * builds/unix/configure.raw: Don't check for `rmdir'. - * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable - according to the autoconf info manual. - * builds/unix/install.mk (install, uninstall, - distclean_project_unix): Update and simplify. + In particular, we need access to named instance data. - * builds/wince/*, builds/windows/*: Updated. + * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): + Add argument for `FT_MM_Var'. - * devel/ft2build.h, include/ft2build.h: Updated. + * src/cff/cffload.c (cff_get_var_blend): Updated. + * src/cff/cffload.h: Updated. - * include/freetype2/config/ftheader.h, - include/freetype2/internal/ftserv.h, - include/freetype2/internal/internal.h: Update all header file - macros. + * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. - * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. + * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. + Accept value `NULL' for arguments. + * src/truetype/ttgxvar.h: Updated. - * docs/*: Updated. +2016-12-18 Werner Lemberg -2015-06-24 Alexei Podtelezhnikov + [sfnt] Handle `fvar' with zero axes as a non-MM font. - * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp. + This is better behaviour than exiting with an error. -2015-06-24 Alexei Podtelezhnikov + * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar' + field. - * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing. + * 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. -2015-06-23 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation + code. - s/TYPEOF/FT_TYPEOF/ (#45376). +2016-12-18 Werner Lemberg - * builds/unix/ftconfig.in, builds/vms/ftconfig.in, - include/freetype2/config/ftconfig.h, - include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it. + Minor GX code shuffling. -2015-06-22 Werner Lemberg + * include/freetype/internal/tttypes.h (TT_Face): Move + `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT + block. - Fix Savannah bug #45097. + * src/sfnt/sfobjs.c (sfnt_init_face): Updated. + * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro. + (TT_Load_Glyph): Use it. - We no longer `pollute' the namespace of possible header file names; - instead we move `ft2build.h' up by one level so that it gets - installed in the default include directory (e.g., - /usr/local/include). After this commit, only `ft2build.h' stays in - the compiler's include path. +2016-12-18 Werner Lemberg - No visible changes for the user who follows the standard FreeType - header inclusion rules. + [cff] Better handling of non-CFF font formats. - * include/*: Move to ... - * include/freetype2/*: This directory, except `ft2build.h'. + * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a + signature, so return `FT_Err_Unknown_File_Format' more often. - * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, - PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. +2016-12-17 Werner Lemberg - * builds/amiga/include/config/ftconfig.h, builds/freetype.mk - (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), - builds/unix/install.mk (install, uninstall), - builds/unix/freetype2.in: Updated. + * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code. - * builds/unix/freetype-config.in: Updated. - Emit -I directory only if it is not `/usr/include'. +2016-12-17 Werner Lemberg - * builds/wince/*, builds/windows/*: Updated. + * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code. - * devel/ft2build.h, include/ft2build.h: Updated. +2016-12-17 Werner Lemberg - * include/freetype2/config/ftheader.h, - include/freetype2/internal/ftserv.h, - include/freetype2/internal/internal.h: Update all header file - macros. + [sfnt, truetype] Various sanitizing fixes. - * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. + * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is + zero, set `num_instances' to zero. -2015-06-21 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with + zero axes as invalid. - Make Jam support work again. + * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading + `loca', `cvt', `fpgm', and `prep' table. - This is just very basic stuff and just a little bit tested on - GNU/Linux only. I won't delve into this since I'm not a Jam user. +2016-12-17 Werner Lemberg - * Jamfile: Call `HDRMACRO' for `ftserv.h' also. - (DEFINES): Replace with... - (CCFLAGS): ... this. + Improve tracing of `FT_Open_Face'. - * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is - already handled in the top-level Jamfile. + * 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. - * src/autofit/Jamfile (DEFINES): Replace with... - (CCFLAGS): ... this. - (_sources): Add missing files. + * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts. - * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no - longer contains macro header definitions. +2016-12-17 Werner Lemberg - * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile, - src/truetype/Jamfile (_sources): Add missing files. + * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. -2015-06-16 Werner Lemberg + Reported as - Fix Savannah bug #45326. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295 - * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate - definitions. +2016-12-16 Werner Lemberg -2015-06-07 Werner Lemberg + [truetype] Fix `cvar' sanity test. - * Version 2.6 released. - ======================= + Reported by Dave Arnold. + * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask. - Tag sources with `VER-2-6'. +2016-12-16 Werner Lemberg - * docs/VERSION.DLL: Update documentation and bump version number to - 2.6. + [cff, truetype] Remove compiler warnings; fix `make multi'. - * 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.5.5/2.6/, s/255/26/. + * src/cff/cf2font.h: Include `cffload.h'. - * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6. - (FREETYPE_PATCH): Set to 0. + * 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'. - * builds/unix/configure.raw (version_info): Set to 18:0:12. - * CMakeLists.txt (VERSION_MINOR): Set to 6. - (VERSION_PATCH): Set to 0. + * src/cff/cffload.h: Include `cffobjs.h'. + Provide declaration for `cff_load_private_dict'. - * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add - declarations for dumping functions. + * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate + `minorVersion' and `map_offset'. - * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler. +2016-12-16 Werner Lemberg - * builds/toplevel.mk: Use `freetype.mk's code to compute the version - string. - Don't include a zero patch level in version string. - * builds/freetype.mk: Remove code for computing the version string. + [cff] Fix heap buffer overflow (#49858). -2015-06-06 Ashish Azad + * src/cff/cffparse.c (cff_parser_run): Add one more stack size + check. - Fix Savannah bug #45260. +2016-12-15 Werner Lemberg - * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo. + Fix clang warnings. -2015-06-03 Werner Lemberg + * src/cff/cffload.c (cff_blend_doBlend): Add cast. + (cff_subfont_load): Set `error' correctly. - [truetype] Fix memory leak. + * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo. - Problem reported by Grissiom ; in +2016-12-15 Dave Arnold + Werner Lemberg - http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html + [cff] Implement CFF2 support (2/2). - there is an example code to trigger the bug. + 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). - * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size' - data before allocating again. Bug most probably introduced four - years ago in version 2.4.3. + * src/cff/cf2font.c (cf2_font_setup): Add support for font + variation. + * src/cff/cf2font.h (CF2_Font): Add fields for variation data. -2015-06-02 Werner Lemberg + * src/cff/cf2ft.c (cf2_free_instance): Free blend data. + (cf2_getVStore, cf2_getNormalizedVector): New functions. + * src/cff/cf2ft.h: Updated. - [raster] Add more tracing. + * 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. + + * 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. - * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define. - (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span, - Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls. + * src/cff/cffobjs.c (cff_face_done): Updated. -2015-06-01 Werner Lemberg + * 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] While tracing opcodes, show code position and stack. + * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend' + dictionary values. - * src/truetype/ttinterp.c: Change all existing TRACE7 calls to - TRACE6. - (opcode_name): Add string lengths. - (TT_RunIns): Implement display of code position and stack. + * 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. -2015-05-31 Werner Lemberg + * 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. - [truetype] In GX, make private point numbers work correctly. +2016-12-15 Dave Arnold + Werner Lemberg - This is completely missing in Apple's documentation: If a `gvar' - tuple uses private point numbers (this is, deltas are specified for - some points only), the uncovered points must be interpolated for - this tuple similar to the IUP bytecode instruction. Examples that - need this functionality are glyphs `Oslash' and `Q' in Skia.ttf. + [cff] Implement CFF2 support (1/2). - * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate, - tt_handle_deltas): New functions. - (TT_Vary_Get_Glyph_Deltas): Renamed to... - (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the - points and does no longer return an array of deltas. - Add tracing information. - Call `tt_handle_deltas' to interpolate missing deltas. - Also fix a minor memory leak in case of error. + This commit does not contain the blend code for font variation + support, which follows in another commit. - * src/truetype/ttgxvar.h: Updated. + You should ignore whitespace while inspecting this commit. - * src/truetype/ttgload.c (TT_Process_Simple_Glyph, - load_truetype_glyph): Updated. + * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2' + member. -2015-05-31 Werner Lemberg + * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member. - [truetype] In GX, make intermediate tuplets work at extrema. + * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2' + flag. + (cf2_getMaxstack): New function. + * src/cff/cf2ft.h: Updated. - * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition. + * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum. + (cf2_interpT2CharString): Handle CFF2 differences. + Add tracing message for errors. -2015-05-31 Werner Lemberg + * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index): + Update for CFF2. - [truetype] Add tracing information to GX code. + * 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 (ft_var_load_avar, ft_var_load_gvar, - ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend, - TT_Set_Var_Design, tt_face_vary_cvt): Do it. + * src/cff/cffobjs.c (cff_face_init): Handle CFF2. -2015-05-28 Werner Lemberg + * 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/tools/apinames.c (names_dump): Fix invalid reference. + * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend + stuff). - Problem reported by Guzman Mosqueda, Jose R - . + * 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. -2015-05-24 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table. - [truetype] Fix commit from 2015-05-22. +2016-12-15 Werner Lemberg + Dave Arnold - * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code - with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'. + [truetype] Provide HVAR advance width variation as a service. - Problem reported by Nikolaus Waxweiler . + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. -2015-05-23 Werner Lemberg + * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. - [truetype] Fix return values of GETINFO bytecode instruction. + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent + double adjustment of advance width. - * src/truetype/ttinterp.h (TT_ExecContextRec): New fields - `vertical_lcd' and `gray_cleartype'. + * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (tt_face_get_metrics): Apply metrics variations. - * src/truetype/ttgload.c (tt_loader_init): Initialize new fields. - Change `symmetrical smoothing' to TRUE, since FreeType produces - exactly this. +2016-12-15 Dave Arnold + Werner Lemberg - * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit - values for symmetrical smoothing, namely 11/18. - Handle bits for vertical LCD subpixels (8/15) and Gray ClearType - (12/19). + [truetype] Provide function to apply `HVAR' advance width variation. -2015-05-23 Werner Lemberg + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - [truetype] Minor. + * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function. + * src/truetype/ttgxvar.h: Updated. - * src/truetype/ttinterp.h (TT_ExecContext): - s/subpixel/subpixel_hinting. +2016-12-15 Dave Arnold + Werner Lemberg - * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated. + [truetype] Add `HVAR' table parsing. -2015-05-22 Werner Lemberg + Note that this is not complete yet; it only handles advance width + variation. - [truetype] Support selector index 3 of the INSTCTRL instruction. + Activation of the code follows in another commit. - This flag activates `native ClearType hinting', disabling backwards - compatibility mode as described in Greg Hitchcocks whitepaper. In - other words, it enables unrestricted functionality of all TrueType - instructions in ClearType. + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. - * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks' - unconditionally. - (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of - `GS.instruct_control' is active. + * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member. - * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3. - (Ins_GETINFO): Updated. + * 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. - * docs/CHANGES: Document it. + * 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. -2015-05-20 Werner Lemberg +2016-12-15 Dave Arnold - [truetype] Minor. + [cff] Extend number parsing. - * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod' - argument. + The forthcoming CFF2 support needs a dynamic parsing limit. -2015-05-17 Werner Lemberg + * 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. - [truetype] Fix loading of composite glyphs. + * src/cff/cffparse.h (cff_parse_num): Export locally. - * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the - ARGS_ARE_XY_VALUES flag is not set, handle argument values as - unsigned. I trust `ttx' (which has exactly such code) that it does - the right thing here... +2016-12-15 Dave Arnold - The reason that noone has ever noticed this bug is probably the fact - that point-aligned subglyphs are rare, as are subglyphs with a - number of points in the range [128;255], which is quite large (or - even in the range [32768;65535], which is extremely unlikely). + [cff] Implement dynamic stack size for Adobe engine. -2015-05-12 Chris Liddell + This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for + the forthcoming CFF2 support. - [cff] Make the `*curveto' operators more tolerant. + * 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. - * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes - `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate, - pulling values off the stack until the stack is exhausted. - Implicitly the stack must be a multiple (or for subtly different - behaviour) a multiple plus a specific number of extra values deep. - If that's not the case, enforce it (as the old code did). + * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member. + Update function declarations. -2015-05-12 Chris Liddell + * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated. - [cff] fix incremental interface with new cff code. + * src/cff/cffparse.c (cff_parser_init): Add parameter for stack + size; return error code. + (cff_parser_done): New function. + (cff_parser_run): Updated. - * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental - interface to retrieve glyph data for a SEAC, it be left to the - incremental interface callback to apply the encoding to raw - character index (as it was in the previous code). + * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make + `stack' a pointer. + Update function declarations. -2015-04-29 Alexei Podtelezhnikov + * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load): + Updated. - [autofit] Speed up IUP. +2016-12-15 Dave Arnold + Werner Lemberg - * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to - the same position from true interpolation, use `scale' to reduce - divisions. + [cff] Code shuffling. -2015-04-28 Werner Lemberg + * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' + fields. - [cff] Use `name' table for PS name if we have a SFNT-CFF. + * 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. - This follows the OpenType 1.7 specification. See +2016-12-14 Werner Lemberg - http://tug.org/pipermail/tex-live/2015-April/036634.html + [sfnt, truetype] Add framework for Metrics Variations service. - for a discussion. + No effect yet; service functions will be implemented later on. - * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we - have an SFNT. + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. -2015-04-27 Alexei Podtelezhnikov + * include/freetype/internal/services/svmetric.h: New file. - [truetype] Speed up IUP. + * include/freetype/internal/ftserv.h + (FT_SERVICE_METRICS_VARIATIONS_H): New macro. - * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial - snapping to the same position from true interpolation. + * include/freetype/internal/tttypes.h (TT_Face): New field `var'. -2015-04-21 Werner Lemberg + * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (sfnt_init_face): Initialize `face->var'. - [autofit] By default, enable warping code but switch off warping. + * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H. + (tt_service_metrics_variations): New service. + (tt_services): Updated. - Suggested by Behdad. + * src/truetype/ttpic.h: Updated. - * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER. +2016-12-14 Werner Lemberg - * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping' - with `false'. + [cff] Add Multiple Masters service. -2015-04-21 Werner Lemberg + The code simply uses the MM functions from the `truetype' module. - * docs/CHANGES: Updated. + Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. -2015-04-21 Werner Lemberg + * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. - [autofit] Introduce `warping' property. + * 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. - This code replaces the debugging hook from the previous commit with - a better, more generic solution. + * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New + functions. + * src/cff/cffload.h: Updated. - * include/ftautoh.h: Document it. + * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. - * src/autofit/afmodule.h (AF_ModuleRec) - [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field. + * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. + (sfnt_init_face): Initialize `face->mm'. - * src/autofit/afmodule.c (_af_debug_disable_warper): Remove. - (af_property_set, af_property_get, af_autofitter_init) - [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option. +2016-12-14 Werner Lemberg - * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no - longer existing `_af_debug_disable_warper'. + Extend functionality of `ft_module_get_service'. - * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c - (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init) - [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the - scaler flags if warping is off. + It can now differentiate between local and global searches. - * src/autofit/aftypes.h: Updated. + * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. + (FT_Get_TrueType_Engine_Type): Updated. -2015-04-16 Werner Lemberg + * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. - [autofit] Add debugging hook to disable warper. + * include/freetype/internal/ftobjs.h: Updated. + * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): + Updated. - * src/autofit/afmodule.c (_af_debug_disable_warper) - [FT_DEBUG_AUTOFIT]: New global variable. +2016-12-14 Werner Lemberg - * src/autofit/aftypes.h: Updated. - (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet). + * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning. - * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro. +2016-12-14 Dave Arnold + Werner Lemberg - * src/autofit/aflatin.c (af_latin_hints_apply) - [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use - of warper. + [sfnt, cff] Minor preparations. - * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply) - [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. + * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, + TTAG_VVAR): New SFNT table tags. - * src/autofit/aflatin2.c (af_latin2_hints_apply) - [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. + * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast. -2015-04-10 Werner Lemberg +2016-12-10 Werner Lemberg - [cff] Update advance width handling to OpenType 1.7. + [truetype, type1] Add `get_var_blend' to MM service. - Problem reported by Behdad. + For internal use; we want to share code between the forthcoming CFF2 + support and TrueType. - * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case - separately. + * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): + New typedef. + (MultiMasters): Add `get_var_blend'. + (FT_Service_MultiMasters): Updated. - * src/cff/cffgload.c (cff_slot_load): Use advance width and side - bearing values from `hmtx' table if present. + * src/truetype/ttgxvar.c (tt_get_var_blend): New function. + * src/truetype/ttgxvar.h: Updated. -2015-04-03 Alexei Podtelezhnikov + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + * src/type1/t1driver.c (t1_service_multi_masters): Updated. - * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop. +2016-12-10 Werner Lemberg -2015-04-02 Alexei Podtelezhnikov + [truetype, type1] Add `done_blend' to MM service. - * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic. + For internal use; we want to share code between the forthcoming CFF2 + support and TrueType. -2015-04-01 Alexei Podtelezhnikov + * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): + New typedef. + (MultiMasters): Add `done_blend'. + (FT_Service_MultiMasters): Updated. - [autofit] Finish the thought. + * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. + * src/truetype/ttgxvar.h: Updated. - * src/autofit/afhints.c (af_direction_compute): make sure the long arm - is never negative so that its `FT_ABS' is not necessary. + * src/truetype/ttobjs.c (TT_Face_Done): Updated. -2015-04-01 Werner Lemberg + * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. + * src/type1/t1driver.c (t1_service_multi_masters): Updated. - [autofit] Call dumper functions for tracing. +2016-12-09 Werner Lemberg - * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code. - * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor - improvement. - * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it. + [sfnt] Revert change from 2016-12-08. -2015-04-01 Werner Lemberg + I missed the functionality of `ft_module_get_service', which makes + the change unnecessary. - [autofit] Make debugging stuff work again. +2016-12-08 Werner Lemberg - The interface to ftgrid was broken in the series of commits starting - with + Add framework to support services with 8 functions. - [autofit] Allocate AF_Loader on the stack instead of AF_Module. + We will need this for CFF variation font support. - from 2015-01-14. + * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8): + New macro. - * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]: - Use a global AF_GlyphHintsRec object for debugging. - (af_autofitter_done, af_autofitter_load_glyph): Updated. +2016-12-08 Werner Lemberg - * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated. + [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface. -2015-04-01 Werner Lemberg + CFF2 fonts will need access to those two functions. - * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko. + * 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. -2015-03-29 Werner Lemberg + * 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. - [cff] Fix Savannah bug #44629. +2016-12-06 Dave Arnold - * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h - (CFF_MAX_SUBRS_CALLS): Set to 16. + Add `FT_Get_Var_Design_Coordinates' function. -2015-03-29 Werner Lemberg + Note that the low-level functions aren't implemented yet. - [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'. + * include/freetype/ftmm.h: Declare. - This commit allows `num_coords' to be larger or smaller than the - number of available axes while selecting a design instance, either - ignoring excess data or using defaults if data is missing. + * 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. - * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): - Implement it. + * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. - * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design, - T1_Set_Var_Design): Ditto. + * src/truetype/ttdriver.c: Updated. -2015-03-29 Werner Lemberg + * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to + handle `get_var_design' service. + * src/truetype/ttgxvar.h: Updated. - [type1] Minor. + * src/type1/t1driver.c: Updated. - * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use - FT_THROW. - (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW. + * src/type1/t1load.c (T1_Get_Var_Design): New dump function to + handle `get_var_design' service. + * src/type1/t1load.h: Updated. -2015-03-27 Werner Lemberg +2016-12-06 Werner Lemberg - [cff] Trace charstring nesting levels. + * src/type1/t1load.c (parse_subrs): Fix memory leak. - * src/cff/cf2intrp.c (cf2_interpT2CharString) : Implement it. + The `subrs' keyword might erroneously occur multiple times. - * src/cff/cffgload.c (cff_decoder_parse_charstrings) - : Ditto. + Reported as -2015-03-21 Alexei Podtelezhnikov + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231 - [base] Optimize `FT_Angle_Diff'. +2016-12-01 Werner Lemberg - Under normal circumstances we are usually close to the desired range - of angle values, so that the remainder is not really necessary. + [gzip] Improve building with external zlib (#49673). - * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder. + Building FreeType with external zlib 1.2.8 makes msvc 14 stop with + the following error. - * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro. + 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 -2015-03-21 Werner Lemberg + 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 - [truetype] Improve `gvar' handling. + #include - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle - single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger - than the default. + which correctly finds an external `zlib.h', but `zlib.h' itself has + a line -2015-03-20 Alexei Podtelezhnikov + #include "zconf.h" - * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring. + which makes Visual Studio 2015 find `src/gzip/zconf.h' while + compiling the files in `src/gzip'. -2015-03-17 Alexei Podtelezhnikov + * src/gzip/zconf.h: Rename to... + * src/gzip/ftzconf.h: ... this. + * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. - Fix Savannah bug #44412 (part 2). +2016-12-01 Oleksandr Chekhovskyi - * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'. + [autofit] Fix Emscripten crash (patch #9180). -2015-03-11 Werner Lemberg + Function calls through pointers must use a matching signature to + work on Emscripten, since such calls are dispatched through lookup + tables grouped by signature. - [autofit] Add support for Arabic script. + * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix + typedef. - Thanks to Titus Nemeth for guidance! +2016-11-29 Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Arabic. + [smooth] Revert previous commit. Already fixed with 6ca54c64. - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. +2016-11-29 Werner Lemberg - * src/autofit/afscript.h: Add Arabic standard characters. + [smooth] Avoid conditional jump on uninitialized value (#49711). - * src/autofit/afranges.c: Add Arabic data. + * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'. - * src/autofit/afstyles.h: Add Arabic data. +2016-11-27 Nikolaus Waxweiler - * docs/CHANGES: Document it. + [autofit] Code shuffling. -2015-03-11 Werner Lemberg + Also improve some comments and remove unused code. - Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols. + No functional change. - * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed - to... - (FT_SERVICE_FONT_FORMAT_H): This. + * 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. - * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed - to ... - (FT_FONT_FORMAT_*): This. +2016-11-17 Werner Lemberg - src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c, - src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, - src/truetype/ttdriver.c, src/type1/t1driver.c, - src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated. + Better support of LLP64 systems with gcc (and clang). -2015-03-11 Werner Lemberg + * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'. - [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'. + * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and + suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'. - * include/config/ftheader.h: Implement it. - * src/base/ftfntfmt.c, docs/CHANGES: Updated. +2016-11-10 Werner Lemberg -2015-03-11 Werner Lemberg + Fix `lcd_weights' array size. - [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'. + * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it. - * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it. + Reported by Nikolaus. - * docs/CHANGES: Updated. +2016-11-06 Werner Lemberg -2015-03-11 Werner Lemberg + * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing. - Fix automatic copyright updating. +2016-11-06 Werner Lemberg - * src/tools/update-copyright: Make scanning of `no-copyright' - actually work. + [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format. - * src/tools/no-copyright: Don't include README in general. + It's unavoidable to call the PNG engine, but to get the metrics it + is sufficient to read the PNG image's header only. -2015-03-11 Werner Lemberg + * 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. - Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'. +2016-11-06 Werner Lemberg - CMakeLists.txt, 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/bld.inf, - 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, docs/INSTALL.ANY, - include/config/ftheader.h, include/ftfntfmt.h, modules.cfg, - src/base/ftfntfmt.c, vms_make.com: Updated. + [sfnt] Speed up `sbix' lookup. -2015-03-10 Alexei Podtelezhnikov + This also fixes a bug introduced in 2016-10-01 which prevents + display of embedded bitmap fonts that use the `sbix' format. - Fix Savannah bug #44412 (part 1). + * 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. - * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns. + (tt_face_load_strike_metrics) : Use + `ebdt_size' and `ebdt_start' + (tt_face_load_sbix_image): Ditto. -2015-03-10 Werner Lemberg +2016-11-06 Seigo Nonaka + Werner Lemberg - [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'. + Introduce a way of quickly retrieving (embedded) bitmap metrics. - * include/ftbitmap.h, src/base/ftbitmap.c: Implement it. - Update all callers. + `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. - * docs/CHANGES: Updated. + * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New + macro. -2015-03-06 Werner Lemberg + * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if + FT_LOAD_BITMAP_METRICS_ONLY is used. - * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. + * 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. - Found by Alexei. + * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if + `FT_LOAD_BITMAP_METRICS_ONLY' is set. -2015-03-05 Alexei Podtelezhnikov + * 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. - * src/base/ftstroke.c: Simplify. + * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. -2015-03-04 Werner Lemberg + * docs/CHANGES: Updated. - [truetype] Some fixes and code refactoring in `ttgxvar.c'. +2016-11-06 Werner Lemberg - * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value - of `point_cnt' if two bytes are read. - Use a more vertical coding style. - (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter. - Use a more vertical coding style. + Synchronize with gnulib (#49448). -2015-03-03 Werner Lemberg + * 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. - [autofit] Fix Savannah bug #44241. +2016-11-03 Behdad Esfahbod - * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs - with less than 3 points. + [truetype] Clamp variation requests to valid range. -2015-03-02 Werner Lemberg + This is required by OpenType 1.8; it also avoids rounding surprises. - Simplify `TYPEOF' macro. + * 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. - No need for two arguments. +2016-10-29 Werner Lemberg - * include/config/ftconfig.h, builds/unix/ftconfig.in, - builds/vms/ftconfig.h (TYPEOF): Updated. + [truetype] Remove clang warnings. - * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), - src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated. + * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for + loop counter handling. -2015-03-01 Werner Lemberg + * src/truetype/ttinterp.c: Updated. + (Ins_SCANTYPE): Use signed constant. + (TT_RunIns): Ensure `num_twilight_points' is 16bit. - Various compiler warning fixes for `make multi'. +2016-10-27 Werner Lemberg - * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), - src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, - af_latin_hint_edges), src/autofit/aflatin2.c - (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare - as `static'. + [truetype] Fix commit from 2014-11-24. - * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): - Removed. Unused. - * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. - * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. + Problem reported by Hin-Tak Leung . - * src/cff/cf2intrp.c: Include `cf2intrp.h'. - * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. + * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking + logic. - * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. +2016-10-26 Werner Lemberg - * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. + Add `FT_Get_{MM,Var}_Blend_Coordinates' functions. - * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): - Removed. Unused. + * include/freetype/ftmm.h: Declare. - * src/raster/ftraster.c (Render_Glyph): Declare as `static'. + * 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. - * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. + * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, + FT_Get_Var_Blend_Coordinates): Implement. - * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. - * src/truetype/ttsubpix.c (is_member_of_family_class, - is_member_of_style_class): Declare as `static'. + * src/truetype/ttdriver.c: Updated. - * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare - as `static'. - * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as - `static'. - (T1_FIELD_COUNT): Removed. Unused. - * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. + * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle + `get_mm_blend' service. + * src/truetype/ttgxvar.h: Updated. - * src/type42/t42parse.c (T1_Done_Table): Removed. Unused. + * src/type1/t1driver.c: Updated. -2015-02-25 Werner Lemberg + * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle + `get_mm_blend' service. + * src/type1/t1load.h: Updated. - [psaux] Signedness fixes. + * docs/CHANGES: Document. - * include/internal/psaux.h, src/psaux/afmparse.c, - src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c, - src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply. +2016-10-26 Werner Lemberg -2015-02-25 Werner Lemberg + * src/type1/t1load.c (parse_subrs): Fix limit check. - [otvalid] Signedness fixes. + Reported as - * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c, - src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c: - Apply. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81 -2015-02-25 Werner Lemberg +2016-10-25 Alexei Podtelezhnikov - * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix. + [cff] Correct cmap format reporting (#24819). -2015-02-25 Werner Lemberg + * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic + charmap instead of guessing its format and language. - [lzw] Signedness fixes. +2016-10-22 Werner Lemberg - * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply. + [truetype] Fix SCANTYPE instruction (#49394). -2015-02-25 Werner Lemberg + * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits. - [gxvalid] Signedness fixes. +2016-10-22 Werner Lemberg - * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c, - src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c, - src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c, - src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c, - src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c, - src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c, - src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply. + [sfnt] Improve handling of invalid post 2.5 tables [#49393]. -2015-02-25 Werner Lemberg + * src/sfnt/ttpost.c (load_format_25): We need at least a single + table entry. - [cache] Signedness fixes. +2016-10-14 Werner Lemberg - * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c, - src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply. + [truetype] Fix handling of `cvar' table data. -2015-02-25 Werner Lemberg + Reported as - Change dimension fields in `FTC_ImageTypeRec' to unsigned type. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53 - This doesn't break ABI. + * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT + indices. - * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for - `width' and `height'. +2016-10-11 Werner Lemberg - * docs/CHANGES: Document it. + [psaux] Fix handling of invalid flex subrs. -2015-02-25 Werner Lemberg + Problem reported as - [cache] Don't use `labs'. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52 - This is the only place in FreeType where this function was used. + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Set `flex_state' after error checking. - * include/config/ftstdlib.h (ft_labs): Remove. +2016-10-11 Werner Lemberg - * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with - `FT_ABS'. + * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation. -2015-02-23 Werner Lemberg +2016-10-08 Werner Lemberg - [cache] Replace `FT_PtrDist' with `FT_Offset'. + * src/cid/cidload.c (cid_face_open): Properly propagate `error'. - * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t') - is a better choice for `hash' to hold a pointer than `FT_PtrDist' - (a.k.a. `ptrdiff_t'), especially since the latter is signed, - causing zillions of signedness warnings. [Note that `hash' was of - type `FT_UInt32' before the change to `FT_PtrDist'.] - Update all users. +2016-10-08 Werner Lemberg - * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c, - src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated. + [cid] Fix parsing of subr offsets. -2015-02-23 Werner Lemberg + Bug introduced 2016-05-16. - [smooth, raster] Re-enable standalone compilation. + * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error. - * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX) - [_STANDALONE_]: Define macros. +2016-10-01 Werner Lemberg - * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS, - FT_HYPOT) [_STANDALONE_]: Define macros. + [sfnt] Disable bitmap strikes if we don't have a bitmap data table. -2015-02-22 Werner Lemberg + * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have + a bitmap data table. - [smooth] Signedness fixes. +2016-10-01 Alexei Podtelezhnikov - * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply. + [smooth] Remove impossibility. -2015-02-22 Werner Lemberg + * src/smooth/ftgrays.c (TWorker): Rearrange fields. + (gray_convert_glyph): Remove impossible condition and clean up. - * src/raster/ftraster.c: Use the file's typedefs everywhere. +2016-09-29 Werner Lemberg -2015-02-22 Werner Lemberg + [pcf] Enrich family name with foundry name and glyph width info. - * src/sfnt/ttpost.c (load_format_20): Fix error tracing message. + This is a very old patch from openSuSE (from 2006, submitted to + FreeType in 2011) that I forgot to apply. - Bug introduced 6 commits earlier. + https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch -2015-02-22 Werner Lemberg + 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. - [pshinter] Fix thinko. + We also check whether we have `wide' characters; all put together, + we get family names like `Sony Fixed' or `Misc Fixed Wide'. - * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly - check `count'. - Bug introduced two commits earlier. + * src/pcf/pcfread.c (pcf_load_font): Implement it. -2015-02-22 Werner Lemberg + * docs/CHANGES: Document it. - [raster] Signedness fixes. +2016-09-29 Werner Lemberg - * src/raster/ftraster.c, src/raster/ftrend1.c: Apply. + [ftfuzzer] Speed up. -2015-02-22 Werner Lemberg + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't + check for embedded bitmaps if we have a non-default instance. - [pshinter] Signedness fixes. +2016-09-29 Werner Lemberg - * src/pshinter/pshalgo.c, src/pshinter/pshglob.c, - src/pshinter/pshrec.c: Apply. + [truetype] Disallow bitmap strikes for non-default instances. -2015-02-22 Werner Lemberg + Also speed up access of default instances if GX variations are + active. - [pshinter] Use macros for (unsigned) flags, not enumerations. + * include/freetype/internal/tttypes.h (TT_FaceRec): Add + `is_default_instance' member. - * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros. - Updated. - * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros. + * src/sfnt/sfobjs.c (sfnt_init_face): Initialize + `is_default_instance'. -2015-02-22 Werner Lemberg + * 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. - * src/pshinter/pshrec.c: Simplify. - (ps_hints_open, ps_hints_stem): Remove switch statement. + * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute + `is_default_instance'. -2015-02-22 Werner Lemberg +2016-09-29 Werner Lemberg - [sfnt] Signedness fixes. + [truetype] Clean up `TT_Face' structure. - * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c, - src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c, - src/sfnt/ttsbit.c: Apply. - * src/sfnt/sfdriver.c: Apply. - (sfnt_get_ps_name): Simplify. + * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused + fields `horz_metrics' and `vert_metrics'. + Update documentation. -2015-02-22 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_done_face): Updated. - [bdf] Signedness fixes. +2016-09-28 Werner Lemberg - * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h, - src/bdf/bdflib.c: Apply. + More FT_ZERO usage. -2015-02-22 Werner Lemberg + * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): + s/ft_memset/FT_MEM_ZERO/. - * src/bdf/bdflib.c (_bdf_atous): New function. - (_bdf_parse_glyphs, _bdf_parse_start): Use it. + * src/psaux/t1decode.c (t1_decoder_parse_charstrings): + s/ft_memset/FT_ARRAY_ZERO/. -2015-02-22 Werner Lemberg + * 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/. - [pcf] Signedness fixes. + * 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/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply. - * src/pcf/pcfread.c: Apply. - (pcf_get_encodings): Ignore invalid negative encoding offsets. +2016-09-28 Werner Lemberg -2015-02-21 Werner Lemberg + */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate. - * src/winfonts/winfnt.c: Signedness fixes. +2016-09-27 Werner Lemberg -2015-02-21 Werner Lemberg + [truetype] Trace number of executed opcodes. - [type42] Signedness fixes. + * src/truetype/ttinterp.c (TT_RunIns): Implement it. - * src/type42/t42parse.c, src/type42/t42parse.h, - src/type42/t42types.h: Apply. +2016-09-27 Werner Lemberg -2015-02-21 Werner Lemberg + [truetype] Speed up `TT_Load_Glyph'. - [pfr] Signedness fixes. + This avoids additional calls to `tt_face_lookup_table' for the + `glyf' table, which can be expensive. - * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c, - src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c, - src/pfr/pfrtypes.h: Apply. + * 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. -2015-02-21 Werner Lemberg +2016-09-27 Werner Lemberg - [cff] Minor signedness fixes related to last commit. + [truetype] Introduce dynamic limits for some bytecode opcodes. - * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply. + This speeds up FreeType's handling of malformed fonts. -2015-02-20 Werner Lemberg + * 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. - [cff] Thinkos in bias handling. + * src/truetype/ttinterp.h (TT_ExecContext): Updated. - Only the final result is always positive. + * docs/CHANGES: Updated. - Bug introduced three commits earlier. +2016-09-25 Werner Lemberg - * src/cff/cffgload.c, src/cff/cffgload.h: Apply. + [truetype] Sanitize only last entry of `loca' table. -2015-02-20 Werner Lemberg + 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). - [cid] Fix signedness issues and emit some better error codes. + * src/truetype/ttpload.c (tt_face_get_location): Implement. + Improve tracing messages. - * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c, - src/cid/cidparse.h: Apply. - * src/cid/cidload.c: Apply. - (parse_fd_array): Reject negative values for number of dictionaries. - * src/cid/cidparse.c: Apply. - (cid_parser_new): Reject negative values for hex data length. +2016-09-25 Werner Lemberg -2015-02-20 Werner Lemberg + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo. - [cff] Signedness fixes for new engine. +2016-09-24 Werner Lemberg - * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c, - src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply. + [autofit] Tracing fixes. -2015-02-20 Werner Lemberg + * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping + functions only if we actually do tracing. - [cff] Signedness fixes for basic infrastructure and old engine. +2016-09-22 Alexei Podtelezhnikov - * include/internal/pshints.h, src/cff/cffdrivr.c, - src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c, - src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply. + [smooth] Reduce divisions in the line renderer. -2015-02-19 Werner Lemberg + We don't need some divisions if a line segments stays within a single + row or a single column of pixels. - * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'. + * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions + conditional. - This is hard-coded to value 2 in `fvar' version 1.0 (and no newer - version exists), but some fonts set it incorrectly. +2016-09-15 Alexei Podtelezhnikov - Problem reported by Adam Twardoch . + * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table. -2015-02-19 Werner Lemberg +2016-09-14 Alexei Podtelezhnikov - [cff] Emit better error code for invalid private dict size. + [smooth] Another tiny speed-up. - * src/cff/cffparse.c (cff_parse_private_dict): Reject negative - values for size and offset. + * src/smooth/ftgrays.c (gray_find_cell): Merge into... + (gray_record_cell): ... this function. -2015-02-19 Werner Lemberg +2016-09-11 Alexei Podtelezhnikov - [autofit] Fix signedness issues. + * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code. - * src/autofit/afangles.c, src/autofit/afcjk.c, - src/autofit/afglobal.c, src/autofit/afhints.c, - src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c, - src/autofit/hbshim.c: Apply. +2016-09-11 Alexei Podtelezhnikov -2015-02-19 Werner Lemberg + [smooth] Fix valgrind warning and reoptimize. - [autofit] Use macros for (unsigned) flags, not enumerations. + 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. - This harmonizes with other code in FreeType (and reduces the number - of necessary casts to avoid compiler warnings). + * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. + (gray_convert_glyph): Remove initialization introduced by 44b172e88. - * src/autofit/afblue.hin: Make flag macros unsigned. - * src/autofit/afblue.h: Regenerated. +2016-09-10 Werner Lemberg - * src/autofit/afcjk.h: Replace flag enumeration with macros. - * src/autofit/afcjk.c: Updated. + [sfnt] Fix previous commit. - * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with - macros. - * src/autofit/afhints.c: Updated. + Problems reported as - * src/autofit/aflatin.h: Replace flag enumerations with macros. - * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40 - * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros. + We now map the strike index right before accessing the physical + data, not earlier. -2015-02-18 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map' + after creating the map so that... - [type1] Fix signedness issues. + * 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. - * include/internal/psaux.h, include/internal/t1types.h, - src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c, - src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply. + * src/truetype/ttdriver.c (tt_size_select): Revert change. -2015-02-18 Werner Lemberg +2016-09-09 Werner Lemberg - [psaux, type1] Fix minor AFM issues. + [ftfuzzer] Minor improvements. - * include/internal/t1types.h (AFM_KernPairRec): Make indices - unsigned. - Update users. - (AFM_FontInfoRec): Make element counters unsigned. - Update users. - * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned - int. + * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore + invalid strikes. + Use better values for call to `FT_Set_Char_Size'. - * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): - Reject negative values for number of kerning elements. +2016-09-09 Werner Lemberg - * src/type1/t1afm.c, src/tools/test_afm.c: Updated. + [sfnt] Don't provide (completely) broken strike data. -2015-02-18 Werner Lemberg + FreeType tries to sanitize strike header data; we now reject + completely broken ones. - Don't use `FT_PtrDist' for lengths. + * include/freetype/internal/tttypes.h (TT_FaceRec): New + `sbit_strike_map' array pointer. - Use FT_UInt instead. + * src/base/ftobjs.c (FT_Match_Size): Reject matches where either + width or height would be zero. + Add tracing message in case of error. - * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec, - T1_DecoderRec): Do it. + * 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. - * include/internal/t1types.h (T1_FontRec): Ditto. + * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use + `sbit_strike_map'. + (tt_face_load_strike_metrics): Improve tracing. - * src/cid/cidload.c (cid_parse_dict): Updated. - * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto. - * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto. - * src/type1/t1load.c (parse_blend_axis_types, parse_encoding, - parse_charstrings, parse_dict): Ditto. - * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings, - t42_parse_dict): Ditto. + * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'. -2015-02-18 Werner Lemberg +2016-09-08 Werner Lemberg - * src/type1/t1driver.c (t1_ps_get_font_value): Clean up. - This handles negative values better, avoiding many casts. + * Version 2.7 released. + ======================= -2015-02-17 Werner Lemberg - [base] Fix Savannah bug #44284. + Tag sources with `VER-2-7'. - * src/base/ftcalc.c (FT_MulFix): Typos. + * docs/VERSION.TXT: Add entry for version 2.7. -2015-02-17 Werner Lemberg + * 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/. - [truetype] Finish compiler warning fixes for signedness issues. + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7. + (FREETYPE_PATCH): Set to 0. - * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c, - src/truetype/ttsubpix.h: Apply. + * builds/unix/configure.raw (version_info): Set to 18:6:12. + * CMakeLists.txt (VERSION_MINOR): Set to 7. + (VERSION_PATCH): Set to 0. -2015-02-17 Werner Lemberg + * docs/CHANGES: Updated. - * src/truetype/ttsubpix.c: Adding missing `static' keywords. +2016-09-08 Werner Lemberg -2015-02-17 Werner Lemberg + * src/truetype/ttinterp.c: Include `ttgxvar.h'. - [truetype] More signedness fixes. + This fixes the `multi' build. - * include/internal/tttypes.h, src/truetype/ttinterp.h, - src/truetype/ttobjs.h, src/truetype/ttinterp.c, - src/truetype/ttobjs.c: Apply. +2016-09-08 Werner Lemberg -2015-02-17 Werner Lemberg + [autofit] Another improvement to Armenian support. - [truetype] Various signedness fixes. + Suggested by Hrant H Papazian . - * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply. + * src/autofit/afscript.h: Use better suited characters to derive + default stem widths. - * src/truetype/ttgload.c: Apply. - (TT_Get_VMetrics): Protect against invalid ascenders and descenders - while constructing advance height. +2016-09-07 Alexei Podtelezhnikov -2015-02-16 Werner Lemberg + * src/smooth/ftgrays.c (gray_hline): Micro-optimize. - [base] Finish compiler warning fixes for signedness issues. +2016-09-06 Alexei Podtelezhnikov - * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c: - Apply. + [smooth] Operate in absolute bitmap coordinates. -2015-02-16 Werner Lemberg + Simpler bitmap addressing improves performance by 1.5%. - * include/tttables.h (TT_OS2): `fsType' must be FT_UShort. + * 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. -2015-02-16 Werner Lemberg +2016-09-06 Alexei Podtelezhnikov - More minor signedness warning fixes. + [smooth] Improve contour start (take 2). - * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c, - src/base/ftutil.c: Apply. + * 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. -2015-02-16 Werner Lemberg +2016-09-06 Werner Lemberg - Next round of minor compiler warning fixes. + [type1] MM fonts support exactly zero named instances (#48748). - * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member - type to `FT_Long'. - (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword. + * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero. - * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'. +2016-09-06 Jonathan Kew - * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c: - Signedness fixes. + [cff] Fix uninitialized memory. -2015-02-16 Werner Lemberg + Problem reported as - Various minor signedness fixes. + https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 - * include/ftadvanc.h, include/internal/ftobjs.h, - src/base/ftgloadr.c, src/base/ftobjs.c: Apply. + * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage' + array to handle a `get' opcode without a previous `put'. -2015-02-16 Werner Lemberg +2016-09-05 Alexei Podtelezhnikov - New `TYPEOF' macro. + * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert. - This helps suppress signedness warnings, avoiding issues with - implicit conversion changes. +2016-09-05 Alexei Podtelezhnikov - * include/config/ftconfig.h, builds/unix/ftconfig.in, - builds/vms/ftconfig.h (TYPEOF): Define. + [smooth] Improve contour start. - * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), - src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it. + * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly + instead of... + (gray_start_cell): ... this function, which is removed. -2015-02-16 Werner Lemberg +2016-09-05 Werner Lemberg - * src/base/ftsystem.c: Use casts in standard C function wrappers. - (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it. + [cff] Fix memory initialization. -2015-02-16 Werner Lemberg + * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' + variants of FreeType's memory allocation macros don't do zeroing. - Fix Savannah bug #44261. +2016-09-05 Werner Lemberg - * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the - environment also while calling the configure script. + [ftrandom] Minor improvements. -2015-02-16 Werner Lemberg + * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to + 500. - * include/internal/ftmemory.h: Add some `FT_Offset' casts. - (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY, - FT_MEM_MOVE): Do it. + * src/tools/ftrandom/Makefile (CFLAGS): Split off include + directories to ... + (INCLUDES): ... this new variable. + (LDFLAGS): New variable. + (ftrandom.o, ftrandom): Updated. -2015-02-15 Werner Lemberg +2016-09-05 Werner Lemberg - [base] Clean up signedness issues in `ftdbgmem.c'. + [autofit] Improve Armenian support. - Also fix other minor issues. + Thanks to Hrant H Papazian for help. - * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types - with FT_Long for consistency. - (ft_mem_primes): Change type to `FT_Int'. - (ft_mem_closest_prime, ft_mem_table_set): Updated. + * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve + selection of characters. - (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free, - ft_mem_debug_realloc): Use `static' keyword and fix signedness - warnings where necessary. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. - (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy, - ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types - and add or remove casts to avoid signedness warnings. +2016-09-04 Werner Lemberg -2015-02-15 Werner Lemberg + [ftrandom] Improve Makefile. - [base] Clean up signedness in arithmetic functions. + It now supports both a normal build (`./configure && make') and a + development build (`make devel'). - This makes the code more readable and reduces compiler warnings. + * 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/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix, - FT_DivFix): Convert input parameters to unsigned, do the - computation, then convert the result back to signed. - (ft_corner_orientation): Fix casts. +2016-09-03 Werner Lemberg -2015-02-07 Werner Lemberg + [truetype] More fixes for handling of GX deltas. - [sfnt] Fix Savannah bug #44184. + Problems reported by Bob Taylor . - * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No - longer reject `htmx' and `vmtx' tables with invalid length but - sanitize them. + * 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. -2015-02-06 Jon Anderson +2016-09-03 Werner Lemberg - [truetype] Fix regression in the incremental glyph loader. + [ftrandom] Various fixes. - * src/truetype/ttgload.c (load_truetype_glyph): For incremental - fonts, the glyph index may be greater than the number of glyphs - indicated, so guard the check with a preprocessor conditional. + * 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. -2015-02-06 Werner Lemberg + * src/tools/ftrandom/README: Updated. - [autofit] Fix potential memory leak. +2016-09-03 Werner Lemberg - While this doesn't show up with FreeType, exactly the same code - leaks with ttfautohint's modified auto-hinter code (which gets used - in a slightly different way). + [base] Avoid negative bitmap strike dimensions (#48985). - It certainly doesn't harm since it is similar to already existing - checks in the code for embedded arrays. + * 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 strike. - * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours' - and `max_points' for all cases. +2016-09-03 Werner Lemberg -2015-01-31 Werner Lemberg + [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). - [autofit] Add support for Thai script. + * src/cff/cffload.c (cff_index_get_name): Check `byte_len'. - Thanks to Ben Mitchell for guidance with blue - zone characters! +2016-09-02 Werner Lemberg - * src/autofit/afblue.dat: Add blue zone data for Thai. + [unix] Enable 64bit support in file system access (#48962). - * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'. - * src/autofit/afscript.h: Add Thai standard characters. +2016-09-02 Werner Lemberg - * src/autofit/afranges.c: Add Thai data. + [sfnt] Avoid left shift of negative value (#48980). - * src/autofit/afstyles.h: Add Thai data. + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned + constant. -2015-01-23 Behdad Esfahbod +2016-09-02 Werner Lemberg - [raster] Handle `FT_RASTER_FLAG_AA' correctly. + * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings. - This fixes a breakage caused by the commit `[raster] Remove - 5-level gray AA mode from monochrome rasterizer.'. +2016-09-02 Werner Lemberg - Problem reported by Markus Trippelsdorf . + Some preparations for the next release. - * src/raster/ftraster.c (ft_black_render): Handle - `FT_RASTER_FLAG_AA'. + * include/freetype/config/ftoption.h + (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable. - * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode - remnants. + * docs/CHANGES: Updated. -2015-01-18 Werner Lemberg +2016-09-01 Alexei Podtelezhnikov - * src/base/ftobjs.c (FT_New_Library): Fix compiler warning. + [smooth] Simplify span rendering more. -2015-01-18 Chris Liddell + It turns out that there is significant cost associated with `FT_Span' + creation and calls to `gray_render_span' because it happens 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%. - [raster] Fix Savannah bug #44022. + * src/smooth/ftgrays.c (gray_render_span): Removed. The code is + migrated to... + (gray_hline): ... here. - Add fallback for glyphs with degenerate bounding boxes. +2016-08-30 Alexei Podtelezhnikov - If a glyph has only one very narrow feature, the bbox can end up - with either the width or height of the bbox being 0, in which case - no raster memory is allocated and no attempt is made to render the - glyph. This is less than ideal when the drop-out compensation in - the rendering code would actually result in the glyph being - rendered. + [smooth] Streamline pixmap drawing a bit more. - This problem can be observed with the `I' glyph (gid 47) in the - Autodesk RomanS TrueType font. + Zero coverage is unlikely (1 out of 256) to warrant checking. This + gives 0.5% speed improvement in rendering simple glyphs. - * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either - dimension is zero to explicitly round up/down (instead of simply - round). + * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks. -2015-01-17 Werner Lemberg +2016-08-29 Alexei Podtelezhnikov - Add some tools to handle yearly copyright notice updates. + [smooth] Streamline pixmap drawing. - We are now following the GNU guidelines: A new release automatically - means that the copyright year of all affected files gets updated; it - is no longer used to track years of modification changes. + This gives 2% speed improvement in rendering simple glyphs. - * src/tools/update-copyright-year: New Perl script. - * src/tools/update-copyright: New shell script that calls - `update-copyright-year' on all files. - * src/tools/no-copyright: Exceptions that should not be handled by - `update-copyright' + * 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. -2015-01-14 Werner Lemberg +2016-08-27 Alexei Podtelezhnikov - * docs/CHANGES: Updated, using a description from Behdad. + [smooth] Reduce stack of band boundaries. -2015-01-14 Behdad Esfahbod + * src/smooth/ftgrays.c (gray_TBand): Removed. + (gray_convert_glyph): Updated to stack band boundaries concisely. - * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning. +2016-08-26 Werner Lemberg -2015-01-14 Behdad Esfahbod + * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'. - [autofit] Add embedded array of segments and edges. +2016-08-26 Werner Lemberg - Avoids multiple mallocs per typical glyphs. + [cid] Fix commit from 2016-05-16. - With this and recent changes to avoid mallocs, the thread-safe - stack-based loader is now as fast as the previous model that had one - cached singleton. + * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors. - * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED): - New macros. - (AF_AxisHintsRec): Add two arrays for segments and edges. +2016-08-26 Werner Lemberg - * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate - data if number of segments exceeds given threshold value. - (af_axis_hints_new_edge): Only allocate data if number of edges - exceeds given threshold value. - (af_glyph_hints_done): Updated. + [sfnt] Cache offset and size to bitmap data table. -2015-01-14 Behdad Esfahbod + This commit avoids `EBDT' and friends being looked up again and + again while loading a single embedded bitmap. - [autofit] Add embedded arrays for points and contours. + * include/freetype/internal/tttypes.h (TT_FaceRec) + [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and + `ebdt_size'. - This avoids at least two malloc calls for typical glyphs. + * 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/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED): - New macros. - (AF_GlyphHintsRec): Add two arrays for contours and points. +2016-08-26 Alexei Podtelezhnikov - * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done): - Updated. - (af_glyph_hints_reload): Only allocate data if number of contours or - points exceeds given threshold values. + * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks. -2015-01-14 Behdad Esfahbod +2016-08-26 Werner Lemberg - [autofit] Allocate hints object on the stack. + [type1] Fix heap buffer overflow. - This avoids one malloc per load. + Reported as - * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to - `AF_GlyphHints'. - Update prototype. + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 - * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' - parameter instead of `FT_Memory'. - (af_loader_done): Directly reset `load_hints'. - (af_loader_load_g): Updated. + * src/type1/t1load.c (parse_charstrings): Reject fonts that don't + contain glyph names. - * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local - `hints' object. +2016-08-25 Werner Lemberg -2015-01-14 Behdad Esfahbod + [sfnt] Fix previous commit (#48901). - [autofit] Reuse slot glyph loader. + * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos. - No need to create a new glyph loader; we can reuse the one from - `slot->internal->loader'. It's hard to tell why it was written that - way originally, but new code looks sound and correct to me, and - avoids lots of allocations. +2016-08-25 Werner Lemberg - * src/autofit/afloader.c (af_loader_init): Change return type to - `void'. - Don't call `FT_GlyphLoader_New'. - (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. - (af_loader_load_g): Update code to use `internal->loader', which - doesn't need copying of data. + [sfnt] Speed up handling of invalid format 4 cmaps. - * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. - Update prototype. + * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add + tests for `num_glyph' from `tt_cmap4_char_map_linear'. - * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated. +2016-08-25 Werner Lemberg -2015-01-14 Behdad Esfahbod + * include/freetype/internal/ftdriver.h: Remove unused typedefs. - [autofit] Remove (unused) support for composite glyphs. +2016-08-22 Alexei Podtelezhnikov - We never have to deal with composite glyphs in the autohinter, as - those will be loaded into FORMAT_OUTLINE by the recursed - `FT_Load_Glyph' function. + [smooth] Simplify span rendering. - In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply - FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies - FT_LOAD_NO_HINTING: + 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. - /* resolve load flags dependencies */ + * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed. + (gray_TWorker): Remove span buffer and related fields. + (gray_sweep, gray_hline): Updated. - if ( load_flags & FT_LOAD_NO_RECURSE ) - load_flags |= FT_LOAD_NO_SCALE | - FT_LOAD_IGNORE_TRANSFORM; + * include/freetype/ftimage.h: Remove documentation note about + `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone. - if ( load_flags & FT_LOAD_NO_SCALE ) - { - load_flags |= FT_LOAD_NO_HINTING | - FT_LOAD_NO_BITMAP; +2016-08-16 Werner Lemberg - load_flags &= ~FT_LOAD_RENDER; - } + [truetype] Fix `MPS' instruction. - and as such the auto-hinter is never called. Thus, the recursion in - `af_loader_load_g' never actually happens. So remove the depth - counter as well. + According to Greg Hitchcock, MPS in DWrite really returns the point + size. - * src/autofit/afloader.c (af_loader_load_g): Remove `depth' - parameter. - : Remove associated code. - (af_loader_load_glyph): Updated. + * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member. -2015-01-14 Behdad Esfahbod + * src/truetype/ttdriver.c (tt_size_request): Set `point_size'. - [raster] Fix uninitialized memory access. + * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize' + member. - Apparently `ras.cProfile' might be uninitialized. This will be the - case if `ras.top == ras.cProfile->offset', as can be seen in - `End_Profile'. The overshoot code introduced in a change `Fix B/W - rasterization of subglyphs with different drop-out modes.' (from - 2009-06-18) violated this, accessing `ras.cProfile->flags' - unconditionally just before calling `End_Profile' (which then - detected that `cProfile' is uninitialized and didn't touch it). + * src/truetype/ttinterp.c (TT_Load_Context): Updated. + (Ins_MPS): Fix instruction. - This was harmless, and was not detected by valgrind before because - the objects were allocated on the `raster_pool', which was always - initialized. With recent change to allocate raster buffers on the - stack, valgrind now reported this invalid access. +2016-08-16 Werner Lemberg - * src/raster/ftraster.c (Convert_Glyph): Don't access an - uninitialized `cProfile'. + [lzw] Optimize last commit. -2015-01-14 Behdad Esfahbod + * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into + conditional clause. - [smooth] Fix uninitialized memory access. +2016-08-16 Werner Lemberg - Looks like `ras.span_y' could always be used without initialization. - This was never detected by valgrind before because the library-wide - `raster_pool' was used for the worker object and `raster_pool' was - originally zero'ed. But subsequent reuses of it were using `span_y' - uninitialized. With the recent change to not use `render_pool' and - allocate worker and buffer on the stack, valgrind now detects this - uninitialized access. + [lzw] Avoid invalid left shift. - * src/smooth/ftgrays.c (gray_raster_render): Initialize - `ras.span_y'. + Reported as -2015-01-14 Behdad Esfahbod + https://bugzilla.mozilla.org/show_bug.cgi?id=1295366 - [base] Don't initialize unused `driver->glyph_loader'. + * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'. - * src/base/ftobjs.c (Destroy_Driver): Don't call - `FT_GlyphLoader_Done'. - (FT_Add_Module): Don't call `FT_GlyphLoader_New'. +2016-08-16 Werner Lemberg -2015-01-14 Behdad Esfahbod + [lzw] Avoid buffer overrun. - [base] Don't allocate `library->raster_pool' anymore. + Reported as - It's unused after the following commits: + https://bugzilla.mozilla.org/show_bug.cgi?id=1273283 - [raster] Allocate render pool for mono rasterizer on the stack. - [raster] Remove 5-level gray AA mode from monochrome rasterizer. + * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't + underflow. - The value of FT_RENDER_POOL_SIZE still serves the purpose it used to - serve, which is, to adjust the pool size. But the pool is now - allocated on the stack on demand. +2016-08-16 Werner Lemberg - * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement. + [truetype] Fix compiler warning. -2015-01-14 Behdad Esfahbod + * src/truetype/ttgload.c (load_truetype_glyph): Add cast. - [base] Do not reorder library->renderers upon use. +2016-08-13 Werner Lemberg - Instead of keeping `library->renderers' in a MRU order, just leave - it as-is. The MRU machinery wasn't thread-safe. + [winfonts] Avoid zero bitmap width and height. - With this patch, rasterizing glyphs from different faces from - different threads doesn't fail choosing rasterizer - (FT_Err_Cannot_Render_Glyph). + Reported as - Easiest to see that crash was to add a `printf' (or otherwise let - thread yield in FT_Throw with debugging enabled). + https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 - * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c - (FT_Outline_Render): Don't call `FT_Set_Renderer'. + * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. + (FNT_Load_Glyph): Check for zero pitch. -2015-01-14 Behdad Esfahbod +2016-08-11 Alexei Podtelezhnikov - [raster] Allocate render pool for mono rasterizer on the stack. + * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes. - Instead of using the `render_pool' member of `FT_Library' that is - provided down to the rasterizer, completely ignore that and allocate - needed objects on the stack instead. +2016-08-11 Alexei Podtelezhnikov - With this patch, rasterizing glyphs from different faces from - different threads doesn't crash in the monochrome rasterizer. + * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting. - * src/raster/ftraster.c (black_TRaster): Remove `buffer', - `buffer_size', and `worker' members. +2016-08-11 Alexei Podtelezhnikov - (ft_black_render): Create `buffer' locally. - (ft_black_reset): Updated. + * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries. -2015-01-14 Behdad Esfahbod +2016-08-10 Peter Klotz - [raster] Remove 5-level gray AA mode from monochrome rasterizer. + * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. - It was off by default and couldn't be turned on at runtime. And the - smooth rasterizer superceded it over ten years ago. No point in - keeping. Comments suggested that it was there for compatibility - with FreeType 1. +2016-08-10 Werner Lemberg - 550 lines down. + [sfnt] Use correct type for `italicAngle' field (#48732). - * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING, - RASTER_GRAY_LINES): Remove macros and all associated code. + * src/sfnt/ttload.c (tt_face_load_post): Fix types. - (black_TWorker): Remove `gray_min_x' and `gray_max_x'. - (black_TRaster): Remove `grays' and `gray_width'. +2016-08-06 Jon Spencer - (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop, - ft_black_render): Updated. + [sfnt] Fix `FT_Get_Advance' for bitmap strikes. - * src/raster/ftrend1.c (ft_raster1_render): Simplify code. - (ft_raster5_renderer_class): Removed. + `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. -2015-01-14 Behdad Esfahbod + Taken from - [smooth] Allocate render pool for smooth rasterizer on the stack. + https://github.com/behdad/harfbuzz/issues/252 - Instead of using the `render_pool' member of `FT_Library' that is - provided down to the rasterizer, completely ignore that and allocate - needed objects on the stack instead. + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + : Set scale values. - With this patch, rasterizing glyphs from different faces from - different threads doesn't crash in the smooth rasterizer. +2016-08-06 Behdad Esfahbod - Bugs: + [truetype] Fix GX variation handling of composites. - https://bugzilla.redhat.com/show_bug.cgi?id=678397 - https://bugzilla.redhat.com/show_bug.cgi?id=1004315 - https://bugzilla.redhat.com/show_bug.cgi?id=1165471 - https://bugs.freedesktop.org/show_bug.cgi?id=69034 + * src/truetype/ttgload.c (load_truetype_glyph) + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag. - * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer', - `buffer_size', `band_size', and `worker' members. +2016-08-05 Alexei Podtelezhnikov - (gray_raster_render): Create `buffer', `buffer_size', and - `band_size' locally. - (gray_raster_reset): Updated. + [smooth] Minor refactoring. -2015-01-14 Behdad Esfahbod + * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line): + Updated. - [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver. +2016-07-29 Werner Lemberg - Previously the code had stipulation for using a per-TT_Size exec - context if `size->debug' was true. But there was no way that - `size->debug' could *ever* be true. As such, the code was always - using the singleton `TT_ExecContext' that was stored in `TT_Driver'. - This was, clearly, not threadsafe. + [sfnt, truetype] Don't abort on invalid `maxComponentDepth'. - With this patch, loading glyphs from different faces from different - threads doesn't crash in the bytecode loader code. + Since 2016-05-16 we detect infinite recursion directly. - * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member. - (TT_DriverRec): Remove `context' member. + * 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/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove - `TT_ExecContext' code related to a global `TT_Driver' object. +2016-07-26 Werner Lemberg - (tt_driver_done): Don't remove `TT_ExecContext' object here but ... - (tt_size_done_bytecode): ... here. + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor. - (tt_driver_init): Don't create `TT_ExecContext' object here but ... - (tt_size_init_bytecode): ... here, only on demand. + No functional change. - * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug - code. - (TT_New_Context): Remove `TT_ExecContext' code related to a global - `TT_Driver' object. +2016-07-22 Hin-Tak Leung - * src/truetype/ttinterp.h: Updated. + [truetype] Record the end of IDEFs. - * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated. + 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. -2015-01-14 Behdad Esfahbod + * src/truetype/ttinterp.c (Ins_IDEF): Updated. - [autofit] Allocate AF_Loader on the stack instead of AF_Module. +2016-07-19 Werner Lemberg - Stop sharing a global `AF_Loader'. Allocate one on the stack during - glyph load. + [truetype] Sanitizer fix, second try. - Right now this results in about 25% slowdown, to be fixed in a - following commit. + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary + tests and use only one slot more. - With this patch loading glyphs from different faces from different - threads doesn't immediately crash in the autohinting loader code. +2016-07-19 Werner Lemberg - Bugs: + [truetype] Sanitizer fix. - https://bugzilla.redhat.com/show_bug.cgi?id=1164941 + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array + to fix nested loops. - * src/autofit/afloader.c (af_loader_init): Pass - `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. - (af_loader_reset, af_loader_load_glyph): Also pass `loader' as - argument. - (af_loader_done): Use `AF_Loader' instead of `AF_Module' as - argument. +2016-07-18 Werner Lemberg - * src/autofit/afmodule.c (af_autofitter_init): Don't call - `af_loader_init'. - (af_autofitter_done): Don't call `af_loader_done'. - (af_autofitter_load_glyph): Use a local `AF_Loader' object. + [truetype] Make GETDATA work only for GX fonts. - * src/autofit/afloader.h: Include `afmodule.h'. - Update prototypes. - Move typedef for `AF_Module' to... + * src/truetype/ttinterp.c (opcode_name): Updated. + (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. + (TT_RunIns): Updated. - * src/autofit/afmodule.h: ... this place. - No longer include `afloader.h'. +2016-07-17 Werner Lemberg -2015-01-14 Behdad Esfahbod + [truetype] Add support for Apple's - * src/type42/t42objs.h (T42_DriverRec): Remove unused member. + GETDATA[], opcode 0x92 -2015-01-12 Werner Lemberg + bytecode instruction. It always returns 17, and we have absolutely + no idea what it is good for... - Fix Savannah bug #43976. + * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. + (Ins_GETDATA): New function. + (TT_RunIns): Add it. - Assure that FreeType's internal include directories are found before - `CPPFLAGS' (which might be set by the user in the environment), and - `CPPFLAGS' before `CFLAGS'. +2016-07-16 Werner Lemberg - * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. - (FT_COMPILE): Make this a special variable for compiling only the - files handled in `freetype.mk'. - (.c.$O): Removed, unused. + [truetype] Add bytecode support for GX variation fonts. - * src/*/rules.mk (*_COMPILE): Fix order of include directories. + This commit implements undocumented (but confirmed) stuff from + Apple's old bytecode engine. -2015-01-11 Werner Lemberg + 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. - [truetype] Prettifying. + GETINFO[], selector bit 3 + If GX variation support is enabled, bit 10 of the result is set + to 1. - * src/truetype/ttinterp.c (project, dualproj, fast_project, - fast_dualproj): Rename to... - (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this. + * 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. -2015-01-11 Werner Lemberg +2016-07-16 Werner Lemberg - * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. + [truetype] Fix GETINFO bytecode instruction. - Based on a patch from Behdad. + * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for + stretching information. -2015-01-11 Werner Lemberg +2016-07-16 Behdad Esfahbod - * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. + [truetype] Make all glyphs in `Zycon' GX font work. -2015-01-11 Werner Lemberg + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary + tests. - * src/truetype/ttinterp.c (Normalize): Remove unused argument. +2016-07-16 Werner Lemberg -2015-01-11 Werner Lemberg + [truetype] Fix GX delta tracing. - [truetype] More macro expansions. + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace + relative point movements. - * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by - expansion. +2016-07-16 Behdad Esfahbod -2015-01-11 Werner Lemberg + [truetype] More fixes for GX. - [truetype] More macro expansions. + This finally fixes the rendering of the cyclist and the lizard in + the `Zycon' font. - * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion, - adjusting function calls where necessary. - (FT_UNUSED_ARG): Removed, no longer needed. + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point + index is always cumulative. -2015-01-10 Werner Lemberg + (tt_handle_deltas): Rename to... + (tt_interpolate_deltas): ... This. + Add new parameter for output point array. + Update caller. - [truetype] More macro expansions. + (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'. - Based on a patch from Behdad. +2016-07-15 Werner Lemberg - * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding - `Ins_*' functions. - (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls. - (ARRAY_BOUND_ERROR): Remove second definition, which is no longer - needed. - (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with... - (Ins_SxyTCA): New function. + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko. -2015-01-10 Werner Lemberg + `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. - [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH. + Reported by Alexei. - Behdad suggested this code simplification, and nobody objected... +2016-07-16 Nikolaus Waxweiler - * include/config/ftoption.h, devel/ftoption.h - (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove. + * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error. - * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]: - Remove related code. - (ARRAY_BOUND_ERROR): Use do-while loop. + Problem reported by Hin-Tak Leung. -2015-01-10 Werner Lemberg +2016-07-15 Werner Lemberg - [truetype] More macro expansions. + [autofit] Update and improve segment and edge tracing. - * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_, - EXEC_ARG): Remove by replacing with expansion. + * 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. -2015-01-10 Werner Lemberg +2016-07-15 Werner Lemberg - [truetype] More macro expansions. + [autofit] For edges, reject segments wider than 1px (#41334). - Based on a patch from Behdad. + * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. - * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize, - SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move, - CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem, - CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt, - CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round, - COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing - with expansion. + * 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. - (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project, - CUR_fast_dualproj): Replace with macros `project', `dualproj', - `fast_project', `fast_dualproj'. +2016-07-14 Werner Lemberg -2015-01-10 Werner Lemberg + * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro. - [truetype] More macro expansions. +2016-07-14 Werner Lemberg - * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing - with expansion. + [sfnt] Fix `face_index' value in `FT_Face' for named instances. -2015-01-10 Werner Lemberg + * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. - [truetype] Remove code for static TrueType interpreter. +2016-07-14 Werner Lemberg - This is a follow-up patch. + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing. - * src/truetype/ttinterp.c, src/truetype/ttinterp.h - [TT_CONFIG_OPTION_STATIC_INTERPRETER, - TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code. +2016-07-14 Behdad Esfahbod -2015-01-10 Werner Lemberg + [truetype] Fix gxvar delta interpolation. - * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion. + 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). - This starts a series of patches that simplifies the code of the - bytecode interpreter. + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize + `points_org' before looping over all tuples. ---------------------------------------------------------------------------- -Copyright 2015-2016 by +Copyright 2016-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.20 b/ChangeLog.20 index 07775ff..11376e8 100644 --- a/ChangeLog.20 +++ b/ChangeLog.20 @@ -1338,7 +1338,7 @@ (cff_compute_bias): Use `U' for constant. * src/cid/cidload.c (cid_decrypt): Ditto. * src/psaux/psobjs.c (T1_Decrypt): Ditto. - * src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto. + * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto. * src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version' variable. * src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top' @@ -1524,7 +1524,7 @@ * src/base/ftcalc.c (FT_DivFix): Fixed a bug in the 64-bit code that created incorrect scale factors! - (FT_Round_Fix, FT_CeilFix, FT_FloorFix): Minor improvements. + (FT_RoundFix, FT_CeilFix, FT_FloorFix): Minor improvements. 2001-05-12 Werner Lemberg @@ -2159,7 +2159,7 @@ * include/freetype/internal/t2types.h, include/freetype/internal/cfftypes.h: Changed the structures for - CFF_Encoding and CFF_Encoding for the new implementations of the + CFF_Charset and CFF_Encoding for the new implementations of the charset and encoding parsers in the CFF driver. * src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode, @@ -2597,7 +2597,7 @@ ---------------------------------------------------------------------------- -Copyright 2000-2016 by +Copyright 2000-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.21 b/ChangeLog.21 index 855c86d..eff9f79 100644 --- a/ChangeLog.21 +++ b/ChangeLog.21 @@ -170,7 +170,7 @@ FTC_CACHE_TRYLOOP_END): New macros. * src/cache/ftccache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c - (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACE_TRYLOOP_END. + (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACHE_TRYLOOP_END. 2005-05-23 Werner Lemberg @@ -617,7 +617,7 @@ `ft_get_adobe_glyph_index', a new function defined in `pstables.h'. (ps_get_macintosh_name, ps_get_standard_strings): Updated. - * src/base/ftobjs.c (FT_Set_Char_Sizes): Handle fractional sizes + * src/base/ftobjs.c (FT_Set_Char_Size): Handle fractional sizes more carefully. This fixes Savannah bug #12263. 2005-03-06 David Turner @@ -1819,7 +1819,7 @@ 2004-08-11 Detlef Würkner * src/base/ftrfork.c (FT_Raccess_Guess) - [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_FORK]: Remove compiler + [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK]: Remove compiler warnings. 2004-08-06 Adam Piotrowski @@ -2101,7 +2101,7 @@ 2004-06-08 David Turner - * include/freetype/freetype.h (FT_GlyphMetrics): Move `lsb_delta' + * include/freetype/freetype.h (FT_Glyph_Metrics): Move `lsb_delta' and `rsb_delta' elements to... (FT_GlyphSlotRec): Here to retain binary compatibility with older FreeType versions. @@ -2528,7 +2528,7 @@ * src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (TT_Process_Simple_Glyph, load_truetype_glyph) - [TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts. + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Support GX var fonts. * src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. @@ -2864,7 +2864,7 @@ (psh_blues_snap_stem): Don't use blue_shift but blue_threshold. * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro. - (psh_glyph_find_string_points): Use PSH_STRONG_THRESHOLD_MAXIMUM. + (psh_glyph_find_strong_points): Use PSH_STRONG_THRESHOLD_MAXIMUM. (psh_glyph_find_blue_points): New function. Needed for fonts like p052003l.pfb (URW Palladio L Roman) which have flex curves at the base line within blue zones, but the flex curves aren't covered by @@ -3361,7 +3361,7 @@ * src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H. (FT_Outline_GetOutsideBorder): Inverse result. - (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_GlyphStrokeBorder): New + (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New functions. (FT_Stroker_EndSubPath): Close path if needed. (FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind. @@ -3493,8 +3493,8 @@ 2003-12-23 David Turner * include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND, - FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_CEIL): New macros. They - are used to avoid compiler warnings with very pedantic compilers. + FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_PIX_CEIL): New macros. + They are used to avoid compiler warnings with very pedantic compilers. Note that `(x) & -64' causes a warning if (x) is not signed. Use `(x) & ~63' instead! Updated all related code. @@ -4231,7 +4231,7 @@ (t42_parse_encoding): Use `ft_isdigit'. - * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_OK if + * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_Ok if success. 2003-10-05 Werner Lemberg @@ -4355,7 +4355,7 @@ new POSTSCRIPT_NAMES service. * src/psaux/t1decode.h (t1_lookup_glyph_by_stdcharcode, t1_decode_init): Use new POSTSCRIPT_NAMES service. - * src/psaux/t1cmap.h, src/psaux/t1decode.h: Dont' include + * src/psaux/t1cmap.h, src/psaux/t1decode.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H. * src/psnames/psmodule.c: Don't include @@ -4749,8 +4749,7 @@ * include/freetype/ttunpat.h: Fixing documentation comment. * include/freetype/config/ftoption.h, devel/ftoption.h - (TT_CONFIG_OPTION_OPTION_COMPILE_UNPATENTED_HINTING): Replaced - with... + (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING): Replaced with... (TT_CONFIG_OPTION_UNPATENTED_HINTING): This. Updated all users. (TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed. @@ -5024,7 +5023,7 @@ drivers. * src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code. - (FT_Set_Pixel_Size): Assign value to `metrics' after validation of + (FT_Set_Pixel_Sizes): Assign value to `metrics' after validation of arguments. 2003-06-20 Werner Lemberg @@ -5200,7 +5199,7 @@ * src/cid/cidload.c (cid_load_keyword): Handle T1_FIELD_LOCATION_BBOX. (parse_font_bbox): Commented out. - (cid_field_record): Comment out element for parsing FontBBox. + (cid_field_records): Comment out element for parsing FontBBox. * src/type42/t42parse.c (t42_parse_font_bbox): Commented out. (t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with @@ -5916,7 +5915,7 @@ 2003-04-23 Werner Lemberg * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist - instead of FT_Uint for `len'. + instead of FT_UInt for `len'. 2003-04-22 Werner Lemberg @@ -6550,7 +6549,7 @@ * src/cache/ftcsbits.c (ftc_sbit_node_load): Fixed a small bug that caused problems with embedded bitmaps. - * src/otlayout/otlayout.h, src/otlyaout/otlconf.h, + * src/otlayout/otlayout.h, src/otlayout/otlconf.h, src/otlayout/otlgsub.c, src/otlayout/otlgsub.h, src/otlayout/otlparse.c, src/otlayout/otlparse.h, src/otlayout/otlutils.h: Updating the OpenType Layout code, adding @@ -7239,7 +7238,7 @@ (ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v): New functions. - (ft_smooth_locd_renderer_class, ft_smooth_lcdv_renderer_class): New + (ft_smooth_lcd_renderer_class, ft_smooth_lcdv_renderer_class): New classes. * src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to... @@ -7376,7 +7375,7 @@ * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of horiBearingX. - * src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of + * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix computation of horiBearingY. 2002-08-16 George Williams @@ -7581,7 +7580,7 @@ * include/freetype/cache/ftccache.h, src/cache/ftccache.i, src/cache/ftccache.c [!FTC_CACHE_USE_LINEAR_HASHING]: Removed. - (FTC_CACHE_USE_LINEAR_HASHING: Removed also. + (FTC_CACHE_USE_LINEAR_HASHING): Removed also. FT_CONFIG_OPTION_USE_CMAPS is now the default. @@ -7603,7 +7602,7 @@ * src/cid/cidriver.c (Cid_Get_Char_Index, Cid_Get_Next_Char): Removed. - (t1_cid_driver_class): Updated. + (t1cid_driver_class): Updated. * src/truetype/ttdriver.c (tt_driver_class): Updated. * src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Removed (t1_driver_class): Updated. @@ -7698,7 +7697,7 @@ CFF_Done_SubFont -> cff_subfont_done CFF_Load_Font -> cff_font_load CFF_Done_Font -> cff_font_done - CFF_Size_Get_Global_Funcs -> cff_size_get_global_funcs + CFF_Size_Get_Globals_Funcs -> cff_size_get_globals_funcs CFF_Size_Done -> cff_size_done CFF_Size_Init -> cff_size_init CFF_Size_Reset -> cff_size_reset @@ -8636,7 +8635,7 @@ src/pfr/*: New files. * include/freetype/config/ftmodule.h, - include/freetype/internal/fttrace.h, src/Jamefile: Updated. + include/freetype/internal/fttrace.h, src/Jamfile: Updated. * src/type1/t1gload.h (T1_Load_Glyph), src/type1/t1gload.c (T1_Load_Glyph): Fixed incorrect parameter sign-ness in callback @@ -9063,7 +9062,7 @@ FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc - * src/base/ftapi.c: New file. It contains backwards compatibility + * src/base/ftapi.c: New file. It contains backward compatibility functions. * include/freetype/internal/psaux.h, src/cid/cidload.c, @@ -9106,7 +9105,7 @@ FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings. * src/base/ftcalc.c (FT_MulFix): Ditto. * src/cff/cffdrivr.c (cff_get_name_index): Ditto. - * src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init, + * src/cff/cffobjs.c (CFF_Size_Get_Globals_Funcs, CFF_Size_Init, CFF_GlyphSlot_Init): Ditto. * src/cid/cidobjs.c (CID_GlyphSlot_Init, CID_Size_Get_Globals_Funcs): Ditto. @@ -9247,7 +9246,7 @@ { } PS_StructRec, *PS_Struct; - typedef PS_StructRec T1_Struct; /* backwards-compatibility */ + typedef PS_StructRec T1_Struct; /* backward compatibility */ Hence, we increase the coherency of the source code by effectively using the `Rec' prefix for structure types. @@ -9384,7 +9383,7 @@ * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto. (pcf_get_bitmaps): The same for `sizebitmaps'. - * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for + * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): The same for `orig_y'. (t1operator_seac): Comment out more dead code. * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER' @@ -9423,7 +9422,7 @@ ---------------------------------------------------------------------------- -Copyright 2002-2016 by +Copyright 2002-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.22 b/ChangeLog.22 index ce08dc9..e3aec74 100644 --- a/ChangeLog.22 +++ b/ChangeLog.22 @@ -189,7 +189,7 @@ * src/base/ftdbgmem.c (_ft_debug_file, _ft_debug_lineno) [FT_DEBUG_MEMORY]: New global variables, replacing... - (FT_MemTable_Rec) [FT_DEBUG_MEMORY]: Remove `filename' and + (FT_MemTableRec) [FT_DEBUG_MEMORY]: Remove `filename' and `line_no'. Update all callers. (ft_mem_debug_alloc) [FT_DEBUG_MEMORY]: Avoid possible integer overflow. @@ -494,7 +494,7 @@ FTC_MruList_Init, FTC_MruList_Reset, FTC_MruList_Done, FTC_MruList_New, FTC_MruList_Remove, FTC_MruList_RemoveSelection): Declare as FT_LOCAL_DEF. - (FTC_MruListFind, FTC_MruList_Lookup) [!FTC_INLINE]: Compile + (FTC_MruList_Find, FTC_MruList_Lookup) [!FTC_INLINE]: Compile conditionally. Declare as FT_LOCAL_DEF. @@ -605,7 +605,7 @@ * docs/release: Minor additions and clarifications. - * docs/CHANGES: Updated to reflect many fixes for backwards + * docs/CHANGES: Updated to reflect many fixes for backward compatibility. Still incomplete. 2006-02-26 David Turner @@ -814,7 +814,7 @@ * include/freetype/ftcache.h (FTC_IMAGE_TYPE_COMPARE, FTC_IMAGE_TYPE_HASH), src/cache/ftcbasic.c (FTC_OldFontRec, FTC_OldImageDescRec, FTC_ImageCache_Lookup, FTC_Image_Cache_New, - FTC_OldImage_Desc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx, + FTC_OldImageDesc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx, ftc_image_type_from_old_desc, FTC_Image_Cache_Lookup, FTC_SBitCache_Lookup, FTC_SBit_Cache_New, FTC_SBit_Cache_Lookup) [FT_CONFIG_OPTION_OLD_INTERNALS]: Try to revive old functions of the @@ -2458,8 +2458,8 @@ * src/gxvalid/gxvbsln.c (GXV_BSLN_VALUE_EMPTY): Add `U'. - * src/gxvalid/gxmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE), - src/gxvalid/gxmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix + * src/gxvalid/gxvmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE), + src/gxvalid/gxvmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix typo. * src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c, @@ -2787,7 +2787,7 @@ 2005-06-15 Kirill Smelkov The next release will be 2.2.0, so don't worry about source code - backwards compatibility. + backward compatibility. * include/freetype/ftimage.h (FT_Outline_MoveToFunc, FT_Outline_LineToFunc, FT_Outline_ConicToFunc, @@ -2821,7 +2821,7 @@ ---------------------------------------------------------------------------- -Copyright 2005-2016 by +Copyright 2005-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.23 b/ChangeLog.23 index b8a914b..834f34d 100644 --- a/ChangeLog.23 +++ b/ChangeLog.23 @@ -607,7 +607,7 @@ (ft_black_render): Initialize `worker->gray_lines' (problem found by valgrind). - (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just + (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Don't #undef, just comment out. 2009-09-12 suzuki toshiya @@ -671,7 +671,7 @@ * src/raster/rules.mk: Don't handle ftmisc.h. It is needed for stand-alone mode only. - * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func, + * src/raster/ftmisc.h (FT_MemoryRec, FT_Alloc_Func, FT_Free_Func, FT_Realloc_Func): Copy declarations from ftsystem.h. 2009-09-02 Bram Tassyns @@ -929,7 +929,7 @@ type1: Fix a data type mismatching with its source. * include/freetype/internal/t1types.h: The type of - T1_Face->buildchar is matched with T1_Decorder->top. + T1_Face->buildchar is matched with T1_Decoder->top. 2009-07-31 suzuki toshiya @@ -944,7 +944,7 @@ pfr: Fix a data type mismatching with its source. - * src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset + * src/pfr/pfrtypes.h: The type of PFR_PhyFont->chars_offset is extended from FT_UInt32 to FT_Offset, because it is calculated with the pointer difference in pfr_phy_font_load(). @@ -975,8 +975,8 @@ psaux: Fix a data type mismatching with its source. * include/freetype/internal/psaux.h: The type of - T1_DecorderRec.buildchar is matched with - T1_DecorderRec.top. + T1_DecoderRec.buildchar is matched with + T1_DecoderRec.top. 2009-07-31 suzuki toshiya @@ -2125,7 +2125,7 @@ code unconditionally. Add support for random numbers and update remaining code accordingly; this should work now. - (t1_operator_seac): Updated. + (t1operator_seac): Updated. * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H. (ps_hints_t1stem3, t1_hints_stem): Updated. @@ -2594,14 +2594,14 @@ Position Independent Code (PIC) support in smooth renderer. * src/smooth/ftsmooth.h declare ft_smooth_renderer_class, - ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class + ft_smooth_lcd_renderer_class and ft_smooth_lcdv_renderer_class using macros from ftrender.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined the following structs: ft_smooth_renderer_class, ft_smooth_lcd_renderer_class - and ft_smooth_lcd_v_renderer_class + and ft_smooth_lcdv_renderer_class will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from ftspic.h in order to access @@ -4156,7 +4156,7 @@ 2008-09-05 suzuki toshiya * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or - ApplicationService framework is missing. Although this value is not + ApplicationServices framework is missing. Although this value is not used in building of FreeType2, it is written in `freetype2.pc' and `freetype-config'. @@ -4861,7 +4861,7 @@ 2008-04-14 Werner Lemberg * src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to - `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'. From Savannah + `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZW'. From Savannah bug #22909. 2008-04-13 Werner Lemberg @@ -5243,7 +5243,7 @@ functions related to cmap type 14 support to the `FT_Object_ActionName' scheme: - FT_Get_Char_Variant_index -> FT_Face_GetCharVariantIndex + FT_Get_Char_Variant_Index -> FT_Face_GetCharVariantIndex FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar @@ -5383,7 +5383,7 @@ * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro. (FT_VALIDATE_OT): Updated. - * src/otvalid/otmath.c: New file. + * src/otvalid/otvmath.c: New file. * src/otvalid/otvalid.c: Include otvmath.c. * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table. @@ -5530,7 +5530,7 @@ * src/truetype/ttinterp.c (Ins_IUP): Add missing variable initialization. - * src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Get rid of an infinite loop in the case of degenerate fonts. 2007-06-26 Rahul Bhalerao @@ -5965,7 +5965,7 @@ * include/freetype/config/ftstdlib.h, include/freetype/internal/ftobjs.h: As suggested by Graham Asher, ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values - instead on relying on the locale-dependent functions provided by + instead of relying on the locale-dependent functions provided by . 2007-05-15 Graham Asher @@ -7023,7 +7023,7 @@ (_ft_lcd_filter_fir): This. Update parameters. (_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function. - (FT_Library_Set_LcdFilter): Update parameters. + (FT_Library_SetLcdFilter): Update parameters. Handle new filter modes. * include/internal/ftobjs.h: Include FT_LCD_FILTER_H. @@ -7366,7 +7366,7 @@ to recognize a few fonts that require the automatic unpatented loader. - * src/smooth/ftgrays.c: Optmize the performance of the anti-aliased + * src/smooth/ftgrays.c: Optimize the performance of the anti-aliased rasterizer. The speed improvement is between 15% and 25%, depending on the font data. @@ -7857,7 +7857,7 @@ 2006-05-18 Werner Lemberg * src/truetype/ttgload.c (TT_Load_Composite_Glyph) - [FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again. + [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again. 2006-05-17 David Turner @@ -7932,7 +7932,7 @@ ---------------------------------------------------------------------------- -Copyright 2006-2016 by +Copyright 2006-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.24 b/ChangeLog.24 index cbbfd8c..796763c 100644 --- a/ChangeLog.24 +++ b/ChangeLog.24 @@ -335,7 +335,7 @@ * include/freetype/ftmoderr.h: Fix commit from 2013-03-11. - The previous version was not backwards compatible. Reported by + The previous version was not backward compatible. Reported by Behdad. 2013-03-14 Werner Lemberg @@ -784,7 +784,7 @@ and `const' where appropriate. (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to... - (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This. + (sph_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This. Update all users. 2013-01-12 Alexei Podtelezhnikov @@ -2141,7 +2141,7 @@ * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a - simplified embolding algorithm. + simplified emboldening algorithm. (FT_Outline_Embolden): Make it a special case of `FT_Outline_EmboldenXY' @@ -2941,10 +2941,10 @@ [type42] Remove casts. - * src/type42/t42driver.c (t42_driver_class): Remove all casts and + * src/type42/t42drivr.c (t42_driver_class): Remove all casts and update affected functions. - * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver + * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42 driver changes. 2011-11-30 Werner Lemberg @@ -3776,7 +3776,7 @@ [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c. * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): - Check different entries pointing same traking value. + Check different entries pointing same tracking value. (gxv_trak_validate): Remove unused variable `table_size'. 2011-06-14 suzuki toshiya @@ -3788,12 +3788,12 @@ (gxv_morx_chain_validate): Conditionalize unvalidated variable `defaultFlags'. - * src/gxvalid/gxmorx0.c + * src/gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_entry_validate): Conditionalize unvalidated variables; `markFirst', `dontAdvance', `markLast', `verb'. - * src/gxvalid/gxmorx1.c + * src/gxvalid/gxvmorx1.c (gxv_morx_subtable_type1_entry_validate): Conditionalize unvalidated variables; `setMark', `dontAdvance'. @@ -3826,11 +3826,11 @@ (gxv_mort_chain_validate): Conditionalize unvalidated variable `defaultFlags'. - * src/gxvalid/gxmort0.c + * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate): Check the conflict of the marks for the glyphs. - * src/gxvalid/gxmort1.c + * src/gxvalid/gxvmort1.c (gxv_mort_subtable_type1_offset_to_subst_validate): Local variables `min_gid', `max_gid' are replaced by variables in the validator. @@ -4029,7 +4029,7 @@ af_latin_hints_compute_blue_edges. (af_cjk_metrics_init_blues): New function, CJK version of af_latin_metrics_init_blues. - (af_cjk_hints_edges): Add code to align the edge stems to blue zones. + (af_cjk_hint_edges): Add code to align the edge stems to blue zones. * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric, and initialize as af_cjk_metrics_init. @@ -5669,7 +5669,7 @@ Use defined macros to set {platform,encoding}_id. * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to - set charmap.{platfom,encoding}_id. + set charmap.{platform,encoding}_id. * src/pcf/pcfdrivr.c: Ditto. * src/winfonts/winfnt.c: Ditto. * src/type1/t1objs.c: Ditto. @@ -5792,8 +5792,8 @@ * src/cff/cffobjs.c (cff_face_init): Check error value by `FT_CMap_New'. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. - * src/type1/t1jobjs.c (T1_Face_Init): Ditto. - * src/type42/t42jobjs.c (T42_Face_Init): Ditto. + * src/type1/t1objs.c (T1_Face_Init): Ditto. + * src/type42/t42objs.c (T42_Face_Init): Ditto. 2010-07-03 Werner Lemberg @@ -6344,7 +6344,7 @@ ---------------------------------------------------------------------------- -Copyright 2010-2016 by +Copyright 2010-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.25 b/ChangeLog.25 index e85be5d..d7fed71 100644 --- a/ChangeLog.25 +++ b/ChangeLog.25 @@ -244,7 +244,7 @@ All public FreeType enumeration and flag values are uppercase... - * include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards + * include/tttables.h (FT_Sfnt_Tag): Implement it. For backward compatibility, retain the old values as macros. * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c @@ -1223,7 +1223,7 @@ 2014-10-14 Werner Lemberg - [autofit] Adjust Devenagari character range. + [autofit] Adjust Devanagari character range. * src/autofit/afranges.c (af_deva_uniranges): Omit characters that are common to all other Indic scripts. @@ -4767,7 +4767,7 @@ * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast. * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto. - * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast. + * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use cast. * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto. * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto. @@ -5145,7 +5145,7 @@ ---------------------------------------------------------------------------- -Copyright 2013-2016 by +Copyright 2013-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, diff --git a/ChangeLog.26 b/ChangeLog.26 new file mode 100644 index 0000000..c174b6d --- /dev/null +++ b/ChangeLog.26 @@ -0,0 +1,5711 @@ +2016-07-12 Werner Lemberg + + * Version 2.6.5 released. + ========================= + + + Tag sources with `VER-2-6-5'. + + This commit immediately follows `[mac] Fix ftexport.sym target in + Jamfile.' on a separate branch, which was then merged with master + after the release. + + * include/freetype/config/ftoption.h + (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out. + + * docs/VERSION.TXT: Add entry for version 2.6.5. + + * 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.4/2.6.5/, s/264/265/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. + + * builds/unix/configure.raw (version_info): Set to 18:5:12. + * CMakeLists.txt (VERSION_PATCH): Set to 5. + + * docs/CHANGES: Updated. + +2016-07-11 Werner Lemberg + + Conditionally compile environment support. + + * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c, + src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c: + Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where + necessary. + +2016-07-11 Werner Lemberg + + Handle properties in `FREETYPE_PROPERTIES' environment variable. + + This commit covers the most important one. + + * src/autofit/afmodule.c (af_property_set): Handle `warping', + `darkening-parameters', and `no-stem-darkening'. + + * src/cff/cffdrivr.c (cff_property_set): Handle + `darkening-parameters', `hinting-engine', and `no-stem-darkening'. + + * src/truetype/ttdriver.c (tt_property_set): Handle + `interpreter-version'. + +2016-07-11 Werner Lemberg + + Replace calls to `atol' with `strtol'. + + We later on need strtol's `endptr' feature. + + * include/freetype/config/ftstdlib.h (ft_atol): Replace with... + (ft_strtol): ... this. + + * src/base/ftdbgmem.c (ft_mem_debug_init): Updated. + * src/cid/cidparse.c (cid_parser_new): Ditto. + * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c + (T42_GlyphSlot_Load): Ditto. + +2016-07-10 Werner Lemberg + + Implement handling of `FREETYPE_PROPERTIES' environment variable. + + Recognizing properties follows in another commit. + + * devel/ftoption.h, include/freetype/config/ftoption.h + (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro. + + * include/freetype/config/ftstdlib.h (ft_getenv): New macro. + + * src/base/ftinit.c (ft_set_default_properties): New function to + parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'. + (FT_Init_FreeType): Updated. + +2016-07-09 Werner Lemberg + + Add function `ft_property_string_set'. + + This is a preparation for handling an `FREETYPE_PROPERTIES' + environment variable to control (some) driver properties. + + No change in functionality. + + * src/base/ftobjs.c (ft_property_do): Add `value_is_string' + parameter. + (ft_property_string_set): New function. + (FT_Property_Set, FT_Property_Get): Updated. + + * include/freetype/internal/ftobjs.h: Updated. + + * include/freetype/internal/services/svprop.h + (FT_Properties_SetFunc): Add `value_is_string' parameter. + + * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c + (cff_property_set), src/truetype/ttdriver.c (tt_property_set): + Updated, emitting an error currently if `value_is_string' is set. + +2016-07-09 suzuki toshiya + + [mac] Fix ftexport.sym target in Jamfile. + + * Jamfile: Update the directories of the header files scanned for + ftexport.sym. They were incorrect since the migration of the + header files, on 2015-06-22. Either inexisting include/cache + (removed on 2006-03-20) is not needed to be listed explicitly. + Now ftmac.h is scanned only in the case of Mac OS & Mac OS X. + +2016-07-08 Alexei Podtelezhnikov + + [smooth] Sub-banding protocol revision. + + Rasterization sub-banding is utilized at large sizes while using a + rather small fixed memory pool. Indeed it is possible to make an + educated guess how much memory is necessary at a given size for a + given glyph. It turns out that, for a large majority of European + glyphs, you should store about 8 times more boundary pixels than + their height. Or, vice versa, if your memory pool can hold 800 + pixels the band height should be 100 and you should sub-band + anything larger than that. Should you still run out of memory, + FreeType bisects the band but you have wasted some time. This is + what has been implemented in FreeType since the beginning. + + It was overlooked, however, that the top band could grow to twice + the default band size leading to unnecessary memory overflows there. + This commit fixes that. Now the bands are distributed more evenly + and cannot exceed the default size. + + Now the magic number 8 is really suitable for rather simple European + scripts. For complex Chinese logograms the magic number should be + 13 but that is subject for another day. + + * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding + protocol. + +2016-07-07 suzuki toshiya + + [mac] Fix Savannah bug #48417. + + Mac OS X linker throws errors when `-exported_symbol_list' input + file includes non-existing symbols. Reported by Ryan Schmidt. + + * builds/exports.mk: Exclude ftmac.h from the headers for apinames + by default. Include it when ftmac.c would be compiled. + +2016-07-06 Werner Lemberg + + * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused. + +2016-07-05 Werner Lemberg + + * Version 2.6.4 released. + ========================= + + + Tag sources with `VER-2-6-4'. + + * docs/VERSION.TXT: Update documentation and bump version number to + 2.6.4. + + * 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.3/2.6.4/, s/263/264/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. + + * builds/unix/configure.raw (version_info): Set to 18:4:12. + * CMakeLists.txt (VERSION_PATCH): Set to 4. + + * docs/CHANGES: Updated. + +2016-07-05 Werner Lemberg + + * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning. + +2016-07-04 Alexei Podtelezhnikov + + [smooth] Variable type revision (part 2). + + * src/smooth/ftgrays.c (TArea): Restore original definition as `int'. + (gray_render_line) [FT_LONG64]: Updated. + (gray_convert_glyph): 32-bit band bisection stack should be 32 bands. + (gray_convert_glyph_inner): Trace successes and failures. + +2016-07-04 Werner Lemberg + + [autofit] Handle single-point contours as segments. + + Doing so allows us to link them to edges – some fonts like + `NotoSansGurmukhi-Regular' have such isolated points sitting exactly + on other outlines. + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't + ignore one-point contours but handle them specially as one-point + segments. + (af_latin_hints_compute_edges): Append one-point segments to edges + if possible. + +2016-07-02 Werner Lemberg + + [autofit] Remove unused structure members. + + * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove + `num_linked'. + + * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated. + +2016-07-02 Werner Lemberg + + [autofit] Update to Unicode 9.0.0. + + * src/autofit/afranges.c (af_arab_nonbase_uniranges, + af_cyrl_uniranges): Add new data. + +2016-07-01 Alexei Podtelezhnikov + + [smooth] Variable type revision (part 1). + + This patch restores original `TCoord' definition as `int' so that the + rendering pool is used more efficiently on LP64 platforms (unix). + + * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some + fields to `TCoord'. + (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline, + gray_sweep, gray_convert_glyph): Updated. + +2016-06-28 Alexei Podtelezhnikov + + [smooth] Minor clean-ups. + + * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'. + (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated. + +2016-06-27 Alexei Podtelezhnikov + + [smooth] Minor clean-ups. + + * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile + qualifier. + (gray_raster_render): Move span initializations from here. + (gray_sweep): ... to here and remove unused `target' argument. + +2016-06-26 Alexei Podtelezhnikov + + [pcf] Fix handling of very large fonts (#47708). + + * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an + unsigned short. + Only reject `0xFFFF' as an invalid encoding offset. + +2016-06-25 Werner Lemberg + + [truetype] Really fix deallocation in case of error (#47726). + + * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize + `outline.points' also. + +2016-06-23 Alexei Podtelezhnikov + + [smooth] Consolidate memory management. + + * src/smooth/ftgrays.c (gray_init_cells): Remove function. + (gray_TWorker): Remove fields that become local variables. + (gray_raster_render): Move rendering buffer declaration from here. + (gray_convert_glyph): ... to here and update accordingly. + +2016-06-22 Alexei Podtelezhnikov + + [smooth] Consolidate boundary checks. + + Removing the checks from `gray_hline' shaves 1% off rendering speed. + + * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'. + (gray_TWorker): No need to store `clip_box'. + (gray_hline): Remove unnecessary boundary checks. + (gray_convert_glyph): Move boundary checks from here. + (gray_raster_render): ... to here and consolidate. + +2016-06-21 Alexei Podtelezhnikov + + [smooth] Use `FT_Outline_Get_CBox'. + + * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'. + (gray_compute_cbox): Remove this function. + (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'. + +2016-06-20 Werner Lemberg + + [smooth] Remove compiler warnings. + + * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang. + +2016-06-20 Alexei Podtelezhnikov + + [smooth] Sanitize memory management. + + * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up. + +2016-06-18 Alexei Podtelezhnikov + + [smooth] Remove `band_shoot' that never worked. + + * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'. + (gray_convert_glyph): Updated. + +2016-06-17 Alexei Podtelezhnikov + + [raster, smooth] Handle FT_RENDER_POOL_SIZE better. + + * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro. + (ft_black_render): Updated. + * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro. + (gray_raster_render): Updated. + +2016-06-16 Werner Lemberg + + * src/base/md5.c: Updated to recent version. + +2016-06-14 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_hline): Optimize if-condition. + +2016-06-13 Werner Lemberg + + [autofit] Add support for Cherokee script. + + * src/autofit/afblue.dat: Add blue zone data for Cherokee. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Cherokee standard characters. + + * src/autofit/afranges.c: Add Cherokee data. + + * src/autofit/afstyles.h: Add Cherokee data. + +2016-06-09 David Capello + + [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files. + + * CMakeLists.txt: Each time cmake is run those files are + modified and the whole FreeType library is recompiled. With this + change we change the files only if there are real modifications, so + we can avoid recompilations. + +2016-06-09 Werner Lemberg + + [bdf] Check number of properties (#48166). + + * src/bdf/bdflib.c (_bdf_parse_start): Implement. + +2016-06-08 Alexei Podtelezhnikov + + [smooth] Re-enable new line renderer on 64-bit archs. + + * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new + implementation, where it is safe from overflows. + +2016-06-08 Alexei Podtelezhnikov + + [smooth] Minor clean-ups. + + * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way. + (gray_render_span): Remove spurious casts and streamline. + +2016-06-07 Werner Lemberg + + [autofit] Add support for Ethiopic script. + + * src/autofit/afblue.dat: Add blue zone data for Ethiopic. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Ethiopic standard characters. + + * src/autofit/afranges.c: Add Ethiopic data. + + * src/autofit/afstyles.h: Add Ethiopic data. + +2016-06-07 Werner Lemberg + + [autofit] Fix compilation with VS2016 (#48126). + + This compiler doesn't recognize the end-of-comment sequence `*/' if + it immediately follows non-ASCII characters. + + * src/autofit/afscript.h: Ensure whitespace before `*/'. + +2016-06-04 Werner Lemberg + + Fix a test for named instances (#48122). + + This was missed while giving negative face indices an extended + meaning. + + * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement. + +2016-05-31 Nikolaus Waxweiler + + [truetype] Let SHPIX move points in the twilight zone in v40. + + * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in + the twilight zone. Otherwise, treat SHPIX the same as DELTAP. + Unbreaks various fonts such as older versions of Rokkitt and DTL + Argo T Light that would glitch severely after calling ALIGNRP after a + blocked SHPIX. + +2016-05-30 Werner Lemberg + + [type42] Support `CharStrings' entry format as created by LilyPond. + + * src/type42/t42parse.c (t42_parse_charstrings): Handle entries + having the format + + (foo) cvn 12345 def + +2016-05-28 Werner Lemberg + + * src/autofit/afranges.c: Remove `UL' postfix from hex numbers. + + Suggested by Alexei. `UL' is only needed for 16bit compilers, but + it seems noone is using this anymore (and we no longer test whether + FreeType compiles in such an environment). Otherwise, it is easy to + add the postfix to the `AF_UNICODE_RANGE' macro. + +2016-05-26 Alexei Podtelezhnikov + + [smooth] Shrink bisection stack. + + The convergence of Bézier flatteners is fast with the deviation + from straight line being asymptotically cut 4-fold on each bisection. + This justifies smaller bisection stack size. + + * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'. + (gray_render_conic): Create and use conic `bez_stack'. Move back the + band analysis from... + (gray_conic_to): ... here. + (gray_render_cubic): Create and use cubic `bez_stack'. Move back the + band analysis from... + (gray_cubic_to): ... here. + (gray_move_to): Updated. + +2016-05-25 Werner Lemberg + + [autofit] Fixes for Armenian and Gujarati ranges. + + * src/autofit/afranges.c (af_armn_uniranges): Corrected. + (af_guru_nonbase_uniranges): Make U+0A3E a base character. + +2016-05-24 Werner Lemberg + + [autofit] Add support for Armenian script. + + * src/autofit/afblue.dat: Add blue zone data for Armenian. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Armenian standard characters. + + * src/autofit/afranges.c: Add Armenian data. + + * src/autofit/afstyles.h: Add Armenian data. + +2016-05-23 Werner Lemberg + + * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'. + + This was commented about 10 years ago – I think the reason then to + disable libtool's `-export-symbols' option was to give some badly + programmed applications access to internal FreeType functions. + + I believe that we should no longer take care of such programs; the + number of symbols exported should be rather restricted as much as + possible. + +2016-05-22 Werner Lemberg + + [autofit] Add blue-zone support for Gurmukhi script. + + This essentially moves the Gurmukhi script from the `Indic' hinter to + the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Gurmukhi. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Gurmukhi standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Gurmukhi data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2016-05-21 Werner Lemberg + + Minor clang++ fixes. + + * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c + (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add + initializer. + + * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit + conversion from NULL to boolean. + +2016-05-21 Werner Lemberg + + Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955). + + * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use + braces for `extern "C++"'. + +2016-05-17 Nikolaus Waxweiler + + [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3]. + + * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with... + (tt_loader_set_pp): ... this new function. + Update all callers. + +2016-05-17 Nikolaus Waxweiler + + [truetype] New implementation of v38 bytecode interpreter [2/3]. + + This patch actually modifies the bytecode interpreter. + + See added comments in `ttinterp.h' for more information on this and + the following commit in the series. + + * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by... + (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY, + SUBPIXEL_HINTING_MINIMAL): ...new macros. + (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backward + compatibility. + Updated. + (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD): + Updated. + (Ins_INSTCTRL): Handle native ClearType mode flag. + Updated. + (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backward + compatibility. + (Move_Zp2_Point): Ditto. + (Ins_SHP): Updated. + (Ins_SHPIX): Handle backward compatibility. + Updated. + (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated. + (Ins_ALIGNRP): Updated. + (Ins_IUP, Ins_DELTAP): Handle backward compatibility. + Updated. + (Ins_GETINFO): Handle v38 flags. + Updated. + (TT_RunIns): Handle backward compatibility mode. + Updated. + +2016-05-17 Nikolaus Waxweiler + + [truetype] New implementation of v38 bytecode interpreter [1/3]. + + This patch prepares data structures and the like. + + See added comments in `ttinterp.h' for more information on this and + the following commits in the series. + + * devel/ftoption.h, include/freetype/config/ftoption.h + (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate + between subpixel versions. + (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY, + TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros. + + * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro. + + * include/freetype/internal/tttypes.h (TT_FaceRec): Updated. + + * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields + `subpixel_hinting_lean', `vertical_lcd_lean', + `backward_compatibility', `iupx_called', iupy_called', and + `grayscale_cleartype' for new hinting mode. + + * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40 + interpreters conditionally. + + * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless + in v38 backward compatibility mode. + Updated. + (compute_glyph_metrics): Add v38 backward compatibility mode + constraint for adjusting advance widths. + Updated. + (tt_loader_init): Handle new flags `subpixel_hinting_lean', + `grayscale_cleartype', and `vertical_lcd_lean'. + Updated. + (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP): + Updated. + + * src/truetype/ttobjs.c (tt_driver_init): Conditionally set + default interpreter version number. + + * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated. + +2016-05-17 Werner Lemberg + + [cff] Fix matrix scaling (#47848). + + * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro. + + * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling + value of all matrix coefficients to scale matrix. + + * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for + matrix normalization if `matrix->yy' is zero. + +2016-05-16 Werner Lemberg + + [base] Reject invalid sfnt Mac resource (#47891). + + * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity + of `CID ' and `TYPE1' table offset and length. + +2016-05-16 Werner Lemberg + + [cid] Fix scanning for `StartData' and `/sfnts' (#47892). + + * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN): + New macros. + (cid_parser_new): Fix and document algorithm. + +2016-05-16 suzuki toshiya + + [truetype] Improve the recursive reference detector. + + The previous fix for #46372 misunderstood a composite glyph referring + same component twice as a recursive reference. See the discussion + + http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html + + Thanks to Khaled Hosny for finding this issue. + + * src/truetype/ttgload.c (ft_list_get_node_at): A function to get + the i-th node from FT_List. + (load_truetype_glyph): In the traversal scan of the reference tree + in the composite glyph, we clear the nodes filled by previous + sibling chain. + +2016-05-07 Werner Lemberg + + [cache] Allow value 0 for face ID. + + We never dereference `face_id', and some implementations might use a + running number instead of a pointer. Additionally, disallowing + value zero was undocumented. + + * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c + (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for + `face_id'. + +2016-05-05 Alexei Podtelezhnikov + + [smooth] More efficient accounting of conic splits and draws. + + A single decrement counter of segments to draw, instead of an array, + contains all the information necessary to decide when to split and + when to draw a conic segment. The number of splits before each draw is + equal to the number of trailing zeros in the counter. + + * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'. + (gray_render_conic): Updated to use decrement counter of segments. + +2016-05-05 Werner Lemberg + + [cff, truetype] Fix logic for `FT_Property_Set'. + + Otherwise some properties could be set to arbitrary values, which is + harmless, but querying could give wrong positive results. + + * src/cff/cffdrivr.c (cff_property_set) [hinting-engine], + * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]: + Only allow defined values. + +2016-04-25 Werner Lemberg + + [autofit] Add blue-zone support for Gujarati script. + + This essentially moves the Gujarati script from the `Indic' hinter to + the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Gujarati. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Gujarati standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Gujarati data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Gujarati data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2016-04-24 Werner Lemberg + + Minor. + + * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro + argument with parentheses. + +2016-04-24 Werner Lemberg + + [truetype] Fix deallocation in case of error (#47726). + + * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in + `outline' that are going to be deallocated in case of error. + +2016-04-23 Werner Lemberg + + [autofit] Improve Georgian blue zone characters. + + Suggested by Akaki Razmadze . + + * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM): + Updated. + + * src/autofit/afblue.c: Regenerated. + +2016-04-16 David Capello + + [cmake] Honor SKIP_INSTALL_* settings (as used in zlib). + + As FreeType depends on zlib, if we don't install zlib (e.g., because + we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too + (cmake triggers an error saying that FreeType cannot be installed + because zlib target isn't in the export set). + + * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS', + `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings. + +2016-04-16 Behdad Esfahbod + + [truetype] Another fix for non-intermediate GX tuples. + + * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing + cases. + +2016-04-12 Alexei Podtelezhnikov + + Remove forgotten macro. + + * include/freetype/internal/internal.h + [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove. + +2016-04-09 Werner Lemberg + + [autofit] Add support for Georgian scripts. + + Georgian is problematic, since `uppercase' forms of Mkhedruli + (called Mtavruli) are not yet defined in Unicode, which means that + proper blue zones can't be defined. However, there is already a + proposal submitted to Unicode; see + + http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf + + Additionally, due to historical reasons, Unicode treats Khutsuri as + the same script as Mkhedruli, and so does OpenType. However, since + the two scripts have completely different shapes it can happen that + blue zones differ considerably. The tag `geok' used here (derived + from ISO 15924) to differentiate the two scripts is not an OpenType + tag in use. If we now have a font that contains both glyphs for + Mkhedruli and Khutsuri, and it uses OpenType features for both also, + HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence, + blue zones for `geok' are not used for glyphs involved in the + OpenType features. + + An issue not yet resolved is which OpenType feature should be used + to access Mtavruli glyph shapes; right now, FreeType doesn't set up + support for them, but it is easy to add them later on as soon as + more information is available. + + * src/autofit/afblue.dat: Add blue zone data for Georgian. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Georgian standard characters. + + * src/autofit/afranges.c: Add Georgian data. + + * src/autofit/afstyles.h: Add Georgian data. + +2016-04-05 Werner Lemberg + + [autofit] Provide dummy blue zone for pseudo script `none'. + + Even if the dummy hinter is used as the handler for `none' (which + doesn't use blue zones), it is more consistent than the old value + (which was 0), pointing to Arabic... + + * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'. + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE. + +2016-03-30 Werner Lemberg + + * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567). + +2016-03-30 Werner Lemberg + + * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate. + +2016-03-30 Werner Lemberg + + * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567). + +2016-03-29 Werner Lemberg + + * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift. + +2016-03-29 Werner Lemberg + + [pfr] Fix binary search (#47514). + + * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border + conditions correctly. + +2016-03-29 Werner Lemberg + + [pfr] Minor. + + * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left', + `right', and `middle' with `min', `max', and `mid' as used in other + FreeType binary search code. + (pfr_load_bitmap_metrics): Fix invalid left shift. + +2016-03-29 Werner Lemberg + + * src/pfr/pfrtypes.h: Replace all enums with macros. + + We need `~FOO' to unset bits, and only with unsigned values (which + `enum' isn't normally) this works cleanly. + +2016-03-26 Werner Lemberg + + [pfr] Robustify bitmap strike handling (#47514). + + We did a binary search for a charcode without ensuring that the + searched data is ordered. Validating the order is now done lazily, + this is, the first access to a bitmap glyph triggers the order check + in the corresponding bitmap strike. + + * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values + `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'. + + * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument + a pointer. Handle new PFR_BITMAP_XXX flags. + (pfr_slot_load_bitmap): Updated. + +2016-03-26 Werner Lemberg + + [pfr] Fix handling of compound glyphs. + + Extra items are indicated with different bit positions. + + * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace + `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and + `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'. + + * src/pfr/pfrgload.c (pfr_glyph_load_simple, + pfr_glyph_load_compound): Use them. + +2016-03-25 Werner Lemberg + + [pfr] Minor. + + * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of + bare numbers. + +2016-03-25 Werner Lemberg + + [pfr] Various clang sanitizer fixes. + + * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle + signed nibbles. + (pfr_slot_load_bitmap): Correctly exit frame in case of error. + Fix invalid left shifts. + +2016-03-23 Werner Lemberg + + Rename `VERSION.DLL' (#47472). + + * docs/VERSION.DLL: Renamed to... + * docs/VERSIONS.TXT: ...this. + +2016-03-23 Werner Lemberg + + [raster, smooth] Directly test outline size (#47500). + + This improves stand-alone compilation. + + * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to... + + * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c + (gray_raster_render): ...these functions. + +2016-03-23 Werner Lemberg + + [raster, smooth] Fix some clang sanitizer runtime issues. + + * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode, + ft_black_render): Harmonize signatures with `ftimage.h'. + + * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset): + Ditto. + +2016-03-22 Werner Lemberg + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor. + + This fixes an AddressSanitizer issue: + + ttgload.c:430:7: runtime error: null pointer passed as argument 1, + which is declared to never be null + +2016-03-21 Werner Lemberg + + * src/autofit/afhints.c (af_glyph_hints_reload): Thinko. + + This fixes the previous commit to this file. + +2016-03-21 Alexei Podtelezhnikov + + [smooth] Partly revert recent changes. + + * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework + conditions to fix rendering issues. + +2016-03-20 Werner Lemberg + + [autofit] Show `near' points in tracing. + + * src/autofit/afhints.h (AF_FLAG_NEAR): New macro. + + * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it. + (af_glyph_hints_reload): Handle AF_FLAG_NEAR. + +2016-03-18 Alexei Podtelezhnikov + + [smooth] Minor refactoring and microoptimizations. + + * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move + band clipping from here. + (gray_conic_to, gray_cubic_to): ... to here. + (gray_render_line, gray_render_scanline): Initialize variables closer + to their use. + +2016-03-17 Alexei Podtelezhnikov + + [smooth] Minor refactoring. + + * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move + upscaling from here. + (gray_conic_to, gray_cubic_to): ... to here. + +2016-03-15 Werner Lemberg + + * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize. + +2016-03-14 Alexei Podtelezhnikov + + [smooth] Temporarily revert 6eb6158dd787 (#47114). + + * src/smooth/ftgrays.c (gray_render_line): Old implementation. + +2016-03-12 Werner Lemberg + + [ftfuzzer] Improve coverage of rasterfuzzer. + + * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use + input data for `tags' array also. + Trim input data to get more positive hits. + +2016-03-11 Pavlo Denysov + + Fix CMake issues for iOS (patch #8941). + + * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory. + * builds/cmake/iOS.cmake: No longer enforce gcc. + +2016-03-09 Behdad Esfahbod + + [truetype] Fix handling of non-intermediate GX tuples. + + We probably did not notice this as all fonts we tested had only + tuple_coords[i] be +1 or -1 for non-intermediate tuples. + + * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it. + +2016-03-06 Alexei Podtelezhnikov + + [base] Refuse to render enormous outlines (#47114). + + The goal is to avoid integer overflows in the rendering algorithms. + The limit is chosen arbitrarily at some 2^18 pixels, which should be + enough for modern devices including printers. + + * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject + enormous outlines. + +2016-03-06 Alexei Podtelezhnikov + + [smooth] Replace left shifts with multiplications (#47114). + + * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it. + +2016-03-05 Werner Lemberg + + [autofit] Avoid excessive stem length rounding (#25392). + + * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument + to pass difference between hinted and unhinted position of base + point; use this to adjust the stem width depending on the PPEM so + that it doesn't become too large under certain circumstances. + Update all callers using value 0 for this argument except... + (af_latin_align_linked_edge): Pass position delta of base point to + `af_latin_compute_stem_width'. + +2016-03-05 J Raynor + + Make FreeType compile on AIX out of the box. + + * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on + AIX. + +2016-03-01 Werner Lemberg + Kostya Serebryany + + [ftfuzzer] Add unit for testing smooth and black rasterizers. + + * src/tools/ftfuzzer/rasterfuzzer.cc: New file. + +2016-03-01 Werner Lemberg + + [autofit] Fix reallocation error introduced in 2016-02-27 (#47310). + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign + `prev_segment' after reallocation. + +2016-03-01 Werner Lemberg + + Fix clang warnings. + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use + FT_UShort for `min_flags' and `max_flags'. + Initialize `prev_*' variables. + + * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix + types of local variables. + + * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]: + Update `printf' format string. + + * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast. + (LLVMFuzzerTestOneInput): Fix loop type. + +2016-02-29 Werner Lemberg + + [autofit] Add blue-zone support for Sinhala script. + + This essentially moves the Sinhala script from the `Indic' hinter to + the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Sinhala. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Sinhala standard character and move data + out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Sinhala data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Sinhala data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2016-02-27 Werner Lemberg + + [autofit] Properly handle spikes pointing to the x-axis. + + An example that gets better rendered is glyph `uusignTaml' (glyph + index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem. + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly + handle segments where the last point of the first segment is + identical to the first point in the second one. This can happen for + malformed fonts or spikes. We either merge the new segment with the + previous one (both segments point into the same direction), or we + discard the shorter segment if they point into different directions. + +2016-02-27 Werner Lemberg + + [autofit] Minor code clean-up. + + * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change + some local variable names to better differentiate between values + along a segment and values orthogonal to it. + +2016-02-26 Werner Lemberg + + [autofit] Improve BOUND action. + + In complex glyph shapes, the original logic was too simple to cater + for situations that would actually need something similar to PS Hint + masks. This fix should alleviate the worst cases. + + * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow + complete disappearance of stems. + +2016-02-25 Werner Lemberg + + [autofit] Add blue-zone support for Tamil script. + + This essentially moves the Tamil script from the `Indic' hinter to + the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Tamil. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Tamil standard character and move data + out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Tamil data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Tamil data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2016-02-18 Werner Lemberg + + [autofit] Add blue-zone support for Malayalam script. + + This essentially moves the Malayalam script from the `Indic' hinter + to the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Malayalam. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Malayalam standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Malayalam data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Malayalam data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2016-02-16 Alexei Podtelezhnikov + + [smooth] Fix integer overflow (#47114). + + * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'. + +2016-02-15 Werner Lemberg + + * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing. + +2016-02-15 Werner Lemberg + + [cff] Handle T2 operator only with old CFF engine (#47157). + + * src/cff/cffparse.c (cff_parser_run) : Enclose with + #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif. + +2016-02-15 Werner Lemberg + + [cff] Partially handle `load' and `store' ops in old CFF engine. + + Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be + displayed. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) : Partially implement it. + + * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass + the number of Multiple Master axes. + Update all callers. + (cff_parse_multiple_master): Get number of axes. + (cff_parser_run) : Updated. + * src/cff/cffparse.h: Updated. + (CFF_ParserRec): Add `num_axes' field. + + * src/cff/cffload.c: Updated. + + * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field. + +2016-02-15 Werner Lemberg + + [cff] Correctly trace SIDs that contain NULL bytes. + + We need this to properly trace Multiple Master CFFs, which contain + two SIDs that are charstrings. + + This commit makes FreeType also show the last SID, omitted + previously due to a bug. + + * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field. + + * src/cff/cffload.c (cff_index_get_pointers): Add argument to return + the pool size. + Update all callers. + + * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly + access `cff->strings' to display the non-default strings. + +2016-02-14 Werner Lemberg + + * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H. + +2016-02-14 Werner Lemberg + + * src/cff/cffparse.c: Include `cffgload.h'. + + Problem reported by Colin Walters . + +2016-02-14 Werner Lemberg + + [cff] Make old CFF engine show MM CFFs (without variations). + + The new code only displays the first master in the font. + + * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new + parameter to allow function calls from dictionaries also. + : Partially implement it. + Update all callers. + * src/cff/cffgload.h: Updated. + + * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the + number of Multiple Master designs. + Update all callers. + (cff_parse_multiple_master): New function to rudimentarily parse + operator. + (cff_parser_run): Handle `T2' operator. + * src/cff/cffparse.h: Updated. + (CFF_ParserRec): Add `num_designs' field. + + * src/cff/cffload.c: Updated. + + * src/cff/cfftoken.h: Handle `MultipleMaster' operator. + + * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field. + + * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for + MM CFFs. + +2016-02-09 Werner Lemberg + + [docmaker] Don't emit trailing newlines. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code): + Use `rstrip'. + +2016-02-07 Werner Lemberg + + * Version 2.6.3 released. + ========================= + + + Tag sources with `VER-2-6-3'. + + * docs/VERSION.DLL: Update documentation and bump version number to + 2.6.3. + + * 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.2/2.6.3/, s/262/263/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. + + * builds/unix/configure.raw (version_info): Set to 18:3:12. + * CMakeLists.txt (VERSION_PATCH): Set to 3. + + * docs/CHANGES: Updated. + +2016-02-07 Werner Lemberg + + Fix another runtime error found by clang's sanitizer (#47082). + + * src/base/ftstroke.c (ft_stroke_border_export): Properly handle + empty input buffer. + +2016-02-07 Werner Lemberg + + Fix runtime errors found by clang's sanitizer (#47082). + + * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c + (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): + Properly handle empty input buffer. + +2016-02-07 Werner Lemberg + + [cff] Minor. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) : + Remove dead code. + +2016-02-07 Werner Lemberg + + [cff] Implement missing operators in new engine (except `random'). + + * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro. + + * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the + following operators: abs, add, and, div, drop, dup, eq, exch, get, + ifelse, index, mul, neg, not, or, put, roll, sqrt, sub. + + * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New + auxiliary function for `roll' operator. + +2016-02-06 Werner Lemberg + + [cff] Fix some Type 2 operators in old CFF engine. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq' + operator, add `not' and (unsupported) `blend' operators. + +2016-02-05 Sebastian Rasmussen + + Make direct call of `make install' work (#47072). + + * builds/unix/unix-def.in (freetype-config): Make sure + `freetype-config' is generated for both make targets (`all' and + `install'). + +2016-02-05 Werner Lemberg + + [base] Fix advance width loading for MM and GX fonts (#47064). + + * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for + MM and GX fonts. + Update callers. + +2016-02-03 Werner Lemberg + + [cff] Fix handling of face_index == -1 for pure CFF. + + * src/cff/cffobjs.c (cff_face_init): Return correct number of faces. + +2016-01-30 Werner Lemberg + + [autofit] Minor tracing improvement. + + * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline + at the start of a new contour. + +2016-01-28 Nikolaus Waxweiler + + Remove unpatented hinter (3/3). + + * include/freetype/config/ftoption.h + (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. + + * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove + `ignore_unpatented_hinter' field. + Update users. + (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove. + Update users. + + * include/freetype/internal/tttypes.h (TT_FaceRec): Remove + `unpatented_hinting' field. + Update users. + + * src/base/ftpatent.c (_tt_check_patents_in_range, + _tt_check_patents_in_table, _tt_face_check_patents): Remove. + (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting): + Replace code with dummies. + + * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code. + * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis' + field. + +2016-01-28 Nikolaus Waxweiler + + Remove unpatented hinter (2/3). + + * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. + +2016-01-28 Nikolaus Waxweiler + + Remove unpatented hinter (1/3). + + * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]: + Remove all code related to this macro. + +2016-01-28 Werner Lemberg + + [autofit] Add blue-zone support for Kannada script. + + This essentially moves the Kannada script from the `Indic' hinter to + the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Kannada. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Kannada standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Kannada data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Kannada data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2016-01-22 Alexei Podtelezhnikov + + Better access to 64-bit integers for C99 compilers. + + * include/freetype/config/ftconfig.h [FT_LONG64]: Use + __STDC_VERSION__ to define 64-bit integers. + * builds/unix/ftconfig.in [FT_LONG64]: Ditto. + * builds/vms/ftconfig.h [FT_LONG64]: Ditto. + +2016-01-21 Werner Lemberg + + [gxvalid] Remove commented out code. + + * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it. + +2016-01-20 Werner Lemberg + + [autofit] Complete last autofit commit. + + Problem reported by Kostya Serebryany . + + * src/autofit/afshaper.c (af_shaper_get_coverage) + [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature. + +2016-01-20 Werner Lemberg + + Still handle `__FTERRORS_H__'. + + We need this for backward compatibility. + + Problem reported by John Emmas . + + * include/freetype/fterrors.h: Fix inclusion guard so that + undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as + expected. + +2016-01-19 Werner Lemberg + + [autofit] Fix handling of default script. + + Patch taken from ttfautohint, commit + 071ae2c00e0d67f9d19418f4fade1c23d27dc185. + + There were two bugs. + + - We now use non-standard script tags like `khms' for special + purposes. However, HarfBuzz maps such tags to `DFLT', and + without this commit the associated lookups were incorrectly + assigned to the non-standard tags. + + - Let's assume we have a Bengali font, and the font's `DFLT' + script tag handles the necessary lookups for Bengali, too. + Without this commit, the `DFLT' lookups were assigned to + ttfautohint's default script (usually `latn') before the + standard lookups for Bengali were handled. + + We now have the following order while searching for covered + glyph indices. + + special features of scripts (e.g. `sups' for Cyrillic) + Unicode mappings of scripts + remaining features of scripts (especially important for Indic + scripts) + default features of default script + + * src/autofit/afshaper.c, src/autofit/afshaper.h + (af_shaper_get_coverage): Add boolean parameter to indicate default + script. + Update all callers. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Fix search order for coverages. + +2016-01-19 Werner Lemberg + + Various minor clang fixes. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths), + src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize + `ch'. + + * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast. + + * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast. + + * src/base/fthash.c (hash_num_lookup): Add cast. + + * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast. + + * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out + redundant code. + + * src/type1/t1driver.c (t1_get_ps_font_value) : Add + cast. + + * src/type1/t1load.c (parse_subrs): Fix type of `count'. + +2016-01-19 Derek B. Noonburg + + [truetype] Add another tricky font. + + * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase. + (sfnt_id): Add variant of `DFKaiShu'. + +2016-01-14 Alexei Podtelezhnikov + + [base] Empower `FT_Library_SetLcdFilterWeights'. + + * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter + in addition to setting weights. + (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and + FT_FORCE_LEGACY_LCD_FILTER. + * include/freetype/ftlcdfil.h: Documentation update. + +2016-01-12 Werner Lemberg + + Don't use macro names that start with `_[A-Z]' [3/3]. + + Such macro names are reserved for both C and C++. + + * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/. + Update all callers. + (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'. + * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto. + +2016-01-12 Werner Lemberg + + Don't use macro names that start with `_[A-Z]' [2/3]. + + Such macro names are reserved for both C and C++. + + * include/freetype/ftimage.h, src/raster/ftraster.c, + src/smooth/ftgrays.c, src/smooth/ftgrays.h: + s/_STANDALONE_/STANDALONE_/. + +2016-01-12 Werner Lemberg + + Don't use macro names that start with `_[A-Z]' [1/3]. + + Such macro names are reserved for both C and C++. + + * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with + `BDF_XXX_'. + +2016-01-12 Werner Lemberg + + Don't use macro names that contain `__' [2/2]. + + Such macro names are reserved for both C and C++. + + * src/cache/*: s/__/_/. + +2016-01-12 Werner Lemberg + + Don't use macro names that contain `__' [1/2]. + + Such macro names are reserved for both C and C++. + + * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'. + +2016-01-10 Jered Gray + + [cff] Fix usage of `|' operator. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR, + default]: `|' is not guaranteed to be processed from left to right + by the compiler. However, the code repeatedly calls + `cf2_buf_readByte' to get the arguments to `|' ... Fix this. + +2015-12-25 Werner Lemberg + + [autofit] Make top-to-bottom hinting work in latin auto-hinter. + + This improves rendering of scripts like Bengali or Devanagari. + + * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to + pass top-to-bottom hinting flag. This makes the function sort edges + in descending vertical position. + + * src/autofit/afhints.c: Updated. + + * src/autofit/aflatin.c (af_latin_hints_compute_edges, + af_latin_hint_edges): Use `top_to_bottom_hinting' flag. + + * src/autofit/afcjk.c (af_cjk_hints_compute_edges), + src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated. + +2015-12-24 Werner Lemberg + + [autofit] Add hinting direction to `AF_ScriptClassRec'. + + Still unused. + + * src/autofit/afglobal.c (SCRIPT): Handle hinting direction. + + * src/autofit/aftypes.h (AF_ScriptClassRec): Add + `top_to_bottom_hinting' field. + (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros. + (AF_DEFINE_SCRIPT_CLASS): Updated. + +2015-12-23 Werner Lemberg + + [autofit] Start implementing hinting direction (up/down, down/up). + + Right now, it does nothing. + + * src/autofit/afscript.h: Add another parameter to `SCRIPT', + specifying hinting direction. + + * src/autofit/afglobal.c, src/autofit/afglobal.h, + src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c, + src/autofit/aftypes.h: Extend `SCRIPT' definitions. + +2015-12-22 Werner Lemberg + + * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744). + +2015-12-22 Werner Lemberg + + [base] Make hash interface symmetric. + + Use `num' and `str' infixes everywhere. + + * src/base/fthash.c (ft_hash_init): Renamed to... + (hash_init): ... This. + (ft_hash_str_init, ft_hash_num_init): New functions. + (ft_hash_free): Renamed to... + (ft_hash_str_free): ... This. + + * include/freetype/internal/fthash.h: Updated. + + * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated. + +2015-12-21 Werner Lemberg + + [type1] Avoid shift of negative numbers (#46732). + + * src/type1/t1load.c (parse_subrs): Do it. + +2015-12-20 Werner Lemberg + + [type1, psaux] Handle large values of num_subrs correctly (#46692). + + We now use a hash to map from subr indices to array elements holding + the subroutines, if necessary. + + * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H. + (T1_FontRec): Add `subrs_hash' field. + + * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H. + (T1_DecoderRec): Add `subrs_hash' field. + + * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field. + + * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H. + (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary. + + * src/type1/t1load.c: Include FT_INTERNAL_HASH_H. + (parse_subrs): Use hash for subr indices that exceed the allocated + number of subr slots. + (t1_init_loader): Remove unnecessary code. + (t1_done_loader, T1_Open_Face): Updated. + + * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances, + T1_Load_Glyph): Updated. + + * src/type1/t1objs.c (T1_Face_Done): Updated. + + * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H. + (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if + necessary. + + * src/cid/cidgload.c (cid_load_glyph): Updated. + +2015-12-20 Werner Lemberg + + [base] Thinko: Remove free function pointer. + + We don't copy keys or values while hashing. + + * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed. + (FT_HashRec): Remove `free' field. + + * src/base/fthash.c (hash_str_free): Removed. + (ft_hash_init, ft_hash_free): Updated. + +2015-12-20 Werner Lemberg + + [base, bdf] Don't expose `FT_Hashnode' in hash functions. + + * src/base/fthash.c (hash_lookup, ft_hash_str_lookup, + ft_hash_num_lookup): Return pointer to `size_t' instead of + `FT_Hashnode'. + + * include/freetype/internal/fthash.h: Updated. + + * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property, + bdf_get_font_property): Updated. + +2015-12-20 Werner Lemberg + + [base, bdf] Add number hashing. + + * src/base/fthash.c (hash_num_lookup, hash_num_compare): New + functions. + (ft_hash_init): Add argument to select between number and string + hashing. + (ft_hash_num_insert, ft_hash_num_lookup): New functions. + + * include/freetype/internal/fthash.h: Updated. + + * src/bdf/bdflib.c (_bdf_parse_start): Updated. + +2015-12-20 Werner Lemberg + + [base] Introduce hash lookup, compare, and free function pointers. + + * include/freetype/internal/fthash.c (FT_Hash_LookupFunc, + FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs. + (FT_HashRec): Add `lookup', `compare', and `free' fields. + + * src/base/fthash.c (hash_str_lookup, hash_str_compare, + hash_str_free): New functions. + (ft_hash_init): Set function pointers. + (hash_bucket, ft_hash_free): Use them. + +2015-12-20 Werner Lemberg + + [base, bdf] Use a union as a hash key. + + We want to support both an integer and a string key later on. + + * include/freetype/internal/fthash.h (FT_Hashkey): New union. + (FT_HashnodeRec): Updated. + (ft_hash_insert, ft_hash_lookup): Renamed to ... + (ft_hash_str_insert, ft_hash_str_lookup): ... this. + + * src/base/fthash.c (hash_bucket): Updated. + (ft_hash_insert, ft_hash_lookup): Renamed to ... + (hash_insert, hash_lookup): ... this. + (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions. + + * src/bdf/bdflib.c: Updated. + +2015-12-19 Werner Lemberg + + [bdf] Use new hash functions. + + * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H. + (hashnode, hashtable): Removed. + (bdf_font_t): Use `FT_HashRec' type for `proptbl'. + + * src/bdf/bdflib.c: Remove all hash functions. + Update code for new hash structure and function names. + +2015-12-19 Werner Lemberg + + [bdf, base] Lift hash functions from bdf driver to base module. + + * src/base/fthash.c, include/freetype/internal/fthash.h: New files, + containing (massaged) code from `bdflib.c' and `bdf.h'. + + * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New + macro. + + * src/base/ftbase.c: Include `fthash.c'. + + * src/base/Jamfile (_sources): Add `fthash'. + + * src/base/rules.mk (BASE_SRC): Add `fthash.c'. + + * docs/LICENSE.TXT: Updated. + +2015-12-15 Werner Lemberg + + [autofit] Add blue-zone support for Bengali script. + + This essentially moves the Bengali script from the `Indic' hinter to + the `Latin' hinter. + + * src/autofit/afblue.dat: Add blue zone data for Bengali. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Bengali standard characters and move + data out of AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afranges.c: Move Bengali data out of + AF_CONFIG_OPTION_INDIC block. + + * src/autofit/afstyles.h: Update Bengali data; in particular, use + AF_WRITING_SYSTEM_LATIN. + +2015-12-14 Ben Wagner + + [bdf] Remove dead code (#46625). + + The BDF specification only allows decimal numbers, no octal or + hexadecimal decoding is needed. + + * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, + _bdf_atos): Remove unused code and parameters. + Update all callers. + (odigits): Remove. + +2015-12-14 Werner Lemberg + + [base] Fix calls to `FT_Stream_Seek'. + + * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set + `error'. + +2015-12-14 Ben Wagner + + [base] Check error when seeking to data supplied offset (#46635). + + * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): + `ft_lookup_PS_in_sfnt_stream' returns offset and length from + user supplied data. Use of this these values must be checked. + +2015-12-13 Werner Lemberg + + [autofit] Add support for Myanmar script. + + * src/autofit/afblue.dat: Add blue zone data for Myanmar. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Myanmar standard characters. + + * src/autofit/afranges.c: Add Myanmar data. + + * src/autofit/afstyles.h: Add Myanmar data. + +2015-12-12 Werner Lemberg + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor. + +2015-12-12 Werner Lemberg + + * src/autofit/afscript.h: Avoid potential crash. + +2015-12-10 Werner Lemberg + + [autofit] Restore OpenType feature check. + + This was removed while rewriting the HarfBuzz interface. + + * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to + hold internal HarfBuzz buffer, needed for feature comparison. + + * src/autofit/afglobal.c (af_face_globals_new, + af_face_globals_free): Initialize and destroy `hb_buf'. + + * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character + (cluster) with and without applied feature. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing + message. + +2015-12-10 Werner Lemberg + + [autofit] Remove redundant code. + + * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it. + +2015-12-09 Werner Lemberg + + [autofit] Thinko. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count + empty blue zones (bug introduced 2015-12-06). + +2015-12-09 Werner Lemberg + + [autofit] Introduce subscript top blue zones. + + This feature is mainly for Khmer: The idea is to avoid a clash + between the top of subscript glyphs and the bottom of normal + baseline glyphs. + + This only works for character clusters mapped to multiple glyphs. + + * src/autofit/afblue.dat: Add subscript top blue zone for Khmer. + + * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New + macro. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE, + AF_LATIN_BLUE_SUB_TOP): New macros. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new + blue zone property. + Update tracing messages. + (af_latin_metrics_scale_dim): Handle new blue zone property. + (af_latin_hints_compute_blue_edges): Updated. + +2015-12-09 Werner Lemberg + + [autofit] Fix tracing message. + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display + inactive blue zones also. + +2015-12-06 Werner Lemberg + + * src/autofit/afblue.dat: Add more Khmer clusters. + + Some fonts have incorrect ligatures; we need more samples to get a + good mean value. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + +2015-12-06 Werner Lemberg + + [autofit] Typos. + + * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem) + [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile. + +2015-12-06 Werner Lemberg + + [autofit] Add support for Khmer script. + + We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and + `Khmer symbols' (`khms', U+19E0-U+19FF). + + * src/autofit/afblue.dat: Add blue zone data for Khmer. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Khmer standard characters. + + * src/autofit/afranges.c: Add Khmer data. + + * src/autofit/afstyles.h: Add Khmer data. + +2015-12-06 Werner Lemberg + + [autofit] Rewrite HarfBuzz interface to support character clusters. + + Scripts like Khmer have blue zones that can't be directly + represented by Unicode characters. Instead, it is necessary to let + HarfBuzz convert character clusters into proper glyph representation + forms, then deriving the blue zone information from the resulting + glyphs. + + * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by... + * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new + files, providing a new API to access HarfBuzz. + + The new API manages a HarfBuzz buffer with `af_shaper_buf_create' + and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded + string with function `af_shaper_get_cluster', and the resulting + glyph data (indices, advance widths, vertical offsets) can be + iteratively accessed with function `af_shaper_get_elem'. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths, + af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. + + * src/autofit/aflatin.c (af_latin_metrics_init_widths, + af_latin_metrics_init_blues, af_latin_metrics_check_digits): + Updated. + + * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/. + + * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/. + (af_face_globals_compute_style_coverage): Updated. + + * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/. + + * src/autofit/autofit.c: s/hbshim.c/afshaper.c/. + + * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC): + Updated. + +2015-12-06 Werner Lemberg + + [autofit] Prepare forthcoming changes. + + This makes it easier to control the commits. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy + loop. No functional change. + +2015-12-06 Werner Lemberg + + [autofit] Use string of standard characters. + + This is more flexible; additionally, it would allow character + clusters. + + * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated. + (AF_ScriptClassRec): Replace `standard_char[123]' with + `standard_charstring'. + + * src/autofit/afscript.h: Replace last three character arguments + of the `SCRIPT' calls with a string parameter, holding the standard + characters (in UTF-8 encoding) separated with spaces. + + * src/autofit/afglobal.c, src/autofit/afglobal.h, + src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c + (SCRIPT): Updated. + + * src/autofit/afcjk.c (af_cjk_metrics_init_widths), + src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated. + +2015-12-05 Werner Lemberg + + * src/autofit/afblue.dat: Separate blue zone characters with spaces. + + Another preparation for character cluster support. + + * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated. + +2015-12-05 Werner Lemberg + + * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces. + + Instead, reduce multiple spaces to a single one. We need this later + for supporting character clusters in `afblue.dat'. + +2015-12-05 Werner Lemberg + + * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'. + + * src/autofit/afblue.h: Regenerated. + +2015-12-05 Werner Lemberg + + * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/. + +2015-12-03 Werner Lemberg + + * builds/unix/install.mk (install): Remove stale `ft2build.h'. + +2015-12-01 Werner Lemberg + + [type1] Avoid dangling pointer (#46572). + + * src/type1/t1afm.c (T1_Read_Metrics): Properly reset + `face->afm_data'. + +2015-11-28 Alexei Podtelezhnikov + + * include/freetype/ftlcdfil.h: Documentation tweak. + +2015-11-28 Werner Lemberg + + * Version 2.6.2 released. + ========================= + + + Tag sources with `VER-2-6-2'. + + * docs/VERSION.DLL: Update documentation and bump version number to + 2.6.2. + + * 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.1/2.6.2/, s/261/262/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. + + * builds/unix/configure.raw (version_info): Set to 18:2:12. + * CMakeLists.txt (VERSION_PATCH): Set to 2. + + * docs/CHANGES: Updated. + +2015-11-28 Werner Lemberg + + Fix C++ compilation. + + * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H. + + * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler. + +2015-11-28 Nikolaus Waxweiler + + Change default LCD filter to be normalized and color-balanced. + + * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update + `default_filter'. + +2015-11-28 Werner Lemberg + + [docmaker] Allow references to section names. + + In the reference, we show the section's title enclosed in single + quotes. + + * src/tools/docmaker/formatter.py (Formatter::__init__): Collect + section names as identifiers. + + * src/tools/docmaker/tohtml.py (section_title_header): Split into... + (section_title_header1, section_title_header2): ... these two + strings. + (HtmlFormatter::make_block_url, make_html_word, html_source_quote): + Handle sections. + (HtmlFormatter::section_enter): Updated to add `id' HTML attribute. + +2015-11-27 Tamas Kenez + + [cmake] Add script to test the config module. + + * builds/cmake/testbuild.sh: New file. + +2015-11-27 Tamas Kenez + + * CMakeLists.txt: Create `freetype-config.cmake' config module. + +2015-11-27 Tamas Kenez + + * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'. + +2015-11-27 Tamas Kenez + + [cmake] Add better control of library dependencies. + + * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit + ZLIB/BZip2/PNG/HarfBuzz. + +2015-11-27 Tamas Kenez + + [cmake] Make `FindHarfBuzz' observe the REQUIRED option. + + * builds/cmake/FindHarfBuzz.cmake: Implement it. + +2015-11-27 Werner Lemberg + + [cmake] Collect files specific to cmake in `builds/cmake'. + + * builds/FindHarfBuzz.cmake: Move to ... + * builds/cmake/FindHarfBuzz.cmake: ... this place. + + * CMakeLists.txt (CMAKE_MODULE_PATH): Updated. + +2015-11-27 Alexander Bock + + CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'. + +2015-11-26 Werner Lemberg + + [docmaker] Allow `foo[bar]' as identifier. + + We need this to handle equally named properties in different + modules. + + * src/tools/docmaker/content.py (re_identifier), + src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'. + + * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word, + HtmlFormatter::index_exit, HtmlFormatter::section_enter, + HtmlFormatter::block_enter): Handle `foo[bar]'. + +2015-11-25 Werner Lemberg + + * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480). + + (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its + contents. + +2015-11-21 Werner Lemberg + + * include/freetype/internal/ftcalc.h: Don't use `register' keyword. + + This fixes compiler warnings. + + Reported by Behdad. + +2015-11-20 Werner Lemberg + + Add `FT_LCD_FILTER_LEGACY1' enum value. + + This does the same as `FT_LCD_FILTER_LEGACY'. + + See + + https://bugs.freedesktop.org/show_bug.cgi?id=92981 + + for the reasoning. + + * include/freetype/ftlcdfil.h (FT_LcdFilter): New value + `FT_LCD_FILTER_LEGACY1'. + + * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it. + +2015-11-15 Werner Lemberg + + * src/autofit/afhints.c (af_get_segment_index): Fix it. + + The old code was too simple, returning invalid values in most cases + where a segment crosses the contour start. + +2015-11-15 Werner Lemberg + + * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439). + +2015-11-11 Werner Lemberg + + [cff, autofit] Switch off stem darkening by default. + + * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c + (cff_driver_init): Do it. + +2015-11-10 Jan Alexander Steffens (heftig) + + Allow native CFF hinter in FT_RENDER_MODE_LIGHT. + + Both the native CFF hinter and the auto-hinter now have a very + similar rendering style. + + * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no + longer implies FT_LOAD_FORCE_AUTOHINT. + + * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New + macro. + + * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New + macro. + + * src/cff/cffdrivr.c (cff_driver_class): Use it. + + * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection + logic. + +2015-11-09 Werner Lemberg + + * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408). + +2015-11-09 Werner Lemberg + + [truetype] Remove integer to pointer conversion compiler warning. + + Problem reported by Alexei. + + * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found + in the glib library to fix the issue. + +2015-11-08 Behdad Esfahbod + + [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also. + + * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it. + +2015-11-08 Philipp Knechtges + + [autofit] Don't distort (latin) glyphs too much (#46195). + + * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and + `descender' fields. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect + ascender and descender data for blue zones. + (af_latin_metrics_scale_dim): Reject vertical scaling values that + change the result by more than two pixels. + +2015-11-05 Werner Lemberg + + [sfnt] Ignore embedded bitmaps with zero size (#46379). + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement + it. + +2015-11-04 Werner Lemberg + + [truetype] Catch infinite recursion in subglyphs (#46372). + + * include/freetype/internal/tttypes.h (TT_LoaderRec): New field + `composites'. + + * src/truetype/ttgload.c: Include FT_LIST_H. + (load_truetype_glyph): Add composite subglyph index to a list; + abort if index is already in list. + (tt_loader_init): Updated. + (tt_loader_done): New function. + (TT_Load_Glyph): Call `tt_loader_done'. + +2015-11-04 Werner Lemberg + + [truetype] Better tracing of composite glyphs. + + * src/truetype/ttgload.c (TT_Load_Composite_Glyph, + load_truetype_glyph): Implement it. + +2015-11-03 Werner Lemberg + + [sfnt] Protect against zero-size bitmaps (#46345). + + * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check + `glyph_size'. + +2015-11-02 Nikolaus Waxweiler + + * src/autofit/afloader.c (af_loader_load_g): Implement emboldening. + +2015-11-02 Nikolaus Waxweiler + + [autofit] Implement darkening computation function. + + This is a crude adaption of the original `cf2_computeDarkening' + function. + + * src/autofit/afloader.c (af_intToFixed, af_fixedToInt, + af_floatToFixed): New macros, taken from `cf2fixed.h'. + (af_loader_compute_darkening): New function. + * src/autofit/afloader.h: Updated. + +2015-11-02 Nikolaus Waxweiler + + [autofit] Add functions to get standard widths for writing systems. + + We need the computed standard horizontal and vertical widths for the + emboldening calculation. This method provides a convenient way to + extract it from writing-system-specific metrics structures, which + all script definitions must implement. + + * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New + function type. + (AF_WritingSystemClassRec): New member `style_metrics_getstdw'. + (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated. + + * src/autofit/afcjk.c (af_cjk_get_standard_width): New function. + (af_cjk_writing_system_class): Updated. + * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated. + * src/autofit/afindic.c (af_cjk_get_standard_width): New function. + (af_indic_writing_system_class): Updated. + * src/autofit/aflatin.c (af_latin_get_standard_width): New function. + (af_indic_writing_system_class): Updated. + * src/autofit/aflatin.c (af_latin_get_standard_width): New function. + (af_indic_writing_system_class): Updated. + +2015-11-02 Nikolaus Waxweiler + + [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data. + + * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields. + + * src/autofit/afglobal.c (af_face_globals_new): Initialize new + fields. + (af_face_globals_free): Reset new fields. + +2015-11-02 Nikolaus Waxweiler + + [autofit] Add stem-darkening properties. + + Actual code follows in a later commit. + + * include/freetype/ftautoh.h: Document `no-stem-darkening' and + `darkening-parameters'. + + * src/autofit/afmodule.h: New fields `no_stem_darkening' and + `darken_params'. + + * src/autofit/afmodule.c (af_property_set, af_property_get): + Handle them. + (af_autofitter_init): Initialize them. + +2015-11-02 Ben Wagner + + [ftfuzzer] Add support for multiple files (patch #8779). + + Currently, libFuzzer only supports mutation of a single file. We + circumvent this problem by using an uncompressed tar archive as + multiple-file input for the fuzzer. + + This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing; + a constructed tarball should contain a font file as the first + element, and files to be attached as further elements. + + * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers. + (archive_read_entry_data, parse_data): New functions. + (LLVMFuzzerTestOneInput): Updated. + + * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom + mutator for libFuzzer that can mutate tarballs in a sensible way. + +2015-10-31 Werner Lemberg + + [sfnt] Fix cmap 14 validation (#46346). + + * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before + accessing `numRanges' and `numMappings'. + Fix size check for non-default UVS table. + +2015-10-31 Werner Lemberg + + [sfnt] Handle infinite recursion in bitmap strikes (#46344). + + * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc, + tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned, + tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add + argument for recursion depth. + (tt_sbit_decoder_load_compound): Add argument for recursion depth. + Increase recursion counter for recursive call. + (tt_sbit_decoder_load_image): Add argument for recursion depth. + Check recurse depth. + (tt_face_load_sbit_image): Updated. + +2015-10-29 Werner Lemberg + + * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor. + +2015-10-29 Werner Lemberg + + * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch. + + Problem reported by David Capello ; see + + http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html + + for details. + +2015-10-27 Werner Lemberg + + [pfr] Add some safety guards (#46302). + + * src/pfr/pfrload.h (PFR_CHECK): Rename to... + (PFR_CHECK_SIZE): ... this. + (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE. + + * src/pfr/pfrload.c (pfr_log_font_count): Check `count'. + (pfr_extra_item_load_kerning_pairs): Remove tracing message. + (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate. + Allocate `chars' after doing a size checks. + + * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid + bitmap format to... + (pfr_slot_load_bitmap): ... this function. + Check bitmap size. + +2015-10-26 Werner Lemberg + + [truetype] Fix sanitizing logic for `loca' (#46223). + + * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an + incorrect adjustment of the number of glyphs, most often using far + too large values. + +2015-10-25 Werner Lemberg + + [autofit] Improve tracing. + + * src/autofit/afhints.c (af_print_idx, af_get_segment_index, + af_get_edge_index): New functions. + + (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'. + Add segment and edge index for each point. + Slightly change printing order of some elements. + Don't print `-1' but `--' for missing elements. + + (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove + unnecessary `|', `[', and `]'. + Don't print `-1' but `--' for missing elements. + +2015-10-24 Werner Lemberg + + [sfnt] Sanitize bitmap strike glyph height. + + Problem reported by Nikolay Sivov . + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value + for `metrics->height' by applying some heuristics. + +2015-10-22 Werner Lemberg + + [sfnt, type42] Fix clang compiler warnings. + + * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'. + + * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast. + +2015-10-22 Dave Arnold + Werner Lemberg + + [cff] Avoid overflow/module arithmetic. + + This modifies the addition of subroutine number to subroutine bias + from unsigned to signed, but does not change any results. + + * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer, + cf2_initLocalRegionBuffer): Change variable names from (unsigned) + `idx' to (signed) `subrNum', since it is not an index until after + the bias is added. + * src/cff/cf2ft.h: Updated. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : + Updated similarly. + +2015-10-22 Werner Lemberg + + [cid] Better check of `SubrCount' dictionary entry (#46272). + + * src/cid/cidload.c (cid_face_open): Add more sanity tests for + `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'. + +2015-10-21 Werner Lemberg + + [base] Pacify compiler (#46266). + + * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and + `anchor'. + +2015-10-21 Werner Lemberg + + [type42] Fix heap buffer overflow (#46269). + + * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in + bounds checking. + +2015-10-21 Dave Arnold + + [cff] Fix limit in assert for max hints. + + * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the + limit (96 bits). + +2015-10-21 Dave Arnold + + [cff] Remove an assert (#46107). + + * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges + in wrong order. + +2015-10-21 Werner Lemberg + + [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257). + + * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize' + only after thorough checks. + Add tracing messages. + +2015-10-21 Werner Lemberg + + [type42] Better check invalid `sfnts' array data (#46255). + + * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be + checked individually against available data size. + +2015-10-20 Werner Lemberg + + [cid] Add a bunch of safety checks. + + * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against + stream size. + (cid_read_subrs): Check largest offset against stream size. + (cid_parse_dict): Move safety check to ... + (cid_face_open): ... this function. + Also test length of binary data and values of `SDBytes', + `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'. + +2015-10-20 Werner Lemberg + + [cid] Avoid segfault with malformed input (#46250). + + * src/cid/cidload.c (cid_read_subrs): Return a proper error code for + unsorted offsets. + +2015-10-20 StudioEtrange + + * CMakeLists.txt: Enable shared library builds on MinGW (#46233). + +2015-10-20 Werner Lemberg + + * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229). + +2015-10-19 Ben Wagner + + [cid] Better handle invalid glyph stream offsets (#46221). + + * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph + length. + +2015-10-18 Werner Lemberg + + [psaux] Fix tracing of negative numbers. + + Due to incorrect casting negative numbers were shown as very large + (positive) integers on 64bit systems. + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) : + Use division instead of shift. + +2015-10-18 Werner Lemberg + + [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223). + + * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it + with #ifndef ... #endif, as suggested in the tracker issue. + +2015-10-18 Werner Lemberg + + [truetype] Better protection against malformed `fpgm' (#46223). + + * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a + malformed `fpgm' table more than once. + +2015-10-17 Werner Lemberg + + * src/cid/cidgload.c (cid_load_glyph): Fix memory leak. + + Reported by Kostya Serebryany . + +2015-10-17 Werner Lemberg + + [bdf] Prevent memory leak (#46217). + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Check + _BDF_GLYPH_BITS. + +2015-10-17 Werner Lemberg + + [bdf] Use stream size to adjust number of glyphs. + + * src/bdf/bdflib.c (ACMSG17): New message macro. + (_bdf_parse_t): Add member `size'. + (bdf_load_font): Set `size'. + (_bdf_parse_glyphs): Adjust `cnt' if necessary. + +2015-10-17 Werner Lemberg + + * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size. + +2015-10-17 Werner Lemberg + + * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222). + +2015-10-17 Werner Lemberg + + [psaux] Fix heap buffer overflow (#46221). + + * src/psaux/t1decode.c (t1_decoder_parse_charstring) : + Fix limit check. + +2015-10-17 Werner Lemberg + + * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220). + +2015-10-15 Kostya Serebryany + + [ftfuzzer] Add README. + + * src/tools/ftfuzzer/README: New file. + +2015-10-15 Ben Wagner + + [bdf] Fix memory leak (#46213). + + * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in + case of error. + +2015-10-15 Werner Lemberg + + [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208). + + * devel/ftoption.h, include/freetype/config/ftoption.h + (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro. + + * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed. + (TT_RunIns): Updated. + +2015-10-15 Werner Lemberg + + * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing. + + The used indices were off by 1. + +2015-10-15 Ben Wagner + Werner Lemberg + + * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211). + +2015-10-15 Werner Lemberg + + [base] Compute MD5 checksums only if explicitly requested. + + This improves profiling accuracy. + + * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it. + +2015-10-14 Werner Lemberg + + [base] Use `FT_' namespace for MD5 functions (#42366). + + * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'. + Undefine HAVE_OPENSSL. + +2015-10-13 Werner Lemberg + + [type1] Correctly handle missing MM axis names (#46202). + + * src/type1/t1load.c (T1_Get_MM_Var): Implement it. + +2015-10-13 Werner Lemberg + + [pcf] Quickly exit if font index < 0. + + Similar to other font formats, this commit makes the parser no + longer check the whole PCF file but only the header and the TOC if + we just want to get the number of available faces (and a proper + recognition of the font format). + + * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. + Exit quickly if face_index < 0. + + * src/pcfread.c (pcf_load_font): Add `face_index' argument. + Exit quickly if face_index < 0. + + * src/pcf/pcf.h: Updated. + +2015-10-13 Werner Lemberg + + [ftfuzzer] Handle TTCs and MM/GX variations. + + This patch also contains various other improvements. + + * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject + pre-C++11 compilers. + (FT_Global): New class. Use it to provide a global constructor and + destructor for the `FT_Library' object. + (setIntermediateAxis): New function to select an (arbitrary) + instance. + (LLVMFuzzerTestOneInput): Loop over all faces and named instances. + Also call `FT_Set_Char_Size'. + +2015-10-13 Werner Lemberg + + [truetype] Refine some GX sanity tests. + + Use the `gvar' table size instead of the remaining bytes in the + stream. + + * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'. + + * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'. + (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument + `size'. + (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated. + +2015-10-13 Werner Lemberg + + [truetype] Another GX sanity test. + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check + `tupleCount'. + Add tracing message. + +2015-10-13 Werner Lemberg + + [truetype] Fix memory leak for broken GX fonts (#46188). + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of + deallocation. + +2015-10-13 Werner Lemberg + + [truetype] Fix commit from 2015-10-10. + + * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error + handling body to condition. + +2015-10-12 Werner Lemberg + + [unix] Make MKDIR_P actually work. + + * builds/unix/configure.raw: Fix underquoting of `INSTALL' and + `MKDIR_P'. + + Problem reported by Dan Liddell . + +2015-10-11 Werner Lemberg + + [sfnt] Improve extraction of number of named instances. + + * src/sfnt/sfobjs.c (sfnt_init_face) + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against + `fvar' table size. + +2015-10-10 Alexei Podtelezhnikov + + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow + (#46149). + +2015-10-10 Werner Lemberg + + [sfnt] Fix infinite loops with broken cmaps (#46167). + + * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care + of border conditions (i.e., if the loops exit naturally). + +2015-10-10 Werner Lemberg + + [truetype] More sanity tests for GX handling. + + These tests should mainly help avoid unnecessarily large memory + allocations in case of malformed fonts. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints, + ft_var_readpackeddeltas): Check number of points against stream + size. + (ft_var_load_avar): Check `pairCount' against table length. + (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount' + against table length. + (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'. + Fix trace. + (TT_Vary_Apply_Glyph_Deltas): Fix trace. + Free `sharedpoints' to avoid memory leak. + +2015-10-10 Werner Lemberg + + [truetype] Better protection against malformed GX data (#46166). + + * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly + handle empty `localpoints' array. + +2015-10-10 Werner Lemberg + + * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162). + +2015-10-09 Werner Lemberg + + * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size. + +2015-10-08 Werner Lemberg + + [pcf] Protect against invalid number of TOC entries (#46159). + + * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries + against size of data stream. + +2015-10-08 Werner Lemberg + + [type42] Protect against invalid number of glyphs (#46159). + + * src/type42/t42parse.c (t42_parse_charstrings): Check number of + `CharStrings' dictionary entries against size of data stream. + +2015-10-08 Werner Lemberg + + [sfnt] Fix some signed overflows (#46149). + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + : Use `FT_MulDiv'. + +2015-10-08 Werner Lemberg + + [type1] Protect against invalid number of subroutines (#46150). + + * src/type1/t1load.c (parse_subrs): Check number of + `Subrs' dictionary entries against size of data stream. + +2015-10-07 Kostya Serebryany + + [ftfuzzer] Add support for LLVM's LibFuzzer. + + * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files. + +2015-10-06 Alexei Podtelezhnikov + + [smooth] Faster alternative line renderer. + + This implementation renders the entire line segment at once without + subdividing it into scanlines. The main speed improvement comes from + reducing the number of divisions to just two per line segment, which + is a bare minimum to calculate cell coverage in a smooth rasterizer. + Notably, the progression from cell to cell does not itself require any + divisions at all. The speed improvement is more noticeable at larger + sizes. + + * src/smooth/ftgrays.c (gray_render_line): New implementation. + +2015-10-06 Werner Lemberg + + [cff] Return correct PS names from pure CFF (#46130). + + * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for + SFNT. + +2015-10-04 Werner Lemberg + + [base] Replace left shifts with multiplication (#46118). + + * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it. + +2015-10-04 Werner Lemberg + + * Version 2.6.1 released. + ========================= + + + Tag sources with `VER-2-6-1'. + + * docs/VERSION.DLL: Update documentation and bump version number to + 2.6.1. + + * 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/2.6.1/, s/26/261/. + + * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. + + * builds/unix/configure.raw (version_info): Set to 18:1:12. + * CMakeLists.txt (VERSION_PATCH): Set to 1. + + * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for + dumping functions. + +2015-10-04 Werner Lemberg + + [bzip2, gzip] Avoid access of uninitialized memory (#46109). + + * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c + (ft_gzip_file_fill_input): In case of an error, adjust the limit to + avoid copying uninitialized memory. + +2015-10-03 Werner Lemberg + + [bzip2, gzip] Avoid access of uninitialized memory (#46109). + + * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c + (ft_gzip_file_fill_output): In case of an error, adjust the limit to + avoid copying uninitialized memory. + +2015-10-01 Alexei Podtelezhnikov + + [smooth] Clean up worker. + + * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields. + +2015-10-01 Werner Lemberg + + [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078). + + * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of + border conditions (i.e., if the loop exits naturally). + +2015-10-01 Werner Lemberg + + * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges. + They should be a subset of `af_deva_uniranges'. + +2015-10-01 Werner Lemberg + + [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078). + + * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to + reject too large glyph indices. + +2015-09-30 Alexei Podtelezhnikov + + [smooth] Clean up worker. + + * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'. + (gray_start_cell, gray_render_line): Update. + +2015-09-30 Werner Lemberg + + [autofit] Replace `no-base' with `non-base'. + + * src/autofit/*: Do it. + +2015-09-30 Werner Lemberg + + [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078). + + * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better + skip invalid segments. + If searching the next character, provide a more efficient logic to + speed up the code. + +2015-09-30 Werner Lemberg + + [truetype] Adjust number of glyphs for malformed `loca' tables. + + * src/truetype/ttpload.c (tt_face_load_loca): Implement it. + +2015-09-29 Werner Lemberg + + [pshinter] Avoid harmless overflow (#45984). + + * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it. + +2015-09-28 Werner Lemberg + + [autofit] Add support for Lao script. + + Thanks to Danh Hong for guidance with blue zone + characters! + + * src/autofit/afblue.dat: Add blue zone data for Lao. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Lao standard characters. + + * src/autofit/afranges.c: Add Lao data. + + * src/autofit/afstyles.h: Add Lao data. + +2015-09-27 suzuki toshiya + + [base] Fix a leak by broken sfnt-PS or resource fork (#46028). + + open_face_from_buffer() frees passed buffer if valid font + is not found. But if copying to the buffer is failed, + the allocated buffer should be freed within the caller. + + * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free + the buffer `sfnt_ps' if an error caused before calling + open_face_from_buffer(). + (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if + an error caused before calling open_face_from_buffer(); + +2015-09-27 suzuki toshiya + + [mac] Fix buffer size calculation for LWFN font. + + * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong + to prevent confused copy by too large chunk size. + +2015-09-26 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro. + +2015-09-26 Werner Lemberg + + [autofit] Minor tracing improvement. + + * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit + blue zones header line if there are no blue zones. + +2015-09-26 Werner Lemberg + + [bzip2, gzip, lzw] Harmonize function signatures with prototype. + + Suggested by Hin-Tak Leung. + + * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c + (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it. + +2015-09-26 Hin-Tak Leung + + Add new FT_LOAD_COMPUTE_METRICS load flag. + + * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro. + * src/truetype/ttgload.c (compute_glyph_metrics): Usage. + +2015-09-26 Werner Lemberg + + * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast. + +2015-09-25 Werner Lemberg + + [type1] Protect against invalid number of glyphs (#46029). + + * src/type1/t1load.c (parse_charstrings): Check number of + `CharStrings' dictionary entries against size of data stream. + +2015-09-23 Werner Lemberg + + [sfnt] Better checks for invalid cmaps (2/2) (#46019). + + While the current code in `FT_Get_Next_Char' correctly rejects + out-of-bounds glyph indices, it can be extremely slow for malformed + cmaps that use 32bit values. This commit tries to improve that. + + * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next, + tt_cmap12_char_map_binary, tt_cmap13_next, + tt_cmap13_char_map_binary): Reject glyph indices larger than or + equal to the number of glyphs. + +2015-09-23 Werner Lemberg + + [base, sfnt] Better checks for invalid cmaps (1/2). + + * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds + glyph indices. + (FT_Get_First_Char): Updated. + + * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character + codes greater than 0xFFFF. + + (tt_cmap8_char_index): Avoid integer overflow in computation of + glyph index. + (tt_cmap8_char_next): Avoid integer overflows in computation of + both next character code and glyph index. + + (tt_cmap10_char_index): Fix unsigned integer logic. + (tt_cmap10_char_next): Avoid integer overflow in computation of + next character code. + + (tt_cmap12_next): Avoid integer overflows in computation of both + next character code and glyph index. + (tt_cmap12_char_map_binary): Ditto. + (tt_cmap12_char_next): Simplify. + + (tt_cmap13_char_map_binary): Avoid integer overflow in computation + of next character code. + (tt_cmap13_char_next): Simplify. + +2015-09-21 suzuki toshiya + + [base] Check too long POST and sfnt resource (#45919). + + * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the + resource fork for Mac OS. Resource forks larger than 16 MB can be + written but can't be handled correctly, at least in Carbon routine. + See https://support.microsoft.com/en-us/kb/130437. + + * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x' + prefix for `%p' formatter. + + * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and + total size of the concatenated POST resource before buffer + allocation. + (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource + before buffer allocation. + + * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the + total resource size before buffer allocation. + +2015-09-19 Werner Lemberg + + [sfnt] Improve handling of invalid SFNT table entries (#45987). + + This patch fixes weaknesses in function `tt_face_load_font_dir'. + + - It incorrectly assumed that valid tables are always at the + beginning. As a consequence, some valid tables after invalid + entries (which are ignored) were never seen. + + - Duplicate table entries (this is, having the same tag) were not + rejected. + + - The number of valid tables was sometimes too large, leading to + access of invalid tables. + + * src/sfnt/ttload.c (check_table_dir): Add argument to return number + of valid tables. + Add another tracing message. + (tt_face_load_font_dir): Only allocate table array for valid + entries as returned by `check_table_dir'. + Reject duplicate tables and adjust number of valid tables + accordingly. + +2015-09-19 Werner Lemberg + + [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999). + + * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short, + then take the absolute value. + Also apply FT_ABS to `height'. + +2015-09-17 Werner Lemberg + + [type42] Fix memory leak (#45989). + + * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single + `CharStrings' array. + +2015-09-17 Werner Lemberg + + [psaux] Fix memory leak (#45986). + + * src/psaux/psobjs.c (ps_parser_load_field) : + Free `temp' in case of error. + +2015-09-17 Werner Lemberg + + [psaux] Improve tracing message. + + * src/psaux/psobjs.c (ps_parser_load_field) : + Handle plural correctly. + +2015-09-17 Werner Lemberg + + [pcf] Fix integer overflows (#45985). + + * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv. + +2015-09-17 Werner Lemberg + + [pcf] Use FT_ABS for some property values (#45893). + + * src/pcf/pcfread.c (pcf_load_font): Take absolute values for + AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and + RESOLUTION_Y. In tracing mode, add warnings. + +2015-09-16 Werner Lemberg + + Minor fixes for some clang warnings. + + * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing + initialization. + + * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast. + +2015-09-15 Werner Lemberg + + [type1, type42] Fix memory leaks (#45966). + + * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis + names. + (parse_blend_design_map): Allow only a single design map. + (parse_encoding): Handle multiple encoding vectors. + + * src/type42/t42parse.c (t42_parse_encoding): Handle multiple + encoding vectors. + +2015-09-15 Werner Lemberg + + [truetype] Fix integer type (#45965). + + * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it. + +2015-09-15 Werner Lemberg + + * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964). + +2015-09-15 Werner Lemberg + + [type1, type42] Check encoding array size (#45961). + + * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c + (t42_parse_encoding): Do it. + +2015-09-14 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve. + +2015-09-14 Werner Lemberg + + [type1] Fix another potential buffer overflow (#45955). + + * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for + `eexec' doesn't exceed `limit'. + +2015-09-13 Werner Lemberg + + Replace `mkinstalldirs' with AC_PROG_MKDIR_P. + + * builds/unix/mkinstalldirs: Removed, no longer needed. + + * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'. + Update pwd call for `$INSTALL'. + + * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'. + + * autogen.sh: Updated. + +2015-09-13 Werner Lemberg + + [winfonts] Check alignment shift count for resource data (#45938). + + * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it. + +2015-09-13 Werner Lemberg + + [type1] Fix potential buffer overflow (#45923). + + * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't + point to end of file buffer. + +2015-09-13 Werner Lemberg + + [gzip] Fix access of small compressed files (#45937). + + * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak. + + (ft_gzip_get_uncompressed_file): Correct byte order while reading + unsigned long value. Without this change, the whole optimization of + accessing small files in `FT_Stream_OpenGzip' is never executed! As + a consequence, access to PCF files in general (which are normally + small files) should be much improved now as originally intended. + +2015-09-11 Werner Lemberg + + [psaux] Fix potential buffer overflow (#45922). + + * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is + enclosed in balanced expressions, ensure that the cursor position + doesn't get larger than the current limit. + +2015-09-11 Werner Lemberg + + [base] Avoid crash while tracing `load_mac_face'. + + Reported in Savannah bug #45919. + + * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while + tracing. + +2015-09-11 Werner Lemberg + + [type42] Fix endless loop (#45920). + + * src/type42/t42parse.c (t42_parse_encoding): Synchronize with + type1's `parse_encoding'. + +2015-09-10 Werner Lemberg + + [docmaker] Allow `-' in bold and italic markup. + + * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust + accordingly. + +2015-09-09 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_RoundFix): Improve. + +2015-09-09 Wojciech Mamrak + + * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize. + + This commit makes the functions behave as expected, this is, + rounding towards plus or minus infinity. + +2015-09-07 Alexei Podtelezhnikov + + * src/smooth/ftgrays.c (gray_render_line): Simplify clipping. + +2015-09-04 Alexei Podtelezhnikov + + [raster,smooth] Microoptimizations. + + * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table, + Bezier_Up): Use do-while loops. + + * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line, + gray_convert_glyph): Ditto. + +2015-09-04 Werner Lemberg + + [autofit] Redesign code ranges (2/2). + + This commit adds two fallback scripts (`latb', `latp') and + implements support for the no-base character ranges introduced in + the previous commit. + + * src/autofit/aftypes.h (AF_ScriptClassRec): Add + `script_uni_nobase_ranges' field. + (AF_DEFINE_SCRIPT_CLASS): Updated. + + * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and + `latp' fallback scripts. + + * src/autofit/afblue.dat: Add blue zones for Latin subscript and + superscript fallback scripts. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base + characters. + (AF_STYLE_MASK): Updated. + + * src/autofit/afglobal.c (SCRIPT): Updated. + (af_face_globals_compute_style_coverage): Handle new style flag. + + * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style + flag. + + * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges. + +2015-09-04 Werner Lemberg + + [autofit] Redesign code ranges (1/2). + + This patch introduces auxiliary code ranges that identify no-base + characters; they refer to glyphs of a script that should be hinted + without alignments to blue zones (mostly diacritics). + + It also splits off ranges for fallback scripts that handle subscript + and superscript characters not covered by OpenType features. For + example, this greatly helps improve the hinting of various phonetic + alphabets, which contain a large amount characters that look like + superscript glyphs. + + Finally, code ranges are updated to Unicode 8.0, and enclosed + characters are removed in general since they normally look better if + they stay unhinted. + + * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode + 8.0. + Split off superscript-like and subscript-like glyphs into... + + (af_latb_uniranges, af_latp_uniranges): ... these two new arrays. + + (af_xxxx_nobase_uniranges): New arrays that hold no-base characters + of the corresponding character ranges. + +2015-09-03 Werner Lemberg + + [autofit] Pass glyph index to hinting function. + + No functionality change yet. + + * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass + glyph index. + + * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply), + src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c + (af_indic_hints_apply), src/autofit/aflatin.c + (af_latin_hints_apply), src/autofit/aflatin2.c + (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g): + Updated. + +2015-08-30 Werner Lemberg + + [autofit] Code clean-up. + + * src/autofit/afglobal.h (AF_STYLE_MASK): New macro. + (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Updated. + +2015-08-30 Werner Lemberg + + [autofit] Make glyph style array use 16bit values. + + * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use + `FT_UShort' for `map' field. + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage, + af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h + (af_get_coverage): Use FT_UShort for `glyph_styles' array. + + * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to + 16 bits. + (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field. + +2015-08-26 Werner Lemberg + + * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828). + +2015-08-25 Werner Lemberg + + [base] Improve kerning tracing and documentation. + + * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if + scaled-down kerning values differ. + +2015-08-18 Werner Lemberg + + [raster] Remove last remnants of `raster5' driver. + + * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed. + + * src/raster/rastpic.c, src/raster/rastpic.h + (ft_raster5_renderer_class_pic_init, + ft_raster5_renderer_class_pic_free): Removed. + +2015-08-17 Alexei Podtelezhnikov + + [base] Improve emboldener (#45596). + + * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement + of zero-length segments. + +2015-08-16 Alexei Podtelezhnikov + + [base] Reoptimize arithmetic. + + * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove + special cases that slow down the general use. + +2015-08-15 pazer + + Fix C++ compilation (#45762). + + * src/base/ftstroke.c (ft_outline_glyph_class): Use + FT_CALLBACK_TABLE. + +2015-08-14 Alexei Podtelezhnikov + + [truetype] Clean up. + + * src/truetype/ttgload.c (TT_Process_Composite_Component): Use + `FT_Outline_Transform' and `FT_Outline_Translate'. + (translate_array): Dropped. + +2015-08-14 Andreas Enge + + * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261). + +2015-08-13 Werner Lemberg + + [truetype] Introduce named instance access to GX fonts. + + For functions querying a face, bits 16-30 of the face index can hold + the named instance index if we have a GX font. The indices start + with value 1; value 0 indicates font access without GX variation + data. + + * include/freetype/freetype.h (FT_FaceRec): Update documentation. + * include/freetype/internal/sfnt.h: Ditto. + + * src/sfnt/sfobjs.c (sfnt_init_face) + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and + do argument checks. + (sfnt_load_face): Updated. + + * src/truetype/ttobjs.c (tt_face_init) + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting + the style name. + + * src/base/ftobjs.c (open_face_from_buffer, + open_face_PS_from_sfnt_stream): Updated. + * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated. + * src/cff/cffload.c (cff_font_load): Updated. + + * src/cff/cffobjs.c (cff_face_init): Make function exit early for + pure CFF fonts if `font_index < 0'. + Updated. + + * src/cid/cidobjs.c (cid_face_init): Updated. + * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. + * src/pfr/pfrobjs.c (pfr_face_init): Updated. + * src/type1/t1objs.c (T1_Face_Init): Updated. + * src/type42/t42objs.c (T42_Face_Init): Updated. + * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): + Updated. + + * docs/CHANGES: Updated. + +2015-08-12 Alexei Podtelezhnikov + + [type1,cff,cid] Streamline font matrix application. + + * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only + if font matrix is not trivial. + * src/cff/cffgload.c (cff_slot_load): Ditto. + * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the + entire outline. + +2015-08-11 Werner Lemberg + + [builds/unix] Minor. + + * builds/unix/configure.raw: + s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with + similarly named uppercase variables. + +2015-08-10 Alexei Podtelezhnikov + + [type1,cid,type42] Minor improvements. + + * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only + when necessary. Refresh comments. + * src/cid/cidload.c (cid_parse_font_matrix): Ditto. + * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments. + +2015-08-08 Werner Lemberg + + [type42] Fix glyph access. + + This is a severe bug: We've missed one level of indirection, as + described in the Type 42 specification. As a result, ftview + sometimes showed incorrect glyphs for given glyph names, and even + displayed `error 0x0006' (invalid argument!) in case the number of + glyph indices differed between the Type 42 font and the embedded + TTF. + + Apparently, noone ever noticed it; this shows how much Type 42 fonts + are in use... + + * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index + to embedded TTF's glyph index. + +2015-08-08 Werner Lemberg + + [type42] Minor clean-up. + + * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused + variable. + +2015-08-06 Alexei Podtelezhnikov + + [type42] Parse FontMatrix according to specifications. + + * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix + does not need scaling by 1000. Units_per_EM are taken from the + embedded TrueType. + +2015-08-06 Werner Lemberg + + [autofit] Improve Arabic hinting. + + Problem reported by Titus Nemeth (by using + ttfautohint). + + * src/autofit/afblue.dat: Add neutral blue zone for the tatweel + character. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + +2015-08-05 Alexei Podtelezhnikov + + [truetype] Clean up types. + + * src/truetype/ttobjs.c (TT_Size): Move declaration from here. + * include/freetype/internal/tttypes.h (TT_Size): ... to here. + (TT_LoaderRec): Switch to appropriate types for `face' and `size'. + * src/truetype/ttgload.c: Remove corresponding type casts. + * src/truetype/ttsubpix.c: Ditto. + +2015-08-05 Werner Lemberg + + [autofit] Improve recognition of flat vs. rounded segments. + + Lower the flatness threshold from upem/8 to upem/14, making the + auto-hinter accept shorter elements. + + Synchronize flat/round stem selection algorithm with blue zone code. + + * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro. + (af_latin_metrics_init_blues): Use it. + (af_latin_hints_compute_segments): Collect information on maximum + and minimum coordinates of `on' points; use this to add a constraint + for the flat/round decision similar to + `af_latin_metrics_init_blues'. + +2015-08-04 Werner Lemberg + + Another left-shift bug (#45681). + + * src/base/ftobjs.c (IsMacBinary): Only accept positive values for + `dlen'. + +2015-08-03 Alexei Podtelezhnikov + + [base] Fix `ft_corner_orientation'. + + Remove casting from `FT_Long' to `FT_Int' that might change the sign + of the return value and make it faster too. + + * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay + with 32-bit arithmetic when safe. Use plain math on 64-bit systems. + * src/pshinter/pshalgo.c: Remove old unused code. + +2015-08-03 Werner Lemberg + + * src/truetype/ttgload.c (load_truetype_glyph) + [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs + having a depth greater than 1. + +2015-08-03 Werner Lemberg + + Fix typo in clang bug from 2015-07-31 (#45678). + + * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality. + +2015-08-02 Werner Lemberg + + * CMakeLists.txt: Improve shared library support. + + Based on a patch from John Cary . + +2015-08-02 Werner Lemberg + + * builds/unix/freetype-config.in (enable_shared): Remove. Unused. + +2015-08-02 Werner Lemberg + + Fix more invalid left-shifts. + + * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication, + not left-shift. + + * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar, + tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication, + not left-shift. + +2015-07-31 Werner Lemberg + + Fix some bugs found by clang's `-fsanitize=undefined' (#45661). + + * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept + positive values from header. + Check overflow. + + * src/base/ftoutln.c (SCALED): Correctly handle left-shift of + negative values. + + * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified, + _bdf_clear_glyph_modified): Use unsigned long constant. + + * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't + left-shift values that can be negative. + + * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't + left-shift values that can be negative. + + * src/raster/ftraster.c (SCALED): Correctly handle left-shift of + negative values. + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift + values that can be negative. + + * src/truetype/ttgload.c (TT_Load_Composite_Glyph, + compute_glyph_metrics, load_sbit_image): Don't left-shift values + that can be negative. + +2015-07-31 Werner Lemberg + + Define FT_LONG_MAX. + + * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro. + * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it. + +2015-07-28 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_Vector_NormLen): Clarify. + +2015-07-27 Alexei Podtelezhnikov + + * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions. + +2015-07-26 Matthias Clasen + + [cff] Don't use `hmtx' table for LSB (#45520). + + * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance + width only. Bug introduced 2015-04-10. + +2015-07-09 Werner Lemberg + + Better support of user-supplied C++ namespaces. + + See + + http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html + + for a rationale. + + * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, + src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, + src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h + (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose + header files that contain FT_{BEGIN,END}_HEADER macros by + themselves. + + * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include + FT_CONFIG_STANDARD_LIBRARY_H earlier. + + * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H. + +2015-07-07 Werner Lemberg + + [sfnt] Make `tt_face_get_name' member of the SFNT interface. + + * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New + prototype. + (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'. + + * src/sfnt/sfdriver.c (sfnt_interface): Updated. + + * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'. + * src/sfnt/sfobjs.h: Add prototype for it. + +2015-06-30 Werner Lemberg + + Fix some clang compiler warnings. + + * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c + (cf2_interpT2CharString), src/truetype/ttgload.c + (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas), + src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues. + +2015-06-29 Alexei Podtelezhnikov + + [truetype] Speed up bytecode interpreter. + + * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'. + +2015-06-29 Alexei Podtelezhnikov + + [base] Speed up emboldening. + + * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use + `FT_Vector_NormLen'. + +2015-06-29 Alexei Podtelezhnikov + + [base] Implement fast vector normalization. + + The function uses Newton's iterations instead of dividing vector + components by its length, which needs a square root. This is, + literally, a bit less accurate but a lot faster. + + * src/base/ftcalc.c (FT_Vector_NormLen): New function. + +2015-06-28 Werner Lemberg + + * CMakeLists.txt: Always create `ftconfig.h'. + + For non-UNIX builds, the file stays unmodified. However, it's + better to have the main configuration files at the same place + regardless of the OS. + +2015-06-28 Werner Lemberg + + * CMakeLists.txt: Improve MSVC support (#43737). + +2015-06-28 Werner Lemberg + + [cmake] Check for libraries and create `ftoption.h'. + + * builds/FindHarfBuzz.cmake: New file, taken from + + https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake + + * CMakeLists.Txt: Add path to local cmake modules. + Find dependencies for zlib, bzip2, libpng, and harfbuzz. + Create `ftoption.h' file. + Set up include and linker stuff for libraries. + +2015-06-28 Werner Lemberg + + * CMakeLists.txt: Fix creation of `ftconfig.h'. + Check for UNIX header files using `check_include_file'. + Set up correct header include directories. + +2015-06-28 Werner Lemberg + + * CMakeLists.txt: Disallow in-source builds. + +2015-06-27 Werner Lemberg + + * src/tools/docmaker/utils.py (check_output): Add missing `\n'. + +2015-06-26 Werner Lemberg + + * CMakeLists.txt: Select platform-dependent `ftdebug.c'. + +2015-06-25 Werner Lemberg + + * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'. + Additionally, do this for UNIX only. + +2015-06-25 Werner Lemberg + + * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'. + +2015-06-25 Werner Lemberg + + Another adjustment to header locations. + + This change is a result of a discussion thread on freetype-devel + + http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html + + Re-introduce the `freetype2' subdirectory for all FreeType header + files after installation, and rename the `freetype2' subdirectory in + the git repository to `freetype'. + + * include/freetype2: Renamed to... + * include/freetype: This. + + * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, + PRIVATE_HEADERS): Updated. + Update creation of `ftconfig.h'. + Install generated `ftconfig.h'. + + * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. + + * builds/amiga/include/config/ftconfig.h, builds/freetype.mk + (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), + builds/unix/freetype2.in: Updated. + + * builds/unix/freetype-config.in: Updated. + * builds/unix/configure.raw: Don't check for `rmdir'. + * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable + according to the autoconf info manual. + * builds/unix/install.mk (install, uninstall, + distclean_project_unix): Update and simplify. + + * builds/wince/*, builds/windows/*: Updated. + + * devel/ft2build.h, include/ft2build.h: Updated. + + * include/freetype2/config/ftheader.h, + include/freetype2/internal/ftserv.h, + include/freetype2/internal/internal.h: Update all header file + macros. + + * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. + + * docs/*: Updated. + +2015-06-24 Alexei Podtelezhnikov + + * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp. + +2015-06-24 Alexei Podtelezhnikov + + * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing. + +2015-06-23 Werner Lemberg + + s/TYPEOF/FT_TYPEOF/ (#45376). + + * builds/unix/ftconfig.in, builds/vms/ftconfig.in, + include/freetype2/config/ftconfig.h, + include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it. + +2015-06-22 Werner Lemberg + + Fix Savannah bug #45097. + + We no longer `pollute' the namespace of possible header file names; + instead we move `ft2build.h' up by one level so that it gets + installed in the default include directory (e.g., + /usr/local/include). After this commit, only `ft2build.h' stays in + the compiler's include path. + + No visible changes for the user who follows the standard FreeType + header inclusion rules. + + * include/*: Move to ... + * include/freetype2/*: This directory, except `ft2build.h'. + + * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, + PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. + + * builds/amiga/include/config/ftconfig.h, builds/freetype.mk + (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), + builds/unix/install.mk (install, uninstall), + builds/unix/freetype2.in: Updated. + + * builds/unix/freetype-config.in: Updated. + Emit -I directory only if it is not `/usr/include'. + + * builds/wince/*, builds/windows/*: Updated. + + * devel/ft2build.h, include/ft2build.h: Updated. + + * include/freetype2/config/ftheader.h, + include/freetype2/internal/ftserv.h, + include/freetype2/internal/internal.h: Update all header file + macros. + + * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. + +2015-06-21 Werner Lemberg + + Make Jam support work again. + + This is just very basic stuff and just a little bit tested on + GNU/Linux only. I won't delve into this since I'm not a Jam user. + + * Jamfile: Call `HDRMACRO' for `ftserv.h' also. + (DEFINES): Replace with... + (CCFLAGS): ... this. + + * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is + already handled in the top-level Jamfile. + + * src/autofit/Jamfile (DEFINES): Replace with... + (CCFLAGS): ... this. + (_sources): Add missing files. + + * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no + longer contains macro header definitions. + + * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile, + src/truetype/Jamfile (_sources): Add missing files. + +2015-06-16 Werner Lemberg + + Fix Savannah bug #45326. + + * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate + definitions. + +2015-06-07 Werner Lemberg + + * Version 2.6 released. + ======================= + + + Tag sources with `VER-2-6'. + + * docs/VERSION.DLL: Update documentation and bump version number to + 2.6. + + * 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.5.5/2.6/, s/255/26/. + + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6. + (FREETYPE_PATCH): Set to 0. + + * builds/unix/configure.raw (version_info): Set to 18:0:12. + * CMakeLists.txt (VERSION_MINOR): Set to 6. + (VERSION_PATCH): Set to 0. + + * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add + declarations for dumping functions. + + * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler. + + * builds/toplevel.mk: Use `freetype.mk's code to compute the version + string. + Don't include a zero patch level in version string. + * builds/freetype.mk: Remove code for computing the version string. + +2015-06-06 Ashish Azad + + Fix Savannah bug #45260. + + * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo. + +2015-06-03 Werner Lemberg + + [truetype] Fix memory leak. + + Problem reported by Grissiom ; in + + http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html + + there is an example code to trigger the bug. + + * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size' + data before allocating again. Bug most probably introduced four + years ago in version 2.4.3. + +2015-06-02 Werner Lemberg + + [raster] Add more tracing. + + * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define. + (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span, + Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls. + +2015-06-01 Werner Lemberg + + [truetype] While tracing opcodes, show code position and stack. + + * src/truetype/ttinterp.c: Change all existing TRACE7 calls to + TRACE6. + (opcode_name): Add string lengths. + (TT_RunIns): Implement display of code position and stack. + +2015-05-31 Werner Lemberg + + [truetype] In GX, make private point numbers work correctly. + + This is completely missing in Apple's documentation: If a `gvar' + tuple uses private point numbers (this is, deltas are specified for + some points only), the uncovered points must be interpolated for + this tuple similar to the IUP bytecode instruction. Examples that + need this functionality are glyphs `Oslash' and `Q' in Skia.ttf. + + * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate, + tt_handle_deltas): New functions. + (TT_Vary_Get_Glyph_Deltas): Renamed to... + (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the + points and does no longer return an array of deltas. + Add tracing information. + Call `tt_handle_deltas' to interpolate missing deltas. + Also fix a minor memory leak in case of error. + + * src/truetype/ttgxvar.h: Updated. + + * src/truetype/ttgload.c (TT_Process_Simple_Glyph, + load_truetype_glyph): Updated. + +2015-05-31 Werner Lemberg + + [truetype] In GX, make intermediate tuplets work at extrema. + + * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition. + +2015-05-31 Werner Lemberg + + [truetype] Add tracing information to GX code. + + * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar, + ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend, + TT_Set_Var_Design, tt_face_vary_cvt): Do it. + +2015-05-28 Werner Lemberg + + * src/tools/apinames.c (names_dump): Fix invalid reference. + + Problem reported by Guzman Mosqueda, Jose R + . + +2015-05-24 Werner Lemberg + + [truetype] Fix commit from 2015-05-22. + + * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code + with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'. + + Problem reported by Nikolaus Waxweiler . + +2015-05-23 Werner Lemberg + + [truetype] Fix return values of GETINFO bytecode instruction. + + * src/truetype/ttinterp.h (TT_ExecContextRec): New fields + `vertical_lcd' and `gray_cleartype'. + + * src/truetype/ttgload.c (tt_loader_init): Initialize new fields. + Change `symmetrical smoothing' to TRUE, since FreeType produces + exactly this. + + * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit + values for symmetrical smoothing, namely 11/18. + Handle bits for vertical LCD subpixels (8/15) and Gray ClearType + (12/19). + +2015-05-23 Werner Lemberg + + [truetype] Minor. + + * src/truetype/ttinterp.h (TT_ExecContext): + s/subpixel/subpixel_hinting. + + * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated. + +2015-05-22 Werner Lemberg + + [truetype] Support selector index 3 of the INSTCTRL instruction. + + This flag activates `native ClearType hinting', disabling backward + compatibility mode as described in Greg Hitchcocks whitepaper. In + other words, it enables unrestricted functionality of all TrueType + instructions in ClearType. + + * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks' + unconditionally. + (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of + `GS.instruct_control' is active. + + * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3. + (Ins_GETINFO): Updated. + + * docs/CHANGES: Document it. + +2015-05-20 Werner Lemberg + + [truetype] Minor. + + * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod' + argument. + +2015-05-17 Werner Lemberg + + [truetype] Fix loading of composite glyphs. + + * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the + ARGS_ARE_XY_VALUES flag is not set, handle argument values as + unsigned. I trust `ttx' (which has exactly such code) that it does + the right thing here... + + The reason that noone has ever noticed this bug is probably the fact + that point-aligned subglyphs are rare, as are subglyphs with a + number of points in the range [128;255], which is quite large (or + even in the range [32768;65535], which is extremely unlikely). + +2015-05-12 Chris Liddell + + [cff] Make the `*curveto' operators more tolerant. + + * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes + `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate, + pulling values off the stack until the stack is exhausted. + Implicitly the stack must be a multiple (or for subtly different + behaviour) a multiple plus a specific number of extra values deep. + If that's not the case, enforce it (as the old code did). + +2015-05-12 Chris Liddell + + [cff] fix incremental interface with new cff code. + + * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental + interface to retrieve glyph data for a SEAC, it be left to the + incremental interface callback to apply the encoding to raw + character index (as it was in the previous code). + +2015-04-29 Alexei Podtelezhnikov + + [autofit] Speed up IUP. + + * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to + the same position from true interpolation, use `scale' to reduce + divisions. + +2015-04-28 Werner Lemberg + + [cff] Use `name' table for PS name if we have a SFNT-CFF. + + This follows the OpenType 1.7 specification. See + + http://tug.org/pipermail/tex-live/2015-April/036634.html + + for a discussion. + + * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we + have an SFNT. + +2015-04-27 Alexei Podtelezhnikov + + [truetype] Speed up IUP. + + * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial + snapping to the same position from true interpolation. + +2015-04-21 Werner Lemberg + + [autofit] By default, enable warping code but switch off warping. + + Suggested by Behdad. + + * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER. + + * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping' + with `false'. + +2015-04-21 Werner Lemberg + + * docs/CHANGES: Updated. + +2015-04-21 Werner Lemberg + + [autofit] Introduce `warping' property. + + This code replaces the debugging hook from the previous commit with + a better, more generic solution. + + * include/ftautoh.h: Document it. + + * src/autofit/afmodule.h (AF_ModuleRec) + [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field. + + * src/autofit/afmodule.c (_af_debug_disable_warper): Remove. + (af_property_set, af_property_get, af_autofitter_init) + [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option. + + * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no + longer existing `_af_debug_disable_warper'. + + * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c + (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init) + [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the + scaler flags if warping is off. + + * src/autofit/aftypes.h: Updated. + +2015-04-16 Werner Lemberg + + [autofit] Add debugging hook to disable warper. + + * src/autofit/afmodule.c (_af_debug_disable_warper) + [FT_DEBUG_AUTOFIT]: New global variable. + + * src/autofit/aftypes.h: Updated. + (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet). + + * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro. + + * src/autofit/aflatin.c (af_latin_hints_apply) + [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use + of warper. + + * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply) + [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. + + * src/autofit/aflatin2.c (af_latin2_hints_apply) + [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. + +2015-04-10 Werner Lemberg + + [cff] Update advance width handling to OpenType 1.7. + + Problem reported by Behdad. + + * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case + separately. + + * src/cff/cffgload.c (cff_slot_load): Use advance width and side + bearing values from `hmtx' table if present. + +2015-04-03 Alexei Podtelezhnikov + + * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop. + +2015-04-02 Alexei Podtelezhnikov + + * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic. + +2015-04-01 Alexei Podtelezhnikov + + [autofit] Finish the thought. + + * src/autofit/afhints.c (af_direction_compute): make sure the long arm + is never negative so that its `FT_ABS' is not necessary. + +2015-04-01 Werner Lemberg + + [autofit] Call dumper functions for tracing. + + * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code. + * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor + improvement. + * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it. + +2015-04-01 Werner Lemberg + + [autofit] Make debugging stuff work again. + + The interface to ftgrid was broken in the series of commits starting + with + + [autofit] Allocate AF_Loader on the stack instead of AF_Module. + + from 2015-01-14. + + * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]: + Use a global AF_GlyphHintsRec object for debugging. + (af_autofitter_done, af_autofitter_load_glyph): Updated. + + * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated. + +2015-04-01 Werner Lemberg + + * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko. + +2015-03-29 Werner Lemberg + + [cff] Fix Savannah bug #44629. + + * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h + (CFF_MAX_SUBRS_CALLS): Set to 16. + +2015-03-29 Werner Lemberg + + [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'. + + This commit allows `num_coords' to be larger or smaller than the + number of available axes while selecting a design instance, either + ignoring excess data or using defaults if data is missing. + + * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): + Implement it. + + * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design, + T1_Set_Var_Design): Ditto. + +2015-03-29 Werner Lemberg + + [type1] Minor. + + * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use + FT_THROW. + (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW. + +2015-03-27 Werner Lemberg + + [cff] Trace charstring nesting levels. + + * src/cff/cf2intrp.c (cf2_interpT2CharString) : Implement it. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Ditto. + +2015-03-21 Alexei Podtelezhnikov + + [base] Optimize `FT_Angle_Diff'. + + Under normal circumstances we are usually close to the desired range + of angle values, so that the remainder is not really necessary. + + * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder. + + * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro. + +2015-03-21 Werner Lemberg + + [truetype] Improve `gvar' handling. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle + single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger + than the default. + +2015-03-20 Alexei Podtelezhnikov + + * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring. + +2015-03-17 Alexei Podtelezhnikov + + Fix Savannah bug #44412 (part 2). + + * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'. + +2015-03-11 Werner Lemberg + + [autofit] Add support for Arabic script. + + Thanks to Titus Nemeth for guidance! + + * src/autofit/afblue.dat: Add blue zone data for Arabic. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Arabic standard characters. + + * src/autofit/afranges.c: Add Arabic data. + + * src/autofit/afstyles.h: Add Arabic data. + + * docs/CHANGES: Document it. + +2015-03-11 Werner Lemberg + + Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols. + + * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed + to... + (FT_SERVICE_FONT_FORMAT_H): This. + + * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed + to ... + (FT_FONT_FORMAT_*): This. + + src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c, + src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, + src/truetype/ttdriver.c, src/type1/t1driver.c, + src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated. + +2015-03-11 Werner Lemberg + + [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'. + + * include/config/ftheader.h: Implement it. + * src/base/ftfntfmt.c, docs/CHANGES: Updated. + +2015-03-11 Werner Lemberg + + [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'. + + * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it. + + * docs/CHANGES: Updated. + +2015-03-11 Werner Lemberg + + Fix automatic copyright updating. + + * src/tools/update-copyright: Make scanning of `no-copyright' + actually work. + + * src/tools/no-copyright: Don't include README in general. + +2015-03-11 Werner Lemberg + + Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'. + + CMakeLists.txt, 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/bld.inf, + 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, docs/INSTALL.ANY, + include/config/ftheader.h, include/ftfntfmt.h, modules.cfg, + src/base/ftfntfmt.c, vms_make.com: Updated. + +2015-03-10 Alexei Podtelezhnikov + + Fix Savannah bug #44412 (part 1). + + * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns. + +2015-03-10 Werner Lemberg + + [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'. + + * include/ftbitmap.h, src/base/ftbitmap.c: Implement it. + Update all callers. + + * docs/CHANGES: Updated. + +2015-03-06 Werner Lemberg + + * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. + + Found by Alexei. + +2015-03-05 Alexei Podtelezhnikov + + * src/base/ftstroke.c: Simplify. + +2015-03-04 Werner Lemberg + + [truetype] Some fixes and code refactoring in `ttgxvar.c'. + + * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value + of `point_cnt' if two bytes are read. + Use a more vertical coding style. + (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter. + Use a more vertical coding style. + +2015-03-03 Werner Lemberg + + [autofit] Fix Savannah bug #44241. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs + with less than 3 points. + +2015-03-02 Werner Lemberg + + Simplify `TYPEOF' macro. + + No need for two arguments. + + * include/config/ftconfig.h, builds/unix/ftconfig.in, + builds/vms/ftconfig.h (TYPEOF): Updated. + + * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), + src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated. + +2015-03-01 Werner Lemberg + + Various compiler warning fixes for `make multi'. + + * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), + src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, + af_latin_hint_edges), src/autofit/aflatin2.c + (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare + as `static'. + + * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): + Removed. Unused. + * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. + * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. + + * src/cff/cf2intrp.c: Include `cf2intrp.h'. + * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. + + * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. + + * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. + + * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): + Removed. Unused. + + * src/raster/ftraster.c (Render_Glyph): Declare as `static'. + + * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. + + * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. + * src/truetype/ttsubpix.c (is_member_of_family_class, + is_member_of_style_class): Declare as `static'. + + * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare + as `static'. + * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as + `static'. + (T1_FIELD_COUNT): Removed. Unused. + * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. + + * src/type42/t42parse.c (T1_Done_Table): Removed. Unused. + +2015-02-25 Werner Lemberg + + [psaux] Signedness fixes. + + * include/internal/psaux.h, src/psaux/afmparse.c, + src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c, + src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply. + +2015-02-25 Werner Lemberg + + [otvalid] Signedness fixes. + + * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c, + src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c: + Apply. + +2015-02-25 Werner Lemberg + + * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix. + +2015-02-25 Werner Lemberg + + [lzw] Signedness fixes. + + * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply. + +2015-02-25 Werner Lemberg + + [gxvalid] Signedness fixes. + + * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c, + src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c, + src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c, + src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c, + src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c, + src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c, + src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply. + +2015-02-25 Werner Lemberg + + [cache] Signedness fixes. + + * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c, + src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply. + +2015-02-25 Werner Lemberg + + Change dimension fields in `FTC_ImageTypeRec' to unsigned type. + + This doesn't break ABI. + + * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for + `width' and `height'. + + * docs/CHANGES: Document it. + +2015-02-25 Werner Lemberg + + [cache] Don't use `labs'. + + This is the only place in FreeType where this function was used. + + * include/config/ftstdlib.h (ft_labs): Remove. + + * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with + `FT_ABS'. + +2015-02-23 Werner Lemberg + + [cache] Replace `FT_PtrDist' with `FT_Offset'. + + * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t') + is a better choice for `hash' to hold a pointer than `FT_PtrDist' + (a.k.a. `ptrdiff_t'), especially since the latter is signed, + causing zillions of signedness warnings. [Note that `hash' was of + type `FT_UInt32' before the change to `FT_PtrDist'.] + Update all users. + + * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c, + src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated. + +2015-02-23 Werner Lemberg + + [smooth, raster] Re-enable standalone compilation. + + * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX) + [_STANDALONE_]: Define macros. + + * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS, + FT_HYPOT) [_STANDALONE_]: Define macros. + +2015-02-22 Werner Lemberg + + [smooth] Signedness fixes. + + * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply. + +2015-02-22 Werner Lemberg + + * src/raster/ftraster.c: Use the file's typedefs everywhere. + +2015-02-22 Werner Lemberg + + * src/sfnt/ttpost.c (load_format_20): Fix error tracing message. + + Bug introduced 6 commits earlier. + +2015-02-22 Werner Lemberg + + [pshinter] Fix thinko. + + * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly + check `count'. + Bug introduced two commits earlier. + +2015-02-22 Werner Lemberg + + [raster] Signedness fixes. + + * src/raster/ftraster.c, src/raster/ftrend1.c: Apply. + +2015-02-22 Werner Lemberg + + [pshinter] Signedness fixes. + + * src/pshinter/pshalgo.c, src/pshinter/pshglob.c, + src/pshinter/pshrec.c: Apply. + +2015-02-22 Werner Lemberg + + [pshinter] Use macros for (unsigned) flags, not enumerations. + + * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros. + Updated. + * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros. + +2015-02-22 Werner Lemberg + + * src/pshinter/pshrec.c: Simplify. + (ps_hints_open, ps_hints_stem): Remove switch statement. + +2015-02-22 Werner Lemberg + + [sfnt] Signedness fixes. + + * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c, + src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c, + src/sfnt/ttsbit.c: Apply. + * src/sfnt/sfdriver.c: Apply. + (sfnt_get_ps_name): Simplify. + +2015-02-22 Werner Lemberg + + [bdf] Signedness fixes. + + * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h, + src/bdf/bdflib.c: Apply. + +2015-02-22 Werner Lemberg + + * src/bdf/bdflib.c (_bdf_atous): New function. + (_bdf_parse_glyphs, _bdf_parse_start): Use it. + +2015-02-22 Werner Lemberg + + [pcf] Signedness fixes. + + * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply. + * src/pcf/pcfread.c: Apply. + (pcf_get_encodings): Ignore invalid negative encoding offsets. + +2015-02-21 Werner Lemberg + + * src/winfonts/winfnt.c: Signedness fixes. + +2015-02-21 Werner Lemberg + + [type42] Signedness fixes. + + * src/type42/t42parse.c, src/type42/t42parse.h, + src/type42/t42types.h: Apply. + +2015-02-21 Werner Lemberg + + [pfr] Signedness fixes. + + * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c, + src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c, + src/pfr/pfrtypes.h: Apply. + +2015-02-21 Werner Lemberg + + [cff] Minor signedness fixes related to last commit. + + * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply. + +2015-02-20 Werner Lemberg + + [cff] Thinkos in bias handling. + + Only the final result is always positive. + + Bug introduced three commits earlier. + + * src/cff/cffgload.c, src/cff/cffgload.h: Apply. + +2015-02-20 Werner Lemberg + + [cid] Fix signedness issues and emit some better error codes. + + * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c, + src/cid/cidparse.h: Apply. + * src/cid/cidload.c: Apply. + (parse_fd_array): Reject negative values for number of dictionaries. + * src/cid/cidparse.c: Apply. + (cid_parser_new): Reject negative values for hex data length. + +2015-02-20 Werner Lemberg + + [cff] Signedness fixes for new engine. + + * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c, + src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply. + +2015-02-20 Werner Lemberg + + [cff] Signedness fixes for basic infrastructure and old engine. + + * include/internal/pshints.h, src/cff/cffdrivr.c, + src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c, + src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply. + +2015-02-19 Werner Lemberg + + * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'. + + This is hard-coded to value 2 in `fvar' version 1.0 (and no newer + version exists), but some fonts set it incorrectly. + + Problem reported by Adam Twardoch . + +2015-02-19 Werner Lemberg + + [cff] Emit better error code for invalid private dict size. + + * src/cff/cffparse.c (cff_parse_private_dict): Reject negative + values for size and offset. + +2015-02-19 Werner Lemberg + + [autofit] Fix signedness issues. + + * src/autofit/afangles.c, src/autofit/afcjk.c, + src/autofit/afglobal.c, src/autofit/afhints.c, + src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c, + src/autofit/hbshim.c: Apply. + +2015-02-19 Werner Lemberg + + [autofit] Use macros for (unsigned) flags, not enumerations. + + This harmonizes with other code in FreeType (and reduces the number + of necessary casts to avoid compiler warnings). + + * src/autofit/afblue.hin: Make flag macros unsigned. + * src/autofit/afblue.h: Regenerated. + + * src/autofit/afcjk.h: Replace flag enumeration with macros. + * src/autofit/afcjk.c: Updated. + + * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with + macros. + * src/autofit/afhints.c: Updated. + + * src/autofit/aflatin.h: Replace flag enumerations with macros. + * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated. + + * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros. + +2015-02-18 Werner Lemberg + + [type1] Fix signedness issues. + + * include/internal/psaux.h, include/internal/t1types.h, + src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c, + src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply. + +2015-02-18 Werner Lemberg + + [psaux, type1] Fix minor AFM issues. + + * include/internal/t1types.h (AFM_KernPairRec): Make indices + unsigned. + Update users. + (AFM_FontInfoRec): Make element counters unsigned. + Update users. + * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned + int. + + * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): + Reject negative values for number of kerning elements. + + * src/type1/t1afm.c, src/tools/test_afm.c: Updated. + +2015-02-18 Werner Lemberg + + Don't use `FT_PtrDist' for lengths. + + Use FT_UInt instead. + + * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec, + T1_DecoderRec): Do it. + + * include/internal/t1types.h (T1_FontRec): Ditto. + + * src/cid/cidload.c (cid_parse_dict): Updated. + * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto. + * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto. + * src/type1/t1load.c (parse_blend_axis_types, parse_encoding, + parse_charstrings, parse_dict): Ditto. + * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings, + t42_parse_dict): Ditto. + +2015-02-18 Werner Lemberg + + * src/type1/t1driver.c (t1_ps_get_font_value): Clean up. + This handles negative values better, avoiding many casts. + +2015-02-17 Werner Lemberg + + [base] Fix Savannah bug #44284. + + * src/base/ftcalc.c (FT_MulFix): Typos. + +2015-02-17 Werner Lemberg + + [truetype] Finish compiler warning fixes for signedness issues. + + * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c, + src/truetype/ttsubpix.h: Apply. + +2015-02-17 Werner Lemberg + + * src/truetype/ttsubpix.c: Adding missing `static' keywords. + +2015-02-17 Werner Lemberg + + [truetype] More signedness fixes. + + * include/internal/tttypes.h, src/truetype/ttinterp.h, + src/truetype/ttobjs.h, src/truetype/ttinterp.c, + src/truetype/ttobjs.c: Apply. + +2015-02-17 Werner Lemberg + + [truetype] Various signedness fixes. + + * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply. + + * src/truetype/ttgload.c: Apply. + (TT_Get_VMetrics): Protect against invalid ascenders and descenders + while constructing advance height. + +2015-02-16 Werner Lemberg + + [base] Finish compiler warning fixes for signedness issues. + + * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c: + Apply. + +2015-02-16 Werner Lemberg + + * include/tttables.h (TT_OS2): `fsType' must be FT_UShort. + +2015-02-16 Werner Lemberg + + More minor signedness warning fixes. + + * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c, + src/base/ftutil.c: Apply. + +2015-02-16 Werner Lemberg + + Next round of minor compiler warning fixes. + + * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member + type to `FT_Long'. + (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword. + + * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'. + + * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c: + Signedness fixes. + +2015-02-16 Werner Lemberg + + Various minor signedness fixes. + + * include/ftadvanc.h, include/internal/ftobjs.h, + src/base/ftgloadr.c, src/base/ftobjs.c: Apply. + +2015-02-16 Werner Lemberg + + New `TYPEOF' macro. + + This helps suppress signedness warnings, avoiding issues with + implicit conversion changes. + + * include/config/ftconfig.h, builds/unix/ftconfig.in, + builds/vms/ftconfig.h (TYPEOF): Define. + + * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), + src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it. + +2015-02-16 Werner Lemberg + + * src/base/ftsystem.c: Use casts in standard C function wrappers. + (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it. + +2015-02-16 Werner Lemberg + + Fix Savannah bug #44261. + + * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the + environment also while calling the configure script. + +2015-02-16 Werner Lemberg + + * include/internal/ftmemory.h: Add some `FT_Offset' casts. + (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY, + FT_MEM_MOVE): Do it. + +2015-02-15 Werner Lemberg + + [base] Clean up signedness issues in `ftdbgmem.c'. + + Also fix other minor issues. + + * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types + with FT_Long for consistency. + (ft_mem_primes): Change type to `FT_Int'. + (ft_mem_closest_prime, ft_mem_table_set): Updated. + + (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free, + ft_mem_debug_realloc): Use `static' keyword and fix signedness + warnings where necessary. + + (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy, + ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types + and add or remove casts to avoid signedness warnings. + +2015-02-15 Werner Lemberg + + [base] Clean up signedness in arithmetic functions. + + This makes the code more readable and reduces compiler warnings. + + * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix, + FT_DivFix): Convert input parameters to unsigned, do the + computation, then convert the result back to signed. + (ft_corner_orientation): Fix casts. + +2015-02-07 Werner Lemberg + + [sfnt] Fix Savannah bug #44184. + + * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No + longer reject `htmx' and `vmtx' tables with invalid length but + sanitize them. + +2015-02-06 Jon Anderson + + [truetype] Fix regression in the incremental glyph loader. + + * src/truetype/ttgload.c (load_truetype_glyph): For incremental + fonts, the glyph index may be greater than the number of glyphs + indicated, so guard the check with a preprocessor conditional. + +2015-02-06 Werner Lemberg + + [autofit] Fix potential memory leak. + + While this doesn't show up with FreeType, exactly the same code + leaks with ttfautohint's modified auto-hinter code (which gets used + in a slightly different way). + + It certainly doesn't harm since it is similar to already existing + checks in the code for embedded arrays. + + * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours' + and `max_points' for all cases. + +2015-01-31 Werner Lemberg + + [autofit] Add support for Thai script. + + Thanks to Ben Mitchell for guidance with blue + zone characters! + + * src/autofit/afblue.dat: Add blue zone data for Thai. + + * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. + + * src/autofit/afscript.h: Add Thai standard characters. + + * src/autofit/afranges.c: Add Thai data. + + * src/autofit/afstyles.h: Add Thai data. + +2015-01-23 Behdad Esfahbod + + [raster] Handle `FT_RASTER_FLAG_AA' correctly. + + This fixes a breakage caused by the commit `[raster] Remove + 5-level gray AA mode from monochrome rasterizer.'. + + Problem reported by Markus Trippelsdorf . + + * src/raster/ftraster.c (ft_black_render): Handle + `FT_RASTER_FLAG_AA'. + + * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode + remnants. + +2015-01-18 Werner Lemberg + + * src/base/ftobjs.c (FT_New_Library): Fix compiler warning. + +2015-01-18 Chris Liddell + + [raster] Fix Savannah bug #44022. + + Add fallback for glyphs with degenerate bounding boxes. + + If a glyph has only one very narrow feature, the bbox can end up + with either the width or height of the bbox being 0, in which case + no raster memory is allocated and no attempt is made to render the + glyph. This is less than ideal when the drop-out compensation in + the rendering code would actually result in the glyph being + rendered. + + This problem can be observed with the `I' glyph (gid 47) in the + Autodesk RomanS TrueType font. + + * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either + dimension is zero to explicitly round up/down (instead of simply + round). + +2015-01-17 Werner Lemberg + + Add some tools to handle yearly copyright notice updates. + + We are now following the GNU guidelines: A new release automatically + means that the copyright year of all affected files gets updated; it + is no longer used to track years of modification changes. + + * src/tools/update-copyright-year: New Perl script. + * src/tools/update-copyright: New shell script that calls + `update-copyright-year' on all files. + * src/tools/no-copyright: Exceptions that should not be handled by + `update-copyright' + +2015-01-14 Werner Lemberg + + * docs/CHANGES: Updated, using a description from Behdad. + +2015-01-14 Behdad Esfahbod + + * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning. + +2015-01-14 Behdad Esfahbod + + [autofit] Add embedded array of segments and edges. + + Avoids multiple mallocs per typical glyphs. + + With this and recent changes to avoid mallocs, the thread-safe + stack-based loader is now as fast as the previous model that had one + cached singleton. + + * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED): + New macros. + (AF_AxisHintsRec): Add two arrays for segments and edges. + + * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate + data if number of segments exceeds given threshold value. + (af_axis_hints_new_edge): Only allocate data if number of edges + exceeds given threshold value. + (af_glyph_hints_done): Updated. + +2015-01-14 Behdad Esfahbod + + [autofit] Add embedded arrays for points and contours. + + This avoids at least two malloc calls for typical glyphs. + + * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED): + New macros. + (AF_GlyphHintsRec): Add two arrays for contours and points. + + * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done): + Updated. + (af_glyph_hints_reload): Only allocate data if number of contours or + points exceeds given threshold values. + +2015-01-14 Behdad Esfahbod + + [autofit] Allocate hints object on the stack. + + This avoids one malloc per load. + + * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to + `AF_GlyphHints'. + Update prototype. + + * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' + parameter instead of `FT_Memory'. + (af_loader_done): Directly reset `load_hints'. + (af_loader_load_g): Updated. + + * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local + `hints' object. + +2015-01-14 Behdad Esfahbod + + [autofit] Reuse slot glyph loader. + + No need to create a new glyph loader; we can reuse the one from + `slot->internal->loader'. It's hard to tell why it was written that + way originally, but new code looks sound and correct to me, and + avoids lots of allocations. + + * src/autofit/afloader.c (af_loader_init): Change return type to + `void'. + Don't call `FT_GlyphLoader_New'. + (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. + (af_loader_load_g): Update code to use `internal->loader', which + doesn't need copying of data. + + * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. + Update prototype. + + * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated. + +2015-01-14 Behdad Esfahbod + + [autofit] Remove (unused) support for composite glyphs. + + We never have to deal with composite glyphs in the autohinter, as + those will be loaded into FORMAT_OUTLINE by the recursed + `FT_Load_Glyph' function. + + In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply + FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies + FT_LOAD_NO_HINTING: + + /* resolve load flags dependencies */ + + if ( load_flags & FT_LOAD_NO_RECURSE ) + load_flags |= FT_LOAD_NO_SCALE | + FT_LOAD_IGNORE_TRANSFORM; + + if ( load_flags & FT_LOAD_NO_SCALE ) + { + load_flags |= FT_LOAD_NO_HINTING | + FT_LOAD_NO_BITMAP; + + load_flags &= ~FT_LOAD_RENDER; + } + + and as such the auto-hinter is never called. Thus, the recursion in + `af_loader_load_g' never actually happens. So remove the depth + counter as well. + + * src/autofit/afloader.c (af_loader_load_g): Remove `depth' + parameter. + : Remove associated code. + (af_loader_load_glyph): Updated. + +2015-01-14 Behdad Esfahbod + + [raster] Fix uninitialized memory access. + + Apparently `ras.cProfile' might be uninitialized. This will be the + case if `ras.top == ras.cProfile->offset', as can be seen in + `End_Profile'. The overshoot code introduced in a change `Fix B/W + rasterization of subglyphs with different drop-out modes.' (from + 2009-06-18) violated this, accessing `ras.cProfile->flags' + unconditionally just before calling `End_Profile' (which then + detected that `cProfile' is uninitialized and didn't touch it). + + This was harmless, and was not detected by valgrind before because + the objects were allocated on the `raster_pool', which was always + initialized. With recent change to allocate raster buffers on the + stack, valgrind now reported this invalid access. + + * src/raster/ftraster.c (Convert_Glyph): Don't access an + uninitialized `cProfile'. + +2015-01-14 Behdad Esfahbod + + [smooth] Fix uninitialized memory access. + + Looks like `ras.span_y' could always be used without initialization. + This was never detected by valgrind before because the library-wide + `raster_pool' was used for the worker object and `raster_pool' was + originally zero'ed. But subsequent reuses of it were using `span_y' + uninitialized. With the recent change to not use `render_pool' and + allocate worker and buffer on the stack, valgrind now detects this + uninitialized access. + + * src/smooth/ftgrays.c (gray_raster_render): Initialize + `ras.span_y'. + +2015-01-14 Behdad Esfahbod + + [base] Don't initialize unused `driver->glyph_loader'. + + * src/base/ftobjs.c (Destroy_Driver): Don't call + `FT_GlyphLoader_Done'. + (FT_Add_Module): Don't call `FT_GlyphLoader_New'. + +2015-01-14 Behdad Esfahbod + + [base] Don't allocate `library->raster_pool' anymore. + + It's unused after the following commits: + + [raster] Allocate render pool for mono rasterizer on the stack. + [raster] Remove 5-level gray AA mode from monochrome rasterizer. + + The value of FT_RENDER_POOL_SIZE still serves the purpose it used to + serve, which is, to adjust the pool size. But the pool is now + allocated on the stack on demand. + + * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement. + +2015-01-14 Behdad Esfahbod + + [base] Do not reorder library->renderers upon use. + + Instead of keeping `library->renderers' in a MRU order, just leave + it as-is. The MRU machinery wasn't thread-safe. + + With this patch, rasterizing glyphs from different faces from + different threads doesn't fail choosing rasterizer + (FT_Err_Cannot_Render_Glyph). + + Easiest to see that crash was to add a `printf' (or otherwise let + thread yield in FT_Throw with debugging enabled). + + * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c + (FT_Outline_Render): Don't call `FT_Set_Renderer'. + +2015-01-14 Behdad Esfahbod + + [raster] Allocate render pool for mono rasterizer on the stack. + + Instead of using the `render_pool' member of `FT_Library' that is + provided down to the rasterizer, completely ignore that and allocate + needed objects on the stack instead. + + With this patch, rasterizing glyphs from different faces from + different threads doesn't crash in the monochrome rasterizer. + + * src/raster/ftraster.c (black_TRaster): Remove `buffer', + `buffer_size', and `worker' members. + + (ft_black_render): Create `buffer' locally. + (ft_black_reset): Updated. + +2015-01-14 Behdad Esfahbod + + [raster] Remove 5-level gray AA mode from monochrome rasterizer. + + It was off by default and couldn't be turned on at runtime. And the + smooth rasterizer superseded it over ten years ago. No point in + keeping. Comments suggested that it was there for compatibility + with FreeType 1. + + 550 lines down. + + * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING, + RASTER_GRAY_LINES): Remove macros and all associated code. + + (black_TWorker): Remove `gray_min_x' and `gray_max_x'. + (black_TRaster): Remove `grays' and `gray_width'. + + (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop, + ft_black_render): Updated. + + * src/raster/ftrend1.c (ft_raster1_render): Simplify code. + (ft_raster5_renderer_class): Removed. + +2015-01-14 Behdad Esfahbod + + [smooth] Allocate render pool for smooth rasterizer on the stack. + + Instead of using the `render_pool' member of `FT_Library' that is + provided down to the rasterizer, completely ignore that and allocate + needed objects on the stack instead. + + With this patch, rasterizing glyphs from different faces from + different threads doesn't crash in the smooth rasterizer. + + Bugs: + + https://bugzilla.redhat.com/show_bug.cgi?id=678397 + https://bugzilla.redhat.com/show_bug.cgi?id=1004315 + https://bugzilla.redhat.com/show_bug.cgi?id=1165471 + https://bugs.freedesktop.org/show_bug.cgi?id=69034 + + * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer', + `buffer_size', `band_size', and `worker' members. + + (gray_raster_render): Create `buffer', `buffer_size', and + `band_size' locally. + (gray_raster_reset): Updated. + +2015-01-14 Behdad Esfahbod + + [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver. + + Previously the code had stipulation for using a per-TT_Size exec + context if `size->debug' was true. But there was no way that + `size->debug' could *ever* be true. As such, the code was always + using the singleton `TT_ExecContext' that was stored in `TT_Driver'. + This was, clearly, not threadsafe. + + With this patch, loading glyphs from different faces from different + threads doesn't crash in the bytecode loader code. + + * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member. + (TT_DriverRec): Remove `context' member. + + * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove + `TT_ExecContext' code related to a global `TT_Driver' object. + + (tt_driver_done): Don't remove `TT_ExecContext' object here but ... + (tt_size_done_bytecode): ... here. + + (tt_driver_init): Don't create `TT_ExecContext' object here but ... + (tt_size_init_bytecode): ... here, only on demand. + + * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug + code. + (TT_New_Context): Remove `TT_ExecContext' code related to a global + `TT_Driver' object. + + * src/truetype/ttinterp.h: Updated. + + * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated. + +2015-01-14 Behdad Esfahbod + + [autofit] Allocate AF_Loader on the stack instead of AF_Module. + + Stop sharing a global `AF_Loader'. Allocate one on the stack during + glyph load. + + Right now this results in about 25% slowdown, to be fixed in a + following commit. + + With this patch loading glyphs from different faces from different + threads doesn't immediately crash in the autohinting loader code. + + Bugs: + + https://bugzilla.redhat.com/show_bug.cgi?id=1164941 + + * src/autofit/afloader.c (af_loader_init): Pass + `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. + (af_loader_reset, af_loader_load_glyph): Also pass `loader' as + argument. + (af_loader_done): Use `AF_Loader' instead of `AF_Module' as + argument. + + * src/autofit/afmodule.c (af_autofitter_init): Don't call + `af_loader_init'. + (af_autofitter_done): Don't call `af_loader_done'. + (af_autofitter_load_glyph): Use a local `AF_Loader' object. + + * src/autofit/afloader.h: Include `afmodule.h'. + Update prototypes. + Move typedef for `AF_Module' to... + + * src/autofit/afmodule.h: ... this place. + No longer include `afloader.h'. + +2015-01-14 Behdad Esfahbod + + * src/type42/t42objs.h (T42_DriverRec): Remove unused member. + +2015-01-12 Werner Lemberg + + Fix Savannah bug #43976. + + Assure that FreeType's internal include directories are found before + `CPPFLAGS' (which might be set by the user in the environment), and + `CPPFLAGS' before `CFLAGS'. + + * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. + (FT_COMPILE): Make this a special variable for compiling only the + files handled in `freetype.mk'. + (.c.$O): Removed, unused. + + * src/*/rules.mk (*_COMPILE): Fix order of include directories. + +2015-01-11 Werner Lemberg + + [truetype] Prettifying. + + * src/truetype/ttinterp.c (project, dualproj, fast_project, + fast_dualproj): Rename to... + (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this. + +2015-01-11 Werner Lemberg + + * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. + + Based on a patch from Behdad. + +2015-01-11 Werner Lemberg + + * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. + +2015-01-11 Werner Lemberg + + * src/truetype/ttinterp.c (Normalize): Remove unused argument. + +2015-01-11 Werner Lemberg + + [truetype] More macro expansions. + + * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by + expansion. + +2015-01-11 Werner Lemberg + + [truetype] More macro expansions. + + * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion, + adjusting function calls where necessary. + (FT_UNUSED_ARG): Removed, no longer needed. + +2015-01-10 Werner Lemberg + + [truetype] More macro expansions. + + Based on a patch from Behdad. + + * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding + `Ins_*' functions. + (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls. + (ARRAY_BOUND_ERROR): Remove second definition, which is no longer + needed. + (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with... + (Ins_SxyTCA): New function. + +2015-01-10 Werner Lemberg + + [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH. + + Behdad suggested this code simplification, and nobody objected... + + * include/config/ftoption.h, devel/ftoption.h + (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove. + + * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]: + Remove related code. + (ARRAY_BOUND_ERROR): Use do-while loop. + +2015-01-10 Werner Lemberg + + [truetype] More macro expansions. + + * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_, + EXEC_ARG): Remove by replacing with expansion. + +2015-01-10 Werner Lemberg + + [truetype] More macro expansions. + + Based on a patch from Behdad. + + * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize, + SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move, + CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem, + CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt, + CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round, + COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing + with expansion. + + (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project, + CUR_fast_dualproj): Replace with macros `project', `dualproj', + `fast_project', `fast_dualproj'. + +2015-01-10 Werner Lemberg + + [truetype] More macro expansions. + + * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing + with expansion. + +2015-01-10 Werner Lemberg + + [truetype] Remove code for static TrueType interpreter. + + This is a follow-up patch. + + * src/truetype/ttinterp.c, src/truetype/ttinterp.h + [TT_CONFIG_OPTION_STATIC_INTERPRETER, + TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code. + +2015-01-10 Werner Lemberg + + * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion. + + This starts a series of patches that simplifies the code of the + bytecode interpreter. + + +---------------------------------------------------------------------------- + +Copyright 2015-2017 by +David Turner, Robert Wilhelm, and Werner Lemberg. + +This file is part of the FreeType project, and may only be used, modified, +and distributed under the terms of the FreeType project license, +LICENSE.TXT. By continuing to use, modify, or distribute this file you +indicate that you have read the license and understand and accept it +fully. + + +Local Variables: +version-control: never +coding: utf-8 +End: diff --git a/Jamfile b/Jamfile index 9d837ba..5df9b8f 100644 --- a/Jamfile +++ b/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 top Jamfile. # -# Copyright 2001-2016 by +# Copyright 2001-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -210,7 +210,7 @@ actions RefDoc { python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 - --title=FreeType-2.6.5 + --title=FreeType-2.8 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h diff --git a/Jamrules b/Jamrules index 1e2d9b7..0047e53 100644 --- a/Jamrules +++ b/Jamrules @@ -1,6 +1,6 @@ # FreeType 2 JamRules. # -# Copyright 2001-2016 by +# Copyright 2001-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/Makefile b/Makefile index e370cae..1c41458 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/README b/README index 23c10ab..926e9dc 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - FreeType 2.6.5 - ============== + FreeType 2.8 + ============ Homepage: http://www.freetype.org @@ -24,9 +24,9 @@ and download one of the following files. - freetype-doc-2.6.5.tar.bz2 - freetype-doc-2.6.5.tar.gz - ftdoc265.zip + freetype-doc-2.8.tar.bz2 + freetype-doc-2.8.tar.gz + ftdoc28.zip To view the documentation online, go to @@ -71,7 +71,7 @@ ---------------------------------------------------------------------- -Copyright 2006-2016 by +Copyright 2006-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/README.git b/README.git index 34ee82d..06f778b 100644 --- a/README.git +++ b/README.git @@ -37,7 +37,7 @@ repository. ---------------------------------------------------------------------- -Copyright 2005-2016 by +Copyright 2005-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/autogen.sh b/autogen.sh index 78053cc..31c1534 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2016 by +# Copyright 2005-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/README b/builds/amiga/README index eae9e33..fb44116 100644 --- a/builds/amiga/README +++ b/builds/amiga/README @@ -1,7 +1,7 @@ README for the builds/amiga subdirectory. -Copyright 2005-2016 by +Copyright 2005-2017 by Werner Lemberg and Detlef Würkner. This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/include/config/ftconfig.h b/builds/amiga/include/config/ftconfig.h index 0cb65b6..9434841 100644 --- a/builds/amiga/include/config/ftconfig.h +++ b/builds/amiga/include/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific configuration file (specification only). */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/include/config/ftmodule.h b/builds/amiga/include/config/ftmodule.h index bbff9c5..38ea4c9 100644 --- a/builds/amiga/include/config/ftmodule.h +++ b/builds/amiga/include/config/ftmodule.h @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType module selection. */ /* */ -/* Copyright 2005-2016 by */ +/* Copyright 2005-2017 by */ /* Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/makefile b/builds/amiga/makefile index 34ba77d..e467f9a 100644 --- a/builds/amiga/makefile +++ b/builds/amiga/makefile @@ -5,7 +5,7 @@ # -# Copyright 2005-2016 by +# Copyright 2005-2017 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/makefile.os4 b/builds/amiga/makefile.os4 index a25dd3e..82ee864 100644 --- a/builds/amiga/makefile.os4 +++ b/builds/amiga/makefile.os4 @@ -4,7 +4,7 @@ # -# Copyright 2005-2016 by +# Copyright 2005-2017 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile index 723a890..08e0a38 100644 --- a/builds/amiga/smakefile +++ b/builds/amiga/smakefile @@ -3,7 +3,7 @@ # -# Copyright 2005-2016 by +# Copyright 2005-2017 by # Werner Lemberg and Detlef Würkner. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c index 4ac6eef..1a897cf 100644 --- a/builds/amiga/src/base/ftdebug.c +++ b/builds/amiga/src/base/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for amiga (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c index 080eaef..c3960d9 100644 --- a/builds/amiga/src/base/ftsystem.c +++ b/builds/amiga/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/ansi/ansi-def.mk b/builds/ansi/ansi-def.mk index 933232d..d3c0f28 100644 --- a/builds/ansi/ansi-def.mk +++ b/builds/ansi/ansi-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/ansi/ansi.mk b/builds/ansi/ansi.mk index 19a3e1f..b33e8ce 100644 --- a/builds/ansi/ansi.mk +++ b/builds/ansi/ansi.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/beos/beos-def.mk b/builds/beos/beos-def.mk index edd356e..fa6f236 100644 --- a/builds/beos/beos-def.mk +++ b/builds/beos/beos-def.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/beos/beos.mk b/builds/beos/beos.mk index 4b9e097..181efe4 100644 --- a/builds/beos/beos.mk +++ b/builds/beos/beos.mk @@ -2,7 +2,7 @@ # FreeType 2 configuration rules for a BeOS system # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/beos/detect.mk b/builds/beos/detect.mk index e85bc41..30f6d10 100644 --- a/builds/beos/detect.mk +++ b/builds/beos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/cmake/iOS.cmake b/builds/cmake/iOS.cmake index 378dbd8..5717e6a 100644 --- a/builds/cmake/iOS.cmake +++ b/builds/cmake/iOS.cmake @@ -1,6 +1,6 @@ # iOS.cmake # -# Copyright 2014-2016 by +# Copyright 2014-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written by David Wimsey diff --git a/builds/cmake/testbuild.sh b/builds/cmake/testbuild.sh index e05dd29..34aded7 100755 --- a/builds/cmake/testbuild.sh +++ b/builds/cmake/testbuild.sh @@ -1,6 +1,6 @@ #!/bin/sh -e -# Copyright 2015-2016 by +# Copyright 2015-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/ansi-cc.mk b/builds/compiler/ansi-cc.mk index 688b0c7..d619641 100644 --- a/builds/compiler/ansi-cc.mk +++ b/builds/compiler/ansi-cc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/bcc-dev.mk b/builds/compiler/bcc-dev.mk index a53fcef..9b43fd1 100644 --- a/builds/compiler/bcc-dev.mk +++ b/builds/compiler/bcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/bcc.mk b/builds/compiler/bcc.mk index 398b853..82e3829 100644 --- a/builds/compiler/bcc.mk +++ b/builds/compiler/bcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/emx.mk b/builds/compiler/emx.mk index 2ce52be..a25e4bc 100644 --- a/builds/compiler/emx.mk +++ b/builds/compiler/emx.mk @@ -3,7 +3,7 @@ # -# Copyright 2003-2016 by +# Copyright 2003-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/gcc-dev.mk b/builds/compiler/gcc-dev.mk index f87f94d..8994fa2 100644 --- a/builds/compiler/gcc-dev.mk +++ b/builds/compiler/gcc-dev.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/gcc.mk b/builds/compiler/gcc.mk index e102c6d..3465038 100644 --- a/builds/compiler/gcc.mk +++ b/builds/compiler/gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/intelc.mk b/builds/compiler/intelc.mk index b2e7047..287db44 100644 --- a/builds/compiler/intelc.mk +++ b/builds/compiler/intelc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/unix-lcc.mk b/builds/compiler/unix-lcc.mk index 20011f8..560c61b 100644 --- a/builds/compiler/unix-lcc.mk +++ b/builds/compiler/unix-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/visualage.mk b/builds/compiler/visualage.mk index 14e6229..2aa4fbe 100644 --- a/builds/compiler/visualage.mk +++ b/builds/compiler/visualage.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/visualc.mk b/builds/compiler/visualc.mk index 62dc9d2..e86ecc5 100644 --- a/builds/compiler/visualc.mk +++ b/builds/compiler/visualc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/watcom.mk b/builds/compiler/watcom.mk index da3d19d..62a4811 100644 --- a/builds/compiler/watcom.mk +++ b/builds/compiler/watcom.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/compiler/win-lcc.mk b/builds/compiler/win-lcc.mk index bd0d4be..91b429e 100644 --- a/builds/compiler/win-lcc.mk +++ b/builds/compiler/win-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/detect.mk b/builds/detect.mk index cea55a5..4ed478e 100644 --- a/builds/detect.mk +++ b/builds/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk index b610e46..85c48df 100644 --- a/builds/dos/detect.mk +++ b/builds/dos/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-def.mk b/builds/dos/dos-def.mk index 9aa0ee6..a6c2f22 100644 --- a/builds/dos/dos-def.mk +++ b/builds/dos/dos-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-emx.mk b/builds/dos/dos-emx.mk index 3933aba..85de037 100644 --- a/builds/dos/dos-emx.mk +++ b/builds/dos/dos-emx.mk @@ -3,7 +3,7 @@ # -# Copyright 2003-2016 by +# Copyright 2003-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-gcc.mk b/builds/dos/dos-gcc.mk index e191a81..e38acfb 100644 --- a/builds/dos/dos-gcc.mk +++ b/builds/dos/dos-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/dos/dos-wat.mk b/builds/dos/dos-wat.mk index a0fe4c9..ddb4876 100644 --- a/builds/dos/dos-wat.mk +++ b/builds/dos/dos-wat.mk @@ -3,7 +3,7 @@ # -# Copyright 2003-2016 by +# Copyright 2003-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/exports.mk b/builds/exports.mk index d5a5085..10b79d3 100644 --- a/builds/exports.mk +++ b/builds/exports.mk @@ -3,7 +3,7 @@ # -# Copyright 2005-2016 by +# Copyright 2005-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/freetype.mk b/builds/freetype.mk index 43766be..f8cfd41 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/link_dos.mk b/builds/link_dos.mk index f04cc70..3854e70 100644 --- a/builds/link_dos.mk +++ b/builds/link_dos.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/link_std.mk b/builds/link_std.mk index a5d192e..4cc2dc9 100644 --- a/builds/link_std.mk +++ b/builds/link_std.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c index 4691ded..60cf73e 100644 --- a/builds/mac/ftmac.c +++ b/builds/mac/ftmac.c @@ -5,7 +5,7 @@ /* Mac FOND support. Written by just@letterror.com. */ /* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -940,7 +940,7 @@ typedef short ResourceIndex; { err = lookup_lwfn_by_fond( pathname, lwfn_file_name, buff, sizeof ( buff ) ); - if ( FT_Err_Ok == err ) + if ( !err ) have_lwfn = 1; } @@ -1217,7 +1217,7 @@ typedef short ResourceIndex; } CloseResFile( res_ref ); - if ( FT_Err_Ok == error && NULL != aface ) + if ( !error && aface ) (*aface)->num_faces = num_faces_in_res; return error; } @@ -1279,7 +1279,7 @@ typedef short ResourceIndex; error = lookup_lwfn_by_fond( path_fond, lwfn_file_name, path_lwfn, sizeof ( path_lwfn ) ); - if ( FT_Err_Ok == error ) + if ( !error ) have_lwfn = 1; } @@ -1315,7 +1315,7 @@ typedef short ResourceIndex; error = lookup_lwfn_by_fond( path_fond, lwfn_file_name, path_lwfn, sizeof ( path_lwfn ) ); - if ( FT_Err_Ok == error ) + if ( !error ) have_lwfn = 1; } @@ -1332,7 +1332,7 @@ typedef short ResourceIndex; error = FT_ERR( Unknown_File_Format ); found_no_lwfn_file: - if ( have_sfnt && FT_Err_Ok != error ) + if ( have_sfnt && error ) error = FT_New_Face_From_SFNT( library, sfnt_id, face_index, @@ -1363,7 +1363,7 @@ typedef short ResourceIndex; /* if it works, fine. */ error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface ); - if ( error == 0 ) + if ( !error ) return error; /* let it fall through to normal loader (.ttf, .otf, etc.); */ @@ -1403,7 +1403,7 @@ typedef short ResourceIndex; /* try resourcefork based font: LWFN, FFIL */ error = FT_New_Face_From_Resource( library, (UInt8 *)pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* let it fall through to normal loader (.ttf, .otf, etc.) */ @@ -1458,7 +1458,7 @@ typedef short ResourceIndex; error = FT_ERR( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* fallback to datafork font */ @@ -1515,7 +1515,7 @@ typedef short ResourceIndex; error = FT_ERR( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* fallback to datafork font */ diff --git a/builds/modules.mk b/builds/modules.mk index 787f864..a89d579 100644 --- a/builds/modules.mk +++ b/builds/modules.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/detect.mk b/builds/os2/detect.mk index df05792..3ea68fb 100644 --- a/builds/os2/detect.mk +++ b/builds/os2/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/os2-def.mk b/builds/os2/os2-def.mk index b8d4d7b..2fe6263 100644 --- a/builds/os2/os2-def.mk +++ b/builds/os2/os2-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/os2-dev.mk b/builds/os2/os2-dev.mk index 629d766..842a289 100644 --- a/builds/os2/os2-dev.mk +++ b/builds/os2/os2-dev.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/os2/os2-gcc.mk b/builds/os2/os2-gcc.mk index b3e590b..4cdffba 100644 --- a/builds/os2/os2-gcc.mk +++ b/builds/os2/os2-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/symbian/bld.inf b/builds/symbian/bld.inf index cbbdc3a..8087202 100644 --- a/builds/symbian/bld.inf +++ b/builds/symbian/bld.inf @@ -2,7 +2,7 @@ // FreeType 2 project for the symbian platform // -// Copyright 2008-2016 by +// Copyright 2008-2017 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/symbian/freetype.mmp b/builds/symbian/freetype.mmp index 1944054..6fe7333 100644 --- a/builds/symbian/freetype.mmp +++ b/builds/symbian/freetype.mmp @@ -2,7 +2,7 @@ // FreeType 2 makefile for the symbian platform // -// Copyright 2008-2016 by +// Copyright 2008-2017 by // David Turner, Robert Wilhelm, and Werner Lemberg. // // This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 7cea85d..7b1d03b 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/aclocal.m4 b/builds/unix/aclocal.m4 index 0a8c94d..eb7517a 100644 --- a/builds/unix/aclocal.m4 +++ b/builds/unix/aclocal.m4 @@ -8360,6 +8360,120 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_LONG_LONG_INT if 'long long int' works. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. + +# Note: If the type 'long long int' exists but is only 32 bits large +# (as on some very old compilers), HAVE_LONG_LONG_INT will not be +# defined. In this case you can treat 'long long int' like 'long int'. + +AC_DEFUN([AC_TYPE_LONG_LONG_INT], +[ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], + [ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug is not important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [], + [ac_cv_type_long_long_int=no], + [:]) + fi + fi]) + if test $ac_cv_type_long_long_int = yes; then + AC_DEFINE([HAVE_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'long long int'.]) + fi +]) + +# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. + +# Note: If the type 'unsigned long long int' exists but is only 32 bits +# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT +# will not be defined. In this case you can treat 'unsigned long long int' +# like 'unsigned long int'. + +AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for unsigned long long int], + [ac_cv_type_unsigned_long_long_int], + [ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [], + [ac_cv_type_unsigned_long_long_int=no]) + fi]) + if test $ac_cv_type_unsigned_long_long_int = yes; then + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'unsigned long long int'.]) + fi +]) + +# Expands to a C program that can be used to test for simultaneous support +# of 'long long' and 'unsigned long long'. We don't want to say that +# 'long long' is available if 'unsigned long long' is not, or vice versa, +# because too many programs rely on the symmetry between signed and unsigned +# integer types (excluding 'bool'). +AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], +[ + AC_LANG_PROGRAM( + [[/* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63;]], + [[/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull));]]) +]) + # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software diff --git a/builds/unix/config.guess b/builds/unix/config.guess index c4bd827..69ed3e5 100755 --- a/builds/unix/config.guess +++ b/builds/unix/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-05-15' +timestamp='2017-03-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -837,10 +837,11 @@ EOF UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1000,6 +1001,9 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; @@ -1032,6 +1036,9 @@ EOF ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; @@ -1337,6 +1344,9 @@ EOF NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-?:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; diff --git a/builds/unix/config.sub b/builds/unix/config.sub index 9feb73b..40ea5df 100755 --- a/builds/unix/config.sub +++ b/builds/unix/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2016-06-20' +timestamp='2017-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,7 +117,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -263,7 +263,7 @@ case $basic_machine in | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -301,6 +301,7 @@ case $basic_machine in | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ @@ -314,6 +315,7 @@ case $basic_machine in | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ + | wasm32 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -387,7 +389,7 @@ case $basic_machine in | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -428,6 +430,7 @@ case $basic_machine in | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ @@ -444,6 +447,7 @@ case $basic_machine in | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -946,6 +950,9 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -1030,7 +1037,7 @@ case $basic_machine in ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1040,7 +1047,7 @@ case $basic_machine in ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1241,6 +1248,9 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none @@ -1395,7 +1405,7 @@ case $os in | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ @@ -1407,7 +1417,7 @@ case $os in | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix*) + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1636,6 +1646,9 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; diff --git a/builds/unix/configure b/builds/unix/configure index e515312..a4c66eb 100755 --- a/builds/unix/configure +++ b/builds/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for FreeType 2.6.5. +# Generated by GNU Autoconf 2.69 for FreeType 2.8. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FreeType' PACKAGE_TARNAME='freetype' -PACKAGE_VERSION='2.6.5' -PACKAGE_STRING='FreeType 2.6.5' +PACKAGE_VERSION='2.8' +PACKAGE_STRING='FreeType 2.8' PACKAGE_BUGREPORT='freetype@nongnu.org' PACKAGE_URL='' @@ -755,6 +755,7 @@ with_gnu_ld with_sysroot enable_libtool_lock enable_biarch_config +enable_largefile enable_mmap with_zlib with_bzip2 @@ -1328,7 +1329,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures FreeType 2.6.5 to adapt to many kinds of systems. +\`configure' configures FreeType 2.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1394,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FreeType 2.6.5:";; + short | recursive ) echo "Configuration of FreeType 2.8:";; esac cat <<\_ACEOF @@ -1408,6 +1409,7 @@ Optional Features: --disable-libtool-lock avoid locking (might break parallel builds) --enable-biarch-config install biarch ftconfig.h to support multiple architectures by single file + --disable-largefile omit support for large files --disable-mmap do not check mmap() and do not use Optional Packages: @@ -1539,7 +1541,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FreeType configure 2.6.5 +FreeType configure 2.8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2137,7 +2139,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FreeType $as_me 2.6.5, which was +It was created by FreeType $as_me 2.8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2493,7 +2495,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Don't forget to update `docs/VERSIONS.TXT'! -version_info='18:5:12' +version_info='20:0:14' ft_version=`echo $version_info | tr : .` @@ -12441,6 +12443,123 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +$as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + + # check whether cpp computation of size of int and long in ftconfig.in works @@ -12523,6 +12642,207 @@ CPPFLAGS="${orig_CPPFLAGS}" # checks for library functions +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + # Here we check whether we can use our mmap file component. # Check whether --enable-mmap was given. @@ -14697,7 +15017,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FreeType $as_me 2.6.5, which was +This file was extended by FreeType $as_me 2.8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14763,7 +15083,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -FreeType config.status 2.6.5 +FreeType config.status 2.8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/builds/unix/configure.ac b/builds/unix/configure.ac index 7613732..7cdafcc 100644 --- a/builds/unix/configure.ac +++ b/builds/unix/configure.ac @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright 2001-2016 by +# Copyright 2001-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -11,13 +11,13 @@ # indicate that you have read the license and understand and accept it # fully. -AC_INIT([FreeType], [2.6.5], [freetype@nongnu.org], [freetype]) +AC_INIT([FreeType], [2.8], [freetype@nongnu.org], [freetype]) AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='18:5:12' +version_info='20:0:14' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -105,6 +105,7 @@ AC_CHECK_HEADERS([fcntl.h unistd.h]) AC_C_CONST AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long]) +AC_TYPE_LONG_LONG_INT # check whether cpp computation of size of int and long in ftconfig.in works @@ -180,6 +181,8 @@ CPPFLAGS="${orig_CPPFLAGS}" # checks for library functions +AC_SYS_LARGEFILE + # Here we check whether we can use our mmap file component. AC_ARG_ENABLE([mmap], diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index dc38ba4..ef6debe 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -2,7 +2,7 @@ # # Process this file with autoconf to produce a configure script. # -# Copyright 2001-2016 by +# Copyright 2001-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update `docs/VERSIONS.TXT'! -version_info='18:5:12' +version_info='20:0:14' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -105,6 +105,7 @@ AC_CHECK_HEADERS([fcntl.h unistd.h]) AC_C_CONST AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long]) +AC_TYPE_LONG_LONG_INT # check whether cpp computation of size of int and long in ftconfig.in works @@ -180,6 +181,8 @@ CPPFLAGS="${orig_CPPFLAGS}" # checks for library functions +AC_SYS_LARGEFILE + # Here we check whether we can use our mmap file component. AC_ARG_ENABLE([mmap], diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk index 557dc92..a2cf0a7 100644 --- a/builds/unix/detect.mk +++ b/builds/unix/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in index f74707d..97de134 100644 --- a/builds/unix/freetype-config.in +++ b/builds/unix/freetype-config.in @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright 2000-2016 by +# Copyright 2000-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -12,11 +12,55 @@ LC_ALL=C export LC_ALL -prefix="%prefix%" -exec_prefix="%exec_prefix%" -exec_prefix_set="no" -includedir="%includedir%" -libdir="%libdir%" + +# if `pkg-config' is available, use values from `freetype2.pc' +pkg-config --version >/dev/null 2>&1 +if test $? -eq 0 ; then + # note that option `--variable' is not affected by the + # PKG_CONFIG_SYSROOT_DIR environment variable + if test "x$SYSROOT" != "x" ; then + PKG_CONFIG_SYSROOT_DIR="$SYSROOT" + export PKG_CONFIG_SYSROOT_DIR + fi + + prefix=`pkg-config --variable prefix freetype2` + exec_prefix=`pkg-config --variable exec_prefix freetype2` + + includedir=`pkg-config --variable includedir freetype2` + libdir=`pkg-config --variable libdir freetype2` + + version=`pkg-config --modversion freetype2` + + cflags=`pkg-config --cflags freetype2` + dynamic_libs=`pkg-config --libs freetype2` + static_libs=`pkg-config --static --libs freetype2` +else + prefix="%prefix%" + exec_prefix="%exec_prefix%" + + includedir="%includedir%" + libdir="%libdir%" + + version=%ft_version% + + cflags="-I${SYSROOT}$includedir/freetype2" + dynamic_libs="-lfreetype" + static_libs="%LIBSSTATIC_CONFIG%" + if test "${SYSROOT}$libdir" != "/usr/lib" && + test "${SYSROOT}$libdir" != "/usr/lib64" ; then + libs_L="-L${SYSROOT}$libdir" + fi +fi + +orig_prefix=$prefix +orig_exec_prefix=$exec_prefix + +orig_includedir=$includedir +orig_libdir=$libdir + +include_suffix=`echo $includedir | sed "s|$prefix||"` +lib_suffix=`echo $libdir | sed "s|$exec_prefix||"` + usage() { @@ -39,14 +83,17 @@ Options: library --static make command line options display flags for static linking + --help display this help and exit EOF exit $1 } + if test $# -eq 0 ; then usage 1 1>&2 fi + while test $# -gt 0 ; do case "$1" in -*=*) @@ -74,8 +121,8 @@ while test $# -gt 0 ; do echo_exec_prefix=yes ;; --version) - echo %ft_version% - exit 0 + echo_version=yes + break ;; --ftversion) echo_ft_version=yes @@ -92,6 +139,9 @@ while test $# -gt 0 ; do --static) show_static=yes ;; + --help) + usage 0 + ;; *) usage 1 1>&2 ;; @@ -99,12 +149,27 @@ while test $# -gt 0 ; do shift done + if test "$local_prefix" = "yes" ; then if test "$exec_prefix_set" != "yes" ; then exec_prefix=$prefix fi fi +if test "$local_prefix" = "yes" ; then + includedir=${prefix}${include_suffix} + if test "$exec_prefix_set" = "yes" ; then + libdir=${exec_prefix}${lib_suffix} + else + libdir=${prefix}${lib_suffix} + fi +fi + + +if test "$echo_version" = "yes" ; then + echo $version +fi + if test "$echo_prefix" = "yes" ; then echo ${SYSROOT}$prefix fi @@ -113,15 +178,6 @@ if test "$echo_exec_prefix" = "yes" ; then echo ${SYSROOT}$exec_prefix fi -if test "$exec_prefix_set" = "yes" ; then - libdir=$exec_prefix/lib -else - if test "$local_prefix" = "yes" ; then - includedir=$prefix/include - libdir=$prefix/lib - fi -fi - if test "$echo_ft_version" = "yes" ; then major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \ | grep FREETYPE_MAJOR \ @@ -136,26 +192,20 @@ if test "$echo_ft_version" = "yes" ; then fi if test "$echo_cflags" = "yes" ; then - echo -I${SYSROOT}$includedir/freetype2 + echo $cflags | sed "s|$orig_includedir/freetype2|$includedir/freetype2|" fi if test "$echo_libs" = "yes" ; then - libs="-lfreetype" - staticlibs="%LIBSSTATIC_CONFIG%" if test "$show_static" = "yes" ; then - libs="$staticlibs" - fi - if test "${SYSROOT}$libdir" != "/usr/lib" && - test "${SYSROOT}$libdir" != "/usr/lib64"; then - echo -L${SYSROOT}$libdir $libs + libs="$libs_L $static_libs" else - echo $libs + libs="$libs_L $dynamic_libs" fi + echo $libs | sed "s|$orig_libdir|$libdir|" fi if test "$echo_libtool" = "yes" ; then - convlib="libfreetype.la" - echo ${SYSROOT}$libdir/$convlib + echo ${SYSROOT}$libdir/libfreetype.la fi # EOF diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4 index 1462fc7..172212f 100644 --- a/builds/unix/freetype2.m4 +++ b/builds/unix/freetype2.m4 @@ -1,7 +1,7 @@ # Configure paths for FreeType2 # Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor # -# Copyright 2001-2016 by +# Copyright 2001-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/ft-munmap.m4 b/builds/unix/ft-munmap.m4 index db798d8..27dd7d5 100644 --- a/builds/unix/ft-munmap.m4 +++ b/builds/unix/ft-munmap.m4 @@ -1,6 +1,6 @@ ## FreeType specific autoconf tests # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in index fbb1c14..abd101d 100644 --- a/builds/unix/ftconfig.in +++ b/builds/unix/ftconfig.in @@ -4,7 +4,7 @@ /* */ /* UNIX-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -287,8 +287,8 @@ FT_BEGIN_HEADER #endif - /* determine whether we have a 64-bit int type for platforms without */ - /* Autoconf */ + /* determine whether we have a 64-bit int type */ + /* (mostly for environments without `autoconf') */ #if FT_SIZEOF_LONG == 8 /* FT_LONG64 must be defined if a 64-bit type is available */ @@ -296,6 +296,16 @@ FT_BEGIN_HEADER #define FT_INT64 long #define FT_UINT64 unsigned long + /* we handle the LLP64 scheme separately for GCC and clang, */ + /* suppressing the `long long' warning */ +#elif ( FT_SIZEOF_LONG == 4 ) && \ + defined( HAVE_LONG_LONG_INT ) && \ + defined( __GNUC__ ) +#pragma GCC diagnostic ignored "-Wlong-long" +#define FT_LONG64 +#define FT_INT64 long long int +#define FT_UINT64 unsigned long long int + /*************************************************************************/ /* */ /* A 64-bit data type may create compilation problems if you compile */ @@ -355,6 +365,15 @@ FT_BEGIN_HEADER #endif +#ifdef _WIN64 + /* only 64bit Windows uses the LLP64 data model, i.e., */ + /* 32bit integers, 64bit pointers */ +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x) +#else +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x) +#endif + + /*************************************************************************/ /* */ /* miscellaneous */ @@ -368,10 +387,11 @@ FT_BEGIN_HEADER /* typeof condition taken from gnulib's `intprops.h' header file */ -#if ( __GNUC__ >= 2 || \ - defined( __IBM__TYPEOF__ ) || \ - ( __SUNPRO_C >= 0x5110 && !__STDC__ ) ) -#define FT_TYPEOF( type ) (__typeof__ (type)) +#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \ + ( defined( __IBMC__ ) && __IBMC__ >= 1210 && \ + defined( __IBM__TYPEOF__ ) ) || \ + ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) ) +#define FT_TYPEOF( type ) ( __typeof__ ( type ) ) #else #define FT_TYPEOF( type ) /* empty */ #endif diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index a5e4459..48a235b 100644 --- a/builds/unix/ftsystem.c +++ b/builds/unix/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Unix-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/unix/install.mk b/builds/unix/install.mk index f944c5c..fae486c 100644 --- a/builds/unix/install.mk +++ b/builds/unix/install.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/pkg.m4 b/builds/unix/pkg.m4 index f26f84c..260e1fb 100644 --- a/builds/unix/pkg.m4 +++ b/builds/unix/pkg.m4 @@ -53,7 +53,7 @@ fi[]dnl # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place +# only at the first occurrence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in index df09e7e..a967cee 100644 --- a/builds/unix/unix-cc.in +++ b/builds/unix/unix-cc.in @@ -2,7 +2,7 @@ # FreeType 2 template for Unix-specific compiler definitions # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -99,7 +99,7 @@ LDFLAGS := @LDFLAGS@ # export symbols # CCraw_build := @CC_BUILD@ # native CC of building system -E_BUILD := @EXEEXT_BUILD@ # extension for exexutable on building system +E_BUILD := @EXEEXT_BUILD@ # extension for executable on building system EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym CCexe := $(CCraw_build) # used to compile `apinames' only diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in index f7b557f..feae99b 100644 --- a/builds/unix/unix-def.in +++ b/builds/unix/unix-def.in @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -111,7 +111,7 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in $< \ > $@.tmp chmod +x $@.tmp - chmod a-w $@.tmp + chmod go-w $@.tmp mv $@.tmp $@ # To support directory names with spaces (as might easily happen on Windows diff --git a/builds/unix/unix-dev.mk b/builds/unix/unix-dev.mk index 3c72e57..92c0600 100644 --- a/builds/unix/unix-dev.mk +++ b/builds/unix/unix-dev.mk @@ -6,7 +6,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix-lcc.mk b/builds/unix/unix-lcc.mk index 1c254d1..5122fde 100644 --- a/builds/unix/unix-lcc.mk +++ b/builds/unix/unix-lcc.mk @@ -6,7 +6,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk index fba1e1d..14d5c0c 100644 --- a/builds/unix/unix.mk +++ b/builds/unix/unix.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/unix/unixddef.mk b/builds/unix/unixddef.mk index adba517..30f2307 100644 --- a/builds/unix/unixddef.mk +++ b/builds/unix/unixddef.mk @@ -4,7 +4,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h index fb75e40..f8ac2ec 100644 --- a/builds/vms/ftconfig.h +++ b/builds/vms/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* VMS-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -116,6 +116,14 @@ FT_BEGIN_HEADER #endif + /* Fix compiler warning with sgi compiler */ +#if defined( __sgi ) && !defined( __GNUC__ ) +#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 ) +#pragma set woff 3505 +#endif +#endif + + /*************************************************************************/ /* */ /*
*/ @@ -298,6 +306,15 @@ FT_BEGIN_HEADER #endif +#ifdef _WIN64 + /* only 64bit Windows uses the LLP64 data model, i.e., */ + /* 32bit integers, 64bit pointers */ +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x) +#else +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x) +#endif + + /*************************************************************************/ /* */ /* miscellaneous */ @@ -311,10 +328,11 @@ FT_BEGIN_HEADER /* typeof condition taken from gnulib's `intprops.h' header file */ -#if ( __GNUC__ >= 2 || \ - defined( __IBM__TYPEOF__ ) || \ - ( __SUNPRO_C >= 0x5110 && !__STDC__ ) ) -#define FT_TYPEOF( type ) (__typeof__ (type)) +#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \ + ( defined( __IBMC__ ) && __IBMC__ >= 1210 && \ + defined( __IBM__TYPEOF__ ) ) || \ + ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) ) +#define FT_TYPEOF( type ) ( __typeof__ ( type ) ) #else #define FT_TYPEOF( type ) /* empty */ #endif diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c index a13cb22..d83e8ec 100644 --- a/builds/vms/ftsystem.c +++ b/builds/vms/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* VMS-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/wince/ftdebug.c b/builds/wince/ftdebug.c index 6e35e17..7a20e2f 100644 --- a/builds/wince/ftdebug.c +++ b/builds/wince/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for WinCE (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/wince/vc2005-ce/freetype.vcproj b/builds/wince/vc2005-ce/freetype.vcproj index c7aa514..a1c0e37 100644 --- a/builds/wince/vc2005-ce/freetype.vcproj +++ b/builds/wince/vc2005-ce/freetype.vcproj @@ -21,7 +21,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -161,7 +161,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -201,7 +201,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -321,7 +321,7 @@ - + @@ -341,7 +341,7 @@ - + @@ -361,7 +361,7 @@ - + @@ -381,7 +381,7 @@ - + @@ -401,7 +401,7 @@ - + @@ -421,7 +421,7 @@ - + @@ -441,7 +441,7 @@ - + @@ -461,7 +461,7 @@ - + @@ -481,7 +481,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -521,7 +521,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -561,7 +561,7 @@ - + @@ -581,7 +581,7 @@ - + @@ -601,7 +601,7 @@ - + @@ -621,7 +621,7 @@ - + @@ -641,7 +641,7 @@ - + @@ -661,7 +661,7 @@ - + @@ -681,7 +681,7 @@ - + @@ -701,7 +701,7 @@ - + @@ -721,7 +721,7 @@ - + @@ -741,7 +741,7 @@ - + @@ -758,7 +758,7 @@ - + diff --git a/builds/wince/vc2005-ce/index.html b/builds/wince/vc2005-ce/index.html index 4afa23d..fcb52bc 100644 --- a/builds/wince/vc2005-ce/index.html +++ b/builds/wince/vc2005-ce/index.html @@ -21,14 +21,14 @@ the following targets:
  • PPC/SP WM6 (Windows Mobile 6)
  • -It compiles the following libraries from the FreeType 2.6.5 sources:

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

      -    freetype265.lib     - release build; single threaded
      -    freetype265_D.lib   - debug build;   single threaded
      -    freetype265MT.lib   - release build; multi-threaded
      -    freetype265MT_D.lib - debug build;   multi-threaded
      + freetype28.lib - release build; single threaded + freetype28_D.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MT_D.lib - debug build; multi-threaded

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/builds/wince/vc2008-ce/freetype.vcproj b/builds/wince/vc2008-ce/freetype.vcproj index c62fda2..273aa53 100644 --- a/builds/wince/vc2008-ce/freetype.vcproj +++ b/builds/wince/vc2008-ce/freetype.vcproj @@ -88,7 +88,7 @@ /> PPC/SP WM6 (Windows Mobile 6) -It compiles the following libraries from the FreeType 2.6.5 sources:

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

      -    freetype265.lib     - release build; single threaded
      -    freetype265_D.lib   - debug build;   single threaded
      -    freetype265MT.lib   - release build; multi-threaded
      -    freetype265MT_D.lib - debug build;   multi-threaded
      + freetype28.lib - release build; single threaded + freetype28_D.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MT_D.lib - debug build; multi-threaded

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/builds/windows/detect.mk b/builds/windows/detect.mk index 0872303..350d156 100644 --- a/builds/windows/detect.mk +++ b/builds/windows/detect.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/ftdebug.c b/builds/windows/ftdebug.c index f29cca0..cadfcea 100644 --- a/builds/windows/ftdebug.c +++ b/builds/windows/ftdebug.c @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component for Win32 (body). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/builds/windows/vc2005/freetype.vcproj b/builds/windows/vc2005/freetype.vcproj index f938b53..e5e67d5 100644 --- a/builds/windows/vc2005/freetype.vcproj +++ b/builds/windows/vc2005/freetype.vcproj @@ -16,7 +16,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -101,7 +101,7 @@ - + diff --git a/builds/windows/vc2005/index.html b/builds/windows/vc2005/index.html index f6eb4fd..4bd9b75 100644 --- a/builds/windows/vc2005/index.html +++ b/builds/windows/vc2005/index.html @@ -11,14 +11,14 @@

    This directory contains project files for Visual C++, named freetype.vcproj, and Visual Studio, called freetype.sln. It -compiles the following libraries from the FreeType 2.6.5 sources:

    +compiles the following libraries from the FreeType 2.8 sources:

      -    freetype265.lib     - release build; single threaded
      -    freetype265_D.lib   - debug build;   single threaded
      -    freetype265MT.lib   - release build; multi-threaded
      -    freetype265MT_D.lib - debug build;   multi-threaded
      + freetype28.lib - release build; single threaded + freetype28_D.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MT_D.lib - debug build; multi-threaded

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/builds/windows/vc2008/freetype.vcproj b/builds/windows/vc2008/freetype.vcproj index b83b5b1..a8bc672 100644 --- a/builds/windows/vc2008/freetype.vcproj +++ b/builds/windows/vc2008/freetype.vcproj @@ -70,7 +70,7 @@ /> This directory contains project files for Visual C++, named freetype.vcproj, and Visual Studio, called freetype.sln. It -compiles the following libraries from the FreeType 2.6.5 sources:

    +compiles the following libraries from the FreeType 2.8 sources:

      -    freetype265.lib     - release build; single threaded
      -    freetype265_D.lib   - debug build;   single threaded
      -    freetype265MT.lib   - release build; multi-threaded
      -    freetype265MT_D.lib - debug build;   multi-threaded
      + freetype28.lib - release build; single threaded + freetype28_D.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MT_D.lib - debug build; multi-threaded

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/builds/windows/vc2010/freetype.vcxproj b/builds/windows/vc2010/freetype.vcxproj index f164b31..e4f11fc 100644 --- a/builds/windows/vc2010/freetype.vcxproj +++ b/builds/windows/vc2010/freetype.vcxproj @@ -191,18 +191,18 @@ - freetype265d - freetype265d - freetype265MTd - freetype265MTd - freetype265STd - freetype265STd - freetype265 - freetype265 - freetype265MT - freetype265MT - freetype265ST - freetype265ST + freetype28d + freetype28d + freetype28MTd + freetype28MTd + freetype28STd + freetype28STd + freetype28 + freetype28 + freetype28MT + freetype28MT + freetype28ST + freetype28ST diff --git a/builds/windows/vc2010/index.html b/builds/windows/vc2010/index.html index 2e27e85..c2b5800 100644 --- a/builds/windows/vc2010/index.html +++ b/builds/windows/vc2010/index.html @@ -12,16 +12,16 @@

    This directory contains a project file for Visual C++ (VS.NET 2010 or newer), named freetype.vcxproj, and Visual Studio, called freetype.sln. It compiles the following libraries from the -FreeType 2.6.5 sources:

    +FreeType 2.8 sources:

      -    freetype265.lib    - release build
      -    freetype265d.lib   - debug build
      -    freetype265ST.lib  - release build; single threaded
      -    freetype265STd.lib - debug build;   single threaded
      -    freetype265MT.lib  - release build; multi-threaded
      -    freetype265MTd.lib - debug build;   multi-threaded
      + freetype28.lib - release build + freetype28d.lib - debug build + freetype28ST.lib - release build; single threaded + freetype28STd.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MTd.lib - debug build; multi-threaded

    Both Win32 and x64 builds are supported.

    @@ -39,7 +39,7 @@ around, which specifically deal with this particular problem. directory.

    Customization of the FreeType library is done by editing the -ftoptions.h header file in the top-level devel path. +ftoption.h header file in the top-level devel path. Alternatively, you may copy the file to another directory and change the include directory in freetype.users.props.

    diff --git a/builds/windows/visualc/freetype.dsp b/builds/windows/visualc/freetype.dsp index 1028ad1..fc14b48 100644 --- a/builds/windows/visualc/freetype.dsp +++ b/builds/windows/visualc/freetype.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug" @@ -78,7 +78,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype265_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT_D.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype28_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype265.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype28.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded" @@ -151,8 +151,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype265ST.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28.lib" +# ADD LIB32 /out:"..\..\..\objs\freetype28ST.lib" # SUBTRACT LIB32 /nologo !ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded" @@ -177,8 +177,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28ST_D.lib" !ENDIF diff --git a/builds/windows/visualc/freetype.vcproj b/builds/windows/visualc/freetype.vcproj index b8d68bf..968f2ee 100644 --- a/builds/windows/visualc/freetype.vcproj +++ b/builds/windows/visualc/freetype.vcproj @@ -69,7 +69,7 @@ /> This directory contains project files for Visual C++, named freetype.dsp, and Visual Studio, called freetype.sln. It -compiles the following libraries from the FreeType 2.6.5 sources:

    +compiles the following libraries from the FreeType 2.8 sources:

      -    freetype265.lib     - release build; single threaded
      -    freetype265_D.lib   - debug build;   single threaded
      -    freetype265MT.lib   - release build; multi-threaded
      -    freetype265MT_D.lib - debug build;   multi-threaded
      + freetype28.lib - release build; single threaded + freetype28_D.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MT_D.lib - debug build; multi-threaded

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/builds/windows/visualce/freetype.dsp b/builds/windows/visualce/freetype.dsp index 1028ad1..fc14b48 100644 --- a/builds/windows/visualce/freetype.dsp +++ b/builds/windows/visualce/freetype.dsp @@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug" @@ -78,7 +78,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded" @@ -102,8 +102,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype265_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT_D.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype28_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT_D.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded" @@ -126,8 +126,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"lib\freetype265.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT.lib" +# ADD BASE LIB32 /nologo /out:"lib\freetype28.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT.lib" !ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded" @@ -151,8 +151,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265.lib" -# ADD LIB32 /out:"..\..\..\objs\freetype265ST.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28.lib" +# ADD LIB32 /out:"..\..\..\objs\freetype28ST.lib" # SUBTRACT LIB32 /nologo !ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded" @@ -177,8 +177,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib" -# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265ST_D.lib" +# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib" +# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28ST_D.lib" !ENDIF diff --git a/builds/windows/visualce/freetype.vcproj b/builds/windows/visualce/freetype.vcproj index ff680da..f28b3c1 100644 --- a/builds/windows/visualce/freetype.vcproj +++ b/builds/windows/visualce/freetype.vcproj @@ -87,7 +87,7 @@ /> PPC/SP WM6 (Windows Mobile 6) -It compiles the following libraries from the FreeType 2.6.5 sources:

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

      -    freetype265.lib     - release build; single threaded
      -    freetype265_D.lib   - debug build;   single threaded
      -    freetype265MT.lib   - release build; multi-threaded
      -    freetype265MT_D.lib - debug build;   multi-threaded
      + freetype28.lib - release build; single threaded + freetype28_D.lib - debug build; single threaded + freetype28MT.lib - release build; multi-threaded + freetype28MT_D.lib - debug build; multi-threaded

    Be sure to extract the files with the Windows (CR+LF) line endings. ZIP diff --git a/builds/windows/w32-bcc.mk b/builds/windows/w32-bcc.mk index 2692622..d8d33b1 100644 --- a/builds/windows/w32-bcc.mk +++ b/builds/windows/w32-bcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-bccd.mk b/builds/windows/w32-bccd.mk index 2e52672..ea634e5 100644 --- a/builds/windows/w32-bccd.mk +++ b/builds/windows/w32-bccd.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-dev.mk b/builds/windows/w32-dev.mk index 8ddbfb0..c9b96e9 100644 --- a/builds/windows/w32-dev.mk +++ b/builds/windows/w32-dev.mk @@ -5,7 +5,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-gcc.mk b/builds/windows/w32-gcc.mk index 04097d2..27a0a8f 100644 --- a/builds/windows/w32-gcc.mk +++ b/builds/windows/w32-gcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-icc.mk b/builds/windows/w32-icc.mk index 66a4dcb..c4f3dbf 100644 --- a/builds/windows/w32-icc.mk +++ b/builds/windows/w32-icc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-intl.mk b/builds/windows/w32-intl.mk index 14ee7ed..4442bd3 100644 --- a/builds/windows/w32-intl.mk +++ b/builds/windows/w32-intl.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-lcc.mk b/builds/windows/w32-lcc.mk index 687c87f..0508fbb 100644 --- a/builds/windows/w32-lcc.mk +++ b/builds/windows/w32-lcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-mingw32.mk b/builds/windows/w32-mingw32.mk index 03963b3..ae40823 100644 --- a/builds/windows/w32-mingw32.mk +++ b/builds/windows/w32-mingw32.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-vcc.mk b/builds/windows/w32-vcc.mk index 68370e6..922fc60 100644 --- a/builds/windows/w32-vcc.mk +++ b/builds/windows/w32-vcc.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/w32-wat.mk b/builds/windows/w32-wat.mk index 01d6a9b..4d6138e 100644 --- a/builds/windows/w32-wat.mk +++ b/builds/windows/w32-wat.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/builds/windows/win32-def.mk b/builds/windows/win32-def.mk index 6fd972f..c9bebdb 100644 --- a/builds/windows/win32-def.mk +++ b/builds/windows/win32-def.mk @@ -3,7 +3,7 @@ # -# Copyright 1996-2016 by +# Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/configure b/configure index 9a09a42..68dbd99 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,7 +15,7 @@ rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk -# respect GNUMAKE environment variable for backwards compatibility +# respect GNUMAKE environment variable for backward compatibility if test "x$GNUMAKE" = x; then if test "x$MAKE" = x; then if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then diff --git a/devel/ft2build.h b/devel/ft2build.h index d055f51..c805cf9 100644 --- a/devel/ft2build.h +++ b/devel/ft2build.h @@ -4,7 +4,7 @@ /* */ /* FreeType 2 build and setup macros (development version). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/devel/ftoption.h b/devel/ftoption.h index d20df81..db661e7 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -77,6 +77,36 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ + /* If you enable this configuration option, FreeType recognizes an */ + /* environment variable called `FREETYPE_PROPERTIES', which can be used */ + /* to control the various font drivers and modules. The controllable */ + /* properties are listed in the section `Controlling FreeType Modules' */ + /* in the reference's table of contents; currently there are properties */ + /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ + /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ + /* multiple lines for better readability). */ + /* */ + /* */ + /* ':' */ + /* '=' */ + /* */ + /* ':' */ + /* '=' */ + /* ... */ + /* */ + /* Example: */ + /* */ + /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ + /* cff:no-stem-darkening=1 \ */ + /* autofitter:warping=1 */ + /* */ +#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES + + + /*************************************************************************/ + /* */ /* Uncomment the line below if you want to activate sub-pixel rendering */ /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ /* */ @@ -492,7 +522,21 @@ FT_BEGIN_HEADER /* code will be used. */ /* */ /* Setting this macro is needed for systems that prohibit address */ - /* fixups, such as BREW. */ + /* fixups, such as BREW. [Note that standard compilers like gcc or */ + /* clang handle PIC generation automatically; you don't have to set */ + /* FT_CONFIG_OPTION_PIC, which is only necessary for very special */ + /* compilers.] */ + /* */ + /* Note that FT_CONFIG_OPTION_PIC support is not available for all */ + /* modules (see `modules.cfg' for a complete list). For building with */ + /* FT_CONFIG_OPTION_PIC support, do the following. */ + /* */ + /* 0. Clone the repository. */ + /* 1. Define FT_CONFIG_OPTION_PIC. */ + /* 2. Remove all subdirectories in `src' that don't have */ + /* FT_CONFIG_OPTION_PIC support. */ + /* 3. Comment out the corresponding modules in `modules.cfg'. */ + /* 4. Compile. */ /* */ /* #define FT_CONFIG_OPTION_PIC */ @@ -791,6 +835,33 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ /**** ****/ + /**** P C F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* There are many PCF 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. This option makes the PCF module */ + /* prepend the foundry name (plus a space) to the family name. */ + /* */ + /* We also check whether we have `wide' characters; all put together, we */ + /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ + /* */ + /* If this option is activated, it can be controlled with the */ + /* `no-long-family-names' property of the pcf driver module. */ + /* */ +#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ @@ -842,6 +913,7 @@ FT_BEGIN_HEADER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 #define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY #endif @@ -850,6 +922,7 @@ FT_BEGIN_HEADER #define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL #endif #endif +#endif /* diff --git a/docs/CHANGES b/docs/CHANGES index c1db81b..3ee9510 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,4 +1,252 @@ +CHANGES BETWEEN 2.7.1 and 2.8 + + I. IMPORTANT CHANGES + + - Support for OpenType Variation Fonts is now complete. The last + missing part was handling the `VVAR' and `MVAR' tables, which is + available with this release. + + - A new function `FT_Face_Properties' allows the control of some + module and library properties per font. Currently, the + following properties can be handled: stem darkening, LCD filter + weights, and the random seed for the `random' CFF operator. + + - The PCF change to show more `colourful' family names (introduced + in version 2.7.1) was too radical; it can now be configured with + PCF_CONFIG_OPTION_LONG_FAMILY_NAMES at compile time. If + activated, it can be switched off at run time with the new pcf + property `no-long-family-names'. If the `FREETYPE_PROPERTIES' + environment variable is available, you can say + + FREETYPE_PROPERTIES=pcf:no-long-family-names=1 + + - Support for the following scripts has been added to the + auto-hinter. + + Adlam, Avestan, Bamum, Buhid, Carian, Chakma, Coptic, Cypriot, + Deseret, Glagolitic, Gothic, Kayah, Lisu, N'Ko, Ol Chiki, Old + Turkic, Osage, Osmanya, Saurashtra, Shavian, Sundanese, Tai + Viet, Tifinagh, Unified Canadian Syllabics, Vai + + + II. IMPORTANT BUG FIXES + + - `Light' auto-hinting mode no longer uses TrueType metrics for + TrueType fonts. This bug was introduced in version 2.4.6, + causing horizontal scaling also. Almost all GNU/Linux + distributions (with Fedora as a notable exception) disabled the + corresponding patch for good reasons; chances are thus high that + you won't notice a difference. + + If optical backward compatibility for legacy applications is + necessary, you might enable the AF_CONFIG_OPTION_TT_SIZE_METRICS + configuration option. However, it is strongly recommended to + avoid that, adjusting font sizes instead. + + - If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType + now scales the font linearly again (bug introduced in version + 2.4.6). + + - CVE-2017-8105, CVE-2017-8287: Older FreeType versions have + out-of-bounds writes caused by heap-based buffer overflows + related to Type 1 fonts. + + https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8105 + https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8287 + + + III. MISCELLANEOUS + + - A new function `FT_Set_Default_Properties' has been added to + parse the `FREETYPE_PROPERTIES' environment variable + (previously, it was internal only). `FT_Init_FreeType' always + call this function, but `FT_New_Library' does not (similar to + `FT_Add_Default_Modules'). + + - To be in sync with OpenType version 1.7 and newer, macros + + FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, + FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY, + TT_NAME_ID_PREFERRED_FAMILY + TT_NAME_ID_PREFERRED_SUBFAMILY + + are renamed to + + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY, + TT_NAME_ID_TYPOGRAPHIC_FAMILY + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY + + The old macro names are deprecated (but still available). + + - Support for SFNT `name' tables has been improved. + + . Format 1 `name' tables are now supported. Use new function + `FT_Get_Sfnt_LangTag' to access associated language tags. + + . Language, encoding, and name IDs have been updated to OpenType + version 1.8.1. + + - The new CFF engine now handles the `random' operator. All CFF + opcodes are now supported. + + - The CFF module has a new property `random-seed' to control the + pseudo-random number generation for the `random' operator. + + - The `freetype-config' script is now a wrapper of `pkg-config' if + this program is available in the path. + + - FT_LOAD_TARGET_LCD is now a variant of FT_LOAD_TARGET_LIGHT; + this should provide better rendering results. + + - A mode to display light auto-hinting with sub-pixel positioning + has been added to `ftdiff'. + + +====================================================================== + +CHANGES BETWEEN 2.7 and 2.7.1 + + I. IMPORTANT CHANGES + + - Support for the new CFF2 font format as introduced with OpenType + 1.8 has been contributed by Dave Arnolds from Adobe. + + - Preliminary support for variation fonts as specified in OpenType + 1.8 (in addition to the already existing support for Adobe's MM + and Apple's GX formats). Dave Arnolds contributed handling of + advance width change variation; more will come in the next + version. + + + II. IMPORTANT BUG FIXES + + - Handling of raw CID fonts was partially broken (bug introduced + in 2.6.4). + + - CVE-2016-10328: Older FreeType versions had an out-of-bounds + write caused by a heap-based buffer overflow related to the CFF + fonts. + + http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328 + + + III. MISCELLANEOUS + + - Some limits for TrueType bytecode execution have been tightened + to speed up FreeType's handling of malformed fonts, in + particular to quickly abort endless loops. + + - The number of twilight points can no longer be set to an + arbitrarily large value. + + - The total number of jump opcode instructions (like JMPR) with + negative arguments is dynamically restricted; the same holds + for the total number of iterations in LOOPCALL opcodes. + + The dynamic limits are based on the number of points in a glyph + and the number of CVT entries. Please report if you encounter a + font where the selected values are not adequate. + + - PCF family names are made more `colourful'; they now include the + foundry and information whether they contain wide characters. + For example, you no longer get `Fixed' but rather `Sony Fixed' + or `Misc Fixed Wide'. + + - A new function `FT_Get_Var_Blend_Coordinates' (with its alias + name `FT_Get_MM_Blend_Coordinates') to retrieve the normalized + blend coordinates of the currently selected variation instance + has been added to the Multiple Masters interface. + + - A new function `FT_Get_Var_Design_Coordinates' to retrieve the + design coordinates of the currently selected variation instance + has been added to the Multiple Masters interface. + + - A new load flag `FT_LOAD_BITMAP_METRICS_ONLY' to retrieve bitmap + information without loading the (embedded) bitmap itself. + + - Retrieving advance widths from bitmap strikes (using + `FT_Get_Advance' and `FT_Get_Advances') have been sped up. + + - The usual round of fuzzer fixes to better reject malformed + fonts. + + - The `ftmulti' demo program can now switch engines with key `H'. + + - The `ftstring' demo program can now show some built-in, + non-latin sample strings (to be selected with the TAB key). + + - The `ftview' demo program can now switch between a font's + charmaps using the TAB key. + + +====================================================================== + +CHANGES BETWEEN 2.6.5 and 2.7 + + I. IMPORTANT CHANGES + + - As announced earlier, the 2.7.x series now uses the new subpixel + hinting mode as the default, emulating a modern version of + ClearType. + + This change inevitably leads to different rendering results, and + you might change the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' + configuration option to adapt it to your taste (or use the new + `FREETYPE_PROPERTIES' environment variable). See the + corresponding entry below for version 2.6.4, which gives more + information. + + - A new option `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' has been + introduced. If set (which is the default), an environment + variable `FREETYPE_PROPERTIES' can be used to control driver + properties. Example: + + FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ + cff:no-stem-darkening=1 \ + autofitter:warping=1 + + This allows to select, say, the subpixel hinting mode at runtime + for a given application. See file `ftoption.h' for more. + + + II. IMPORTANT BUG FIXES + + - After loading a named instance of a GX variation font, the + `face_index' value in the returned `FT_Face' structure now + correctly holds the named instance index in the upper 16bits as + documented. + + + III. MISCELLANEOUS + + - A new macro `FT_IS_NAMED_INSTANCE' to test whether a given face + is a named instance. + + - More fixes to GX font handling. + + - Apple's `GETVARIATION' bytecode operator (needed for GX + variation font support) has been implemented. + + - Another round of fuzzer fixes, mainly to reject invalid fonts + faster. + + - Handling of raw CID fonts was broken (bug introduced in version + 2.6.4). + + - The smooth rasterizer has been streamlined to make it faster by + approx. 20%. + + - The `ftgrid' demo program now understands command line option + `-d' to give start-up design coordinates. + + - The `ftdump' demo program has a new command line option `-p' to + dump TrueType bytecode instructions. + + +====================================================================== + CHANGES BETWEEN 2.6.4 and 2.6.5 I. IMPORTANT BUG FIXES @@ -7,7 +255,7 @@ CHANGES BETWEEN 2.6.4 and 2.6.5 2.6.4). - I. IMPORTANT CHANGES + II. IMPORTANT CHANGES - The new subpixel hinting mode is now disabled by default; it will be enabled by default in the forthcoming 2.7.x series. @@ -60,7 +308,7 @@ CHANGES BETWEEN 2.6.3 and 2.6.4 - Type 42 fonts as created by LilyPond are now supported. - - Minor rendering improvments in the auto-hinter. + - Minor rendering improvements in the auto-hinter. - For experimental reasons, the old CFF engine now supports all CFF operators except `random', including the deprecated Multiple @@ -105,7 +353,7 @@ CHANGES BETWEEN 2.6.2 and 2.6.3 to the user. The exception to this is `__FTERRORS_H__', which must be sometimes undefined by the user to get FreeType error strings: Both this form and the new `FTERRORS_H_' macro are - accepted for backwards compatibility. + accepted for backward compatibility. - Minor improvements mainly to the Type 1 driver. @@ -346,17 +594,17 @@ CHANGES BETWEEN 2.5.5 and 2.6 compiler warnings. - Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init', - since this name better reflects its function. For backwards + since this name better reflects its function. For backward compatibility, the old function name is still available. - Function `FT_Get_X11_Font_Format' has been renamed to `FT_Get_Font_Format', since this name better reflects its - function. For backwards compatibility, the old function name is + function. For backward compatibility, the old function name is still available. Additionally, the header file macro for this function has been renamed to `FT_FONT_FORMATS_H' (the old name `FT_XFREE86_H' is - retained for backwards compatibility). + retained for backward compatibility). - Various improvements to the `ftgrid' demo program. @@ -790,7 +1038,7 @@ index ebcf189..3f2ce6b 100644 II. MISCELLANEOUS - The (top-level) `configure' script now respects the MAKE - environment variable to specify a `make' binary. For backwards + environment variable to specify a `make' binary. For backward compatibility, GNUMAKE still overrides MAKE, though. - The `ftview' and `ftdiff' demo programs have been redesigned, @@ -2009,7 +2257,7 @@ CHANGES BETWEEN 2.1.10 and 2.1.9 probably using a different pitch, and to further manipulate it. - A new API `FT_Outline_Embolden' (in FT_OUTLINE_H) gives finer - control how outlines are embolded. + control how outlines are emboldened. - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps also (code contributed by Chia I Wu). Note that this function @@ -2128,7 +2376,7 @@ CHANGES BETWEEN 2.1.8 and 2.1.7 correctly treated as a CID, similar to FreeType's CID driver module. Note that CID CMap support is still missing. - - The FT_FACE_FLAGS_GLYPH_NAMES flag is now set correctly for all + - The FT_FACE_FLAG_GLYPH_NAMES flag is now set correctly for all font formats. - Some subsetted Type 1 fonts weren't parsed correctly. This bug @@ -2419,7 +2667,7 @@ CHANGES BETWEEN 2.1.5 and 2.1.4 - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now deprecated in favour of - FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB} -- those encodings + FT_ENCODING_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} -- those encodings are not specific to Microsoft. @@ -4541,7 +4789,7 @@ Extensions support: ------------------------------------------------------------------------ -Copyright 2000-2016 by +Copyright 2000-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/CUSTOMIZE b/docs/CUSTOMIZE index e8817b7..6d1587e 100644 --- a/docs/CUSTOMIZE +++ b/docs/CUSTOMIZE @@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers ---------------------------------------------------------------------- -Copyright 2003-2016 by +Copyright 2003-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/DEBUG b/docs/DEBUG index 29e1072..e5e9390 100644 --- a/docs/DEBUG +++ b/docs/DEBUG @@ -6,7 +6,7 @@ I. Configuration macros There are several ways to enable debugging features in a FreeType 2 builds. This is controlled through the definition of special macros -located in the file `ftoptions.h'. The macros are: +located in the file `ftoption.h'. The macros are: FT_DEBUG_LEVEL_ERROR @@ -191,7 +191,7 @@ behaviour of FreeType at runtime. ------------------------------------------------------------------------ -Copyright 2002-2016 by +Copyright 2002-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL b/docs/INSTALL index 5155a4b..d6ec0d8 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -16,6 +16,8 @@ I. Normal installation and upgrades GNU Make VERSION 3.80 OR NEWER IS NEEDED! + [For `cmake' see below.] + 2. On VMS with the `mms' build tool @@ -75,7 +77,7 @@ II. Custom builds of the library ---------------------------------------------------------------------- -Copyright 2000-2016 by +Copyright 2000-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.ANY b/docs/INSTALL.ANY index aae2773..30b9578 100644 --- a/docs/INSTALL.ANY +++ b/docs/INSTALL.ANY @@ -143,7 +143,7 @@ II. Support for flat-directory compilation ---------------------------------------------------------------------- -Copyright 2003-2016 by +Copyright 2003-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS index 4285804..1a837ae 100644 --- a/docs/INSTALL.CROSS +++ b/docs/INSTALL.CROSS @@ -163,7 +163,7 @@ procedure. ---------------------------------------------------------------------- -Copyright 2006-2016 by +Copyright 2006-2017 by suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg. diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU index f1eb081..79b53d8 100644 --- a/docs/INSTALL.GNU +++ b/docs/INSTALL.GNU @@ -148,7 +148,7 @@ instructions in the file `INSTALL.UNIX' instead. ---------------------------------------------------------------------- -Copyright 2003-2016 by +Copyright 2003-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.MAC b/docs/INSTALL.MAC index 42bb0d8..2587e24 100644 --- a/docs/INSTALL.MAC +++ b/docs/INSTALL.MAC @@ -1,32 +1,32 @@ -Please follow the instructions in INSTALL.UNIX to install FreeType on +Please follow the instructions in INSTALL.UNIX to install FreeType on Mac OS X. -Currently FreeType2 functions based on some deprecated Carbon APIs -return FT_Err_Unimplemented_Feature always, even if FreeType2 is -configured and built on the system that deprecated Carbon APIs are -available. To enable deprecated FreeType2 functions as far as possible, -replace src/base/ftmac.c by builds/mac/ftmac.c. +Currently FreeType2 functions based on some deprecated Carbon APIs +return `FT_Err_Unimplemented_Feature' always, even if FreeType2 is +configured and built on the system that deprecated Carbon APIs are +available. To enable deprecated FreeType2 functions as far as +possible, replace `src/base/ftmac.c' by `builds/mac/ftmac.c'. -Starting with Mac OS X 10.5, gcc defaults the deployment target -to 10.5. In previous versions of Mac OS X, this defaulted to 10.1. -If you want your built binaries to run only on 10.5, this change -does not concern you. If you want them to also run on older versions -of Mac OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET -environment variable or pass -mmacosx-version-min to gcc. You should -specify the oldest version of Mac OS you want the code to run on. -For example, if you use Bourne shell: +Starting with Mac OS X 10.5, gcc defaults the deployment target to +10.5. In previous versions of Mac OS X, this defaulted to 10.1. If +you want your built binaries to run only on 10.5, this change does not +concern you. If you want them to also run on older versions of Mac +OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET +environment variable or pass `-mmacosx-version-min' to gcc. You +should specify the oldest version of Mac OS you want the code to run +on. For example, if you use Bourne shell: - export MACOSX_DEPLOYMENT_TARGET=10.2 + export MACOSX_DEPLOYMENT_TARGET=10.2 or, if you use C shell: - setenv MACOSX_DEPLOYMENT_TARGET 10.2 + setenv MACOSX_DEPLOYMENT_TARGET 10.2 -Alternatively, you could pass "-mmacosx-version-min=10.2" to gcc. +Alternatively, you could pass `-mmacosx-version-min=10.2' to gcc. -Here the number 10.2 is the lowest version that the built binaries -can run on. In the cases in above, the built binaries will run on -Mac OS X 10.2 and later, but _not_ earlier. If you want to run on -earlier, you have to set lower version, e.g. 10.0. +Here the number 10.2 is the lowest version that the built binaries can +run on. In the above cases, the built binaries will run on Mac OS X +10.2 and later, but _not_ earlier. If you want to run on earlier, you +have to set lower version, e.g., 10.0. For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README. diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX index b043883..8b620da 100644 --- a/docs/INSTALL.UNIX +++ b/docs/INSTALL.UNIX @@ -28,6 +28,9 @@ or MSys on Win32: As a special exception, 'makepp' can also be used to build FreeType 2. See the file docs/MAKEPP for details. + For builds with `cmake' please check file `CMakeLists.txt'; this + is a contributed file not directly supported by the FreeType team. + 2. Regenerate the configure script if needed -------------------------------------------- @@ -102,7 +105,7 @@ or MSys on Win32: ---------------------------------------------------------------------- -Copyright 2003-2016 by +Copyright 2003-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/INSTALL.VMS b/docs/INSTALL.VMS index ef371d7..7a5174d 100644 --- a/docs/INSTALL.VMS +++ b/docs/INSTALL.VMS @@ -49,7 +49,7 @@ V7.2-1. ------------------------------------------------------------------------ -Copyright 2000-2016 by +Copyright 2000-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/TODO b/docs/TODO index 4aa3f09..c4304b3 100644 --- a/docs/TODO +++ b/docs/TODO @@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType. ------------------------------------------------------------------------ -Copyright 2001-2016 by +Copyright 2001-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/VERSIONS.TXT b/docs/VERSIONS.TXT index c5a57e7..e116d34 100644 --- a/docs/VERSIONS.TXT +++ b/docs/VERSIONS.TXT @@ -52,6 +52,9 @@ on _most_ systems, but not all of them: release libtool so ------------------------------- + 2.8.0 20.0.14 6.14.0 + 2.7.1 19.0.13 6.13.0 + 2.7.0 18.6.12 6.12.6 2.6.5 18.5.12 6.12.5 2.6.4 18.4.12 6.12.4 2.6.3 18.3.12 6.12.3 @@ -108,7 +111,7 @@ other release numbers. ------------------------------------------------------------------------ -Copyright 2002-2016 by +Copyright 2002-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/formats.txt b/docs/formats.txt index 4966bd7..1c494f0 100644 --- a/docs/formats.txt +++ b/docs/formats.txt @@ -1,141 +1,167 @@ -This file contains a list of various font formats. It gives the +This file contains a list of various font formats. It gives the reference document and whether it is supported in FreeType 2. - - file type: - The only special case is `MAC'; on older Mac OS versions, a `file' - is stored as a data and a resource fork, this is, within two - separate data chunks. In all other cases, the font data is stored - in a single file. - - wrapper format: - The format used to represent the font data. In the table below it - is used only if the font format differs. Possible values are `SFNT' - (binary), `PS' (a text header, followed by binary or text data), - `LZW' (compressed with either `gzip' or `compress'), and - `BZ2' (compressed with `bzip2`). - - font format: - How the font is to be accessed, possibly after converting the file - type and wrapper format into a generic form. Bitmap formats are - `BDF', `PCF', and one form of `WINFNT'; all others are vector - formats. - - font type: - Sub-formats of the font format. `SBIT' and `MACSBIT' are bitmap - formats, `MM' and `VAR' support optical axes. - - glyph access: - If not specified, the glyph access is `standard' to the font format. - Values are `CID' for CID-keyed fonts, `SYNTHETIC' for fonts which - are modified versions of other fonts by means of a transformation - matrix, `COLLECTION' for collecting multiple fonts (sharing most of - the data) into a single file, and `TYPE_0' for PS fonts which are to - be accessed in a tree-like structure. - - FreeType driver: - The module in the FreeType library which handles the specific font - format. A missing entry means that FreeType doesn't support the +Table fields +------------ + + wrapper format + The format used to represent the font data. In the table below it + is used only if the font format differs. Possible values are + + SFNT binary + PFB binary + PS a text header, followed by binary or text data + LZW compressed with either `gzip' or `compress' + BZ2 compressed with `bzip2'. + + font format + How the font is to be accessed, possibly after converting the file + type and wrapper format into a generic form. Bitmap formats are + `BDF', `PCF', and one form of `WINFNT'; all others are vector + formats. `PS' indicates third-order, `TT' second-order Bézier + curves. + + font type + Sub-formats of the font format. `SBIT' and `MACSBIT' are bitmap + formats, `MM' and `VAR' support optical axes. `CFF2' supports + optical axes also. + + glyph access + If not specified, the glyph access is `standard' to the font + format. Values are `CID' for CID-keyed fonts, `SYNTHETIC' for + fonts that are modified versions of other fonts by means of a + transformation matrix, and `TYPE_0' for PS fonts which are to be + accessed in a tree-like structure. + + FreeType driver + The module in the FreeType library which handles the specific font + format. A missing entry means that FreeType doesn't support the font format (yet). -Please send additions and/or corrections to wl@gnu.org or to the -FreeType developer's list at freetype-devel@nongnu.org (for subscribers -only). If you can provide a font example for a format which isn't -supported yet please send a mail too. - - -file wrapper font font glyph FreeType reference -type format format type access driver documents ----------------------------------------------------------------------------- - ---- --- BDF --- --- bdf 5005.BDF_Spec.pdf, X11 - - ---- SFNT PS TYPE_1 --- type1 Type 1 GX Font Format - (for the Mac) [3] -MAC SFNT PS TYPE_1 --- type1 Type 1 GX Font Format - (for the Mac) [3] ---- SFNT PS TYPE_1 CID cid 5180.sfnt.pdf (for the Mac) - [3] -MAC SFNT PS TYPE_1 CID cid 5180.sfnt.pdf (for the Mac) - [3] ---- SFNT PS CFF --- cff OT spec, 5176.CFF.pdf - (`OTTO' format) -MAC SFNT PS CFF --- cff OT spec, 5176.CFF.pdf - (`OTTO' format) ---- SFNT PS CFF CID cff OT spec, 5176.CFF.pdf -MAC SFNT PS CFF CID cff OT spec, 5176.CFF.pdf ---- SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf -MAC SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf ---- SFNT TT SBIT --- sfnt XFree86 (bitmaps only; - with `head' table) ---- SFNT TT MACSBIT --- sfnt OT spec (for the Mac; - bitmaps only; `bhed' table) -MAC SFNT TT MACSBIT --- sfnt OT spec (for the Mac; - bitmaps only; `bhed' table) ---- SFNT TT --- --- truetype OT spec (`normal' TT font) -MAC SFNT TT --- --- truetype OT spec (`normal' TT font) -MAC SFNT TT VAR --- truetype GX spec (`?var' tables) ---- SFNT TT --- COLLECTION truetype OT spec (this can't be CFF) -MAC SFNT TT --- COLLECTION truetype OT spec (this can't be CFF) - - ---- --- PS TYPE_1 --- type1 T1_SPEC.pdf - (`normal' Type 1 font) -MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf - (`normal' Type 1 font) ---- --- PS TYPE_1 CID cid PLRM.pdf (CID Font Type 0; - Type 9 font) ---- --- PS MM --- type1 5015.Type1_Supp.pdf - (Multiple Masters) ---- --- PS CFF --- cff 5176.CFF.pdf (`pure' CFF) ---- --- PS CFF CID cff 5176.CFF.pdf (`pure' CFF) ---- --- PS CFF SYNTHETIC --- 5176.CFF.pdf (`pure' CFF) ---- PS PS CFF --- --- PLRM.pdf (Type 2) [1] ---- PS PS CFF CID --- PLRM.pdf (Type 2) [1] ---- PS PS CFF SYNTHETIC --- PLRM.pdf (Type 2) [1] ---- --- PS --- TYPE_0 --- PLRM.pdf ---- --- PS TYPE_3 --- --- PLRM.pdf (never supported) ---- --- PS TYPE_3 CID --- PLRM.pdf (CID Font Type 1; - Type 10 font; never supported) ---- PS PS TYPE_14 --- --- PLRM.pdf (Chameleon font; - Type 14 font; never supported?) ---- --- PS TYPE_32 CID --- PLRM.pdf (CID Font Type 4; - Type 32 font; never supported?) ---- PS TT --- --- type42 5012.Type42_Spec.pdf - (Type 42 font) ---- PS TT --- CID --- PLRM.pdf (CID Font Type 2; - Type 11 font) - - ---- ? ? CEF ? cff ? - - ---- --- PCF --- --- pcf X11 [4] ---- LZW PCF --- --- pcf X11 [4] ---- BZ2 PCF --- --- pcf X11 [4] - - ---- --- PFR PFR0 --- pfr [2] ---- --- PFR PFR1 --- --- (undocumented, proprietary; - probably never supported) - - ---- --- WINFNT --- --- winfonts Windows developer's notes [5] ---- --- WINFNT VECTOR --- --- Windows developer's notes [5] - - -[1] Support should be rather simple since this is identical to `CFF' but - in a PS wrapper. +Notes +----- + + The SFNT container format also provides `collections' (usually + having the file extension `.ttc' or `.otc'). A collection contains + multiple font faces that share some tables to avoid redundancy, thus + reducing the file size. In FreeType, elements of a collection can + be accessed with a proper face index. + + Both the GX and the OpenType 1.8 variation fonts provide `named + instances'. FreeType maps them to face indices (they can also be + accessed with the standard MM interface). + + Other font formats (not using the SFNT wrapper) also provide + multiple faces within one file; they are marked with an asterisk + (`*') in the table below. + + FreeType can be configured to support Mac files (on older Mac OS + versions, a `file' is stored as a data and a resource fork, this is, + within two separate data chunks). If a file can't be opened as a + font, FreeType then checks whether it is a resource fork, trying to + extract the contained font data from either a `POST' or `sfnt' + resource. + + +Please send additions and/or corrections to wl@gnu.org or to the +FreeType developer's list at freetype-devel@nongnu.org (for +subscribers only). If you can provide a font example for a format +which isn't supported yet please send a mail too. + + + wrapper font font glyph FreeType reference + format format type access driver documents + ----------------------------------------------------------------------------- + + --- BDF --- --- bdf 5005.BDF_Spec.pdf, X11 + + + SFNT PS TYPE_1 --- type1 Type 1 GX Font Format + (for the Mac) [3] + SFNT PS TYPE_1 CID cid 5180.sfnt.pdf (for the Mac) + [3] + SFNT PS CFF --- cff OT spec, 5176.CFF.pdf + (`OTTO' format) + SFNT PS CFF CID cff OT spec, 5176.CFF.pdf + SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf + SFNT PS CFF2 --- cff OT spec 1.8 + + SFNT TT SBIT --- sfnt XFree86 (bitmaps only; + with `head' table) + SFNT TT MACSBIT --- sfnt OT spec (for the Mac; + bitmaps only; `bhed' table) + SFNT TT --- --- truetype OT spec (`normal' TT font) + SFNT TT VAR --- truetype GX spec (`?var' tables) + SFNT TT VAR --- truetype OT spec 1.8 + (`?var' + `?VAR' tables) + + + --- PS TYPE_1 --- type1 T1_SPEC.pdf + (PFA, Type 1 font resource) + PFB PS TYPE_1 --- type1 T1_SPEC.pdf, + 5040.Download_Fonts.pdf + (`normal' Type 1 font) + --- PS TYPE_1 CID cid PLRM.pdf (CID Font Type 0; + Type 9 font) + --- PS MM --- type1 5015.Type1_Supp.pdf + (Multiple Masters) + --- PS CFF --- cff 5176.CFF.pdf (`pure' CFF) + --- PS* CFF CID cff 5176.CFF.pdf (`pure' CFF) + --- PS CFF SYNTHETIC --- 5176.CFF.pdf (`pure' CFF) + --- PS CFF/MM --- cff old 5167.CFF.pdf (`pure' CFF) + [3] + --- PS* CFF/MM CID cff old 5167.CFF.pdf (`pure' CFF) + [3] + --- PS CFF/MM SYNTHETIC --- old 5167.CFF.pdf (`pure' CFF) + [3] + PS PS CFF --- --- PLRM.pdf (Type 2) [1] + PS PS* CFF CID --- PLRM.pdf (Type 2) [1] + PS PS CFF SYNTHETIC --- PLRM.pdf (Type 2) [1] + PS PS CFF/MM --- --- PLRM.pdf (Type 2) [1] + PS PS* CFF/MM CID --- PLRM.pdf (Type 2) [1] + PS PS CFF/MM SYNTHETIC --- PLRM.pdf (Type 2) [1] + --- PS --- TYPE_0 --- PLRM.pdf + --- PS TYPE_3 --- --- PLRM.pdf (never supported) + --- PS TYPE_3 CID --- PLRM.pdf (CID Font Type 1; + Type 10 font; never supported) + PS PS TYPE_14 --- --- PLRM.pdf (Chameleon font; + Type 14 font; never supported?) + --- PS TYPE_32 CID --- PLRM.pdf (CID Font Type 4; + Type 32 font; never supported?) + PS TT --- --- type42 5012.Type42_Spec.pdf + (Type 42 font) + PS TT --- CID --- PLRM.pdf (CID Font Type 2; + Type 11 font) + + + ? ? CEF ? cff ? + + + --- PCF --- --- pcf X11 [4] + LZW PCF --- --- pcf X11 [4] + BZ2 PCF --- --- pcf X11 [4] + + + --- PFR* PFR0 --- pfr [2] + --- PFR PFR1 --- --- (undocumented, proprietary; + probably never supported) + + + --- WINFNT* --- --- winfonts Windows developer's notes [5] + --- WINFNT VECTOR --- --- Windows developer's notes [5] + + +[1] Support should be rather simple since this is identical to `CFF' + but in a PS wrapper. [2] Official PFR specification: http://www.bitstream.com/categories/developer/truedoc/pfrspec.html http://www.bitstream.com/categories/developer/truedoc/pfrspec1.2.pdf - The syntax of the auxiliary data is not defined there, but is - partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1) + The syntax of the auxiliary data is not defined there, but is + partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1) section 7.4. http://www.etsi.org/ @@ -143,7 +169,8 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf (free registration required). -[3] Support is rudimentary currently; some tables are not loaded yet. +[3] Support is rudimentary currently; some tables or data are not + loaded yet. [4] See @@ -151,13 +178,13 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf Elias Israel, Erik Fortune, Digital Press, 1992 ISBN 1-55558-096-3 - for a specification given in Appendix D on pgs. 436-450. However, - this information might be out of date; unfortunately, there is no - PCF specification available online, and this book is out of print. - George Williams deduced the font format from the X11 sources and + for a specification given in Appendix D on pgs. 436-450. However, + this information might be out of date; unfortunately, there is no + PCF specification available online, and this book is out of print. + George Williams deduced the font format from the X11 sources and documented it for his FontForge font editor: - http://fontforge.sourceforge.net/pcf-format.html + http://fontforge.github.io/pcf-format.html [5] This is from MS Windows 3; see Microsoft's Knowledge Base article at @@ -165,7 +192,7 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf ------------------------------------------------------------------------ -Copyright 2004-2016 by +Copyright 2004-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, @@ -176,3 +203,7 @@ accept it fully. --- end of formats.txt --- + +Local Variables: +coding: utf-8 +End: diff --git a/docs/freetype-config.1 b/docs/freetype-config.1 index 63e5aed..eaaa1b9 100644 --- a/docs/freetype-config.1 +++ b/docs/freetype-config.1 @@ -1,4 +1,4 @@ -.TH FREETYPE-CONFIG 1 "July 2016" "FreeType 2.6.5" +.TH FREETYPE-CONFIG 1 "May 2017" "FreeType 2.8" . . .SH NAME @@ -23,6 +23,14 @@ FreeType library version installed on the system, such as the installation (directory path) prefix or the FreeType version number. . .PP +If +.BR pkg-config (1) +is found in the path, +.B freetype-config +acts as a wrapper for +.BR pkg-config . +. +.PP This program is part of the FreeType package. . . @@ -50,7 +58,8 @@ Return the executable prefix value of the installed FreeType library . .TP .B \-\-ftversion -Return the FreeType version number. +Return the FreeType version number, directly derived from file +`freetype.h'. . .TP .B \-\-version @@ -72,32 +81,61 @@ Return compiler flags for compiling against the installed FreeType library. .B \-\-static Make command line options display flags for static linking. . +.TP +.B \-\-help +Show help and exit. +. . .SS Path override options . These affect any selected output option, except the libtool version -returned by `--version'. +returned by +.BR \-\-version . . .TP .BI \-\-prefix= PREFIX -Override `--prefix' value with +Override +.B \-\-prefix +value with .IR PREFIX . . +This also sets +.BI \-\-exec-prefix= PREFIX +if option +.B \-\-exec-prefix +is not explicitly given. +. .TP .BI \-\-exec-prefix= EPREFIX -Override `--exec-prefix' value with +Override +.B \-\-exec-prefix +value with .IR EPREFIX . . . .SH BUGS In case the libraries FreeType links to are located in non-standard -directories, the output from option +directories, and +.BR pkg-config (1) +is not available, the output from option .B \-\-libs might be incomplete. +. It is thus recommended to use the .BR pkg-config (1) interface instead, which is able to correctly resolve all dependencies. . +.PP +Setting +.B \-\-exec-prefix +(either explicitly or implicitly) might return incorrect results if +combined with option +.BR \-\-static . +. +The same problem can occur if you set the +.B SYSROOT +environment variable. +. . .SH AUTHOR . diff --git a/docs/raster.txt b/docs/raster.txt index 5e8df51..bd3fd00 100644 --- a/docs/raster.txt +++ b/docs/raster.txt @@ -618,7 +618,7 @@ II. Rendering Technology ------------------------------------------------------------------------ -Copyright 2003-2016 by +Copyright 2003-2017 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/docs/reference/ft2-auto_hinter.html b/docs/reference/ft2-auto_hinter.html index 3a78ad9..f1770f8 100644 --- a/docs/reference/ft2-auto_hinter.html +++ b/docs/reference/ft2-auto_hinter.html @@ -3,7 +3,7 @@ -FreeType-2.6.5 API Reference +FreeType-2.8 API Reference + + + + +

    FreeType-2.8 API Reference

    + +

    The PCF driver

    +

    Synopsis

    + + +
    no-long-family-names
    + + +

    While FreeType's PCF driver doesn't expose API functions by itself, it is possible to control its behaviour with FT_Property_Set and FT_Property_Get. Right now, there is a single property ‘no-long-family-names’ available if FreeType is compiled with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.

    +

    The PCF driver's module name is ‘pcf’.

    + +
    +

    no-long-family-names

    +

    Defined in FT_PCF_DRIVER_H (freetype/ftpcfdrv.h).

    +
    +FT_END_HEADER
    +
    +
    +#endif /* FTPCFDRV_H_ */
    +
    +
    +/* END */
    +
    + +

    If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling FreeType, the PCF driver constructs long family names.

    +

    There are many PCF 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. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are ‘wide’ characters; all put together, family names like ‘Sony Fixed’ or ‘Misc Fixed Wide’ are constructed.

    +

    If ‘no-long-family-names’ is set, this feature gets switched off.

    +
    +  FT_Library  library;
    +  FT_Bool     no_long_family_names = TRUE;
    +
    +
    +  FT_Init_FreeType( &library );
    +
    +  FT_Property_Set( library, "pcf",
    +                            "no-long-family-names",
    +                            &no_long_family_names );
    +
    + +

    note

    +

    This property can be used with FT_Property_Get also.

    +

    This property can be set via the ‘FREETYPE_PROPERTIES’ environment variable (using values 1 and 0 for ‘on’ and ‘off’, respectively).

    + +
    +
    + + + diff --git a/docs/reference/ft2-pfr_fonts.html b/docs/reference/ft2-pfr_fonts.html index 26aff21..36f2f8e 100644 --- a/docs/reference/ft2-pfr_fonts.html +++ b/docs/reference/ft2-pfr_fonts.html @@ -3,7 +3,7 @@ -FreeType-2.6.5 API Reference +FreeType-2.8 API Reference