ref: fa420250c59414e432243feffb70be68654b8c27
parent: 958f019dc66d5e1bafcfea95117d7c7c82cbd993
author: Werner Lemberg <[email protected]>
date: Wed May 11 16:04:35 EDT 2005
* 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 <[email protected]>.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2005-05-11 Kirill Smelkov <[email protected]>
+
+ * 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 <[email protected]>
+
+ * src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
+ FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
+ <[email protected]>.
+
2005-05-08 Werner Lemberg <[email protected]>
* include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE)
@@ -6,7 +29,7 @@
2005-05-07 Werner Lemberg <[email protected]>
Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck
- Blaskey).
+ Blaskey <[email protected]>).
* src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'.
* src/sfnt/ttcmac.c: Use SFNT_Err_Ok where appropriate.
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -1183,8 +1183,8 @@
/* 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
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -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_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 @@
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
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -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;
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -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;
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -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;
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -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 )
{
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -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;
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -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;