summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2018-08-06 10:24:08 +0200
committerWerner Lemberg <wl@gnu.org>2018-08-06 10:24:08 +0200
commit86e7385342b11ac6a2a179a80585d629e97f2a1f (patch)
treef271ba9bea044e26980b5f9d8220c95102269804
parent720ae67f35701819f6bf3fd9337dc89079a4ed27 (diff)
downloadfreetype2-86e7385342b11ac6a2a179a80585d629e97f2a1f.tar.gz
Minor comment formatting.
-rw-r--r--include/freetype/freetype.h10
-rw-r--r--include/freetype/ftglyph.h87
-rw-r--r--include/freetype/ftincrem.h48
-rw-r--r--include/freetype/ftmoderr.h26
-rw-r--r--include/freetype/fttypes.h8
-rw-r--r--include/freetype/tttables.h18
6 files changed, 97 insertions, 100 deletions
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 92a4b44f3..620df4c7a 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3239,12 +3239,12 @@ FT_BEGIN_HEADER
* 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
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index 38419302e..be17a7764 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -508,74 +508,71 @@ FT_BEGIN_HEADER
* 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
- * ...
- * }
- *
- * // access bitmap content by typecasting
- * glyph_bitmap = (FT_BitmapGlyph)glyph;
- *
- * // do funny stuff with it, like blitting/drawing
- * ...
- *
- * // discard glyph image (bitmap or not)
- * FT_Done_Glyph( glyph );
+ * if ( error ) // `glyph' unchanged
+ * ...
* }
*
+ * // access bitmap content by typecasting
+ * glyph_bitmap = (FT_BitmapGlyph)glyph;
*
- * Here another example, again without error handling:
- *
+ * // do funny stuff with it, like blitting/drawing
+ * ...
*
- * {
- * FT_Glyph glyphs[MAX_GLYPHS]
+ * // discard glyph image (bitmap or not)
+ * FT_Done_Glyph( glyph );
+ * }
*
+ * Here another example, again without error handling:
*
- * ...
+ * {
+ * 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++ )
- * {
- * FT_Glyph bitmap = 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];
*
- * // 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 );
- * }
+ * // 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 );
*
* ...
*
- * 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,
diff --git a/include/freetype/ftincrem.h b/include/freetype/ftincrem.h
index 08bba7329..b3a17c30a 100644
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -286,30 +286,30 @@ FT_BEGIN_HEADER
* 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;
- *
- *
- * // 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 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 = &parameter; // we use one optional argument
- *
- * // open the font
- * error = FT_Open_Face( library, &open_args, index, &face );
- * ...
- * }
+ * {
+ * 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 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 = &parameter; // we use one optional argument
+ *
+ * // open the font
+ * error = FT_Open_Face( library, &open_args, index, &face );
+ * ...
+ * }
*
*/
typedef struct FT_Incremental_InterfaceRec_
diff --git a/include/freetype/ftmoderr.h b/include/freetype/ftmoderr.h
index 1f71633c0..661b0da0e 100644
--- 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 } };
- *
- * const struct
- * {
- * int mod_err_offset;
- * const char* mod_err_msg
- * } ft_mod_errors[] =
- *
- * #include FT_MODULE_ERRORS_H
- * }
+ * int mod_err_offset;
+ * const char* mod_err_msg
+ * } ft_mod_errors[] =
+ *
+ * #include FT_MODULE_ERRORS_H
+ * }
*
*/
diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h
index de69e3b9f..9da08a0c9 100644
--- a/include/freetype/fttypes.h
+++ b/include/freetype/fttypes.h
@@ -370,10 +370,10 @@ FT_BEGIN_HEADER
* 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 ::
diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h
index c23d3c69b..8ecc8e274 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -779,19 +779,19 @@ FT_BEGIN_HEADER
* 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