ref: ece8b20e6c51924b85f3055e555a430a2d4bfd1b
parent: a4aadf5401284c1beb2b0904c1d977c7e3f57d9c
author: Werner Lemberg <[email protected]>
date: Mon Dec 13 18:16:59 EST 2004
Documentation updates, whitespace.
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -264,24 +264,18 @@
/* 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_
{
--- 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 );
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -124,6 +124,28 @@
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 @@
/* */
/* <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 @@
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,
--- 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,
@@ -53,6 +55,8 @@
return error;
}
+
+ /* documentation is in ftbdf.h */
FT_EXPORT( FT_Error )
FT_Get_BDF_Property( FT_Face face,
--- 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 )
--- 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, ... )
{
@@ -59,6 +61,8 @@
va_end( ap );
}
+
+ /* documentation is in ftdebug.h */
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
--- 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 )
{
@@ -2564,6 +2566,8 @@
return cmap_info.language;
}
+
+ /* documentation is in ftsizes.h */
FT_EXPORT_DEF( FT_Error )
FT_Activate_Size( FT_Size size )
--- 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,
@@ -100,6 +104,8 @@
return error;
}
+
+ /* documentation is in ftpfr.h */
FT_EXPORT_DEF( FT_Error )
FT_Get_PFR_Advance( FT_Face face,
--- 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,
@@ -1878,6 +1913,8 @@
return error;
}
+
+ /* documentation is in ftstroke.h */
FT_EXPORT_DEF( FT_Error )
FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
--- 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 )
--- 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,
@@ -148,6 +150,8 @@
return FT_Err_Out_Of_Memory;
}
+
+ /* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )
FT_QRealloc( FT_Memory memory,
--- 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, */
@@ -21,6 +21,8 @@
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_WINFNT_H
+
+ /* documentation is in ftwinfnt.h */
FT_EXPORT_DEF( FT_Error )
FT_Get_WinFNT_Header( FT_Face face,
--- 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, */
@@ -20,6 +20,9 @@
#include FT_XFREE86_H
#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 )
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -677,8 +677,8 @@
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