ref: 9be656bb0c0baa8df8c9fa30100e1cbe865346db
parent: 809d5125af527dd589d303cd8ae988dad58d00d6
author: Werner Lemberg <[email protected]>
date: Sat Sep 1 07:01:52 EDT 2018
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2018-09-01 Werner Lemberg <[email protected]>
+
+ 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 <[email protected]>
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -6,7 +6,7 @@
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,37 +18,42 @@
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.
======================================================================
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -166,13 +166,6 @@
FT_Outline *anoutline );
- FT_EXPORT( FT_Error )
- FT_Outline_New_Internal( FT_Memory memory,
- FT_UInt numPoints,
- FT_Int numContours,
- FT_Outline *anoutline );
-
-
/**************************************************************************
*
* @function:
@@ -198,11 +191,6 @@
FT_EXPORT( FT_Error )
FT_Outline_Done( FT_Library library,
FT_Outline* outline );
-
-
- FT_EXPORT( FT_Error )
- FT_Outline_Done_Internal( FT_Memory memory,
- FT_Outline* outline );
/**************************************************************************
--- 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 );
@@ -455,21 +450,6 @@
*outline = null_outline;
return FT_Err_Ok;
- }
-
-
- /* 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 );
}