diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index c67d67bc8..ca0ed2156 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. */ /* */ /* */ - /* 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 7866c4627..0df502c75 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 + /*************************************************************************/ + /* */ + /* */ + /* FT_FixedSqrt */ + /* */ + /* */ + /* Computes the square root of a 16.16 fixed point value. */ + /* */ + /* */ + /* x :: The value to compute the root for. */ + /* */ + /* */ + /* The result of `sqrt(x)'. */ + /* */ + /* */ + /* 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 ea9870f47..417d1483e 100644 --- a/include/freetype/internal/ftmemory.h +++ b/include/freetype/internal/ftmemory.h @@ -124,6 +124,28 @@ FT_BEGIN_HEADER void* *P ); + /*************************************************************************/ + /* */ + /* */ + /* FT_QAlloc */ + /* */ + /* */ + /* Allocates a new block of memory. The returned area is *not* */ + /* zero-filled, making allocation quicker. */ + /* */ + /* */ + /* memory :: A handle to a given `memory object' which handles */ + /* allocation. */ + /* */ + /* size :: The size in bytes of the block to allocate. */ + /* */ + /* */ + /* P :: A pointer to the fresh new block. It should be set to */ + /* NULL if `size' is 0, or in case of error. */ + /* */ + /* */ + /* 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 /* */ /* */ /* 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. */ /* */ /* */ /* memory :: A handle to a given `memory object' which handles */ @@ -165,6 +188,35 @@ FT_BEGIN_HEADER void* *P ); + /*************************************************************************/ + /* */ + /* */ + /* FT_Realloc */ + /* */ + /* */ + /* 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. */ + /* */ + /* */ + /* 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. */ + /* */ + /* */ + /* P :: A pointer to the fresh new block. It should be set to */ + /* NULL if `size' is 0, or in case of error. */ + /* */ + /* */ + /* FreeType error code. 0 means success. */ + /* */ + /* */ + /* 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 d2f133db7..fec27e2db 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 f169642e0..6e19e55f3 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 95f3dbf53..160f20bfa 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 58b07115b..756fa9363 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 fb959e37f..9e930ddf7 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 40128acba..fee3607d6 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 541af4e86..e030b3502 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 9d3ec43d7..ac3760f2d 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 46f618c51..bc2e90e1f 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 04e80236e..a4bf767df 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 e8b0451ab..b32e70d97 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