Documentation updates, whitespace.
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 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index c67d67b..ca0ed21 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -264,25 +264,19 @@ FT_BEGIN_HEADER
/* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */
/* See @FT_Pixel_Mode for possible values. */
/* */
- /* palette_mode :: This field is only used with paletted pixel modes; */
- /* it indicates how the palette is stored. */
+ /* palette_mode :: This field is intended for paletted pixel modes; */
+ /* it indicates how the palette is stored. Not */
+ /* used currently. */
/* */
- /* palette :: A typeless pointer to the bitmap palette; only */
- /* used for paletted pixel modes. */
+ /* palette :: A typeless pointer to the bitmap palette; this */
+ /* field is intended for paletted pixel modes. Not */
+ /* used currently. */
/* */
/* <Note> */
- /* For now, the only pixel mode supported by FreeType are mono and */
+ /* For now, the only pixel modes supported by FreeType are mono and */
/* grays. However, drivers might be added in the future to support */
/* more `colorful' options. */
/* */
- /* When using pixel modes pal2, pal4 and pal8 with a void `palette' */
- /* field, a gray pixmap with respectively 4, 16, and 256 levels of */
- /* gray is assumed. This, in order to be compatible with some */
- /* embedded bitmap formats defined in the TrueType specification. */
- /* */
- /* Note that no font was found presenting such embedded bitmaps, so */
- /* this is currently completely unhandled by the library. */
- /* */
typedef struct FT_Bitmap_
{
int rows;
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 7866c46..0df502c 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,6 +27,23 @@
FT_BEGIN_HEADER
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_FixedSqrt */
+ /* */
+ /* <Description> */
+ /* Computes the square root of a 16.16 fixed point value. */
+ /* */
+ /* <Input> */
+ /* x :: The value to compute the root for. */
+ /* */
+ /* <Return> */
+ /* The result of `sqrt(x)'. */
+ /* */
+ /* <Note> */
+ /* This function is not very fast. */
+ /* */
FT_EXPORT( FT_Int32 )
FT_SqrtFixed( FT_Int32 x );
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index ea9870f..417d148 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -124,6 +124,28 @@ FT_BEGIN_HEADER
void* *P );
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_QAlloc */
+ /* */
+ /* <Description> */
+ /* Allocates a new block of memory. The returned area is *not* */
+ /* zero-filled, making allocation quicker. */
+ /* */
+ /* <Input> */
+ /* memory :: A handle to a given `memory object' which handles */
+ /* allocation. */
+ /* */
+ /* size :: The size in bytes of the block to allocate. */
+ /* */
+ /* <Output> */
+ /* P :: A pointer to the fresh new block. It should be set to */
+ /* NULL if `size' is 0, or in case of error. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
FT_BASE( FT_Error )
FT_QAlloc( FT_Memory memory,
FT_Long size,
@@ -137,7 +159,8 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
- /* from the heap, possibly changing `*P'. */
+ /* from the heap, possibly changing `*P'. The returned area is */
+ /* zero-filled. */
/* */
/* <Input> */
/* memory :: A handle to a given `memory object' which handles */
@@ -165,6 +188,35 @@ FT_BEGIN_HEADER
void* *P );
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Realloc */
+ /* */
+ /* <Description> */
+ /* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
+ /* from the heap, possibly changing `*P'. The returned area is *not* */
+ /* zero-filled, making reallocation quicker. */
+ /* */
+ /* <Input> */
+ /* memory :: A handle to a given `memory object' which handles */
+ /* reallocation. */
+ /* */
+ /* current :: The current block size in bytes. */
+ /* */
+ /* size :: The new block size in bytes. */
+ /* */
+ /* <InOut> */
+ /* P :: A pointer to the fresh new block. It should be set to */
+ /* NULL if `size' is 0, or in case of error. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* All callers of FT_Realloc() _must_ provide the current block size */
+ /* as well as the new one. */
+ /* */
FT_BASE( FT_Error )
FT_QRealloc( FT_Memory memory,
FT_Long current,
diff --git a/src/base/ftbdf.c b/src/base/ftbdf.c
index d2f133d..fec27e2 100644
--- a/src/base/ftbdf.c
+++ b/src/base/ftbdf.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (body). */
/* */
-/* Copyright 2002, 2003 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,8 @@
#include FT_SERVICE_BDF_H
+ /* documentation is in ftbdf.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_BDF_Charset_ID( FT_Face face,
const char* *acharset_encoding,
@@ -54,6 +56,8 @@
}
+ /* documentation is in ftbdf.h */
+
FT_EXPORT( FT_Error )
FT_Get_BDF_Property( FT_Face face,
const char* prop_name,
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index f169642..6e19e55 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -586,7 +586,7 @@
#endif /* FT_LONG64 */
- /* a not-so-fast but working 16.16 fixed point square root function */
+ /* documentation is in ftcalc.h */
FT_EXPORT_DEF( FT_Int32 )
FT_SqrtFixed( FT_Int32 x )
diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c
index 95f3dbf..160f20b 100644
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -48,6 +48,8 @@
#if defined( FT_DEBUG_LEVEL_ERROR )
+ /* documentation is in ftdebug.h */
+
FT_EXPORT_DEF( void )
FT_Message( const char* fmt, ... )
{
@@ -60,6 +62,8 @@
}
+ /* documentation is in ftdebug.h */
+
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
{
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 58b0711..756fa93 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2543,6 +2543,8 @@
}
+ /* documentation is in tttables.h */
+
FT_EXPORT_DEF( FT_ULong )
FT_Get_CMap_Language_ID( FT_CharMap charmap )
{
@@ -2565,6 +2567,8 @@
}
+ /* documentation is in ftsizes.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Activate_Size( FT_Size size )
{
diff --git a/src/base/ftpfr.c b/src/base/ftpfr.c
index fb959e3..9e930dd 100644
--- a/src/base/ftpfr.c
+++ b/src/base/ftpfr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (body). */
/* */
-/* Copyright 2002, 2003 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,6 +33,8 @@
}
+ /* documentation is in ftpfr.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_PFR_Metrics( FT_Face face,
FT_UInt *aoutline_resolution,
@@ -78,6 +80,8 @@
}
+ /* documentation is in ftpfr.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_PFR_Kerning( FT_Face face,
FT_UInt left,
@@ -101,6 +105,8 @@
}
+ /* documentation is in ftpfr.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_PFR_Advance( FT_Face face,
FT_UInt gindex,
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index 40128ac..fee3607 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -24,6 +24,9 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
+
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_StrokerBorder )
FT_Outline_GetInsideBorder( FT_Outline* outline )
{
@@ -35,6 +38,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_StrokerBorder )
FT_Outline_GetOutsideBorder( FT_Outline* outline )
{
@@ -708,6 +713,8 @@
} FT_StrokerRec;
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_New( FT_Memory memory,
FT_Stroker *astroker )
@@ -728,6 +735,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( void )
FT_Stroker_Set( FT_Stroker stroker,
FT_Fixed radius,
@@ -744,6 +753,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( void )
FT_Stroker_Rewind( FT_Stroker stroker )
{
@@ -755,6 +766,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( void )
FT_Stroker_Done( FT_Stroker stroker )
{
@@ -1086,6 +1099,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_LineTo( FT_Stroker stroker,
FT_Vector* to )
@@ -1147,6 +1162,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_ConicTo( FT_Stroker stroker,
FT_Vector* control,
@@ -1243,6 +1260,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_CubicTo( FT_Stroker stroker,
FT_Vector* control1,
@@ -1351,6 +1370,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_BeginSubPath( FT_Stroker stroker,
FT_Vector* to,
@@ -1433,6 +1454,8 @@
}
+ /* documentation is in ftstroke.h */
+
/* there's a lot of magic in this function! */
FT_EXPORT_DEF( FT_Error )
FT_Stroker_EndSubPath( FT_Stroker stroker )
@@ -1515,6 +1538,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_GetBorderCounts( FT_Stroker stroker,
FT_StrokerBorder border,
@@ -1544,6 +1569,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Stroker_GetCounts( FT_Stroker stroker,
FT_UInt *anum_points,
@@ -1574,6 +1601,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( void )
FT_Stroker_ExportBorder( FT_Stroker stroker,
FT_StrokerBorder border,
@@ -1591,6 +1620,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( void )
FT_Stroker_Export( FT_Stroker stroker,
FT_Outline* outline )
@@ -1600,6 +1631,8 @@
}
+ /* documentation is in ftstroke.h */
+
/*
* The following is very similar to FT_Outline_Decompose, except
* that we do support opened paths, and do not scale the outline.
@@ -1809,6 +1842,8 @@
extern const FT_Glyph_Class ft_outline_glyph_class;
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Glyph_Stroke( FT_Glyph *pglyph,
FT_Stroker stroker,
@@ -1879,6 +1914,8 @@
}
+ /* documentation is in ftstroke.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
FT_Stroker stroker,
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index 541af4e..e030b35 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -35,6 +35,8 @@
/*************************************************************************/
/*************************************************************************/
+ /* documentation is in ftsynth.h */
+
FT_EXPORT_DEF( void )
FT_GlyphSlot_Oblique( FT_GlyphSlot slot )
{
@@ -70,6 +72,7 @@
/*************************************************************************/
+ /* documentation is in ftsynth.h */
FT_EXPORT_DEF( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot )
diff --git a/src/base/ftutil.c b/src/base/ftutil.c
index 9d3ec43..ac3760f 100644
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -77,6 +77,8 @@
}
+ /* documentation is in ftmemory.h */
+
FT_BASE_DEF( FT_Error )
FT_QAlloc( FT_Memory memory,
FT_Long size,
@@ -149,6 +151,8 @@
}
+ /* documentation is in ftmemory.h */
+
FT_BASE_DEF( FT_Error )
FT_QRealloc( FT_Memory memory,
FT_Long current,
diff --git a/src/base/ftwinfnt.c b/src/base/ftwinfnt.c
index 46f618c..bc2e90e 100644
--- a/src/base/ftwinfnt.c
+++ b/src/base/ftwinfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows FNT specific info (body). */
/* */
-/* Copyright 2003 by */
+/* Copyright 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,8 @@
#include FT_SERVICE_WINFNT_H
+ /* documentation is in ftwinfnt.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_WinFNT_Header( FT_Face face,
FT_WinFNT_HeaderRec *header )
diff --git a/src/base/ftxf86.c b/src/base/ftxf86.c
index 04e8023..a4bf767 100644
--- a/src/base/ftxf86.c
+++ b/src/base/ftxf86.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for X11 support (body). */
/* */
-/* Copyright 2002, 2003 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,9 @@
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_XFREE86_NAME_H
+
+ /* documentation is in ftxf86.h */
+
FT_EXPORT_DEF( const char* )
FT_Get_X11_Font_Format( FT_Face face )
{
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index e8b0451..b32e70d 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -677,8 +677,8 @@ THE SOFTWARE.
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
bitmap->pitch = glyph.bpr;
- /* note: we don't allocate a new array to hold the bitmap, we */
- /* can simply point to it */
+ /* note: we don't allocate a new array to hold the bitmap; */
+ /* we can simply point to it */
ft_glyphslot_set_bitmap( slot, glyph.bitmap );
}
else