diff --git a/ChangeLog b/ChangeLog index d24261648..c9d5ece3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-03-10 Werner Lemberg + + [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'. + + * include/ftbitmap.h, src/base/ftbitmap.c: Implement it. + Update all callers. + + * docs/CHANGES: Updated. + 2015-03-06 Werner Lemberg * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. diff --git a/docs/CHANGES b/docs/CHANGES index 352563df4..02dd5bdae 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -21,6 +21,8 @@ CHANGES BETWEEN 2.5.5 and 2.6 need the lock to be held as long as the same `FT_Face' is not used from multiple threads at the same time. + - Thai script support has been added to the auto-hinter. + III. MISCELLANEOUS @@ -32,6 +34,10 @@ CHANGES BETWEEN 2.5.5 and 2.6 This change doesn't break the ABI; however, it might cause compiler warnings. + - Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init', + since this name better reflects its function. For backwards + compatibility, the old function name is still available. + ====================================================================== diff --git a/include/ftbitmap.h b/include/ftbitmap.h index 4a1e83c31..46cc47b7d 100644 --- a/include/ftbitmap.h +++ b/include/ftbitmap.h @@ -55,7 +55,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* */ - /* FT_Bitmap_New */ + /* FT_Bitmap_Init */ /* */ /* */ /* Initialize a pointer to an @FT_Bitmap structure. */ @@ -63,6 +63,14 @@ FT_BEGIN_HEADER /* */ /* abitmap :: A pointer to the bitmap structure. */ /* */ + /* */ + /* A deprecated name for the same function is `FT_Bitmap_New'. */ + /* */ + FT_EXPORT( void ) + FT_Bitmap_Init( FT_Bitmap *abitmap ); + + + /* deprecated */ FT_EXPORT( void ) FT_Bitmap_New( FT_Bitmap *abitmap ); @@ -202,7 +210,7 @@ FT_BEGIN_HEADER /* FT_Bitmap_Done */ /* */ /* */ - /* Destroy a bitmap object created with @FT_Bitmap_New. */ + /* Destroy a bitmap object initialized with @FT_Bitmap_Init. */ /* */ /* */ /* library :: A handle to a library object. */ diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c index 094a7a1f8..a54572aaa 100644 --- a/src/base/ftbitmap.c +++ b/src/base/ftbitmap.c @@ -30,6 +30,16 @@ /* documentation is in ftbitmap.h */ + FT_EXPORT_DEF( void ) + FT_Bitmap_Init( FT_Bitmap *abitmap ) + { + if ( abitmap ) + *abitmap = null_bitmap; + } + + + /* deprecated function name; retained for ABI compatibility */ + FT_EXPORT_DEF( void ) FT_Bitmap_New( FT_Bitmap *abitmap ) { @@ -297,7 +307,7 @@ /* convert to 8bpp */ - FT_Bitmap_New( &tmp ); + FT_Bitmap_Init( &tmp ); error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 ); if ( error ) return error; @@ -759,7 +769,7 @@ FT_Error error; - FT_Bitmap_New( &bitmap ); + FT_Bitmap_Init( &bitmap ); error = FT_Bitmap_Copy( slot->library, &slot->bitmap, &bitmap ); if ( error ) return error; diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c index 2c10a99db..d83018fcf 100644 --- a/src/base/ftglyph.c +++ b/src/base/ftglyph.c @@ -82,7 +82,7 @@ } else { - FT_Bitmap_New( &glyph->bitmap ); + FT_Bitmap_Init( &glyph->bitmap ); error = FT_Bitmap_Copy( library, &slot->bitmap, &glyph->bitmap ); } diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 33d23bf4f..cf7841ff2 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -4123,7 +4123,7 @@ FT_Error err; - FT_Bitmap_New( &bitmap ); + FT_Bitmap_Init( &bitmap ); /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */ err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 ); diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index 9f0f45291..143f276d3 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -1448,7 +1448,7 @@ FT_Library library = face->root.glyph->library; - FT_Bitmap_New( &new_map ); + FT_Bitmap_Init( &new_map ); /* Convert to 8bit grayscale. */ error = FT_Bitmap_Convert( library, map, &new_map, 1 );