diff --git a/ChangeLog b/ChangeLog index c35dc7057..195994e40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,10 @@ 2006-02-23 David Turner - * src/bdf/bdflib.c: fixed a bug with zero-width glyphs - this patch comes from the Debian package for libfreetype6 !! - How come nobody mentions this on the devel list ?? + Two patches from Debian libfreetype6 for 2.1.10. - * src/bdf/bdflib.c: fixed a problem with large encodings. - Again, this patch comes from Debian libfreetype6 for 2.1.10 ! + * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a bug with zero-width + glyphs. + Fix a problem with large encodings. 2006-02-23 Chia-I Wu diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h index 8939030d2..ea9e87ce9 100644 --- a/include/freetype/ftoutln.h +++ b/include/freetype/ftoutln.h @@ -467,8 +467,8 @@ FT_BEGIN_HEADER * the drawing direction of a contour must be filled. * * FT_ORIENTATION_NONE :: - * The orientation cannot be determined. That is, different part of the - * glyph has different orientation. + * The orientation cannot be determined. That is, different parts of + * the glyph have different orientation. * */ typedef enum diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index b9f845944..64823a728 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -4,7 +4,7 @@ /* */ /* FreeType outline management (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -668,20 +668,20 @@ } -#define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \ - do { \ - ( first ) = ( c > 0 ) ? ( outline )->points + \ - ( outline )->contours[c - 1] + 1 \ - : ( outline )->points; \ - ( last ) = ( outline )->points + ( outline )->contours[c]; \ +#define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \ + do { \ + (first) = ( c > 0 ) ? (outline)->points + \ + (outline)->contours[c - 1] + 1 \ + : (outline)->points; \ + (last) = (outline)->points + (outline)->contours[c]; \ } while ( 0 ) - /* Is a point in some contour? */ - /* */ - /* We treat every point of the contour as if it */ - /* it is ON. That is, we allow false positive, */ - /* but disallow false negative. (XXX really?) */ + /* Is a point in some contour? */ + /* */ + /* We treat every point of the contour as if it */ + /* it were ON. That is, we allow false positives, */ + /* but disallow false negatives. (XXX really?) */ static FT_Bool ft_contour_has( FT_Outline* outline, FT_Short c, diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index ebb86a838..e7b3d88f8 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -4,7 +4,7 @@ /* */ /* FreeType synthesizing code for emboldening and slanting (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -99,8 +99,8 @@ } else { - /* this is more than enough for most glyphs; */ - /* if you need accurate values, you have to call FT_Outline_Get_CBox */ + /* this is more than enough for most glyphs; if you need accurate */ + /* values, you have to call FT_Outline_Get_CBox */ xstr = xstr * 2; ystr = xstr; } diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index 167acb23b..d13df4716 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -1563,7 +1563,7 @@ /* Check that the encoding is in the range [0,65536] because */ /* otherwise p->have (a bitmap with static size) overflows. */ - if ( (size_t)p->glyph_enc >= sizeof(p->have)*8 ) + if ( (size_t)p->glyph_enc >= sizeof ( p->have ) * 8 ) { error = BDF_Err_Invalid_File_Format; goto Exit;