Documentation updates, whitespace.

This commit is contained in:
Werner Lemberg 2004-12-13 23:16:59 +00:00
parent a4aadf5401
commit ece8b20e6c
14 changed files with 152 additions and 22 deletions

View File

@ -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;

View File

@ -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 );

View File

@ -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,

View File

@ -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,

View File

@ -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 )

View File

@ -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, ... )
{

View File

@ -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 )
{

View File

@ -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,

View File

@ -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,

View File

@ -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 )

View File

@ -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,

View File

@ -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 )

View File

@ -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 )
{

View File

@ -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