* include/freetype/ftimage.h (FT_Raster_RenderFunc),

include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.

* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed.  Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.


* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes.  Reported by Ismail Donmez
<ismail@kde.org.tr>.
This commit is contained in:
Werner Lemberg 2005-05-11 20:04:35 +00:00
parent 2c9ee60e04
commit daeaa43978
9 changed files with 81 additions and 61 deletions

View File

@ -1,3 +1,26 @@
2005-05-11 Kirill Smelkov <kirr@mns.spb.ru>
* include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.
* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.
2005-05-11 Werner Lemberg <wl@gnu.org>
* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-08 Werner Lemberg <wl@gnu.org>
* include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE)
@ -6,7 +29,7 @@
2005-05-07 Werner Lemberg <wl@gnu.org>
Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck
Blaskey).
Blaskey <listtarget@danbala.com>).
* src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'.
* src/sfnt/ttcmac.c: Use SFNT_Err_Ok where appropriate.

View File

@ -1183,8 +1183,8 @@ FT_BEGIN_HEADER
/* composition). */
/* */
typedef int
(*FT_Raster_RenderFunc)( FT_Raster raster,
FT_Raster_Params* params );
(*FT_Raster_RenderFunc)( FT_Raster raster,
const FT_Raster_Params* params );
#define FT_Raster_Render_Func FT_Raster_RenderFunc

View File

@ -4,7 +4,7 @@
/* */
/* FreeType renderer modules public interface (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -46,9 +46,9 @@ FT_BEGIN_HEADER
(*FT_Glyph_DoneFunc)( FT_Glyph glyph );
typedef void
(*FT_Glyph_TransformFunc)( FT_Glyph glyph,
FT_Matrix* matrix,
FT_Vector* delta );
(*FT_Glyph_TransformFunc)( FT_Glyph glyph,
const FT_Matrix* matrix,
const FT_Vector* delta );
typedef void
(*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph,
@ -85,16 +85,16 @@ FT_BEGIN_HEADER
typedef FT_Error
(*FT_Renderer_RenderFunc)( FT_Renderer renderer,
FT_GlyphSlot slot,
FT_UInt mode,
FT_Vector* origin );
(*FT_Renderer_RenderFunc)( FT_Renderer renderer,
FT_GlyphSlot slot,
FT_UInt mode,
const FT_Vector* origin );
typedef FT_Error
(*FT_Renderer_TransformFunc)( FT_Renderer renderer,
FT_GlyphSlot slot,
FT_Matrix* matrix,
FT_Vector* delta );
(*FT_Renderer_TransformFunc)( FT_Renderer renderer,
FT_GlyphSlot slot,
const FT_Matrix* matrix,
const FT_Vector* delta );
typedef void

View File

@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -306,9 +306,9 @@
FT_CALLBACK_DEF( void )
ft_outline_glyph_transform( FT_Glyph outline_glyph,
FT_Matrix* matrix,
FT_Vector* delta )
ft_outline_glyph_transform( FT_Glyph outline_glyph,
const FT_Matrix* matrix,
const FT_Vector* delta )
{
FT_OutlineGlyph glyph = (FT_OutlineGlyph)outline_glyph;

View File

@ -108,9 +108,6 @@
/* define DEBUG_RASTER if you want to compile a debugging version */
#define xxxDEBUG_RASTER
/* The default render pool size in bytes */
#define RASTER_RENDER_POOL 8192
/* undefine FT_RASTER_OPTION_ANTI_ALIASING if you do not want to support */
/* 5-levels anti-aliasing */
#ifdef FT_CONFIG_OPTION_5_GRAY_LEVELS
@ -3254,8 +3251,8 @@
static int
ft_black_render( TRaster_Instance* raster,
FT_Raster_Params* params )
ft_black_render( TRaster_Instance* raster,
const FT_Raster_Params* params )
{
FT_Outline* outline = (FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;

View File

@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer interface (body). */
/* */
/* Copyright 1996-2001, 2002, 2003 by */
/* Copyright 1996-2001, 2002, 2003, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -55,10 +55,10 @@
/* transform a given glyph image */
static FT_Error
ft_raster1_transform( FT_Renderer render,
FT_GlyphSlot slot,
FT_Matrix* matrix,
FT_Vector* delta )
ft_raster1_transform( FT_Renderer render,
FT_GlyphSlot slot,
const FT_Matrix* matrix,
const FT_Vector* delta )
{
FT_Error error = Raster_Err_Ok;
@ -95,10 +95,10 @@
/* convert a slot's glyph image into a bitmap */
static FT_Error
ft_raster1_render( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
FT_Vector* origin )
ft_raster1_render( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
const FT_Vector* origin )
{
FT_Error error;
FT_Outline* outline;

View File

@ -694,7 +694,7 @@
cmap->cur_delta = FT_PEEK_SHORT( p );
p += num_ranges * 2;
offset = FT_PEEK_SHORT( p );
offset = FT_PEEK_USHORT( p );
if ( offset != 0xFFFFU )
{

View File

@ -1578,7 +1578,7 @@
/* Error code. 0 means sucess. */
/* */
static
int FT_Outline_Decompose( FT_Outline* outline,
int FT_Outline_Decompose( const FT_Outline* outline,
const FT_Outline_Funcs* func_interface,
void* user )
{
@ -1960,8 +1960,8 @@
extern int
gray_raster_render( PRaster raster,
FT_Raster_Params* params )
gray_raster_render( PRaster raster,
const FT_Raster_Params* params )
{
FT_Outline* outline = (FT_Outline*)params->source;
const FT_Bitmap* target_map = params->target;

View File

@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -54,10 +54,10 @@
/* transform a given glyph image */
static FT_Error
ft_smooth_transform( FT_Renderer render,
FT_GlyphSlot slot,
FT_Matrix* matrix,
FT_Vector* delta )
ft_smooth_transform( FT_Renderer render,
FT_GlyphSlot slot,
const FT_Matrix* matrix,
const FT_Vector* delta )
{
FT_Error error = Smooth_Err_Ok;
@ -94,13 +94,13 @@
/* convert a slot's glyph image into a bitmap */
static FT_Error
ft_smooth_render_generic( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
FT_Vector* origin,
FT_Render_Mode required_mode,
FT_Int hmul,
FT_Int vmul )
ft_smooth_render_generic( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
const FT_Vector* origin,
FT_Render_Mode required_mode,
FT_Int hmul,
FT_Int vmul )
{
FT_Error error;
FT_Outline* outline = NULL;
@ -231,10 +231,10 @@
/* convert a slot's glyph image into a bitmap */
static FT_Error
ft_smooth_render( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
FT_Vector* origin )
ft_smooth_render( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
const FT_Vector* origin )
{
if ( mode == FT_RENDER_MODE_LIGHT )
mode = FT_RENDER_MODE_NORMAL;
@ -247,10 +247,10 @@
/* convert a slot's glyph image into a horizontal LCD bitmap */
static FT_Error
ft_smooth_render_lcd( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
FT_Vector* origin )
ft_smooth_render_lcd( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
const FT_Vector* origin )
{
FT_Error error;
@ -266,10 +266,10 @@
/* convert a slot's glyph image into a vertical LCD bitmap */
static FT_Error
ft_smooth_render_lcd_v( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
FT_Vector* origin )
ft_smooth_render_lcd_v( FT_Renderer render,
FT_GlyphSlot slot,
FT_Render_Mode mode,
const FT_Vector* origin )
{
FT_Error error;