diff --git a/src/freetype/sfdriver.c b/src/freetype/sfdriver.c index c4dcf6d75..fcde4e5d0 100644 --- a/src/freetype/sfdriver.c +++ b/src/freetype/sfdriver.c @@ -166,8 +166,8 @@ tt_face_free_name, /* TT_Free_Table_Func free_name */ NULL, /* TT_Load_Table_Func load_kern */ - tt_face_load_gasp, /* TT_Load_Table_Func load_gasp */ - tt_face_load_pclt, /* TT_Load_Table_Func load_init */ + NULL, /* TT_Load_Table_Func load_gasp */ + NULL, /* TT_Load_Table_Func load_init */ /* see `ttload.h' */ PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ), diff --git a/src/freetype/sfobjs.c b/src/freetype/sfobjs.c index 91fec5f72..1f33eaf12 100644 --- a/src/freetype/sfobjs.c +++ b/src/freetype/sfobjs.c @@ -1334,10 +1334,6 @@ if ( sfnt->load_eblc ) LOAD_( eblc ); - /* consider the pclt and gasp tables as optional */ - LOAD_( pclt ); - LOAD_( gasp ); - face->root.num_glyphs = face->max_profile.numGlyphs; /* Bit 8 of the `fsSelection' field in the `OS/2' table denotes */ @@ -1742,10 +1738,6 @@ face->vertical_info = 0; } - /* freeing the gasp table */ - FT_FREE( face->gasp.gaspRanges ); - face->gasp.numRanges = 0; - /* freeing the name table */ if ( sfnt ) sfnt->free_name( face ); diff --git a/src/freetype/ttload.c b/src/freetype/ttload.c index 1ffe9625a..5e3f5b464 100644 --- a/src/freetype/ttload.c +++ b/src/freetype/ttload.c @@ -1288,140 +1288,4 @@ } - /*************************************************************************/ - /* */ - /* */ - /* tt_face_load_pclt */ - /* */ - /* */ - /* Loads the PCL 5 Table. */ - /* */ - /* */ - /* face :: A handle to the target face object. */ - /* */ - /* stream :: A handle to the input stream. */ - /* */ - /* */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - tt_face_load_pclt( TT_Face face, - FT_Stream stream ) - { - static const FT_Frame_Field pclt_fields[] = - { -#undef FT_STRUCTURE -#define FT_STRUCTURE TT_PCLT - - FT_FRAME_START( 54 ), - FT_FRAME_ULONG ( Version ), - FT_FRAME_ULONG ( FontNumber ), - FT_FRAME_USHORT( Pitch ), - FT_FRAME_USHORT( xHeight ), - FT_FRAME_USHORT( Style ), - FT_FRAME_USHORT( TypeFamily ), - FT_FRAME_USHORT( CapHeight ), - FT_FRAME_USHORT( SymbolSet ), - FT_FRAME_BYTES ( TypeFace, 16 ), - FT_FRAME_BYTES ( CharacterComplement, 8 ), - FT_FRAME_BYTES ( FileName, 6 ), - FT_FRAME_CHAR ( StrokeWeight ), - FT_FRAME_CHAR ( WidthType ), - FT_FRAME_BYTE ( SerifStyle ), - FT_FRAME_BYTE ( Reserved ), - FT_FRAME_END - }; - - FT_Error error; - TT_PCLT* pclt = &face->pclt; - - - /* optional table */ - error = face->goto_table( face, TTAG_PCLT, stream, 0 ); - if ( error ) - goto Exit; - - if ( FT_STREAM_READ_FIELDS( pclt_fields, pclt ) ) - goto Exit; - - Exit: - return error; - } - - - /*************************************************************************/ - /* */ - /* */ - /* tt_face_load_gasp */ - /* */ - /* */ - /* Loads the `gasp' table into a face object. */ - /* */ - /* */ - /* face :: A handle to the target face object. */ - /* */ - /* stream :: The input stream. */ - /* */ - /* */ - /* FreeType error code. 0 means success. */ - /* */ - FT_LOCAL_DEF( FT_Error ) - tt_face_load_gasp( TT_Face face, - FT_Stream stream ) - { - FT_Error error; - FT_Memory memory = stream->memory; - - FT_UInt j,num_ranges; - TT_GaspRange gaspranges = NULL; - - - /* the gasp table is optional */ - error = face->goto_table( face, TTAG_gasp, stream, 0 ); - if ( error ) - goto Exit; - - if ( FT_FRAME_ENTER( 4L ) ) - goto Exit; - - face->gasp.version = FT_GET_USHORT(); - face->gasp.numRanges = FT_GET_USHORT(); - - FT_FRAME_EXIT(); - - /* only support versions 0 and 1 of the table */ - if ( face->gasp.version >= 2 ) - { - face->gasp.numRanges = 0; - error = FT_THROW( Invalid_Table ); - goto Exit; - } - - num_ranges = face->gasp.numRanges; - FT_TRACE3(( "numRanges: %u\n", num_ranges )); - - if ( FT_QNEW_ARRAY( face->gasp.gaspRanges, num_ranges ) || - FT_FRAME_ENTER( num_ranges * 4L ) ) - goto Exit; - - gaspranges = face->gasp.gaspRanges; - - for ( j = 0; j < num_ranges; j++ ) - { - gaspranges[j].maxPPEM = FT_GET_USHORT(); - gaspranges[j].gaspFlag = FT_GET_USHORT(); - - FT_TRACE3(( "gaspRange %d: rangeMaxPPEM %5d, rangeGaspBehavior 0x%x\n", - j, - gaspranges[j].maxPPEM, - gaspranges[j].gaspFlag )); - } - - FT_FRAME_EXIT(); - - Exit: - return error; - } - - /* END */ diff --git a/src/freetype/ttload.h b/src/freetype/ttload.h index c7cc63d11..67d3a9946 100644 --- a/src/freetype/ttload.h +++ b/src/freetype/ttload.h @@ -82,19 +82,9 @@ FT_BEGIN_HEADER tt_face_load_post( TT_Face face, FT_Stream stream ); - - FT_LOCAL( FT_Error ) - tt_face_load_pclt( TT_Face face, - FT_Stream stream ); - FT_LOCAL( void ) tt_face_free_name( TT_Face face ); - - FT_LOCAL( FT_Error ) - tt_face_load_gasp( TT_Face face, - FT_Stream stream ); - #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS FT_LOCAL( FT_Error ) diff --git a/src/freetype/tttables.h b/src/freetype/tttables.h index 495b74863..2aa8f0176 100644 --- a/src/freetype/tttables.h +++ b/src/freetype/tttables.h @@ -463,36 +463,6 @@ FT_BEGIN_HEADER } TT_Postscript; - /*************************************************************************/ - /* */ - /* */ - /* TT_PCLT */ - /* */ - /* */ - /* A structure to model a TrueType `PCLT' table. All fields comply */ - /* to the OpenType specification. */ - /* */ - typedef struct TT_PCLT_ - { - FT_Fixed Version; - FT_ULong FontNumber; - FT_UShort Pitch; - FT_UShort xHeight; - FT_UShort Style; - FT_UShort TypeFamily; - FT_UShort CapHeight; - FT_UShort SymbolSet; - FT_Char TypeFace[16]; - FT_Char CharacterComplement[8]; - FT_Char FileName[6]; - FT_Char StrokeWeight; - FT_Char WidthType; - FT_Byte SerifStyle; - FT_Byte Reserved; - - } TT_PCLT; - - /*************************************************************************/ /* */ /* */ diff --git a/src/freetype/tttypes.h b/src/freetype/tttypes.h index 19e4dbe42..a1316618f 100644 --- a/src/freetype/tttypes.h +++ b/src/freetype/tttypes.h @@ -347,71 +347,6 @@ FT_BEGIN_HEADER } TT_NameTableRec, *TT_NameTable; - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*** ***/ - /*** ***/ - /*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/ - /*** ***/ - /*** ***/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* */ - /* TT_GaspRangeRec */ - /* */ - /* */ - /* A tiny structure used to model a gasp range according to the */ - /* TrueType specification. */ - /* */ - /* */ - /* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */ - /* */ - /* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */ - /* modes to be used. */ - /* */ - typedef struct TT_GaspRangeRec_ - { - FT_UShort maxPPEM; - FT_UShort gaspFlag; - - } TT_GaspRangeRec, *TT_GaspRange; - - -#define TT_GASP_GRIDFIT 0x01 -#define TT_GASP_DOGRAY 0x02 - - - /*************************************************************************/ - /* */ - /* */ - /* TT_GaspRec */ - /* */ - /* */ - /* A structure modeling the TrueType `gasp' table used to specify */ - /* grid-fitting and anti-aliasing behaviour. */ - /* */ - /* */ - /* version :: The version number. */ - /* */ - /* numRanges :: The number of gasp ranges in table. */ - /* */ - /* gaspRanges :: An array of gasp ranges. */ - /* */ - typedef struct TT_Gasp_ - { - FT_UShort version; - FT_UShort numRanges; - TT_GaspRange gaspRanges; - - } TT_GaspRec; - - /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ @@ -1146,12 +1081,6 @@ FT_BEGIN_HEADER /* (`hdmx' table). This table is optional in */ /* TrueType/OpenType fonts. */ /* */ - /* gasp :: The grid-fitting and scaling properties */ - /* table (`gasp'). This table is optional in */ - /* TrueType/OpenType fonts. */ - /* */ - /* pclt :: The `pclt' SFNT table. */ - /* */ /* num_sbit_scales :: The number of sbit scales for this font. */ /* */ /* sbit_scales :: Array of sbit scales embedded in this */ @@ -1339,12 +1268,6 @@ FT_BEGIN_HEADER /* */ /***********************************************************************/ - /* grid-fitting and scaling table */ - TT_GaspRec gasp; /* the `gasp' table */ - - /* PCL 5 table */ - TT_PCLT pclt; - /* embedded bitmaps support */ FT_ULong num_sbit_scales; TT_SBit_Scale sbit_scales;