formatting
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 332 333 334 335
diff --git a/ChangeLog b/ChangeLog
index 21deaf4..4b0ede2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,23 +1,25 @@
2002-01-05 David Turner <david@freetype.org>
- * src/autohint/ahhint.c: modified computation of auto-hinted stem
- widths, this avoids color fringes in "ClearType-like" rendering
-
- * src/truetype/ttgload.c: modified the TrueType loader to make it
- more paranoid, this avoids nasty buffer overflows in the case of
- invalid glyph data (as encountered in the output of some buggy
- font converters..)
+ * src/autohint/ahhint.c (ah_align_linked_edge): Modified computation
+ of auto-hinted stem widths; this avoids color fringes in
+ "ClearType-like" rendering.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph_Header,
+ TT_Load_Simple_Glyph, TT_Load_Composite_Glyph, load_truetype_glyph):
+ Modified the TrueType loader to make it more paranoid; this avoids
+ nasty buffer overflows in the case of invalid glyph data (as
+ encountered in the output of some buggy font converters).
2002-01-04 David Turner <david@freetype.org>
- * README.UNX: added special README file for Unix users
+ * README.UNX: Added special README file for Unix users.
+
+ * builds/unix/ftsystem.c (FT_New_Stream): Fixed typo.
+
+ * src/base/ftobjs.c: Added #include FT_OUTLINE_H to get rid
+ of compiler warnings.
- * builds/unix/ftsystem.c (FT_New_Stream): fixed typo
-
- * src/base/ftobjs.c: added #include FT_OUTLINE_H to get rid
- of compiler warnings
-
- * src/base/ftoutln.c (FT_Outline_Check): remove compiler warning
+ * src/base/ftoutln.c (FT_Outline_Check): Remove compiler warning.
2002-01-03 Werner Lemberg <wl@gnu.org>
diff --git a/README b/README
index cf8c883..02200a8 100644
--- a/README
+++ b/README
@@ -2,20 +2,22 @@
Special note to Unix users
==========================
- Please read the file "README.UNX", it contains important information
- regarding the installation of FreeType on Unix systems, especially
- GNU based operating systems like GNU/Linux.
+ Please read the file "README.UNX", it contains important
+ information regarding the installation of FreeType on Unix
+ systems, especially GNU based operating systems like GNU/Linux.
FreeType 2.0.6
==============
- Please read the docs/CHANGES file, it contains IMPORTANT INFORMATION.
+ Please read the docs/CHANGES file, it contains IMPORTANT
+ INFORMATION.
- Read the files "INSTALL" or "docs/BUILD" for installation instructions.
+ Read the files "INSTALL" or "docs/BUILD" for installation
+ instructions.
- Note that the FreeType 2 documentation is now available as a separate
- package from our sites. See:
+ Note that the FreeType 2 documentation is now available as a
+ separate package from our sites. See:
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.0.6.tar.bz2
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.0.6.tar.gz
diff --git a/README.UNX b/README.UNX
index 933f599..5b113dc 100644
--- a/README.UNX
+++ b/README.UNX
@@ -1,109 +1,104 @@
-SPECIAL NOTE FOR UNIX USERS:
-============================
- If you're installing this release of FreeType on a system that
- already uses release 2.0.5 (or even an older version), you'll
- need to perform a few special steps to ensure that everything
- goes well:
-
-
- I. Enable the TrueType bytecode hinter if you need it:
- ------------------------------------------------------
-
- The TrueType bytecode interpreter is disabled in all
- public releases of the FreeType packages for patents
- reasons (see www.freetype.org/patents.html for more
- details).
+SPECIAL NOTE FOR UNIX USERS
+===========================
+
+ If you are installing this release of FreeType on a system that
+ already uses release 2.0.5 (or even an older version), you have to
+ perform a few special steps to ensure that everything goes well.
+
+
+ I. Enable the TrueType bytecode hinter if you need it
+ -----------------------------------------------------
+
+ The TrueType bytecode interpreter is disabled in all public
+ releases of the FreeType packages for patents reasons (see
+ http://www.freetype.org/patents.html for more details).
- However, many Linux distributions do enable the
- interpreter in the FreeType packages (DEB/RPM/etc..) they
- produce for their platforms. If you're using TrueType fonts
- on your system, you'll most probably want to enable it
- manually by doing the following:
+ However, many Linux distributions do enable the interpreter in the
+ FreeType packages (DEB/RPM/etc.) they produce for their platforms.
+ If you are using TrueType fonts on your system, you most probably
+ want to enable it manually by doing the following:
- open the file "include/freetype/config/ftoption.h"
- locate a line that says:
- #undef TT_CONFIG_OPTION_BYTECODE_ITNERPRETER
+ #undef TT_CONFIG_OPTION_BYTECODE_ITNERPRETER
- change it to:
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- of course, this must be done _before_ compiling the
- library
+ of course, this must be done _before_ compiling the library
- II. Determine the correct installation path:
- --------------------------------------------
+ II. Determine the correct installation path
+ -------------------------------------------
- By default, the source package will install the library
- in "/usr/local". However, many Unix distributions now
- install the library in "/usr", since FreeType is becoming
- a critical system component
-
+ By default, the source package will install the library in
+ "/usr/local". However, many Unix distributions now install the
+ library in "/usr", since FreeType is becoming a critical system
+ component.
If FreeType is already installed on your system, type
- freetype-config --prefix
+ freetype-config --prefix
- on the command line. This should return the installation
- path to use below (e.g. "/usr" or "/usr/local"). Otherwise,
- simply use "/usr"
-
-
- then, to build and install the library, type:
+ on the command line. This should return the installation path to
+ use below (e.g. "/usr" or "/usr/local"). Otherwise, simply use
+ "/usr".
+
+ Then, to build and install the library, type:
- make setup unix CFG="--prefix=<yourprefix>"
- make
- make install (as root)
+ make setup unix CFG="--prefix=<yourprefix>"
+ make
+ make install (as root)
- where "<yourprefix>" must be replaced by the prefix returned
- by the "freetype-config" command.
+ where "<yourprefix>" must be replaced by the prefix returned by
+ the "freetype-config" command.
- III. Take care of XFree86 4:
- ----------------------------
+ III. Take care of XFree86 version 4
+ -----------------------------------
- Certain recent Linux distributions will install _several_
- versions of FreeType on your system.. For example, on a
- fresh Mandrake 8.1 system, you'll find the following files:
+ Certain recent Linux distributions will install _several_ versions
+ of FreeType on your system. For example, on a fresh Mandrake 8.1
+ system, you can find the following files:
- /usr/lib/libfreetype.so which links to
- /usr/lib/libfreetype.6.1.0.so
+ /usr/lib/libfreetype.so which links to
+ /usr/lib/libfreetype.6.1.0.so
- and:
+ and
- /usr/X11R6/lib/libfreetype.so which links to
- /usr/X11R6/lib/libfreetype.6.0.so
+ /usr/X11R6/lib/libfreetype.so which links to
+ /usr/X11R6/lib/libfreetype.6.0.so
- note that these files correspond to two distinct versions of
- the library ! It seems that this surprising issue is due to
- the install scripts of recent XFree86 servers (from 4.1.0)
- which irremediably install their own (dated) version of
- the library in "/usr/X11R6/lib"
+ Note that these files correspond to two distinct versions of the
+ library! It seems that this surprising issue is due to the
+ install scripts of recent XFree86 servers (from 4.1.0) which
+ irremediably install their own (dated) version of the library in
+ "/usr/X11R6/lib".
- In certain _rare_ cases, you may experience minor problems if
- you install this release of the library in "/usr" only, namely,
- that certain applications will not benefit from the bug fixes
- and rendering improvements you'd expect..
+ In certain _rare_ cases you may experience minor problems if you
+ install this release of the library in "/usr" only, namely, that
+ certain applications will not benefit from the bug fixes and
+ rendering improvements you'd expect.
- There are two good ways to deal with such nasty systems:
+ There are two good ways to deal with this situation:
- - install the library _twice_, in "/usr" and in "/usr/X11R6"
- (you'll need to do that each time you install a new
- FreeType release though)
+ - Install the library _twice_, in "/usr" and in "/usr/X11R6"
+ (you have to do that each time you install a new FreeType
+ release though).
- - change the link in /usr/X11R6/lib/libfreetype.so to point
- to /usr/lib/libfreetype.so, and get rid of
- /usr/X11R6/lib/libfreetype.6.0.so
-
+ - Change the link in /usr/X11R6/lib/libfreetype.so to point to
- The FreeType Team is not responsible for this mess, so please contact
- either the XFree86 development team or your Linux distributor to help
- clear this issue.., or if the above information doesn't help..
+ /usr/lib/libfreetype.so,
+ and get rid of
+ /usr/X11R6/lib/libfreetype.6.0.so
-
\ No newline at end of file
+ The FreeType Team is not responsible for this problem, so please
+ contact either the XFree86 development team or your Linux
+ distributor to help clear this issue in case the information given
+ here doesn't help.
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 1db7c96..8157a68 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -240,6 +240,7 @@
FT_Stream stream = loader->stream;
FT_Int byte_len = loader->byte_len - 10;
+
if ( byte_len < 0 )
return TT_Err_Invalid_Outline;
@@ -281,8 +282,9 @@
short* cur = gloader->current.outline.contours;
short* limit = cur + n_contours;
- /* check room for contours array + instructions count */
- byte_len -= 2*(n_contours+1);
+
+ /* check space for contours array + instructions count */
+ byte_len -= 2 * ( n_contours + 1 );
if ( byte_len < 0 )
goto Invalid_Outline;
@@ -376,12 +378,12 @@
{
if ( *flag & 2 )
byte_len -= 1;
- else if ( (*flag & 16) == 0 )
+ else if ( ( *flag & 16 ) == 0 )
byte_len -= 2;
if ( *flag & 4 )
byte_len -= 1;
- else if ( (*flag & 32) == 0 )
+ else if ( ( *flag & 32 ) == 0 )
byte_len -= 2;
}
@@ -389,7 +391,6 @@
goto Invalid_Outline;
}
-
/* reading the X coordinates */
{
@@ -487,7 +488,7 @@
if ( error )
goto Fail;
- /* check room */
+ /* check space */
byte_len -= 4;
if ( byte_len < 0 )
goto Invalid_Composite;
@@ -499,7 +500,7 @@
subglyph->flags = GET_UShort();
subglyph->index = GET_UShort();
- /* check room */
+ /* check space */
byte_len -= 2;
if ( subglyph->flags & ARGS_ARE_WORDS )
byte_len -= 2;
@@ -823,7 +824,7 @@
goto Exit;
}
- loader->byte_len = (FT_Int) count;
+ loader->byte_len = (FT_Int)count;
#if 0
/* temporary hack */