From bd0f71aa960cdaf0cdeea26d47792e9d13520bf8 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 22 Sep 2008 08:55:44 +0000 Subject: [PATCH] Fix Savannah bug #24307. * include/freetype/internal/t1types.h (CID_FaceRec), src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'. * src/smooth/ftgrays.c (gray_raster_render): Don't dereference `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by Stephan T. Lavavej . --- ChangeLog | 15 ++++++++++++++- include/freetype/internal/t1types.h | 4 +++- src/smooth/ftgrays.c | 18 ++++++++---------- src/type42/t42types.h | 6 ++++-- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index fed6086b6..b6a349cc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-09-22 John Tytgat + + Fix Savannah bug #24307. + + * include/freetype/internal/t1types.h (CID_FaceRec), + src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'. + +2008-09-21 Werner Lemberg + + * src/smooth/ftgrays.c (gray_raster_render): Don't dereference + `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by + Stephan T. Lavavej . + 2008-09-21 suzuki toshiya * src/otvalid/Jamfile: Add missing target `otvmath' for multi build @@ -9,7 +22,7 @@ * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values passed to this function are already `normalized'. Problem reported - by Stephan T. Lavavej . + by Stephan T. Lavavej . * docs/CHANGES: Document it. diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h index 047c6d59d..4b05fa32c 100644 --- a/include/freetype/internal/t1types.h +++ b/include/freetype/internal/t1types.h @@ -5,7 +5,7 @@ /* Basic Type1/Type2 type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -231,7 +231,9 @@ FT_BEGIN_HEADER void* psnames; void* psaux; CID_FaceInfoRec cid; +#if 0 void* afm_data; +#endif CID_Subrs subrs; /* since version 2.1 - interface to PostScript hinter */ diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 054cf6cd4..c44ba01d2 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1881,7 +1881,7 @@ worker = raster->worker; /* if direct mode is not set, we must have a target bitmap */ - if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 ) + if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) ) { if ( !target_map ) return ErrRaster_Invalid_Argument; @@ -1899,7 +1899,7 @@ return ErrRaster_Invalid_Mode; /* compute clipping box */ - if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 ) + if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) ) { /* compute clip box from target pixmap */ ras.clip_box.xMin = 0; @@ -1908,9 +1908,7 @@ ras.clip_box.yMax = target_map->rows; } else if ( params->flags & FT_RASTER_FLAG_CLIP ) - { ras.clip_box = params->clip_box; - } else { ras.clip_box.xMin = -32768L; @@ -1927,17 +1925,17 @@ ras.band_size = raster->band_size; ras.num_gray_spans = 0; - if ( target_map ) - ras.target = *target_map; - - ras.render_span = (FT_Raster_Span_Func)gray_render_span; - ras.render_span_data = &ras; - if ( params->flags & FT_RASTER_FLAG_DIRECT ) { ras.render_span = (FT_Raster_Span_Func)params->gray_spans; ras.render_span_data = params->user; } + else + { + ras.target = *target_map; + ras.render_span = (FT_Raster_Span_Func)gray_render_span; + ras.render_span_data = &ras; + } return gray_convert_glyph( worker ); } diff --git a/src/type42/t42types.h b/src/type42/t42types.h index 6626b0445..c7c2db490 100644 --- a/src/type42/t42types.h +++ b/src/type42/t42types.h @@ -4,7 +4,7 @@ /* */ /* Type 42 font data types (specification only). */ /* */ -/* Copyright 2002, 2003, 2006 by Roberto Alameda. */ +/* Copyright 2002, 2003, 2006, 2008 by Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -35,7 +35,9 @@ FT_BEGIN_HEADER T1_FontRec type1; const void* psnames; const void* psaux; +#if 0 const void* afm_data; +#endif FT_Byte* ttf_data; FT_ULong ttf_size; FT_Face ttf_face; @@ -48,7 +50,7 @@ FT_BEGIN_HEADER FT_END_HEADER -#endif /* __T1TYPES_H__ */ +#endif /* __T42TYPES_H__ */ /* END */