diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-06-20 01:56:21 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-06-20 01:56:21 +0000 |
commit | bbda1cc717797ba68eb2eda0dd18205ea4413009 (patch) | |
tree | 2ab54b718e2475169b65b58818934da04c602e36 /Build/source/libs/freetype2/freetype-src/src/tools | |
parent | ff31ae48b941d2911b213d6fcf6043bfecf803ef (diff) |
freetype2 2.8.0
git-svn-id: svn://tug.org/texlive/trunk@44650 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/tools')
14 files changed, 84 insertions, 41 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/afblue.pl b/Build/source/libs/freetype2/freetype-src/src/tools/afblue.pl index 39fe5c584a8..027b6304136 100755 --- a/Build/source/libs/freetype2/freetype-src/src/tools/afblue.pl +++ b/Build/source/libs/freetype2/freetype-src/src/tools/afblue.pl @@ -5,7 +5,7 @@ # # Process a blue zone character data file. # -# 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, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py index 438345c4119..283d8151887 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py @@ -3,7 +3,7 @@ # # Parse comment blocks to build content blocks (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py index aa889966469..4e25ff0f87b 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py @@ -4,7 +4,7 @@ # # Convert source code markup to HTML documentation. # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/formatter.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/formatter.py index c47589048bf..2745754f389 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/formatter.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/formatter.py @@ -3,7 +3,7 @@ # # Convert parsed content blocks to a structured document (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py index 3d30c727725..06407e16436 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py @@ -3,7 +3,7 @@ # # Convert source code comments to multi-line blocks (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py index 9b28780e960..012b55e49a7 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py @@ -3,7 +3,7 @@ # # A sub-class container of the `Formatter' class to produce HTML. # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/utils.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/utils.py index cbba9b874c6..ba5b2e7596e 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/utils.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/utils.py @@ -3,7 +3,7 @@ # # Auxiliary functions for the `docmaker' tool (library file). # -# Copyright 2002-2016 by +# Copyright 2002-2017 by # David Turner. # # This file is part of the FreeType project, and may only be used, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/README b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/README index c16b7e94eef..53f90717787 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/README +++ b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/README @@ -64,7 +64,7 @@ a convenience `main' function. Link it with `ftfuzzer.cc', ---------------------------------------------------------------------- -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, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftfuzzer.cc b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftfuzzer.cc index 31834a5f926..4da0c2bf255 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftfuzzer.cc +++ b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftfuzzer.cc @@ -2,7 +2,7 @@ // // A fuzzing function to test FreeType with libFuzzer. // -// 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, @@ -76,7 +76,7 @@ FT_Global global_ft; - // We want to select n values at random (without repitition), + // We want to select n values at random (without repetition), // with 0 < n <= N. The algorithm is taken from TAoCP, Vol. 2 // (Algorithm S, selection sampling technique) struct Random @@ -270,11 +270,20 @@ long num_faces = face->num_faces; FT_Done_Face( face ); - // loop over all faces - for ( long face_index = 0; - face_index < num_faces; - face_index++ ) + // loop over up to 20 arbitrarily selected faces + // from index range [0;num-faces-1] + long max_face_cnt = num_faces < 20 + ? num_faces + : 20; + + Random faces_pool( (int)max_face_cnt, (int)num_faces ); + + for ( long face_cnt = 0; + face_cnt < max_face_cnt; + face_cnt++ ) { + long face_index = faces_pool.get() - 1; + // get number of instances if ( FT_New_Memory_Face( library, files[0].data(), @@ -285,17 +294,41 @@ long num_instances = face->style_flags >> 16; FT_Done_Face( face ); - // load face with and without instances - for ( long instance_index = 0; - instance_index < num_instances + 1; - instance_index++ ) + // loop over the face without instance (index 0) + // and up to 20 arbitrarily selected instances + // from index range [1;num_instances] + long max_instance_cnt = num_instances < 20 + ? num_instances + : 20; + + Random instances_pool( (int)max_instance_cnt, (int)num_instances ); + + for ( long instance_cnt = 0; + instance_cnt <= max_instance_cnt; + instance_cnt++ ) { - if ( FT_New_Memory_Face( library, - files[0].data(), - (FT_Long)files[0].size(), - ( instance_index << 16 ) + face_index, - &face ) ) - continue; + long instance_index = 0; + + if ( !instance_cnt ) + { + if ( FT_New_Memory_Face( library, + files[0].data(), + (FT_Long)files[0].size(), + face_index, + &face ) ) + continue; + } + else + { + instance_index = instances_pool.get(); + + if ( FT_New_Memory_Face( library, + files[0].data(), + (FT_Long)files[0].size(), + ( instance_index << 16 ) + face_index, + &face ) ) + continue; + } // if we have more than a single input file coming from an archive, // attach them (starting with the second file) using the order given @@ -314,19 +347,24 @@ FT_Attach_Stream( face, &open_args ); } - // loop over an arbitrary size for outlines (index 0) - // and up to ten arbitrarily selected bitmap stroke sizes (index 1-10) - int max_idx = face->num_fixed_sizes < 10 - ? face->num_fixed_sizes - : 10; + // loop over an arbitrary size for outlines + // and up to ten arbitrarily selected bitmap strike sizes + // from the range [0;num_fixed_sizes - 1] + int max_size_cnt = face->num_fixed_sizes < 10 + ? face->num_fixed_sizes + : 10; - Random pool( max_idx, face->num_fixed_sizes ); + Random sizes_pool( max_size_cnt, face->num_fixed_sizes ); - for ( int idx = 0; idx <= max_idx; idx++ ) + for ( int size_cnt = 0; + size_cnt <= max_size_cnt; + size_cnt++ ) { FT_Int32 flags = load_flags; - if ( !idx ) + int size_index = 0; + + if ( !size_cnt ) { // set up 20pt at 72dpi as an arbitrary size if ( FT_Set_Char_Size( face, 20 * 64, 20 * 64, 72, 72 ) ) @@ -335,17 +373,20 @@ } else { - // bitmap strokes are not active for glyph variations + // bitmap strikes are not active for font variations if ( instance_index ) continue; - if ( FT_Select_Size( face, pool.get() - 1 ) ) + size_index = sizes_pool.get() - 1; + + if ( FT_Select_Size( face, size_index ) ) continue; flags |= FT_LOAD_COLOR; } // test MM interface only for a face without a selected instance - if ( instance_index == 0 ) + // and without a selected bitmap strike + if ( !instance_index && !size_cnt ) setIntermediateAxis( face ); // loop over all glyphs diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftmutator.cc b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftmutator.cc index 4818450aac0..22aa5a77730 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftmutator.cc +++ b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/ftmutator.cc @@ -2,7 +2,7 @@ // // A custom fuzzer mutator to test for FreeType with libFuzzer. // -// 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, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/rasterfuzzer.cc b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/rasterfuzzer.cc index 05187b0be80..ae9b1a56d45 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/rasterfuzzer.cc +++ b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/rasterfuzzer.cc @@ -2,7 +2,7 @@ // // A fuzzing function to test FreeType's rasterizers with libFuzzer. // -// Copyright 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, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/runinput.cc b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/runinput.cc index d5f9f1587db..15261207e8f 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/runinput.cc +++ b/Build/source/libs/freetype2/freetype-src/src/tools/ftfuzzer/runinput.cc @@ -2,7 +2,7 @@ // // A `main' function for fuzzers like `ftfuzzer.cc'. // -// 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, diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/glnames.py b/Build/source/libs/freetype2/freetype-src/src/tools/glnames.py index 3569f06ee91..9ed158862f2 100755 --- a/Build/source/libs/freetype2/freetype-src/src/tools/glnames.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/glnames.py @@ -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, @@ -5318,7 +5318,7 @@ def main(): write( "/* */\n" ) write( "/* PostScript glyph names. */\n" ) write( "/* */\n" ) - write( "/* Copyright 2005-2016 by */\n" ) + write( "/* Copyright 2005-2017 by */\n" ) write( "/* David Turner, Robert Wilhelm, and Werner Lemberg. */\n" ) write( "/* */\n" ) write( "/* This file is part of the FreeType project, and may only be used, */\n" ) @@ -5378,6 +5378,7 @@ def main(): # write the lookup routine now # write( """\ +#ifdef DEFINE_PS_TABLES /* * This function searches the compressed table efficiently. */ @@ -5472,6 +5473,7 @@ def main(): NotFound: return 0; } +#endif /* DEFINE_PS_TABLES */ #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */ diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/update-copyright-year b/Build/source/libs/freetype2/freetype-src/src/tools/update-copyright-year index f4a323b7c89..4b04bfc995f 100755 --- a/Build/source/libs/freetype2/freetype-src/src/tools/update-copyright-year +++ b/Build/source/libs/freetype2/freetype-src/src/tools/update-copyright-year @@ -2,7 +2,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -i "$0" ${1+"$@"}' & eval 'exec perl -wS -i "$0" $argv:q' if 0; -# Copyright 2015-2016 by +# Copyright 2015-2017 by # Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, |