Minor comment formatting.
This commit is contained in:
parent
720ae67f35
commit
86e7385342
|
@ -3239,12 +3239,12 @@ FT_BEGIN_HEADER
|
||||||
* hinting algorithm and have the results rendered in horizontal LCD
|
* hinting algorithm and have the results rendered in horizontal LCD
|
||||||
* pixel mode, with code like
|
* pixel mode, with code like
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* FT_Load_Glyph( face, glyph_index,
|
* FT_Load_Glyph( face, glyph_index,
|
||||||
* load_flags | FT_LOAD_TARGET_LIGHT );
|
* 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,
|
* In general, you should stick with one rendering mode. For example,
|
||||||
* switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO
|
* switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO
|
||||||
|
|
|
@ -508,74 +508,71 @@ FT_BEGIN_HEADER
|
||||||
* be _replaced_ by this function (with newly allocated data).
|
* be _replaced_ by this function (with newly allocated data).
|
||||||
* Typically, you would use (omitting error handling):
|
* Typically, you would use (omitting error handling):
|
||||||
*
|
*
|
||||||
|
* {
|
||||||
|
* FT_Glyph glyph;
|
||||||
|
* FT_BitmapGlyph glyph_bitmap;
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
* // load glyph
|
||||||
|
* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
|
||||||
|
*
|
||||||
|
* // 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 )
|
||||||
* {
|
* {
|
||||||
* FT_Glyph glyph;
|
* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,
|
||||||
* FT_BitmapGlyph glyph_bitmap;
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* // load glyph
|
|
||||||
* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
|
|
||||||
*
|
|
||||||
* // 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,
|
|
||||||
* 0, 1 );
|
* 0, 1 );
|
||||||
* if ( error ) // `glyph' unchanged
|
* 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 );
|
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
|
* // 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 );
|
||||||
|
* }
|
||||||
*
|
*
|
||||||
* Here another example, again without error handling:
|
* 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 glyphs[MAX_GLYPHS]
|
* FT_Glyph bitmap = glyphs[idx];
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* for ( idx = 0; i < MAX_GLYPHS; i++ )
|
* // after this call, `bitmap' no longer points into
|
||||||
* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||
|
* // the `glyphs' array (and the old value isn't destroyed)
|
||||||
* FT_Get_Glyph ( face->glyph, &glyphs[idx] );
|
* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );
|
||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* for ( idx = 0; i < MAX_GLYPHS; i++ )
|
* FT_Done_Glyph( bitmap );
|
||||||
* {
|
|
||||||
* 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 );
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* ...
|
|
||||||
*
|
|
||||||
* for ( idx = 0; i < MAX_GLYPHS; i++ )
|
|
||||||
* FT_Done_Glyph( glyphs[idx] );
|
|
||||||
* }
|
* }
|
||||||
|
*
|
||||||
|
* ...
|
||||||
|
*
|
||||||
|
* for ( idx = 0; i < MAX_GLYPHS; i++ )
|
||||||
|
* FT_Done_Glyph( glyphs[idx] );
|
||||||
|
* }
|
||||||
*/
|
*/
|
||||||
FT_EXPORT( FT_Error )
|
FT_EXPORT( FT_Error )
|
||||||
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
|
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
|
||||||
|
|
|
@ -286,30 +286,30 @@ FT_BEGIN_HEADER
|
||||||
* wants to support incremental glyph loading. You should use it with
|
* wants to support incremental glyph loading. You should use it with
|
||||||
* @FT_PARAM_TAG_INCREMENTAL as in the following example:
|
* @FT_PARAM_TAG_INCREMENTAL as in the following example:
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* FT_Incremental_InterfaceRec inc_int;
|
* FT_Incremental_InterfaceRec inc_int;
|
||||||
* FT_Parameter parameter;
|
* FT_Parameter parameter;
|
||||||
* FT_Open_Args open_args;
|
* FT_Open_Args open_args;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* // set up incremental descriptor
|
* // set up incremental descriptor
|
||||||
* inc_int.funcs = my_funcs;
|
* inc_int.funcs = my_funcs;
|
||||||
* inc_int.object = my_object;
|
* inc_int.object = my_object;
|
||||||
*
|
*
|
||||||
* // set up optional parameter
|
* // set up optional parameter
|
||||||
* parameter.tag = FT_PARAM_TAG_INCREMENTAL;
|
* parameter.tag = FT_PARAM_TAG_INCREMENTAL;
|
||||||
* parameter.data = &inc_int;
|
* parameter.data = &inc_int;
|
||||||
*
|
*
|
||||||
* // set up FT_Open_Args structure
|
* // set up FT_Open_Args structure
|
||||||
* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
|
* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
|
||||||
* open_args.pathname = my_font_pathname;
|
* open_args.pathname = my_font_pathname;
|
||||||
* open_args.num_params = 1;
|
* open_args.num_params = 1;
|
||||||
* open_args.params = ¶meter; // we use one optional argument
|
* open_args.params = ¶meter; // we use one optional argument
|
||||||
*
|
*
|
||||||
* // open the font
|
* // open the font
|
||||||
* error = FT_Open_Face( library, &open_args, index, &face );
|
* error = FT_Open_Face( library, &open_args, index, &face );
|
||||||
* ...
|
* ...
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef struct FT_Incremental_InterfaceRec_
|
typedef struct FT_Incremental_InterfaceRec_
|
||||||
|
|
|
@ -73,20 +73,20 @@
|
||||||
* It can also be used to create a module error message table easily
|
* It can also be used to create a module error message table easily
|
||||||
* with something like
|
* 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_
|
* int mod_err_offset;
|
||||||
* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s },
|
* const char* mod_err_msg
|
||||||
* #define FT_MODERR_START_LIST {
|
* } ft_mod_errors[] =
|
||||||
* #define FT_MODERR_END_LIST { 0, 0 } };
|
|
||||||
*
|
*
|
||||||
* const struct
|
* #include FT_MODULE_ERRORS_H
|
||||||
* {
|
* }
|
||||||
* int mod_err_offset;
|
|
||||||
* const char* mod_err_msg
|
|
||||||
* } ft_mod_errors[] =
|
|
||||||
*
|
|
||||||
* #include FT_MODULE_ERRORS_H
|
|
||||||
* }
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -370,10 +370,10 @@ FT_BEGIN_HEADER
|
||||||
* A simple structure used to store a 2x2 matrix. Coefficients are
|
* A simple structure used to store a 2x2 matrix. Coefficients are
|
||||||
* in 16.16 fixed-point format. The computation performed is:
|
* in 16.16 fixed-point format. The computation performed is:
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
* x' = x*xx + y*xy
|
* x' = x*xx + y*xy
|
||||||
* y' = x*yx + y*yy
|
* y' = x*yx + y*yy
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* @fields:
|
* @fields:
|
||||||
* xx ::
|
* xx ::
|
||||||
|
|
|
@ -779,19 +779,19 @@ FT_BEGIN_HEADER
|
||||||
* If you need to determine the table's length you should first call this
|
* 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:
|
* 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 );
|
* error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
|
||||||
* if ( error ) { ... table does not exist ... }
|
* if ( error ) { ... table does not exist ... }
|
||||||
*
|
*
|
||||||
* buffer = malloc( length );
|
* buffer = malloc( length );
|
||||||
* if ( buffer == NULL ) { ... not enough memory ... }
|
* if ( buffer == NULL ) { ... not enough memory ... }
|
||||||
*
|
*
|
||||||
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
|
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
|
||||||
* if ( error ) { ... could not load table ... }
|
* if ( error ) { ... could not load table ... }
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* Note that structures like @TT_Header or @TT_OS2 can't be used with
|
* 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
|
* this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
|
||||||
|
|
Loading…
Reference in New Issue