[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'. * include/ftbitmap.h, src/base/ftbitmap.c: Implement it. Update all callers. * docs/CHANGES: Updated.
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
diff --git a/ChangeLog b/ChangeLog
index d242616..c9d5ece 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-03-10 Werner Lemberg <wl@gnu.org>
+
+ [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 <wl@gnu.org>
* src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
diff --git a/docs/CHANGES b/docs/CHANGES
index 352563d..02dd5bd 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 4a1e83c..46cc47b 100644
--- a/include/ftbitmap.h
+++ b/include/ftbitmap.h
@@ -55,7 +55,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
- /* FT_Bitmap_New */
+ /* FT_Bitmap_Init */
/* */
/* <Description> */
/* Initialize a pointer to an @FT_Bitmap structure. */
@@ -63,6 +63,14 @@ FT_BEGIN_HEADER
/* <InOut> */
/* abitmap :: A pointer to the bitmap structure. */
/* */
+ /* <Note> */
+ /* 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 */
/* */
/* <Description> */
- /* Destroy a bitmap object created with @FT_Bitmap_New. */
+ /* Destroy a bitmap object initialized with @FT_Bitmap_Init. */
/* */
/* <Input> */
/* library :: A handle to a library object. */
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c
index 094a7a1..a54572a 100644
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -31,6 +31,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 )
{
if ( 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 2c10a99..d83018f 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 33d23bf..cf7841f 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 9f0f452..143f276 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 );