* src/type1/t1objs.c (T1_Face_Init): Add cast to avoid compiler warning.
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
diff --git a/ChangeLog b/ChangeLog
index b7c9014..75ec6e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,27 +1,32 @@
-2002-01-03 Keith Packard <keithp@keithp.com>
+2002-01-03 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1objs.c (T1_Face_Init): Add cast to avoid compiler
+ warning.
- * builds/unix/ftsystem.c (FT_New_Stream): added a fix to ensure that
- all FreeType input streams are closed in child processes of a "fork"
- on Unix systems. This is important to avoid (potential) access
- control issues..
+2002-01-03 Keith Packard <keithp@keithp.com>
+ * builds/unix/ftsystem.c (FT_New_Stream): Added a fix to ensure that
+ all FreeType input streams are closed in child processes of a "fork"
+ on Unix systems. This is important to avoid (potential) access
+ control issues.
2002-01-03 David Turner <david@freetype.org>
- * src/type1/t1objs.c (T1_Face_Init): fixed a bug that crashed the
- library when dealing with certain weird fonts (like "Stalingrad",
- in "sadn.pfb". This font has no full font name entry.. )
+ * src/type1/t1objs.c (T1_Face_Init): Fixed a bug that crashed the
+ library when dealing with certain weird fonts like "Stalingrad", in
+ "sadn.pfb" (this font has no full font name entry).
+
+ * src/base/ftoutln.c, include/freetype/ftoutln.h (FT_Outline_Check):
+ New function to check the consistency of outline data.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Use `FT_Outline_Check' to
+ ensure that loaded glyphs are valid. This allows certain fonts like
+ "tt1095m_.ttf" to be loaded even though it appears they contain
+ really funky glyphs.
- * src/base/ftoutln.c, include/freetype/ftoutln.h: added the
- FT_Outline_Check API to check the consistency of outline data
-
- * src/base/ftobjs.c (FT_Load_Glyph): added a call to the new
- FT_Outline_Check to ensure that loaded glyphs are valid. This
- allows certain fonts like "tt1095m_.ttf" to be loaded even though
- it appears they contain really funky glyphs..
-
- there still is a bug there though.. !!
+ There still is a bug there, though.
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix error condition.
2001-12-30 David Turner <david@freetype.org>
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index c492be1..048eb4f 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -223,17 +223,17 @@
return FT_Err_Cannot_Open_Resource;
}
- /* here, we ensure that a "fork" will _not_ duplicate */
- /* our opened input streams on Unix. This is critical */
- /* since it would avoid some (possible) access control */
- /* issues and clean up the kernel file table a bit. */
+ /* Here we ensure that a "fork" will _not_ duplicate */
+ /* our opened input streams on Unix. This is critical */
+ /* since it avoids some (possible) access control */
+ /* issues and cleans up the kernel file table a bit. */
/* */
#ifdef F_SETFD
-# ifdef FD_CLOEXEC
- ret = fcntl ( file, F_SETFD, FD_CLOEXEC);
-# else
- ret = fcntl ( file, F_SETFD, 1);
-# endif /* FD_CLOEXEC */
+#ifdef FD_CLOEXEC
+ ret = fcntl( file, F_SETFD, FD_CLOEXEC );
+#else
+ ret = fcntl( file, F_SETFD, 1 );
+#endif /* FD_CLOEXEC */
#endif /* F_SETFD */
if ( fstat( file, &stat_buf ) < 0 )
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index fcf527a..27cac3a 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -53,6 +53,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Translate */
/* FT_Outline_Transform */
/* FT_Outline_Reverse */
+ /* FT_Outline_Check */
/* */
/* FT_Outline_Get_CBox */
/* FT_Outline_Get_BBox */
@@ -184,10 +185,10 @@ FT_BEGIN_HEADER
/* FT_Outline_Check */
/* */
/* <Description> */
- /* Check the content of an outline descriptor */
+ /* Check the contents of an outline descriptor. */
/* */
/* <Input> */
- /* outline :: handle to source outline */
+ /* outline :: A handle to a source outline. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 28b25fc..2543e82 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -914,7 +914,7 @@
if ( error )
goto Exit;
- /* check that the loaded outline is correct !! */
+ /* check that the loaded outline is correct */
error = FT_Outline_Check( &slot->outline );
if ( error )
goto Exit;
@@ -1944,7 +1944,7 @@
FT_Get_Postscript_Name( FT_Face face )
{
const char* result = NULL;
-
+
if ( !face )
goto Exit;
@@ -2002,19 +2002,19 @@
FT_Activate_Size( FT_Size size )
{
FT_Face face;
-
+
if ( size == NULL )
return FT_Err_Bad_Argument;
-
+
face = size->face;
if ( face == NULL || face->driver == NULL )
return FT_Err_Bad_Argument;
-
+
/* we don't need anything more complex than that; all size objects */
/* are already listed by the face */
face->size = size;
-
+
return FT_Err_Ok;
}
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 18c8d77..68a22de 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -299,7 +299,7 @@
/* documentation is in ftoutln.h */
-
+
FT_EXPORT_DEF( FT_Error )
FT_Outline_Check( FT_Outline* outline )
{
@@ -310,18 +310,19 @@
FT_Int end0, end;
FT_Int n;
- /* empty glyph ?? */
+
+ /* empty glyph? */
if ( n_points == 0 && n_contours == 0 )
return 0;
-
+
/* check point and contour counts */
if ( n_points <= 0 || n_contours <= 0 )
goto Bad;
-
+
end0 = -1;
for ( n = 0; n < n_contours; n++ )
{
- end = outline->contours[n];
+ end = outline->contours[n];
/* note that we don't accept empty contours */
if ( end <= end0 || end >= n_points )
@@ -329,13 +330,14 @@
end0 = end;
}
-
- if ( end != n_points-1 )
+
+ if ( end != n_points - 1 )
goto Bad;
/* XXX: check the that array */
return 0;
}
+
Bad:
return FT_Err_Invalid_Argument;
}
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 8335f6c..dfe8125 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -377,7 +377,7 @@
: (char *)"Regular" );
}
else
- root->style_name = "Regular";
+ root->style_name = (char *)"Regular";
}
else
{