ref: 86e7385342b11ac6a2a179a80585d629e97f2a1f
parent: 720ae67f35701819f6bf3fd9337dc89079a4ed27
author: Werner Lemberg <[email protected]>
date: Mon Aug 6 06:24:08 EDT 2018
Minor comment formatting.
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3239,12 +3239,12 @@
* hinting algorithm and have the results rendered in horizontal LCD
* pixel mode, with code like
*
- * {
- * FT_Load_Glyph( face, glyph_index,
- * load_flags | FT_LOAD_TARGET_LIGHT );
+ * {
+ * FT_Load_Glyph( face, glyph_index,
+ * load_flags | FT_LOAD_TARGET_LIGHT );
*
- * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
- * }
+ * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
+ * }
*
* In general, you should stick with one rendering mode. For example,
* switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -508,74 +508,71 @@
* be _replaced_ by this function (with newly allocated data).
* Typically, you would use (omitting error handling):
*
+ * {
+ * FT_Glyph glyph;
+ * FT_BitmapGlyph glyph_bitmap;
*
- * {
- * FT_Glyph glyph;
- * FT_BitmapGlyph glyph_bitmap;
*
+ * // load glyph
+ * error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
*
- * // load glyph
- * error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
+ * // extract glyph image
+ * error = FT_Get_Glyph( face->glyph, &glyph );
*
- * // extract glyph image
- * error = FT_Get_Glyph( face->glyph, &glyph );
- *
- * // convert to a bitmap (default render mode + destroying old)
- * if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )
- * {
- * error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,
+ * // convert to a bitmap (default render mode + destroying old)
+ * if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )
+ * {
+ * error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,
* 0, 1 );
- * if ( error ) // `glyph' unchanged
- * ...
- * }
+ * if ( error ) // `glyph' unchanged
+ * ...
+ * }
*
- * // access bitmap content by typecasting
- * glyph_bitmap = (FT_BitmapGlyph)glyph;
+ * // access bitmap content by typecasting
+ * glyph_bitmap = (FT_BitmapGlyph)glyph;
*
- * // do funny stuff with it, like blitting/drawing
- * ...
+ * // do funny stuff with it, like blitting/drawing
+ * ...
*
- * // discard glyph image (bitmap or not)
- * FT_Done_Glyph( glyph );
- * }
+ * // discard glyph image (bitmap or not)
+ * FT_Done_Glyph( glyph );
+ * }
*
- *
* Here another example, again without error handling:
*
+ * {
+ * FT_Glyph glyphs[MAX_GLYPHS]
*
- * {
- * FT_Glyph glyphs[MAX_GLYPHS]
*
+ * ...
*
- * ...
+ * for ( idx = 0; i < MAX_GLYPHS; i++ )
+ * error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||
+ * FT_Get_Glyph ( face->glyph, &glyphs[idx] );
*
- * for ( idx = 0; i < MAX_GLYPHS; i++ )
- * error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||
- * FT_Get_Glyph ( face->glyph, &glyphs[idx] );
+ * ...
*
- * ...
+ * for ( idx = 0; i < MAX_GLYPHS; i++ )
+ * {
+ * FT_Glyph bitmap = glyphs[idx];
*
- * for ( idx = 0; i < MAX_GLYPHS; i++ )
- * {
- * FT_Glyph bitmap = glyphs[idx];
*
+ * ...
*
- * ...
+ * // after this call, `bitmap' no longer points into
+ * // the `glyphs' array (and the old value isn't destroyed)
+ * FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );
*
- * // after this call, `bitmap' no longer points into
- * // the `glyphs' array (and the old value isn't destroyed)
- * FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );
- *
- * ...
- *
- * FT_Done_Glyph( bitmap );
- * }
- *
* ...
*
- * for ( idx = 0; i < MAX_GLYPHS; i++ )
- * FT_Done_Glyph( glyphs[idx] );
+ * FT_Done_Glyph( bitmap );
* }
+ *
+ * ...
+ *
+ * for ( idx = 0; i < MAX_GLYPHS; i++ )
+ * FT_Done_Glyph( glyphs[idx] );
+ * }
*/
FT_EXPORT( FT_Error )
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -286,30 +286,30 @@
* wants to support incremental glyph loading. You should use it with
* @FT_PARAM_TAG_INCREMENTAL as in the following example:
*
- * {
- * FT_Incremental_InterfaceRec inc_int;
- * FT_Parameter parameter;
- * FT_Open_Args open_args;
+ * {
+ * FT_Incremental_InterfaceRec inc_int;
+ * FT_Parameter parameter;
+ * FT_Open_Args open_args;
*
*
- * // set up incremental descriptor
- * inc_int.funcs = my_funcs;
- * inc_int.object = my_object;
+ * // set up incremental descriptor
+ * inc_int.funcs = my_funcs;
+ * inc_int.object = my_object;
*
- * // set up optional parameter
- * parameter.tag = FT_PARAM_TAG_INCREMENTAL;
- * parameter.data = &inc_int;
+ * // set up optional parameter
+ * parameter.tag = FT_PARAM_TAG_INCREMENTAL;
+ * parameter.data = &inc_int;
*
- * // set up FT_Open_Args structure
- * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
- * open_args.pathname = my_font_pathname;
- * open_args.num_params = 1;
- * open_args.params = ¶meter; // we use one optional argument
+ * // set up FT_Open_Args structure
+ * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
+ * open_args.pathname = my_font_pathname;
+ * open_args.num_params = 1;
+ * open_args.params = ¶meter; // we use one optional argument
*
- * // open the font
- * error = FT_Open_Face( library, &open_args, index, &face );
- * ...
- * }
+ * // open the font
+ * error = FT_Open_Face( library, &open_args, index, &face );
+ * ...
+ * }
*
*/
typedef struct FT_Incremental_InterfaceRec_
--- a/include/freetype/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
@@ -73,20 +73,20 @@
* It can also be used to create a module error message table easily
* with something like
*
+ * {
+ * #undef FTMODERR_H_
+ * #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s },
+ * #define FT_MODERR_START_LIST {
+ * #define FT_MODERR_END_LIST { 0, 0 } };
+ *
+ * const struct
* {
- * #undef FTMODERR_H_
- * #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s },
- * #define FT_MODERR_START_LIST {
- * #define FT_MODERR_END_LIST { 0, 0 } };
+ * int mod_err_offset;
+ * const char* mod_err_msg
+ * } ft_mod_errors[] =
*
- * const struct
- * {
- * int mod_err_offset;
- * const char* mod_err_msg
- * } ft_mod_errors[] =
- *
- * #include FT_MODULE_ERRORS_H
- * }
+ * #include FT_MODULE_ERRORS_H
+ * }
*
*/
--- a/include/freetype/fttypes.h
+++ b/include/freetype/fttypes.h
@@ -370,10 +370,10 @@
* A simple structure used to store a 2x2 matrix. Coefficients are
* in 16.16 fixed-point format. The computation performed is:
*
- * {
- * x' = x*xx + y*xy
- * y' = x*yx + y*yy
- * }
+ * {
+ * x' = x*xx + y*xy
+ * y' = x*yx + y*yy
+ * }
*
* @fields:
* xx ::
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -779,19 +779,19 @@
* If you need to determine the table's length you should first call this
* function with `*length' set to~0, as in the following example:
*
- * {
- * FT_ULong length = 0;
+ * {
+ * FT_ULong length = 0;
*
*
- * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
- * if ( error ) { ... table does not exist ... }
+ * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
+ * if ( error ) { ... table does not exist ... }
*
- * buffer = malloc( length );
- * if ( buffer == NULL ) { ... not enough memory ... }
+ * buffer = malloc( length );
+ * if ( buffer == NULL ) { ... not enough memory ... }
*
- * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
- * if ( error ) { ... could not load table ... }
- * }
+ * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
+ * if ( error ) { ... could not load table ... }
+ * }
*
* Note that structures like @TT_Header or @TT_OS2 can't be used with
* this function; they are limited to @FT_Get_Sfnt_Table. Reason is that