* 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>.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
diff --git a/ChangeLog b/ChangeLog
index 77ef745..83135ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index bff1e7c..0cb3b71 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -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
diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h
index db3ca94..5a01da4 100644
--- 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_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
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 1b22ab6..18f5a8e 100644
--- 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;
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index b23ad27..c0c46a3 100644
--- 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;
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index a17ef9b..ed75fb6 100644
--- 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;
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 95f9d74..0f3a324 100644
--- 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 )
{
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index f30c488..6eeabb7 100644
--- 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;
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index af8783e..54bf9e7 100644
--- 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;