From 248885405683d82a54f694feacc07113d697f862 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 28 Jul 2024 19:42:49 -0400 Subject: [PATCH] [bdf,pcf,winfonts,sfnt] Remove barely used marcros. * include/freetype/internal/ftobjs.h (FT_FACE_SIZE, FT_SIZE_FACE): Removed. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Updated. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): Ditto. --- include/freetype/internal/ftobjs.h | 6 ------ src/bdf/bdfdrivr.c | 4 ++-- src/pcf/pcfdrivr.c | 2 +- src/sfnt/ttbdf.c | 2 +- src/winfonts/winfnt.c | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index e6333c2aa..a1e93298f 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -604,12 +604,6 @@ FT_BEGIN_HEADER #define FT_FACE_MEMORY( x ) FT_FACE( x )->memory #define FT_FACE_STREAM( x ) FT_FACE( x )->stream -#define FT_SIZE_FACE( x ) FT_SIZE( x )->face -#define FT_SLOT_FACE( x ) FT_SLOT( x )->face - -#define FT_FACE_SLOT( x ) FT_FACE( x )->glyph -#define FT_FACE_SIZE( x ) FT_FACE( x )->size - /************************************************************************** * diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c index e02a16093..4b9d6347f 100644 --- a/src/bdf/bdfdrivr.c +++ b/src/bdf/bdfdrivr.c @@ -780,8 +780,8 @@ THE SOFTWARE. FT_UInt glyph_index, FT_Int32 load_flags ) { - BDF_Face bdf = (BDF_Face)FT_SIZE_FACE( size ); - FT_Face face = FT_FACE( bdf ); + FT_Face face = size->face; + BDF_Face bdf = (BDF_Face)face; FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; bdf_glyph_t glyph; diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c index f1dba0240..93632f17c 100644 --- a/src/pcf/pcfdrivr.c +++ b/src/pcf/pcfdrivr.c @@ -453,7 +453,7 @@ THE SOFTWARE. FT_UInt glyph_index, FT_Int32 load_flags ) { - PCF_Face face = (PCF_Face)FT_SIZE_FACE( size ); + PCF_Face face = (PCF_Face)size->face; FT_Stream stream; FT_Error error = FT_Err_Ok; FT_Bitmap* bitmap = &slot->bitmap; diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c index 6138fc46d..d9765f486 100644 --- a/src/sfnt/ttbdf.c +++ b/src/sfnt/ttbdf.c @@ -142,7 +142,7 @@ { TT_Face ttface = (TT_Face)face; TT_BDF bdf = &ttface->bdf; - FT_Size size = FT_FACE_SIZE( face ); + FT_Size size = face->size; FT_Error error = FT_Err_Ok; FT_Byte* p; FT_UInt count; diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c index 1a0f01949..6dbe74bf5 100644 --- a/src/winfonts/winfnt.c +++ b/src/winfonts/winfnt.c @@ -1006,7 +1006,7 @@ FT_UInt glyph_index, FT_Int32 load_flags ) { - FNT_Face face = (FNT_Face)FT_SIZE_FACE( size ); + FNT_Face face = (FNT_Face)size->face; FNT_Font font; FT_Error error = FT_Err_Ok; FT_Byte* p;