From 2d494f79f0fef7823acd96495cd98f73df348e2d Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 15 Apr 2020 23:34:02 +1000 Subject: [PATCH] Remove unused FT_Reference_Face/FT_Reference_Library and some deprecated constants --- src/freetype/freetype.h | 98 ----------------------------------------- src/freetype/ftmodapi.h | 36 --------------- src/freetype/ftobjs.c | 28 ------------ 3 files changed, 162 deletions(-) diff --git a/src/freetype/freetype.h b/src/freetype/freetype.h index 95f766708..f20820779 100644 --- a/src/freetype/freetype.h +++ b/src/freetype/freetype.h @@ -174,7 +174,6 @@ FT_BEGIN_HEADER /* */ /* FT_New_Face */ /* FT_Done_Face */ - /* FT_Reference_Face */ /* FT_New_Memory_Face */ /* FT_Face_Properties */ /* FT_Open_Face */ @@ -702,21 +701,6 @@ FT_BEGIN_HEADER /* This value is deprecated and was neither used nor reported by */ /* FreeType. Don't use or test for it. */ /* */ - /* FT_ENCODING_MS_SJIS :: */ - /* Same as FT_ENCODING_SJIS. Deprecated. */ - /* */ - /* FT_ENCODING_MS_GB2312 :: */ - /* Same as FT_ENCODING_PRC. Deprecated. */ - /* */ - /* FT_ENCODING_MS_BIG5 :: */ - /* Same as FT_ENCODING_BIG5. Deprecated. */ - /* */ - /* FT_ENCODING_MS_WANSUNG :: */ - /* Same as FT_ENCODING_WANSUNG. Deprecated. */ - /* */ - /* FT_ENCODING_MS_JOHAB :: */ - /* Same as FT_ENCODING_JOHAB. Deprecated. */ - /* */ /* */ /* By default, FreeType enables a Unicode charmap and tags it with */ /* FT_ENCODING_UNICODE when it is either provided or can be generated */ @@ -770,14 +754,6 @@ FT_BEGIN_HEADER FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), - /* for backward compatibility */ - FT_ENCODING_GB2312 = FT_ENCODING_PRC, - FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, - FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC, - FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, - FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, - FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, - FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), @@ -790,25 +766,6 @@ FT_BEGIN_HEADER } FT_Encoding; - /* these constants are deprecated; use the corresponding `FT_Encoding' */ - /* values instead */ -#define ft_encoding_none FT_ENCODING_NONE -#define ft_encoding_unicode FT_ENCODING_UNICODE -#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL -#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 -#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 -#define ft_encoding_sjis FT_ENCODING_SJIS -#define ft_encoding_gb2312 FT_ENCODING_PRC -#define ft_encoding_big5 FT_ENCODING_BIG5 -#define ft_encoding_wansung FT_ENCODING_WANSUNG -#define ft_encoding_johab FT_ENCODING_JOHAB - -#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD -#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT -#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM -#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN - - /*************************************************************************/ /* */ /* */ @@ -1155,9 +1112,6 @@ FT_BEGIN_HEADER /* The face contains vertical glyph metrics. This is only */ /* available in some formats, not all of them. */ /* */ - /* FT_FACE_FLAG_FAST_GLYPHS :: */ - /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ - /* */ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ /* The face contains multiple masters and is capable of */ /* interpolating between them. Supported formats are Adobe MM, */ @@ -1335,18 +1289,6 @@ FT_BEGIN_HEADER ( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) - /************************************************************************* - * - * @macro: - * FT_HAS_FAST_GLYPHS( face ) - * - * @description: - * Deprecated. - * - */ -#define FT_HAS_FAST_GLYPHS( face ) 0 - - /************************************************************************* * * @macro: @@ -2157,9 +2099,6 @@ FT_BEGIN_HEADER /* @FT_Open_Face and its siblings can be called multiple times using */ /* the same `library' argument. */ /* */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Face. */ - /* */ /* To loop over all faces, use code similar to the following snippet */ /* (omitting the error handling). */ /* */ @@ -2235,33 +2174,6 @@ FT_BEGIN_HEADER FT_Face *aface ); - /*************************************************************************/ - /* */ - /* */ - /* FT_Reference_Face */ - /* */ - /* */ - /* A counter gets initialized to~1 at the time an @FT_Face structure */ - /* is created. This function increments the counter. @FT_Done_Face */ - /* then only destroys a face if the counter is~1, otherwise it simply */ - /* decrements the counter. */ - /* */ - /* This function helps in managing life-cycles of structures that */ - /* reference @FT_Face objects. */ - /* */ - /* */ - /* face :: A handle to a target face object. */ - /* */ - /* */ - /* FreeType error code. 0~means success. */ - /* */ - /* */ - /* 2.4.2 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Reference_Face( FT_Face face ); - - /*************************************************************************/ /* */ /* */ @@ -2277,10 +2189,6 @@ FT_BEGIN_HEADER /* */ /* FreeType error code. 0~means success. */ /* */ - /* */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Face. */ - /* */ FT_EXPORT( FT_Error ) FT_Done_Face( FT_Face face ); @@ -3035,12 +2943,6 @@ FT_BEGIN_HEADER } FT_Render_Mode; - /* these constants are deprecated; use the corresponding */ - /* `FT_Render_Mode' values instead */ -#define ft_render_mode_normal FT_RENDER_MODE_NORMAL -#define ft_render_mode_mono FT_RENDER_MODE_MONO - - /*************************************************************************/ /* */ /* */ diff --git a/src/freetype/ftmodapi.h b/src/freetype/ftmodapi.h index 6e54f6fb7..15a04e4d8 100644 --- a/src/freetype/ftmodapi.h +++ b/src/freetype/ftmodapi.h @@ -83,7 +83,6 @@ FT_BEGIN_HEADER /* */ /* FT_New_Library */ /* FT_Done_Library */ - /* FT_Reference_Library */ /* */ /* FT_Renderer */ /* FT_Renderer_Class */ @@ -283,33 +282,6 @@ FT_BEGIN_HEADER FT_Module module ); - /*************************************************************************/ - /* */ - /* */ - /* FT_Reference_Library */ - /* */ - /* */ - /* A counter gets initialized to~1 at the time an @FT_Library */ - /* structure is created. This function increments the counter. */ - /* @FT_Done_Library then only destroys a library if the counter is~1, */ - /* otherwise it simply decrements the counter. */ - /* */ - /* This function helps in managing life-cycles of structures that */ - /* reference @FT_Library objects. */ - /* */ - /* */ - /* library :: A handle to a target library object. */ - /* */ - /* */ - /* FreeType error code. 0~means success. */ - /* */ - /* */ - /* 2.4.2 */ - /* */ - FT_EXPORT( FT_Error ) - FT_Reference_Library( FT_Library library ); - - /*************************************************************************/ /* */ /* */ @@ -339,10 +311,6 @@ FT_BEGIN_HEADER /* */ /* FreeType error code. 0~means success. */ /* */ - /* */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Library. */ - /* */ FT_EXPORT( FT_Error ) FT_New_Library( FT_Memory memory, FT_Library *alibrary ); @@ -363,10 +331,6 @@ FT_BEGIN_HEADER /* */ /* FreeType error code. 0~means success. */ /* */ - /* */ - /* See the discussion of reference counters in the description of */ - /* @FT_Reference_Library. */ - /* */ FT_EXPORT( FT_Error ) FT_Done_Library( FT_Library library ); diff --git a/src/freetype/ftobjs.c b/src/freetype/ftobjs.c index 48669d700..5157310d1 100644 --- a/src/freetype/ftobjs.c +++ b/src/freetype/ftobjs.c @@ -1827,20 +1827,6 @@ } - /* documentation is in freetype.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Reference_Face( FT_Face face ) - { - if ( !face ) - return FT_THROW( Invalid_Face_Handle ); - - face->internal->refcount++; - - return FT_Err_Ok; - } - - /* documentation is in freetype.h */ FT_EXPORT_DEF( FT_Error ) @@ -3567,20 +3553,6 @@ /*************************************************************************/ - /* documentation is in ftmodapi.h */ - - FT_EXPORT_DEF( FT_Error ) - FT_Reference_Library( FT_Library library ) - { - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - - library->refcount++; - - return FT_Err_Ok; - } - - /* documentation is in ftmodapi.h */ FT_EXPORT_DEF( FT_Error )