summaryrefslogtreecommitdiffstats
path: root/include/freetype/ftoutln.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/freetype/ftoutln.h')
-rw-r--r--include/freetype/ftoutln.h70
1 files changed, 41 insertions, 29 deletions
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 873e64b..d7d01e8 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -84,7 +84,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Decompose */
/* */
/* <Description> */
- /* Walks over an outline's structure to decompose it into individual */
+ /* Walk over an outline's structure to decompose it into individual */
/* segments and Bézier arcs. This function is also able to emit */
/* `move to' and `close to' operations to indicate the start and end */
/* of new contours in the outline. */
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
/* <Input> */
/* outline :: A pointer to the source target. */
/* */
- /* func_interface :: A table of `emitters', i.e,. function pointers */
+ /* func_interface :: A table of `emitters', i.e., function pointers */
/* called during decomposition to indicate path */
/* operations. */
/* */
@@ -103,7 +103,7 @@ FT_BEGIN_HEADER
/* decomposition. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Decompose( FT_Outline* outline,
@@ -117,7 +117,7 @@ FT_BEGIN_HEADER
/* FT_Outline_New */
/* */
/* <Description> */
- /* Creates a new outline of a given size. */
+ /* Create a new outline of a given size. */
/* */
/* <Input> */
/* library :: A handle to the library object from where the */
@@ -130,11 +130,10 @@ FT_BEGIN_HEADER
/* numContours :: The maximal number of contours within the outline. */
/* */
/* <Output> */
- /* anoutline :: A handle to the new outline. NULL in case of */
- /* error. */
+ /* anoutline :: A handle to the new outline. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* The reason why this function takes a `library' parameter is simply */
@@ -160,7 +159,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Done */
/* */
/* <Description> */
- /* Destroys an outline created with @FT_Outline_New. */
+ /* Destroy an outline created with @FT_Outline_New. */
/* */
/* <Input> */
/* library :: A handle of the library object used to allocate the */
@@ -169,7 +168,7 @@ FT_BEGIN_HEADER
/* outline :: A pointer to the outline object to be discarded. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* If the outline's `owner' field is not set, only the outline */
@@ -200,7 +199,7 @@ FT_BEGIN_HEADER
/* outline :: A handle to a source outline. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Check( FT_Outline* outline );
@@ -212,7 +211,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Get_CBox */
/* */
/* <Description> */
- /* Returns an outline's `control box'. The control box encloses all */
+ /* Return an outline's `control box'. The control box encloses all */
/* the outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */
@@ -240,7 +239,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Translate */
/* */
/* <Description> */
- /* Applies a simple translation to the points of an outline. */
+ /* Apply a simple translation to the points of an outline. */
/* */
/* <InOut> */
/* outline :: A pointer to the target outline descriptor. */
@@ -262,7 +261,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Copy */
/* */
/* <Description> */
- /* Copies an outline into another one. Both objects must have the */
+ /* Copy an outline into another one. Both objects must have the */
/* same sizes (number of points & number of contours) when this */
/* function is called. */
/* */
@@ -273,7 +272,7 @@ FT_BEGIN_HEADER
/* target :: A handle to the target outline. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Copy( const FT_Outline* source,
@@ -286,7 +285,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Transform */
/* */
/* <Description> */
- /* Applies a simple 2x2 matrix to all of an outline's points. Useful */
+ /* Apply a simple 2x2 matrix to all of an outline's points. Useful */
/* for applying rotations, slanting, flipping, etc. */
/* */
/* <InOut> */
@@ -310,7 +309,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Embolden */
/* */
/* <Description> */
- /* Emboldens an outline. The new outline will be at most 4 times */
+ /* Embolden an outline. The new outline will be at most 4~times */
/* `strength' pixels wider and higher. You may think of the left and */
/* bottom borders as unchanged. */
/* */
@@ -325,7 +324,7 @@ FT_BEGIN_HEADER
/* 26.6 pixel format. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* The used algorithm to increase or decrease the thickness of the */
@@ -333,6 +332,9 @@ FT_BEGIN_HEADER
/* situations like acute angles or intersections are sometimes */
/* handled incorrectly. */
/* */
+ /* If you need `better' metrics values you should call */
+ /* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */
+ /* */
/* Example call: */
/* */
/* { */
@@ -352,14 +354,14 @@ FT_BEGIN_HEADER
/* FT_Outline_Reverse */
/* */
/* <Description> */
- /* Reverses the drawing direction of an outline. This is used to */
+ /* Reverse the drawing direction of an outline. This is used to */
/* ensure consistent fill conventions for mirrored glyphs. */
/* */
/* <InOut> */
/* outline :: A pointer to the target outline descriptor. */
/* */
/* <Note> */
- /* This functions toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */
+ /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */
/* the outline's `flags' field. */
/* */
/* It shouldn't be used by a normal client application, unless it */
@@ -375,7 +377,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Get_Bitmap */
/* */
/* <Description> */
- /* Renders an outline within a bitmap. The outline's image is simply */
+ /* Render an outline within a bitmap. The outline's image is simply */
/* OR-ed to the target bitmap. */
/* */
/* <Input> */
@@ -387,14 +389,19 @@ FT_BEGIN_HEADER
/* abitmap :: A pointer to the target bitmap descriptor. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* This function does NOT CREATE the bitmap, it only renders an */
- /* outline image within the one you pass to it! */
+ /* outline image within the one you pass to it! Consequently, the */
+ /* various fields in `abitmap' should be set accordingly. */
/* */
/* It will use the raster corresponding to the default glyph format. */
/* */
+ /* The value of the `num_grays' field in `abitmap' is ignored. If */
+ /* you select the gray-level rasterizer, and you want less than 256 */
+ /* gray levels, you have to use @FT_Outline_Render directly. */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Get_Bitmap( FT_Library library,
FT_Outline* outline,
@@ -407,8 +414,8 @@ FT_BEGIN_HEADER
/* FT_Outline_Render */
/* */
/* <Description> */
- /* Renders an outline within a bitmap using the current scan-convert. */
- /* This functions uses an @FT_Raster_Params structure as an argument, */
+ /* Render an outline within a bitmap using the current scan-convert. */
+ /* This function uses an @FT_Raster_Params structure as an argument, */
/* allowing advanced features like direct composition, translucency, */
/* etc. */
/* */
@@ -422,7 +429,7 @@ FT_BEGIN_HEADER
/* describe the rendering operation. */
/* */
/* <Return> */
- /* FreeType error code. 0 means success. */
+ /* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* You should know what you are doing and how @FT_Raster_Params works */
@@ -432,6 +439,11 @@ FT_BEGIN_HEADER
/* converter is called, which means that the value you give to it is */
/* actually ignored. */
/* */
+ /* The gray-level rasterizer always uses 256 gray levels. If you */
+ /* want less gray levels, you have to provide your own span callback. */
+ /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */
+ /* @FT_Raster_Params structure for more details. */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Render( FT_Library library,
FT_Outline* outline,
@@ -446,7 +458,7 @@ FT_BEGIN_HEADER
* @description:
* A list of values used to describe an outline's contour orientation.
*
- * The TrueType and Postscript specifications use different conventions
+ * The TrueType and PostScript specifications use different conventions
* to determine whether outline contours should be filled or unfilled.
*
* @values:
@@ -455,7 +467,7 @@ FT_BEGIN_HEADER
* be filled, and counter-clockwise ones must be unfilled.
*
* FT_ORIENTATION_POSTSCRIPT ::
- * According to the Postscript specification, counter-clockwise contours
+ * According to the PostScript specification, counter-clockwise contours
* must be filled, and clockwise ones must be unfilled.
*
* FT_ORIENTATION_FILL_RIGHT ::
@@ -465,7 +477,7 @@ FT_BEGIN_HEADER
*
* FT_ORIENTATION_FILL_LEFT ::
* This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
- * remember that in Postscript, everything that is to the left of
+ * remember that in PostScript, everything that is to the left of
* the drawing direction of a contour must be filled.
*
* FT_ORIENTATION_NONE ::