Add one more example to the documentation of FT_Glyph_To_Bitmap.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
diff --git a/ChangeLog.20 b/ChangeLog.20
index 78fad10..8fcc5e7 100644
--- a/ChangeLog.20
+++ b/ChangeLog.20
@@ -2597,7 +2597,7 @@
----------------------------------------------------------------------------
-Copyright 2000, 2001, 2002, 2007, 2008 by
+Copyright 2000, 2001, 2002, 2007 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used, modified,
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index 668a73f..fdf410e 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -444,6 +444,8 @@ FT_BEGIN_HEADER
/* FreeType error code. 0~means success. */
/* */
/* <Note> */
+ /* This function does nothing if the glyph format isn't scalable. */
+ /* */
/* The glyph image is translated with the `origin' vector before */
/* rendering. */
/* */
@@ -483,7 +485,42 @@ FT_BEGIN_HEADER
/* } */
/* */
/* */
- /* This function does nothing if the glyph format isn't scalable. */
+ /* 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, &glyph[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 ); */
+ /* } */
+ /* */
+ /* ... */
+ /* */
+ /* 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/src/cff/cffgload.c b/src/cff/cffgload.c
index 2d30b9d..935239d 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -426,9 +426,7 @@
}
#ifdef FT_DEBUG_LEVEL_TRACE
else
- {
FT_TRACE4(( "glyph index %d:\n", glyph_index ));
- }
#endif
decoder->num_locals = sub->num_local_subrs;