diff --git a/ChangeLog b/ChangeLog index 2931c1758..da996a31d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,38 +1,55 @@ 2007-01-04 David Turner - * docs/INSTALL.UNIX: simplified some parts, add reference to - autogen.sh and pointer to README.CVS + * docs/INSTALL.UNIX: Simplify some parts, add reference to + autogen.sh and pointer to README.CVS. - * README.CVS: add common problem description and solution - when running autogen.sh + * README.CVS: Add common problem description and solution + when running autogen.sh. - * docs/INSTALL: add reference to MacOS X + * docs/INSTALL: Add reference to MacOS X. - * docs/MAKEPP, docs/INSTALL.MAC: add new documentation files + * docs/MAKEPP, docs/INSTALL.MAC: New documentation files. - * docs/TODO: remove obsolete items + * docs/TODO: Remove obsolete items. - * src/raster/ftraster.c: removing dynamically generated "count_table", - and replace it with a constant array of bytes + * src/raster/ftraster.c: (TRaster_Instance): Replace it with... + (TWorker): This. + Remove `count_table' and `memory'. + Make `grays' a pointer. + (TRaster): New structure. + (count_table): New static array. + (RAS_ARGS, RAS_ARG, RAS_VARS, RAS_VAR, FT_UNUSED_RASTER, cur_ras, + Vertical_Gray_Sweep_Step, ft_black_new, ft_black_done, + ft_black_set_mode, ft_black_render): Updated. + (ft_black_init): Don't initialize `count_table'. + (ft_black_reset): Use the render pool. This saves about 6KB of + heap space for each FT_Library instance. - * src/raster/ftraster.c, src/smooth/ftgrays.c: small optimization, the - rasterizers now use the render pool to store their state during - scanline conversion. this saves about 6 KB of heap space for each - FT_Library instance + * src/smooth/ftgrays.c (TRaster): Replaced with... + (TWorker): This. + Remove `memory'. + (TRaster): New structure. + + (RAS_ARG_, RAS_ARG, RAS_VAR_, RAS_VAR, ras, gray_render_line, + gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to, + gray_render_span, gray_raster_render): Updated. + (gray_raster_reset): Use the render pool. This saves about 6KB of + heap space for each FT_Library instance. * src/sfnt/sfobjs.c, src/sfnt/ttkern.c, src/sfnt/ttkern.h, src/sfnt/ttmtx.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h, - src/truetype/ttpload.c, include/freetype/config/ftoption.h: - remove FT_OPTIMIZE_MEMORY macro, since the optimization is - no longer experimental + src/truetype/ttpload.c, include/freetype/config/ftoption.h: Remove + FT_OPTIMIZE_MEMORY macro (and code for !FT_OPTIMIZE_MEMORY) since + the optimization is no longer experimental. - * src/pshinter/pshalgo.c: remove a stupid typo that results in no - hinting and a memory leak with some large Asian CFF fonts + * src/pshinter/pshalgo.c (psh_glyph_interpolate_normal_points): + Remove a typo that results in no hinting and a memory leak with some + large Asian CFF fonts. - * src/base/ftobjs.c (FT_Done_Library): remove a subtle memory leak - which happens when FT_Done_Library is called with opened CFF_Faces in - it. We need to close all faces before destroying the modules, or else - some bad things (memory leaks) may happen. + * src/base/ftobjs.c (FT_Done_Library): Remove a subtle memory leak + which happens when FT_Done_Library is called with still open + CFF_Faces in it. We need to close all faces before destroying the + modules, or else some bad things (memory leaks) may happen. 2007-01-02 Werner Lemberg @@ -3973,7 +3990,7 @@ ---------------------------------------------------------------------------- -Copyright 2005, 2006 by +Copyright 2005, 2006, 2007 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.CVS b/README.CVS index 0359b9643..63afddfbb 100644 --- a/README.CVS +++ b/README.CVS @@ -9,12 +9,12 @@ which in turn depends on the following packages: libtool (1.5.22) autoconf (2.59c) -The versions given in parentheses are known to work. Note that -autogen.sh also sets up proper file permissions for the configure and -auxiliary scripts. +The versions given in parentheses are known to work. Newer versions +should work too, of course. Note that autogen.sh also sets up proper +file permissions for the `configure' and auxiliary scripts. -Note that a very common problem is that the script complains that -the aclocal program doesn't accept a --force option: +A very common problem is that this script complains that the `aclocal' +program doesn't accept a `--force' option: generating `configure.ac' running `aclocal -I . --force' @@ -22,8 +22,8 @@ the aclocal program doesn't accept a --force option: Try `aclocal --help' for more information. error while running `aclocal -I . --force' -What this really means that your version of Automake is too old, -please update it before trying to build FreeType. +This means that your version of the automake package is too old. +Please update it before trying to build FreeType. For static builds which don't use platform specific optimizations, no @@ -35,4 +35,16 @@ configure script is necessary at all; saying should work on all platforms which have GNU make (or makepp). +---------------------------------------------------------------------- + +Copyright 2005, 2006, 2007 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. + + --- end of README.CVS --- diff --git a/devel/ftoption.h b/devel/ftoption.h index aa92659f3..0add36a77 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -595,7 +595,6 @@ FT_BEGIN_HEADER /* */ - /* * Define this variable if you want to keep the layout of internal * structures that was used prior to FreeType 2.2. This also compiles in diff --git a/docs/INSTALL b/docs/INSTALL index 572adc8e9..78f04c94f 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -13,7 +13,7 @@ I. Normal installation and upgrades need it, read the file `TRUETYPE' for information. - 2. Unix Systems (including Mac OS X, as well as Cygwin or MSys on Windows) + 2. Unix Systems (including Mac OS X, Cygwin, and MSys on Windows) Please read *both* `UPGRADE.UNIX' and `INSTALL.UNIX' to install or upgrade FreeType 2 on a Unix system. Note that you *need* GNU @@ -76,7 +76,7 @@ II. Custom builds of the library ---------------------------------------------------------------------- -Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 by +Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 d466fc3f1..df2b4fc20 100644 --- a/docs/INSTALL.MAC +++ b/docs/INSTALL.MAC @@ -1 +1,2 @@ -Follow the instructions in INSTALL.UNIX to install FreeType on Mac OS X +Please follow the instructions in INSTALL.UNIX to install FreeType on +Mac OS X. diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX index 6a5aa316b..3ddfb8e4b 100644 --- a/docs/INSTALL.UNIX +++ b/docs/INSTALL.UNIX @@ -19,32 +19,32 @@ or MSys on Win32: GNU Make Copyright (C) Free Software Foundation Inc. - Note that version 3.78.1 or higher is *required*, or the build will + Note that version 3.78.1 or higher is *required* or the build will fail. - It's also OK to have GNU Make under another name (e.g. 'gmake') - if you use the GNUMAKE trick described below. + It is also fine to have GNU Make under another name (e.g. 'gmake') + if you use the GNUMAKE variable as described below. - As a special exception, 'makepp' can also be used to build - FreeType 2. See the file docs/MAKEPP for details + As a special exception, 'makepp' can also be used to build + FreeType 2. See the file docs/MAKEPP for details. - 2. Regenerate the configure script when needed - ---------------------------------------------- + 2. Regenerate the configure script if needed + -------------------------------------------- - This only applies if you're building a CVS snapshot or checkout, - *not* if you grabbed the sources of an official release. + This only applies if you are building a CVS snapshot or checkout, + *not* if you grabbed the sources of an official release. - you need to invoke the "autogen.sh" script in the top-level - directory in order to re-generate the configure script for your - platform. Normally, this simply means typing: + You need to invoke the `autogen.sh' script in the top-level + directory in order to create the `configure' script for your + platform. Normally, this simply means typing: - sh autogen.sh + sh autogen.sh + + In case of problems, you may need to install or upgrade Automake, + Autoconf or Libtool. See README.CVS in the top-level directory + for more information. - in case of problems, you may need to install or upgrade Automake, - Autoconf or Libtool. See README.CVS in the top-level directory for - the gory details. - 3. Build and install the library -------------------------------- @@ -83,7 +83,7 @@ or MSys on Win32: ---------------------------------------------------------------------- -Copyright 2003, 2004, 2005, 2006 by +Copyright 2003, 2004, 2005, 2006, 2007 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/MAKEPP b/docs/MAKEPP index 97512ccc4..58eaf551d 100644 --- a/docs/MAKEPP +++ b/docs/MAKEPP @@ -1,5 +1,5 @@ -As a special exception, FreeType can also be built with the -'makepp' build tool, available from http://makepp.sourceforge.net +As a special exception, FreeType can also be built with the 'makepp' +build tool, available from http://makepp.sourceforge.net. -Note however that you will need at least version 1.19 and pass -the option --norc-substitution to have it work correctly +Note, however. that you will need at least version 1.19 and pass the +option --norc-substitution to have it work correctly. diff --git a/docs/TODO b/docs/TODO index 4d38fcf66..be60d6f04 100644 --- a/docs/TODO +++ b/docs/TODO @@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType. ------------------------------------------------------------------------ -Copyright 2001, 2002, 2003, 2004, 2005, 2006 by +Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h index 1f66c3a9f..afd8139db 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index 0f88f0f22..a0ddbb62f 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/freetype/internal/tttypes.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 2384a27b7..a2e682aaa 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -3758,34 +3758,34 @@ if ( library->generic.finalizer ) library->generic.finalizer( library ); - /* Close all faces in the library. if we don't do + /* Close all faces in the library. If we don't do * this, we can have some subtle memory leaks. - * for example: + * Example: * * - the cff font driver uses the pshinter module in cff_size_done * - if the pshinter module is destroyed before the cff font driver, - * opened FT_Face objects managed by the driver will not be properly + * opened FT_Face objects managed by the driver are not properly * destroyed, resulting in a memory leak */ { FT_UInt n; + for ( n = 0; n < library->num_modules; n++ ) { FT_Module module = library->modules[n]; FT_List faces; - if ( (module->clazz->module_flags & FT_MODULE_FONT_DRIVER) == 0 ) + + if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 ) continue; faces = &FT_DRIVER(module)->faces_list; - while ( faces->head ) { - FT_Done_Face( FT_FACE(faces->head->data) ); - } + while ( faces->head ) + FT_Done_Face( FT_FACE( faces->head->data ) ); } } - /* Close all other modules in the library */ #if 1 /* XXX Modules are removed in the reversed order so that */ diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 83c07ddf8..7d6b2ec03 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -4,7 +4,7 @@ /* */ /* PostScript hinting algorithm (body). */ /* */ -/* Copyright 2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 9c292f939..63d6bb77d 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph rasterizer (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2005, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -3177,6 +3177,7 @@ static const char count_table[256] = #ifdef FT_RASTER_OPTION_ANTI_ALIASING FT_UInt n; + /* set default 5-levels gray palette */ for ( n = 0; n < 5; n++ ) raster->grays[n] = n * 255 / 4; @@ -3263,8 +3264,10 @@ static const char count_table[256] = { PWorker worker = (PWorker)pool_base; - raster->buffer = pool_base + ((sizeof(*worker) + 7) & ~7); - raster->buffer_size = ((pool_base + pool_size) - (char*)raster->buffer)/sizeof(Long); + + raster->buffer = pool_base + ( (sizeof ( *worker ) + 7 ) & ~7 ); + raster->buffer_size = ( ( pool_base + pool_size ) - + (char*)raster->buffer ) / sizeof ( Long ); raster->worker = worker; } else @@ -3339,7 +3342,8 @@ static const char count_table[256] = ras.target = *target_map; worker->buff = (PLong) raster->buffer; - worker->sizeBuff = worker->buff + raster->buffer_size/sizeof(Long); + worker->sizeBuff = worker->buff + + raster->buffer_size / sizeof ( Long ); #ifdef FT_RASTER_OPTION_ANTI_ALIASING worker->grays = raster->grays; worker->gray_width = raster->gray_width; diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index 80c026f70..ce19f7294 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ /* */ /* SFNT object management (base). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c index 15ff13fc2..8eb2ff487 100644 --- a/src/sfnt/ttkern.c +++ b/src/sfnt/ttkern.c @@ -5,7 +5,7 @@ /* Load the basic TrueType kerning table. This doesn't handle */ /* kerning data within the GPOS table at the moment. */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/sfnt/ttkern.h b/src/sfnt/ttkern.h index 77c1f9afb..df1da9b27 100644 --- a/src/sfnt/ttkern.h +++ b/src/sfnt/ttkern.h @@ -5,7 +5,7 @@ /* Load the basic TrueType kerning table. This doesn't handle */ /* kerning data within the GPOS table at the moment. */ /* */ -/* Copyright 1996-2001, 2002, 2005 by */ +/* Copyright 1996-2001, 2002, 2005, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -41,7 +41,7 @@ FT_BEGIN_HEADER FT_UInt left_glyph, FT_UInt right_glyph ); -# define TT_FACE_HAS_KERNING( face ) ( (face)->kern_avail_bits != 0 ) +#define TT_FACE_HAS_KERNING( face ) ( (face)->kern_avail_bits != 0 ) FT_END_HEADER diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c index c8fc22070..9d8e79aaa 100644 --- a/src/sfnt/ttmtx.c +++ b/src/sfnt/ttmtx.c @@ -4,7 +4,7 @@ /* */ /* Load the metrics tables common to TTF and OTF fonts (body). */ /* */ -/* Copyright 2006 by */ +/* Copyright 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index d06034394..50d6ec3ea 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded bitmap support (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h index a6e5176ee..c6067c0e3 100644 --- a/src/sfnt/ttsbit.h +++ b/src/sfnt/ttsbit.h @@ -4,7 +4,7 @@ /* */ /* TrueType and OpenType embedded bitmap support (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index c38f42f76..da722cc41 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ /* */ /* A new `perfect' anti-aliasing renderer (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2005, 2006 by */ +/* Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1929,14 +1929,20 @@ if ( raster ) { - if ( pool_base && pool_size >= (long)sizeof(TWorker) + 2048 ) + if ( pool_base && pool_size >= (long)sizeof ( TWorker ) + 2048 ) { - PWorker worker = (PWorker) pool_base; + PWorker worker = (PWorker)pool_base; + rast->worker = worker; - rast->buffer = pool_base + ((sizeof(TWorker) + sizeof(TCell)-1) & ~(sizeof(TCell)-1)); - rast->buffer_size = (long)((pool_base + pool_size) - (char*)rast->buffer) & ~(sizeof(TCell)-1); - rast->band_size = (int)( rast->buffer_size/(sizeof(TCell)*8) ); + rast->buffer = pool_base + + ( ( sizeof ( TWorker ) + sizeof ( TCell ) - 1 ) & + ~( sizeof ( TCell ) - 1 ) ); + rast->buffer_size = (long)( ( pool_base + pool_size ) - + (char*)rast->buffer ) & + ~( sizeof ( TCell ) - 1 ); + rast->band_size = (int)( rast->buffer_size / + ( sizeof ( TCell ) * 8 ) ); } else {