Remove `FT_Outline_{New,Done}_Internal'. These public API functions(!) were always undocumented and have escaped all clean-up efforts until now. * include/freetype/ftoutln.h (FT_Outline_New_Internal, FT_Outline_Done_Internal): Removed. * src/base/ftoutln.h (FT_Outline_New_Internal, FT_Outline_Done_Internal): Merge into... (FT_Outline_New, FT_Outline_Done): ... these functions. * docs/README: 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 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
diff --git a/ChangeLog b/ChangeLog
index bc086cd..a748921 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2018-09-01 Werner Lemberg <wl@gnu.org>
+
+ Remove `FT_Outline_{New,Done}_Internal'.
+
+ These public API functions(!) were always undocumented and have
+ escaped all clean-up efforts until now.
+
+ * include/freetype/ftoutln.h (FT_Outline_New_Internal,
+ FT_Outline_Done_Internal): Removed.
+
+ * src/base/ftoutln.h (FT_Outline_New_Internal,
+ FT_Outline_Done_Internal): Merge into...
+ (FT_Outline_New, FT_Outline_Done): ... these functions.
+
+ * docs/README: Updated.
+
2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
diff --git a/docs/CHANGES b/docs/CHANGES
index 70bfe7a..2b4f4d8 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -6,7 +6,7 @@ CHANGES BETWEEN 2.9.1 and 2.10
II. IMPORTANT CHANGES
- - A bunch of new functions has been added to access and process
+ - A bunch of new functions has been added to access and process
COLR/CPAL data of OpenType fonts with coloured glyph layers.
FT_Palette_Data_Get
@@ -18,38 +18,43 @@ CHANGES BETWEEN 2.9.1 and 2.10
III. MISCELLANEOUS
- - `TT_Set_MM_Blend' could fail if call repeatedly with the same
+ - `TT_Set_MM_Blend' could fail if call repeatedly with the same
arguments.
- - The precision of handling deltas in Variation Fonts has been
- increased. The problem did only show up with multidimensional
+ - The precision of handling deltas in Variation Fonts has been
+ increased. The problem did only show up with multidimensional
designspaces.
- - New function `FT_Library_SetLcdGeometry' to set up the geometry
+ - New function `FT_Library_SetLcdGeometry' to set up the geometry
of LCD subpixels.
- FreeType now uses the `defaultChar' property of PCF fonts to set
- the glyph for the undefined character at glyph index 0 (as
+ the glyph for the undefined character at glyph index 0 (as
FreeType already does for all other supported font formats). As
- a consequence, the order of glyphs of a PCF font if accessed with
- FreeType can be different now compared to previous versions.
+ a consequence, the order of glyphs of a PCF font if accessed
+ with FreeType can be different now compared to previous
+ versions.
This change doesn't affect PCF font access with cmaps.
- - `FT_Select_Charmap' has been changed to allow parameter value
+ - `FT_Select_Charmap' has been changed to allow parameter value
`FT_ENCODING_NONE', which is valid for BDF, PCF, and Windows FNT
- formats to access built-in cmaps that don't have a predefined
+ formats to access built-in cmaps that don't have a predefined
`FT_Encoding' value.
- - A previously reserved field in the `FT_GlyphSlotRec' structure
+ - A previously reserved field in the `FT_GlyphSlotRec' structure
now holds the glyph index.
- - On Win32 platforms, the use of `_DLL' to build the library has
+ - On Win32 platforms, the use of `_DLL' to build the library has
been replaced with `DLL_EXPORT' and `DLL_IMPORT'.
- - The usual round of fuzzer bug fixes to better reject malformed
+ - The usual round of fuzzer bug fixes to better reject malformed
fonts.
+ - `FT_Outline_New_Internal' and `FT_Outline_Done_Internal' have
+ been removed. These two functions were public by oversight only
+ and were never documented either.
+
======================================================================
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index bbab07c..292616c 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -166,13 +166,6 @@ FT_BEGIN_HEADER
FT_Outline *anoutline );
- FT_EXPORT( FT_Error )
- FT_Outline_New_Internal( FT_Memory memory,
- FT_UInt numPoints,
- FT_Int numContours,
- FT_Outline *anoutline );
-
-
/**************************************************************************
*
* @function:
@@ -200,11 +193,6 @@ FT_BEGIN_HEADER
FT_Outline* outline );
- FT_EXPORT( FT_Error )
- FT_Outline_Done_Internal( FT_Memory memory,
- FT_Outline* outline );
-
-
/**************************************************************************
*
* @function:
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 2266ce1..85a4697 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -16,13 +16,6 @@
*/
- /**************************************************************************
- *
- * All functions are declared in freetype.h.
- *
- */
-
-
#include <ft2build.h>
#include FT_OUTLINE_H
#include FT_INTERNAL_OBJECTS_H
@@ -296,15 +289,23 @@
}
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error )
- FT_Outline_New_Internal( FT_Memory memory,
- FT_UInt numPoints,
- FT_Int numContours,
- FT_Outline *anoutline )
+ FT_Outline_New( FT_Library library,
+ FT_UInt numPoints,
+ FT_Int numContours,
+ FT_Outline *anoutline )
{
- FT_Error error;
+ FT_Error error;
+ FT_Memory memory;
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
+ memory = library->memory;
+
if ( !anoutline || !memory )
return FT_THROW( Invalid_Argument );
@@ -330,7 +331,7 @@
Fail:
anoutline->flags |= FT_OUTLINE_OWNER;
- FT_Outline_Done_Internal( memory, anoutline );
+ FT_Outline_Done( library, anoutline );
return error;
}
@@ -339,22 +340,6 @@
/* documentation is in ftoutln.h */
FT_EXPORT_DEF( FT_Error )
- FT_Outline_New( FT_Library library,
- FT_UInt numPoints,
- FT_Int numContours,
- FT_Outline *anoutline )
- {
- if ( !library )
- return FT_THROW( Invalid_Library_Handle );
-
- return FT_Outline_New_Internal( library->memory, numPoints,
- numContours, anoutline );
- }
-
-
- /* documentation is in ftoutln.h */
-
- FT_EXPORT_DEF( FT_Error )
FT_Outline_Check( FT_Outline* outline )
{
if ( outline )
@@ -436,13 +421,23 @@
}
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error )
- FT_Outline_Done_Internal( FT_Memory memory,
- FT_Outline* outline )
+ FT_Outline_Done( FT_Library library,
+ FT_Outline* outline )
{
+ FT_Memory memory;
+
+
+ if ( !library )
+ return FT_THROW( Invalid_Library_Handle );
+
if ( !outline )
return FT_THROW( Invalid_Outline );
+ memory = library->memory;
+
if ( !memory )
return FT_THROW( Invalid_Argument );
@@ -460,21 +455,6 @@
/* documentation is in ftoutln.h */
- FT_EXPORT_DEF( FT_Error )
- FT_Outline_Done( FT_Library library,
- FT_Outline* outline )
- {
- /* check for valid `outline' in FT_Outline_Done_Internal() */
-
- if ( !library )
- return FT_THROW( Invalid_Library_Handle );
-
- return FT_Outline_Done_Internal( library->memory, outline );
- }
-
-
- /* documentation is in ftoutln.h */
-
FT_EXPORT_DEF( void )
FT_Outline_Get_CBox( const FT_Outline* outline,
FT_BBox *acbox )