Commit ad4597ba authored by David Turner's avatar David Turner
Browse files

* include/freetype/internal/psglobals.h (removed),

          include/freetype/internal/pshints.h,
          src/pshinter/pshglob.h: removing obsolete file

        * include/freetype/internal/tttypes.h,
          include/freetype/internal/sfnt.h,
          src/base/ftnames.c, src/cff/cffdrivr.c,
          src/sfnt/*.c, src/truetype/*.c: updated SFNT/TrueType type
          definitions
parent 875e7b7f
......@@ -40,7 +40,17 @@
src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
stc/type1/t1load.c, src/type1/t1tokens.h: updated common Postscript
type definitions
* include/freetype/internal/psglobals.h (removed),
include/freetype/internal/pshints.h,
src/pshinter/pshglob.h: removing obsolete file
* include/freetype/internal/tttypes.h,
include/freetype/internal/sfnt.h,
src/base/ftnames.c, src/cff/cffdrivr.c,
src/sfnt/*.c, src/truetype/*.c: updated SFNT/TrueType type
definitions
2002-03-13 Antoine Leca <antoine@oriolnet.com>
......
......@@ -25,7 +25,6 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
#include FT_INTERNAL_POSTSCRIPT_GLOBALS_H
FT_BEGIN_HEADER
......
......@@ -133,7 +133,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_Load_SFNT_Header_Func */
/* TT_Load_SFNT_HeaderRec_Func */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
......@@ -162,10 +162,10 @@ FT_BEGIN_HEADER
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
typedef FT_Error
(*TT_Load_SFNT_Header_Func)( TT_Face face,
(*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
FT_Stream stream,
FT_Long face_index,
SFNT_Header* sfnt );
SFNT_Header sfnt );
/*************************************************************************/
......@@ -194,7 +194,7 @@ FT_BEGIN_HEADER
typedef FT_Error
(*TT_Load_Directory_Func)( TT_Face face,
FT_Stream stream,
SFNT_Header* sfnt );
SFNT_Header sfnt );
/*************************************************************************/
......@@ -284,7 +284,7 @@ FT_BEGIN_HEADER
FT_UInt load_flags,
FT_Stream stream,
FT_Bitmap *amap,
TT_SBit_Metrics *ametrics );
TT_SBit_MetricsRec *ametrics );
/*************************************************************************/
......@@ -392,7 +392,7 @@ FT_BEGIN_HEADER
/* */
typedef FT_Error
(*TT_CharMap_Load_Func)( TT_Face face,
TT_CMapTable* cmap,
TT_CMapTable cmap,
FT_Stream input );
......@@ -414,7 +414,7 @@ FT_BEGIN_HEADER
/* */
typedef FT_Error
(*TT_CharMap_Free_Func)( TT_Face face,
TT_CMapTable* cmap );
TT_CMapTable cmap );
/*************************************************************************/
......@@ -479,7 +479,7 @@ FT_BEGIN_HEADER
SFNT_Get_Interface_Func get_interface;
TT_Load_Any_Func load_any;
TT_Load_SFNT_Header_Func load_sfnt_header;
TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
TT_Load_Directory_Func load_directory;
/* these functions are called by `load_face' but they can also */
......
This diff is collapsed.
......@@ -53,7 +53,7 @@
if ( idx < (FT_UInt)ttface->num_names )
{
TT_NameRec* name = ttface->name_table.names + idx;
TT_NameEntryRec* name = ttface->name_table.names + idx;
aname->platform_id = name->platformID;
......
......@@ -97,7 +97,7 @@
FT_UInt right_glyph,
FT_Vector* kerning )
{
TT_Kern_0_Pair* pair;
TT_Kern0_Pair pair;
if ( !face )
......@@ -295,7 +295,7 @@
{
FT_Error error;
CFF_Face face;
TT_CMapTable* cmap;
TT_CMapTable cmap;
cmap = &charmap->cmap;
......@@ -339,7 +339,7 @@
{
FT_Error error;
CFF_Face face;
TT_CMapTable* cmap;
TT_CMapTable cmap;
cmap = &charmap->cmap;
......
......@@ -21,7 +21,6 @@
#include FT_FREETYPE_H
#include FT_INTERNAL_POSTSCRIPT_GLOBALS_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
......
......@@ -128,7 +128,7 @@
for ( n = 0; n < face->num_names; n++ )
{
TT_NameRec* name = face->name_table.names + n;
TT_NameEntryRec* name = face->name_table.names + n;
if ( name->nameID == 6 && name->string != NULL )
......@@ -148,7 +148,7 @@
if ( found_win )
{
FT_Memory memory = face->root.memory;
TT_NameRec* name = face->name_table.names + found_win;
TT_NameEntryRec* name = face->name_table.names + found_win;
FT_UInt len = name->stringLength/2;
FT_Error error;
FT_String* result;
......@@ -171,7 +171,7 @@
if ( found_apple )
{
FT_Memory memory = face->root.memory;
TT_NameRec* name = face->name_table.names + found_win;
TT_NameEntryRec* name = face->name_table.names + found_win;
FT_UInt len = name->stringLength;
FT_Error error;
FT_String* result;
......@@ -223,7 +223,7 @@
SFNT_Get_Interface,
TT_Load_Any,
TT_Load_SFNT_Header,
TT_Load_SFNT_HeaderRec,
TT_Load_Directory,
TT_Load_Header,
......
......@@ -59,7 +59,7 @@
{
FT_Memory memory = face->root.memory;
FT_UShort n;
TT_NameRec* rec;
TT_NameEntryRec* rec;
FT_Bool wide_chars = 1;
FT_Int found_apple = -1;
FT_Int found_win = -1;
......@@ -215,7 +215,7 @@
FT_Error error;
FT_Library library = face->root.driver->root.library;
SFNT_Service sfnt;
SFNT_Header sfnt_header;
SFNT_HeaderRec sfnt_header;
/* for now, parameters are unused */
FT_UNUSED( num_params );
......
......@@ -35,51 +35,51 @@
FT_CALLBACK_DEF( FT_UInt )
code_to_index0( TT_CMapTable* charmap,
code_to_index0( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_ULong )
code_to_next0( TT_CMapTable* charmap,
code_to_next0( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_UInt )
code_to_index2( TT_CMapTable* charmap,
code_to_index2( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_ULong )
code_to_next2( TT_CMapTable* charmap,
code_to_next2( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_UInt )
code_to_index4( TT_CMapTable* charmap,
code_to_index4( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_ULong )
code_to_next4( TT_CMapTable* charmap,
code_to_next4( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_UInt )
code_to_index6( TT_CMapTable* charmap,
code_to_index6( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_ULong )
code_to_next6( TT_CMapTable* charmap,
code_to_next6( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_UInt )
code_to_index8_12( TT_CMapTable* charmap,
code_to_index8_12( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_ULong )
code_to_next8_12( TT_CMapTable* charmap,
code_to_next8_12( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_UInt )
code_to_index10( TT_CMapTable* charmap,
code_to_index10( TT_CMapTable charmap,
FT_ULong char_code );
FT_CALLBACK_DEF( FT_ULong )
code_to_next10( TT_CMapTable* charmap,
code_to_next10( TT_CMapTable charmap,
FT_ULong char_code );
......@@ -108,7 +108,7 @@
/* */
FT_LOCAL_DEF( FT_Error )
TT_CharMap_Load( TT_Face face,
TT_CMapTable* cmap,
TT_CMapTable cmap,
FT_Stream stream )
{
FT_Error error;
......@@ -118,16 +118,16 @@
FT_UShort u, l;
TT_CMap0* cmap0;
TT_CMap2* cmap2;
TT_CMap4* cmap4;
TT_CMap6* cmap6;
TT_CMap8_12* cmap8_12;
TT_CMap10* cmap10;
TT_CMap0 cmap0;
TT_CMap2 cmap2;
TT_CMap4 cmap4;
TT_CMap6 cmap6;
TT_CMap8_12 cmap8_12;
TT_CMap10 cmap10;
TT_CMap2SubHeader* cmap2sub;
TT_CMap4Segment* segments;
TT_CMapGroup* groups;
TT_CMap2SubHeader cmap2sub;
TT_CMap4Segment segments;
TT_CMapGroup groups;
if ( cmap->loaded )
......@@ -182,7 +182,7 @@
if ( ALLOC_ARRAY( cmap2->subHeaders,
num_SH + 1,
TT_CMap2SubHeader ) ||
TT_CMap2SubHeaderRec ) ||
ACCESS_Frame( ( num_SH + 1 ) * 8L ) )
{
FREE( cmap2->subHeaderKeys );
......@@ -246,7 +246,7 @@
if ( ALLOC_ARRAY( cmap4->segments,
num_Seg,
TT_CMap4Segment ) ||
TT_CMap4SegmentRec ) ||
ACCESS_Frame( ( num_Seg * 4 + 1 ) * 2L ) )
goto Fail;
......@@ -338,7 +338,7 @@
n = cmap8_12->nGroups;
if ( ALLOC_ARRAY( cmap8_12->groups, n, TT_CMapGroup ) ||
if ( ALLOC_ARRAY( cmap8_12->groups, n, TT_CMapGroupRec ) ||
ACCESS_Frame( n * 3 * 4L ) )
goto Fail;
......@@ -416,7 +416,7 @@
/* */
FT_LOCAL_DEF( FT_Error )
TT_CharMap_Free( TT_Face face,
TT_CMapTable* cmap )
TT_CMapTable cmap )
{
FT_Memory memory;
......@@ -488,10 +488,10 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
FT_CALLBACK_DEF( FT_UInt )
code_to_index0( TT_CMapTable* cmap,
code_to_index0( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap0* cmap0 = &cmap->c.cmap0;
TT_CMap0 cmap0 = &cmap->c.cmap0;
return ( charCode <= 0xFF ? cmap0->glyphIdArray[charCode] : 0 );
......@@ -516,10 +516,10 @@
/* Next char code. 0 if no higher one is encoded. */
/* */
FT_CALLBACK_DEF( FT_ULong )
code_to_next0( TT_CMapTable* cmap,
code_to_next0( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap0* cmap0 = &cmap->c.cmap0;
TT_CMap0 cmap0 = &cmap->c.cmap0;
while ( ++charCode <= 0xFF )
......@@ -545,14 +545,14 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
FT_CALLBACK_DEF( FT_UInt )
code_to_index2( TT_CMapTable* cmap,
code_to_index2( TT_CMapTable cmap,
FT_ULong charCode )
{
FT_UInt result, index1, offset;
FT_UInt char_lo;
FT_ULong char_hi;
TT_CMap2SubHeader* sh2;
TT_CMap2* cmap2;
TT_CMap2SubHeader sh2;
TT_CMap2 cmap2;
cmap2 = &cmap->c.cmap2;
......@@ -610,14 +610,14 @@
/* Next encoded character. 0 if none exists. */
/* */
FT_CALLBACK_DEF( FT_ULong )
code_to_next2( TT_CMapTable* cmap,
code_to_next2( TT_CMapTable cmap,
FT_ULong charCode )
{
FT_UInt index1, offset;
FT_UInt char_lo;
FT_ULong char_hi;
TT_CMap2SubHeader* sh2;
TT_CMap2* cmap2;
TT_CMap2SubHeader sh2;
TT_CMap2 cmap2;
cmap2 = &cmap->c.cmap2;
......@@ -693,12 +693,12 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
FT_CALLBACK_DEF( FT_UInt )
code_to_index4( TT_CMapTable* cmap,
code_to_index4( TT_CMapTable cmap,
FT_ULong charCode )
{
FT_UInt result, index1, segCount;
TT_CMap4* cmap4;
TT_CMap4Segment *seg4, *limit;
TT_CMap4 cmap4;
TT_CMap4SegmentRec *seg4, *limit;
cmap4 = &cmap->c.cmap4;
......@@ -777,12 +777,12 @@
/* Next encoded character. 0 if none exists. */
/* */
FT_CALLBACK_DEF( FT_ULong )
code_to_next4( TT_CMapTable* cmap,
code_to_next4( TT_CMapTable cmap,
FT_ULong charCode )
{
FT_UInt index1, segCount;
TT_CMap4* cmap4;
TT_CMap4Segment *seg4, *limit;
TT_CMap4 cmap4;
TT_CMap4SegmentRec *seg4, *limit;
cmap4 = &cmap->c.cmap4;
......@@ -844,10 +844,10 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
FT_CALLBACK_DEF( FT_UInt )
code_to_index6( TT_CMapTable* cmap,
code_to_index6( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap6* cmap6;
TT_CMap6 cmap6;
FT_UInt result = 0;
......@@ -877,10 +877,10 @@
/* Next encoded character. 0 if none exists. */
/* */
FT_CALLBACK_DEF( FT_ULong )
code_to_next6( TT_CMapTable* cmap,
code_to_next6( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap6* cmap6;
TT_CMap6 cmap6;
charCode++;
......@@ -920,11 +920,11 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
FT_CALLBACK_DEF( FT_UInt )
code_to_index8_12( TT_CMapTable* cmap,
code_to_index8_12( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap8_12* cmap8_12;
TT_CMapGroup *group, *limit;
TT_CMap8_12 cmap8_12;
TT_CMapGroupRec *group, *limit;
cmap8_12 = &cmap->c.cmap8_12;
......@@ -984,11 +984,11 @@
/* Next encoded character. 0 if none exists. */
/* */
FT_CALLBACK_DEF( FT_ULong )
code_to_next8_12( TT_CMapTable* cmap,
code_to_next8_12( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap8_12* cmap8_12;
TT_CMapGroup *group, *limit;
TT_CMap8_12 cmap8_12;
TT_CMapGroupRec *group, *limit;
charCode++;
......@@ -1030,10 +1030,10 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
FT_CALLBACK_DEF( FT_UInt )
code_to_index10( TT_CMapTable* cmap,
code_to_index10( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap10* cmap10;
TT_CMap10 cmap10;
FT_UInt result = 0;
......@@ -1067,10 +1067,10 @@
/* Next encoded character. 0 if none exists. */
/* */
FT_CALLBACK_DEF( FT_ULong )
code_to_next10( TT_CMapTable* cmap,
code_to_next10( TT_CMapTable cmap,
FT_ULong charCode )
{
TT_CMap10* cmap10;
TT_CMap10 cmap10;
charCode++;
......
......@@ -29,12 +29,12 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
TT_CharMap_Load( TT_Face face,
TT_CMapTable* cmap,
TT_CMapTable cmap,
FT_Stream input );
FT_LOCAL( FT_Error )
TT_CharMap_Free( TT_Face face,
TT_CMapTable* cmap );
TT_CMapTable cmap );
FT_END_HEADER
......
......@@ -53,12 +53,12 @@
/* <Return> */
/* A pointer to the table directory entry. 0 if not found. */
/* */
FT_LOCAL_DEF( TT_Table* )
FT_LOCAL_DEF( TT_Table )
TT_LookUp_Table( TT_Face face,
FT_ULong tag )
{
TT_Table* entry;
TT_Table* limit;
TT_Table entry;
TT_Table limit;
FT_TRACE3(( "TT_LookUp_Table: %08p, `%c%c%c%c' -- ",
......@@ -110,7 +110,7 @@
FT_Stream stream,
FT_ULong* length )
{
TT_Table* table;
TT_Table table;
FT_Error error;
......@@ -134,7 +134,7 @@
/*************************************************************************/
/* */
/* <Function> */
/* TT_Load_SFNT_Header */
/* TT_Load_SFNT_HeaderRec */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
......@@ -160,10 +160,10 @@
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
FT_LOCAL_DEF( FT_Error )
TT_Load_SFNT_Header( TT_Face face,
TT_Load_SFNT_HeaderRec( TT_Face face,
FT_Stream stream,
FT_Long face_index,
SFNT_Header* sfnt )
SFNT_Header sfnt )
{
FT_Error error;
FT_ULong format_tag;
......@@ -172,7 +172,7 @@
const FT_Frame_Field sfnt_header_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE SFNT_Header
#define FT_STRUCTURE SFNT_HeaderRec
FT_FRAME_START( 8 ),
FT_FRAME_USHORT( num_tables ),
......@@ -185,7 +185,7 @@
const FT_Frame_Field ttc_header_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE TTC_Header
#define FT_STRUCTURE TTC_HeaderRec
FT_FRAME_START( 8 ),
FT_FRAME_LONG( version ),
......@@ -193,7 +193,7 @@
FT_FRAME_END };
FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
FT_TRACE2(( "TT_Load_SFNT_HeaderRec: %08p, %ld\n",
face, face_index ));
face->ttc_header.tag = 0;
......@@ -213,7 +213,7 @@
FT_Int n;
FT_TRACE3(( "TT_Load_SFNT_Header: file is a collection\n" ));
FT_TRACE3(( "TT_Load_SFNT_HeaderRec: file is a collection\n" ));
/* it's a TrueType collection, i.e. a file containing several */
/* font files. Read the font directory now */
......@@ -263,7 +263,7 @@
entry_selector > num_tables ||
entry_selector * 2 <= num_tables )
{
FT_TRACE2(( "TT_Load_SFNT_Header: file is not SFNT!\n" ));
FT_TRACE2(( "TT_Load_SFNT_HeaderRec: file is not SFNT!\n" ));
error = SFNT_Err_Unknown_File_Format;
}
}
......@@ -297,12 +297,12 @@
FT_LOCAL_DEF( FT_Error )
TT_Load_Directory( TT_Face face,
FT_Stream stream,
SFNT_Header* sfnt )
SFNT_Header sfnt )
{
FT_Error error;
FT_Memory memory = stream->memory;
TT_Table *entry, *limit;
TT_TableRec *entry, *limit;
FT_TRACE2(( "TT_Load_Directory: %08p\n", face ));
......@@ -314,7 +314,7 @@
if ( ALLOC_ARRAY( face->dir_tables,
face->num_tables,
TT_Table ) )
TT_TableRec ) )
goto Exit;
if ( ACCESS_Frame( face->num_tables * 16L ) )
......@@ -397,7 +397,7 @@
{
FT_Error error;
FT_Stream stream;
TT_Table* table;
TT_Table table;
FT_ULong size;
......@@ -687,7 +687,7 @@
FT_ULong table_len;
FT_Long num_shorts, num_longs, num_shorts_checked;
TT_LongMetrics** longs;
TT_LongMetrics * longs;
TT_ShortMetrics** shorts;
......@@ -715,7 +715,7 @@
}