* src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch * src/smooth/ftgrays.c: remove hard-coded error values, use FreeType ones instead * src/autofit/afhints.c (af_glyph_hints_dump_segments): remove unused variable
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
diff --git a/ChangeLog b/ChangeLog
index 18ec812..828cbbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-11-28 David Turner <david@freetype.org>
+
+ * src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch
+
+ * src/smooth/ftgrays.c: remove hard-coded error values, use FreeType
+ ones instead
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments): remove unused
+ variable
+
2006-11-26 Pierre Hanser <hanser@club-internet.fr>
* src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer.
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index 9a3ea3d..264a70b 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -191,7 +191,6 @@
void
af_glyph_hints_dump_segments( AF_GlyphHints hints )
{
- AF_Point points = hints->points;
FT_Int dimension;
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index a94c7ee..d1459a4 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -54,7 +54,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
#define xxAF_USE_WARPER /* only define to use warp hinting */
-#define xxAF_DEBUG
+#define AF_DEBUG
#ifdef AF_DEBUG
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index fe8e24d..448125c 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -91,7 +91,6 @@
#define FT_COMPONENT trace_smooth
-#define ErrRaster_MemoryOverflow -4
#ifdef _STANDALONE_
@@ -108,8 +107,10 @@
#define ft_jmp_buf jmp_buf
-#define ErrRaster_Invalid_Mode -2
-#define ErrRaster_Invalid_Outline -1
+#define ErrRaster_Invalid_Mode -2
+#define ErrRaster_Invalid_Outline -1
+#define ErrRaster_Invalid_Argument -3
+#define ErrRaster_Memory_Overflow -4
#define FT_BEGIN_HEADER
#define FT_END_HEADER
@@ -133,7 +134,7 @@
#define FT_TRACE( x ) do ; while ( 0 ) /* nothing */
#endif
-#else /* _STANDALONE_ */
+#else /* !_STANDALONE_ */
#include <ft2build.h>
#include "ftgrays.h"
@@ -145,8 +146,10 @@
#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph
#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline
+#define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory
+#define ErrRaster_Invalid_Argument Smooth_Err_Bad_Argument
-#endif /* _STANDALONE_ */
+#endif /* !_STANDALONE_ */
#ifndef FT_MEM_SET
@@ -1596,7 +1599,7 @@
}
else
{
- error = ErrRaster_MemoryOverflow;
+ error = ErrRaster_Memory_Overflow;
}
return error;
@@ -1720,7 +1723,7 @@
band--;
continue;
}
- else if ( error != ErrRaster_MemoryOverflow )
+ else if ( error != ErrRaster_Memory_Overflow )
return 1;
ReduceBands:
@@ -1766,7 +1769,7 @@
if ( !raster || !raster->buffer || !raster->buffer_size )
- return -1;
+ return ErrRaster_Invalid_Argument;
/* return immediately if the outline is empty */
if ( outline->n_points == 0 || outline->n_contours <= 0 )
@@ -1782,7 +1785,7 @@
/* if direct mode is not set, we must have a target bitmap */
if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 &&
( !target_map || !target_map->buffer ) )
- return -1;
+ return ErrRaster_Invalid_Argument;
/* this version does not support monochrome rendering */
if ( !( params->flags & FT_RASTER_FLAG_AA ) )
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index fc620c5..b464fcd 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -283,7 +283,7 @@
/* be worth to do more checks for a few special cases. */
for ( nn = 0; trick_names[nn] != NULL; nn++ )
{
- if ( ttface->family &&
+ if ( ttface->family_name &&
ft_strcmp( ttface->family_name, trick_names[nn] ) == 0 )
{
unpatented_hinting = 1;