From 17432b5e3719db41ddbd85381ce4b02cb52cd0c3 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 12 Jan 2007 09:28:44 +0000 Subject: [PATCH] * src/type1/t1load.c (is_space): Removed. (parse_encoding, parse_charstrings): Use IS_PS_DELIM. (parse_charstrings): Use IS_PS_TOKEN. * autogen.sh: Avoid bash specific syntax. --- ChangeLog | 48 ++++++++++++++++++++------------- Jamfile | 2 +- README | 2 +- autogen.sh | 9 +++---- builds/unix/configure.raw | 4 +-- docs/CHANGES | 7 ++--- docs/VERSION.DLL | 2 +- include/freetype/freetype.h | 2 +- include/freetype/ftgasp.h | 41 ++++++++++++++-------------- include/freetype/ftlcdfil.h | 54 ++++++++++++++++++++----------------- src/base/ftobjs.c | 4 +-- src/type1/t1load.c | 17 +++--------- 12 files changed, 99 insertions(+), 93 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1527a0129..5860b11de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,34 +1,44 @@ +2007-01-11 Werner Lemberg + + * src/type1/t1load.c (is_space): Removed. + (parse_encoding, parse_charstrings): Use IS_PS_DELIM. + (parse_charstrings): Use IS_PS_TOKEN. + + + * autogen.sh: Avoid bash specific syntax. + 2007-01-11 David Turner - * docs/CHANGES: small update + * docs/CHANGES: Small update. - * builds/unix/configure.ac: updating libtool version number to 9.11.3 + * builds/unix/configure.raw (version_info): Set to 9:11:3. - * src/base/ftobjs.c (IsMacResource): fixed a small bug that caused a - crash with some Mac OS X .dfont files. Submitted by Masatake Yamoto. + * src/base/ftobjs.c (IsMacResource): Fix a small bug that caused a + crash with some Mac OS X .dfont files. Submitted by Masatake + Yamoto. - * autogen.sh: small fix to get it working on Mac OS X properly, - the issue is that GNU libtool is called "glibtool" on this platform, - and we must call "glibtoolize", since "libtoolize" doesn't exist + * autogen.sh: Small fix to get it working on Mac OS X properly: + The issue is that GNU libtool is called `glibtool' on this platform, + and we must call `glibtoolize', since `libtoolize' doesn't exist. 2007-01-10 David Turner - * all-sources: tagging all sources with VER-2-3-0-RC1 and - VER-2-3-0 + * all-sources: Tag all sources with VER-2-3-0-RC1 and + VER-2-3-0. - * Jamfile, README, builds/win32/visualc/freetype.dsp, - builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL, - include/freetype/freetype.h, include/freetype/t1tables.h, - include/freetype/internal/tttypes.h: updating version - number to 2.3.0 !! + * Jamfile (RefDoc), README, builds/win32/visualc/freetype.dsp, + builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL: Update + version number to 2.3.0. + + * include/freetype/freetype.h (FREETYPE_MINOR): Set to 3. + (FREETYPE_PATCH): Set to 0. * include/freetype/ftchapters.h, include/freetype/ftgasp.h, - include/freetype/ftlcdfil.h: updating reference documentation - with GASP support and LCD filtering sections + include/freetype/ftlcdfil.h: Update reference documentation with + GASP support and LCD filtering sections. - * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): - fixed a typo which created an endless loop with some malformed - font files + * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix a typo + which created an endless loop with some malformed font files. 2007-01-10 Derek Clegg diff --git a/Jamfile b/Jamfile index 9c0a622dd..8d364686a 100644 --- a/Jamfile +++ b/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 top Jamfile. # -# 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, modified, diff --git a/README b/README index f5fa23d53..1766d2e47 100644 --- a/README +++ b/README @@ -51,7 +51,7 @@ ---------------------------------------------------------------------- -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/autogen.sh b/autogen.sh index 3e09c1fc1..d8fb5b2ec 100644 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh -# 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, @@ -40,14 +40,13 @@ echo "generating \`configure.ac'" sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \ < configure.raw > configure.ac -# on MacOS X, the GNU libtool is named "glibtool" -HOSTOS=$(uname) +# On MacOS X, the GNU libtool is named `glibtool'. +HOSTOS=`uname` LIBTOOLIZE=libtoolize -if [ "$HOSTOS"x == Darwinx ] ; then +if test "$HOSTOS"x = Darwinx; then LIBTOOLIZE=glibtoolize fi - run aclocal -I . --force run $LIBTOOLIZE --force --copy run autoconf --force diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index f8cf60e54..f8f42ea48 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, 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, modified, @@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in]) # Don't forget to update docs/VERSION.DLL! -version_info='9:10:3' +version_info='9:11:3' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) diff --git a/docs/CHANGES b/docs/CHANGES index 46bb3abf0..ea7cd1cc3 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,4 +1,4 @@ -CHANGES BETWEEN 2.2.2 and 2.2.1 +CHANGES BETWEEN 2.3.0 and 2.2.1 I. IMPORTANT BUG FIXES @@ -127,8 +127,9 @@ CHANGES BETWEEN 2.2.2 and 2.2.1 - Better support for Mac Fonts on POSIX systems, plus compilation fixes for PPC64. - - The TrueTypeGX validator (gxvalid) checks the order of glyph ids - in the kern table + - The TrueTypeGX validator (gxvalid) checks the order of glyph IDs + in the kern table. + ====================================================================== diff --git a/docs/VERSION.DLL b/docs/VERSION.DLL index 00fa2cd3e..df8d8f07c 100644 --- a/docs/VERSION.DLL +++ b/docs/VERSION.DLL @@ -113,7 +113,7 @@ other release numbers. ------------------------------------------------------------------------ -Copyright 2002, 2003, 2004, 2005, 2006 by +Copyright 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/freetype.h b/include/freetype/freetype.h index e2eeed4dc..59543856f 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (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/ftgasp.h b/include/freetype/ftgasp.h index 07c68834c..90c6426e3 100644 --- a/include/freetype/ftgasp.h +++ b/include/freetype/ftgasp.h @@ -22,24 +22,23 @@ #include #include FT_FREETYPE_H - /*************************************************************************** - * - * @section: - * gasp_table - * - * @title: - * Gasp Table - * - * @abstract: - * Retrieving TrueType GASP table entries - * - * @description: - * The function @FT_Get_Gasp can be used to query a TrueType or OpenType - * font for specific entries in their GASP table, if any. This is mainly - * useful when implementing native TrueType hinting with the bytecode - * interpreter and when one wants to duplicate the Windows text rendering - * results - */ + /*************************************************************************** + * + * @section: + * gasp_table + * + * @title: + * Gasp Table + * + * @abstract: + * Retrieving TrueType `gasp' table entries + * + * @description: + * The function @FT_Get_Gasp can be used to query a TrueType or OpenType + * font for specific entries in their `gasp' table, if any. This is + * mainly useful when implementing native TrueType hinting with the + * bytecode interpreter to duplicate the Windows text rendering results. + */ /************************************************************************* * @@ -72,7 +71,8 @@ * `ClearType' is Microsoft's implementation of LCD rendering, partly * protected by patents. * - * @since: 2.3.0 + * @since: + * 2.3.0 */ #define FT_GASP_NO_TABLE -1 #define FT_GASP_DO_GRIDFIT 0x01 @@ -98,7 +98,8 @@ * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE is there is no * `gasp' table in the face. * - * @since: 2.3.0 + * @since: + * 2.3.0 */ FT_EXPORT( FT_Int ) FT_Get_Gasp( FT_Face face, diff --git a/include/freetype/ftlcdfil.h b/include/freetype/ftlcdfil.h index 50416bcad..5a6f0cf1b 100644 --- a/include/freetype/ftlcdfil.h +++ b/include/freetype/ftlcdfil.h @@ -5,7 +5,7 @@ /* FreeType API for color filtering of subpixel bitmap glyphs */ /* (specification). */ /* */ -/* 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, */ @@ -26,27 +26,29 @@ FT_BEGIN_HEADER - /*************************************************************************** - * - * @section: - * lcd_filtering - * - * @title: - * LCD Filtering - * - * @abstract: - * Reduce color fringes of LCD-optimized bitmaps - * - * @description: - * The @FT_Library_SetLcdFilter API can be used to specify a low-pass filter - * to be applied to LCD-optimized bitmaps generated through @FT_Render_Glyph. - * This is useful to reduce color fringes when compared to unfiltered rendering. - * - * Note that no filter is active by default, and that this function is - * *not* implemented in default builds of the library. You need to #define - * FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your ftoption.h file in order to - * activate it. - */ + /*************************************************************************** + * + * @section: + * lcd_filtering + * + * @title: + * LCD Filtering + * + * @abstract: + * Reduce color fringes of LCD-optimized bitmaps. + * + * @description: + * The @FT_Library_SetLcdFilter API can be used to specify a low-pass + * filter which is then applied to LCD-optimized bitmaps generated + * through @FT_Render_Glyph. This is useful to reduce color fringes + * which would occur with unfiltered rendering. + * + * Note that no filter is active by default, and that this function is + * *not* implemented in default builds of the library. You need to + * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file + * in order to activate it. + */ + /**************************************************************************** * @@ -68,7 +70,7 @@ FT_BEGIN_HEADER * FT_LCD_FILTER_LIGHT :: * The light filter is a variant that produces less blurriness at the * cost of slightly more color fringes than the default one. It might - * be better, depending on taste, your monitor or your personal vision. + * be better, depending on taste, your monitor, or your personal vision. * * FT_LCD_FILTER_LEGACY :: * This filter corresponds to the original libXft color filter. It @@ -80,7 +82,8 @@ FT_BEGIN_HEADER * This filter is only provided for comparison purposes, and might be * disabled or stay unsupported in the future. * - * @since: 2.3.0 + * @since: + * 2.3.0 */ typedef enum { @@ -145,7 +148,8 @@ FT_BEGIN_HEADER * need to modify their layout and glyph positioning code when enabling * the filter. * - * @since: 2.3.0 + * @since: + * 2.3.0 */ FT_EXPORT( FT_Error ) FT_Library_SetLcdFilter( FT_Library library, diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 0101b70d2..7eb2efcce 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -1446,7 +1446,7 @@ face_index, aface ); FT_FREE( data_offsets ); /* POST exists in an LWFN providing a single face */ - if (!error) + if ( !error ) (*aface)->num_faces = 1; return error; } @@ -1463,7 +1463,7 @@ error = Mac_Read_sfnt_Resource( library, stream, data_offsets, count, face_index_internal, aface ); FT_FREE( data_offsets ); - if (!error) + if ( !error ) (*aface)->num_faces = count; } diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 8efd5fa59..93c9e01c7 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1014,15 +1014,6 @@ } - static int - is_space( FT_Byte c ) - { - return ( c == ' ' || c == '\t' || - c == '\r' || c == '\n' || c == '\f' || - c == '\0' ); - } - - static int read_binary_data( T1_Parser parser, FT_Long* size, @@ -1206,9 +1197,9 @@ /* we stop when we encounter a `def' or `]' */ if ( *cur == 'd' && cur + 3 < limit ) { - if ( cur[1] == 'e' && - cur[2] == 'f' && - is_space( cur[3] ) ) + if ( cur[1] == 'e' && + cur[2] == 'f' && + IS_PS_DELIM( cur[3] ) ) { FT_TRACE6(( "encoding end\n" )); cur += 3; @@ -1488,7 +1479,7 @@ break; /* we stop when we find a `def' or `end' keyword */ - if ( cur + 3 < limit && is_space( cur[3] ) ) + if ( cur + 3 < limit && IS_PS_DELIM( cur[3] ) ) { if ( cur[0] == 'd' && cur[1] == 'e' &&