ref: f8ba2005ab6f35ad5cda250dfc6105101a10acb4
parent: 78e004e84388998ff8ff23e4e8b7d5976d039c77
author: Werner Lemberg <[email protected]>
date: Sat Mar 30 08:16:35 EST 2002
* include/freetype/t1tables.h (t1_blend_max): Fix typo. * src/base/ftstream.c: Simplify FT_ERROR calls. formatting, copyright update
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-30 Werner Lemberg <[email protected]>
+
+ * include/freetype/t1tables.h (t1_blend_max): Fix typo.
+ * src/base/ftstream.c: Simplify FT_ERROR calls.
+
2002-03-29 Werner Lemberg <[email protected]>
* builds/vms/ftconfig.h: Rename LOCAL_DEF and LOCAL_FUNC to
@@ -146,6 +151,8 @@
FT_AutoHinter_Done_Global_Func => FT_AutoHinter_GlobalDoneFunc
etc.
+ * ahloader.h [_STANDALONE_]: Removed all conditional code.
+
* include/freetype/internal/cfftypes.h, src/cff/*.c: Updating the
type definitions of the CFF font driver.
@@ -169,18 +176,26 @@
FTDriver_initGlyphSlot => FT_Slot_InitFunc
etc.
- * include/freetype/internal/ftobjs.h, src/base/ftapi.c,
- src/base/ftobjs.c: Updated a few face method definitions:
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: Updated a
+ few face method definitions:
FT_PSName_Requester => FT_Face_GetPostscriptNameFunc
FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc
FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc
+ * src/base/ftapi.c: New file. It contains backwards compatibility
+ functions.
+
* include/freetype/internal/psaux.h, src/cid/cidload.c,
src/cidtoken.h, 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.
+ Renamed all enumeration values like to uppercase variants:
+ t1_token_any => T1_TOKEN_TYPE_ANY
+ t1_field_cid_info => T1_FIELD_LOCATION_CID_INFO
+ etc.
+
* include/freetype/internal/psglobals.h,
include/freetype/internal/pshints.h, src/pshinter/pshglob.h:
Removing obsolete files.
@@ -278,9 +293,9 @@
(psh1_print_zone): This.
* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
- src/base/ftobjs.c, src/base/ftinit.c: Adding the new
- FT_Library_Version API to return the library's current version in
- dynamic links.
+ src/base/ftobjs.c: Adding the new FT_Library_Version API to return
+ the library's current version in dynamic links.
+ * src/base/ftinit.c (FT_Init_FreeType): Updated.
2002-03-06 Werner Lemberg <[email protected]>
@@ -309,6 +324,9 @@
Windows-encoded entries before Macintosh or Unicode ones, since it
seems some fonts don't have reliable values here anyway.
+ * include/freetype/internal/psnames.h: Add typedef for
+ `PSNames_Service'.
+
2002-03-05 Werner Lemberg <[email protected]>
* builds/unix/aclocal.m4, builds/unix/ltmain.sh: Update to libtool
@@ -405,8 +423,9 @@
ft_close_stream => ft_ansi_stream_close (in base/ftsystem.c only)
ft_io_stream => ft_ansi_stream_io (in base/ftsystem.c only)
- * Moving all memory and list management code to "src/base/ftutil.c"
- (previously in "ftobjs.c" and "ftlist.c" respectively).
+ * src/base/ftutil.c: New file. Contains all memory and list
+ management code (previously in "ftobjs.c" and "ftlist.c",
+ respectively).
* include/freetype/internal/ftobjs.h: Moving all code related to
glyph loaders to ...
--- a/include/freetype/internal/pshints.h
+++ b/include/freetype/internal/pshints.h
@@ -6,7 +6,7 @@
/* recorders (specification only). These are used to support native */
/* T1/T2 hints in the "type1", "cid" and "cff" font drivers. */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,7 +56,7 @@
(*PSH_Globals_DestroyFunc)( PSH_Globals globals );
- typedef struct PSH_Globals_FuncsRec_
+ typedef struct PSH_Globals_FuncsRec_
{
PSH_Globals_NewFunc create;
PSH_Globals_SetScaleFunc set_scale;
@@ -98,7 +98,7 @@
/* strange happened (e.g. memory shortage). */
/* */
/* The hints accumulated in the object can later be used by the */
- /* Postscript hinter. */
+ /* PostScript hinter. */
/* */
typedef struct T1_HintsRec_* T1_Hints;
@@ -215,6 +215,7 @@
/* */
/* @input: */
/* hints :: A handle to the Type 1 hints recorder. */
+ /* */
/* end_point :: The index of the last point in the input glyph in */
/* which the previously defined hints apply. */
/* */
@@ -609,6 +610,7 @@
} PSHinter_Interface;
typedef PSHinter_Interface* PSHinter_Service;
+
FT_END_HEADER
--- a/include/freetype/internal/psnames.h
+++ b/include/freetype/internal/psnames.h
@@ -5,7 +5,7 @@
/* High-level interface for the `PSNames' module (in charge of */
/* various functions related to Postscript glyph names conversion). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -231,6 +231,7 @@
typedef PSNames_Interface* PSNames_Service;
+
FT_END_HEADER
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -133,7 +133,7 @@
/*************************************************************************/
/* */
/* <FuncType> */
- /* TT_Load_SFNT_HeaderRec_Func */
+ /* TT_Load_SFNT_HeaderRec_Func */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
@@ -162,10 +162,10 @@
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
typedef FT_Error
- (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt );
+ (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt );
/*************************************************************************/
@@ -192,9 +192,9 @@
/* TT_Load_Format_Tag(). */
/* */
typedef FT_Error
- (*TT_Load_Directory_Func)( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt );
+ (*TT_Load_Directory_Func)( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt );
/*************************************************************************/
@@ -278,12 +278,12 @@
/* The `map.buffer' field is always freed before the glyph is loaded. */
/* */
typedef FT_Error
- (*TT_Load_SBit_Image_Func)( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *amap,
+ (*TT_Load_SBit_Image_Func)( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *amap,
TT_SBit_MetricsRec *ametrics );
@@ -391,9 +391,9 @@
/* released. */
/* */
typedef FT_Error
- (*TT_CharMap_Load_Func)( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream input );
+ (*TT_CharMap_Load_Func)( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream input );
/*************************************************************************/
@@ -413,8 +413,8 @@
/* FreeType error code. 0 means success. */
/* */
typedef FT_Error
- (*TT_CharMap_Free_Func)( TT_Face face,
- TT_CMapTable cmap );
+ (*TT_CharMap_Free_Func)( TT_Face face,
+ TT_CMapTable cmap );
/*************************************************************************/
@@ -471,53 +471,53 @@
/* */
typedef struct SFNT_Interface_
{
- TT_Goto_Table_Func goto_table;
+ TT_Goto_Table_Func goto_table;
- TT_Init_Face_Func init_face;
- TT_Load_Face_Func load_face;
- TT_Done_Face_Func done_face;
- SFNT_Get_Interface_Func get_interface;
+ TT_Init_Face_Func init_face;
+ TT_Load_Face_Func load_face;
+ TT_Done_Face_Func done_face;
+ SFNT_Get_Interface_Func get_interface;
- TT_Load_Any_Func load_any;
+ TT_Load_Any_Func load_any;
TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
- TT_Load_Directory_Func load_directory;
+ TT_Load_Directory_Func load_directory;
/* these functions are called by `load_face' but they can also */
/* be called from external modules, if there is a need to do so */
- TT_Load_Table_Func load_header;
- TT_Load_Metrics_Func load_metrics;
- TT_Load_Table_Func load_charmaps;
- TT_Load_Table_Func load_max_profile;
- TT_Load_Table_Func load_os2;
- TT_Load_Table_Func load_psnames;
+ TT_Load_Table_Func load_header;
+ TT_Load_Metrics_Func load_metrics;
+ TT_Load_Table_Func load_charmaps;
+ TT_Load_Table_Func load_max_profile;
+ TT_Load_Table_Func load_os2;
+ TT_Load_Table_Func load_psnames;
- TT_Load_Table_Func load_names;
- TT_Free_Table_Func free_names;
+ TT_Load_Table_Func load_names;
+ TT_Free_Table_Func free_names;
/* optional tables */
- TT_Load_Table_Func load_hdmx;
- TT_Free_Table_Func free_hdmx;
+ TT_Load_Table_Func load_hdmx;
+ TT_Free_Table_Func free_hdmx;
- TT_Load_Table_Func load_kerning;
- TT_Load_Table_Func load_gasp;
- TT_Load_Table_Func load_pclt;
+ TT_Load_Table_Func load_kerning;
+ TT_Load_Table_Func load_gasp;
+ TT_Load_Table_Func load_pclt;
/* see `ttload.h' */
- TT_Load_Table_Func load_bitmap_header;
+ TT_Load_Table_Func load_bitmap_header;
/* see `ttsbit.h' */
- TT_Set_SBit_Strike_Func set_sbit_strike;
- TT_Load_Table_Func load_sbits;
- TT_Load_SBit_Image_Func load_sbit_image;
- TT_Free_Table_Func free_sbits;
+ TT_Set_SBit_Strike_Func set_sbit_strike;
+ TT_Load_Table_Func load_sbits;
+ TT_Load_SBit_Image_Func load_sbit_image;
+ TT_Free_Table_Func free_sbits;
/* see `ttpost.h' */
- TT_Get_PS_Name_Func get_psname;
- TT_Free_Table_Func free_psnames;
+ TT_Get_PS_Name_Func get_psname;
+ TT_Free_Table_Func free_psnames;
/* see `ttcmap.h' */
- TT_CharMap_Load_Func load_charmap;
- TT_CharMap_Free_Func free_charmap;
+ TT_CharMap_Load_Func load_charmap;
+ TT_CharMap_Free_Func free_charmap;
} SFNT_Interface;
@@ -524,6 +524,7 @@
/* transitional */
typedef SFNT_Interface* SFNT_Service;
+
FT_END_HEADER
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -5,7 +5,7 @@
/* Basic Type1/Type2 type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -88,15 +88,10 @@
typedef struct T1_FontRec_
{
- /* font info dictionary */
- PS_FontInfoRec font_info;
+ PS_FontInfoRec font_info; /* font info dictionary */
+ PS_PrivateRec private_dict; /* private dictionary */
+ FT_String* font_name; /* top-level dictionary */
- /* private dictionary */
- PS_PrivateRec private_dict;
-
- /* top-level dictionary */
- FT_String* font_name;
-
T1_EncodingType encoding_type;
T1_EncodingRec encoding;
@@ -183,15 +178,15 @@
typedef struct CID_FaceRec_
{
- FT_FaceRec root;
- void* psnames;
- void* psaux;
- CID_FaceInfoRec cid;
- void* afm_data;
- CID_Subrs subrs;
+ FT_FaceRec root;
+ void* psnames;
+ void* psaux;
+ CID_FaceInfoRec cid;
+ void* afm_data;
+ CID_Subrs subrs;
/* since FT 2.1 - interface to PostScript hinter */
- void* pshinter;
+ void* pshinter;
} CID_FaceRec;
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -86,11 +86,11 @@
/* */
/* num_tables :: The number of tables in file. */
/* */
- /* search_range :: Must be 16*(max power of 2 <= num_tables). */
+ /* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */
/* */
- /* entry_selector :: Must be log2 of search_range/16. */
+ /* entry_selector :: Must be log2 of `search_range / 16'. */
/* */
- /* range_shift :: Must be num_tables*16 - search_range. */
+ /* range_shift :: Must be `num_tables * 16 - search_range'. */
/* */
typedef struct SFNT_HeaderRec_
{
@@ -245,7 +245,8 @@
/*************************************************************************/
/* */
- /* <Type> TT_ShortMetrics */
+ /* <Type> */
+ /* TT_ShortMetrics */
/* */
/* <Description> */
/* A simple type to model the short metrics of the `hmtx' and `vmtx' */
@@ -387,9 +388,9 @@
/* */
typedef struct TT_Gasp_
{
- FT_UShort version;
- FT_UShort numRanges;
- TT_GaspRange gaspRanges;
+ FT_UShort version;
+ FT_UShort numRanges;
+ TT_GaspRange gaspRanges;
} TT_GaspRec;
@@ -667,21 +668,21 @@
/* */
typedef struct TT_SBit_RangeRec
{
- FT_UShort first_glyph;
- FT_UShort last_glyph;
+ FT_UShort first_glyph;
+ FT_UShort last_glyph;
- FT_UShort index_format;
- FT_UShort image_format;
- FT_ULong image_offset;
+ FT_UShort index_format;
+ FT_UShort image_format;
+ FT_ULong image_offset;
- FT_ULong image_size;
+ FT_ULong image_size;
TT_SBit_MetricsRec metrics;
- FT_ULong num_glyphs;
+ FT_ULong num_glyphs;
- FT_ULong* glyph_offsets;
- FT_UShort* glyph_codes;
+ FT_ULong* glyph_offsets;
+ FT_UShort* glyph_codes;
- FT_ULong table_offset;
+ FT_ULong table_offset;
} TT_SBit_RangeRec, *TT_SBit_Range;
@@ -689,7 +690,7 @@
/*************************************************************************/
/* */
/* <Struct> */
- /* TT_SBit_StrikeRec */
+ /* TT_SBit_StrikeRec */
/* */
/* <Description> */
/* A structure used describe a given bitmap strike in the `EBLC' */
@@ -803,11 +804,11 @@
TT_SBit_LineMetricsRec hori;
TT_SBit_LineMetricsRec vert;
- FT_Byte x_ppem;
- FT_Byte y_ppem;
+ FT_Byte x_ppem;
+ FT_Byte y_ppem;
- FT_Byte x_ppem_substitute;
- FT_Byte y_ppem_substitute;
+ FT_Byte x_ppem_substitute;
+ FT_Byte y_ppem_substitute;
} TT_SBit_ScaleRec, *TT_SBit_Scale;
@@ -893,7 +894,7 @@
/* */
typedef struct TT_Post_NamesRec_
{
- FT_Bool loaded;
+ FT_Bool loaded;
union
{
@@ -945,10 +946,8 @@
{
FT_ULong language; /* for Mac fonts (originally ushort) */
- FT_UShort* subHeaderKeys;
- /* high byte mapping table */
- /* value = subHeader index * 8 */
-
+ FT_UShort* subHeaderKeys; /* high byte mapping table */
+ /* value = subHeader index * 8 */
TT_CMap2SubHeader subHeaders;
FT_UShort* glyphIdArray;
FT_UShort numGlyphId; /* control value */
@@ -970,18 +969,18 @@
typedef struct TT_CMap4Rec_
{
- FT_ULong language; /* for Mac fonts (originally ushort) */
+ FT_ULong language; /* for Mac fonts (originally ushort) */
- FT_UShort segCountX2; /* number of segments * 2 */
- FT_UShort searchRange; /* these parameters can be used */
- FT_UShort entrySelector; /* for a binary search */
- FT_UShort rangeShift;
+ FT_UShort segCountX2; /* number of segments * 2 */
+ FT_UShort searchRange; /* these parameters can be used */
+ FT_UShort entrySelector; /* for a binary search */
+ FT_UShort rangeShift;
- TT_CMap4Segment segments;
- FT_UShort* glyphIdArray;
- FT_UShort numGlyphId; /* control value */
+ TT_CMap4Segment segments;
+ FT_UShort* glyphIdArray;
+ FT_UShort numGlyphId; /* control value */
- TT_CMap4Segment last_segment; /* last used segment; this is a small */
+ TT_CMap4Segment last_segment; /* last used segment; this is a small */
/* cache to potentially increase speed */
} TT_CMap4Rec, *TT_CMap4;
@@ -1018,13 +1017,13 @@
typedef struct TT_CMap8_12Rec_
{
- FT_ULong language; /* for Mac fonts */
+ FT_ULong language; /* for Mac fonts */
- FT_ULong nGroups;
- TT_CMapGroup groups;
+ FT_ULong nGroups;
+ TT_CMapGroup groups;
- TT_CMapGroup last_group; /* last used group; this is a small */
- /* cache to potentially increase speed */
+ TT_CMapGroup last_group; /* last used group; this is a small */
+ /* cache to potentially increase speed */
} TT_CMap8_12Rec, *TT_CMap8_12;
@@ -1046,8 +1045,8 @@
typedef FT_UInt
- (*TT_CharMap_Func)( TT_CMapTable charmap,
- FT_ULong char_code );
+ (*TT_CharMap_Func)( TT_CMapTable charmap,
+ FT_ULong char_code );
typedef FT_ULong
(*TT_CharNext_Func)( TT_CMapTable charmap,
@@ -1075,8 +1074,8 @@
TT_CMap10Rec cmap10;
} c;
- TT_CharMap_Func get_index;
- TT_CharNext_Func get_next_char;
+ TT_CharMap_Func get_index;
+ TT_CharNext_Func get_next_char;
} TT_CMapTableRec;
@@ -1102,8 +1101,6 @@
} TT_CharMapRec;
-
-
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -1123,7 +1120,7 @@
/* following formats: TTF, OpenType-TT, and OpenType-CFF. */
/* */
/* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
- /* are not shared between font drivers, and are thus defined normally in */
+ /* are not shared between font drivers, and are thus defined in */
/* `ttobjs.h'. */
/* */
/*************************************************************************/
@@ -1220,16 +1217,16 @@
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* This function is normally equivalent to FT_STREAM_SEEK(offset) */
- /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, but */
- /* alternative formats (e.g. compressed ones) might use something */
+ /* This function is normally equivalent to FT_STREAM_SEEK(offset) */
+ /* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */
+ /* but alternative formats (e.g. compressed ones) might use something */
/* different. */
/* */
typedef FT_Error
- (*TT_Loader_StartGlyphFunc)( TT_Loader loader,
- FT_UInt glyph_index,
- FT_ULong offset,
- FT_UInt byte_count );
+ (*TT_Loader_StartGlyphFunc)( TT_Loader loader,
+ FT_UInt glyph_index,
+ FT_ULong offset,
+ FT_UInt byte_count );
/*************************************************************************/
@@ -1248,7 +1245,7 @@
/* FreeType error code. 0 means success. */
/* */
typedef FT_Error
- (*TT_Loader_ReadGlyphFunc)( TT_Loader loader );
+ (*TT_Loader_ReadGlyphFunc)( TT_Loader loader );
/*************************************************************************/
@@ -1263,10 +1260,9 @@
/* loader :: The current TrueType glyph loader object. */
/* */
typedef void
- (*TT_Loader_EndGlyphFunc)( TT_Loader loader );
+ (*TT_Loader_EndGlyphFunc)( TT_Loader loader );
-
/*************************************************************************/
/* */
/* TrueType Face Type */
@@ -1337,6 +1333,10 @@
/* not loaded by the driver on face opening. */
/* See the `ttpost' module for more details. */
/* */
+ /* cmap_table :: XXX */
+ /* */
+ /* cmap_size :: XXX */
+ /* */
/* num_charmaps :: The number of character mappings in the */
/* font. */
/* */
@@ -1355,6 +1355,8 @@
/* */
/* access_glyph_frame :: XXX */
/* */
+ /* forget_glyph_frame :: XXX */
+ /* */
/* read_glyph_header :: XXX */
/* */
/* read_simple_glyph :: XXX */
@@ -1361,8 +1363,6 @@
/* */
/* read_composite_glyph :: XXX */
/* */
- /* forget_glyph_frame :: XXX */
- /* */
/* sfnt :: A pointer to the SFNT `driver' interface. */
/* */
/* psnames :: A pointer to the `PSNames' module */
@@ -1433,15 +1433,12 @@
/* num_kern_pairs :: The number of kerning pairs present in the */
/* font file. The engine only loads the */
/* first horizontal format 0 kern table it */
- /* finds in the font file. You should use */
- /* the `ttxkern' structures if you want to */
- /* access other kerning tables. Ignored */
- /* for Type 2 fonts. */
+ /* finds in the font file. Ignored for */
+ /* Type 2 fonts. */
/* */
/* kern_table_index :: The index of the kerning table in the font */
- /* kerning directory. Only used by the */
- /* ttxkern extension to avoid data */
- /* duplication. Ignored for Type 2 fonts. */
+ /* kerning directory. Ignored for Type 2 */
+ /* fonts. */
/* */
/* interpreter :: A pointer to the TrueType bytecode */
/* interpreters field is also used to hook */
@@ -1451,56 +1448,56 @@
/* */
typedef struct TT_FaceRec_
{
- FT_FaceRec root;
+ FT_FaceRec root;
- TTC_HeaderRec ttc_header;
+ TTC_HeaderRec ttc_header;
- FT_ULong format_tag;
- FT_UShort num_tables;
- TT_Table dir_tables;
+ FT_ULong format_tag;
+ FT_UShort num_tables;
+ TT_Table dir_tables;
- TT_Header header; /* TrueType header table */
- TT_HoriHeader horizontal; /* TrueType horizontal header */
+ TT_Header header; /* TrueType header table */
+ TT_HoriHeader horizontal; /* TrueType horizontal header */
- TT_MaxProfile max_profile;
- FT_ULong max_components;
+ TT_MaxProfile max_profile;
+ FT_ULong max_components;
- FT_Bool vertical_info;
- TT_VertHeader vertical; /* TT Vertical header, if present */
+ FT_Bool vertical_info;
+ TT_VertHeader vertical; /* TT Vertical header, if present */
- FT_UShort num_names; /* number of name records */
- TT_NameTableRec name_table; /* name table */
+ FT_UShort num_names; /* number of name records */
+ TT_NameTableRec name_table; /* name table */
- TT_OS2 os2; /* TrueType OS/2 table */
- TT_Postscript postscript; /* TrueType Postscript table */
+ TT_OS2 os2; /* TrueType OS/2 table */
+ TT_Postscript postscript; /* TrueType Postscript table */
#ifdef FT_CONFIG_OPTION_USE_CMAPS
- FT_Byte* cmap_table; /* extracted 'cmap' table */
- FT_ULong cmap_size;
+ FT_Byte* cmap_table; /* extracted 'cmap' table */
+ FT_ULong cmap_size;
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
- FT_Int num_charmaps;
- TT_CharMap charmaps; /* array of TT_CharMapRec */
+ FT_Int num_charmaps;
+ TT_CharMap charmaps; /* array of TT_CharMapRec */
#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
- TT_Goto_Table_Func goto_table;
+ TT_Goto_Table_Func goto_table;
- TT_Loader_StartGlyphFunc access_glyph_frame;
- TT_Loader_EndGlyphFunc forget_glyph_frame;
- TT_Loader_ReadGlyphFunc read_glyph_header;
- TT_Loader_ReadGlyphFunc read_simple_glyph;
- TT_Loader_ReadGlyphFunc read_composite_glyph;
+ TT_Loader_StartGlyphFunc access_glyph_frame;
+ TT_Loader_EndGlyphFunc forget_glyph_frame;
+ TT_Loader_ReadGlyphFunc read_glyph_header;
+ TT_Loader_ReadGlyphFunc read_simple_glyph;
+ TT_Loader_ReadGlyphFunc read_composite_glyph;
/* a typeless pointer to the SFNT_Interface table used to load */
/* the basic TrueType tables in the face object */
- void* sfnt;
+ void* sfnt;
/* a typeless pointer to the PSNames_Interface table used to */
/* handle glyph names <-> unicode & Mac values */
- void* psnames;
+ void* psnames;
/***********************************************************************/
/* */
@@ -1509,20 +1506,20 @@
/***********************************************************************/
/* horizontal device metrics */
- TT_HdmxRec hdmx;
+ TT_HdmxRec hdmx;
/* grid-fitting and scaling table */
- TT_GaspRec gasp; /* the `gasp' table */
+ TT_GaspRec gasp; /* the `gasp' table */
/* PCL 5 table */
- TT_PCLT pclt;
+ TT_PCLT pclt;
/* embedded bitmaps support */
- FT_Int num_sbit_strikes;
- TT_SBit_Strike sbit_strikes;
+ FT_Int num_sbit_strikes;
+ TT_SBit_Strike sbit_strikes;
- FT_Int num_sbit_scales;
- TT_SBit_Scale sbit_scales;
+ FT_Int num_sbit_scales;
+ TT_SBit_Scale sbit_scales;
/* postscript names table */
TT_Post_NamesRec postscript_names;
@@ -1535,29 +1532,29 @@
/***********************************************************************/
/* the glyph locations */
- FT_UShort num_locations;
- FT_Long* glyph_locations;
+ FT_UShort num_locations;
+ FT_Long* glyph_locations;
/* the font program, if any */
- FT_ULong font_program_size;
- FT_Byte* font_program;
+ FT_ULong font_program_size;
+ FT_Byte* font_program;
/* the cvt program, if any */
- FT_ULong cvt_program_size;
- FT_Byte* cvt_program;
+ FT_ULong cvt_program_size;
+ FT_Byte* cvt_program;
/* the original, unscaled, control value table */
- FT_ULong cvt_size;
- FT_Short* cvt;
+ FT_ULong cvt_size;
+ FT_Short* cvt;
/* the format 0 kerning table, if any */
- FT_Int num_kern_pairs;
- FT_Int kern_table_index;
- TT_Kern0_Pair kern_pairs;
+ FT_Int num_kern_pairs;
+ FT_Int kern_table_index;
+ TT_Kern0_Pair kern_pairs;
/* A pointer to the bytecode interpreter to use. This is also */
/* used to hook the debugger for the `ttdebug' utility. */
- TT_Interpreter interpreter;
+ TT_Interpreter interpreter;
/***********************************************************************/
@@ -1567,7 +1564,7 @@
/* */
/***********************************************************************/
- FT_Generic extra;
+ FT_Generic extra;
} TT_FaceRec;
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -5,7 +5,7 @@
/* Basic Type 1/Type 2 tables definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -81,11 +81,11 @@
/* T1_FontInfo */
/* */
/* <Description> */
- /* this type is equivalent to @PS_FontInfoRec but has been deprecated */
- /* it is kept to maintain source compatibility between various */
- /* versions of FreeType */
+ /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */
+ /* kept to maintain source compatibility between various versions of */
+ /* FreeType. */
/* */
- typedef PS_FontInfoRec T1_FontInfo;
+ typedef PS_FontInfoRec T1_FontInfo;
/*************************************************************************/
@@ -94,9 +94,9 @@
/* PS_PrivateRec */
/* */
/* <Description> */
- /* A structure used to model a Type1/Type2 private dictionary. Note */
+ /* A structure used to model a Type1/Type2 private dictionary. Note */
/* that for Multiple Master fonts, each instance has its own Private */
- /* dict. */
+ /* dictionary. */
/* */
typedef struct PS_PrivateRec_
{
@@ -143,9 +143,9 @@
/* T1_Private */
/* */
/* <Description> */
- /* this type is equivalent to @PS_PrivateRec but has been deprecated */
- /* it is kept to maintain source compatibility between various */
- /* versions of FreeType */
+ /* This type is equivalent to @PS_PrivateRec. It is deprecated but */
+ /* kept to maintain source compatibility between various versions of */
+ /* FreeType. */
/* */
typedef PS_PrivateRec T1_Private;
@@ -186,22 +186,22 @@
} T1_Blend_Flags;
- /* backwards compatible definitions */
-#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
-#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
-#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
-#define t1_blend_blue_values T1_BLEND_BLUE_VALUES
-#define t1_blend_other_blues T1_BLEND_OTHER_BLUES
-#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH
-#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT
-#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS
-#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS
-#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE
-#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT
-#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES
-#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES
-#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
-#define t1_blend_max T1_BELND_MAX
+ /* backwards compatible definitions */
+#define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION
+#define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS
+#define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE
+#define t1_blend_blue_values T1_BLEND_BLUE_VALUES
+#define t1_blend_other_blues T1_BLEND_OTHER_BLUES
+#define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH
+#define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT
+#define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS
+#define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS
+#define t1_blend_blue_scale T1_BLEND_BLUE_SCALE
+#define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT
+#define t1_blend_family_blues T1_BLEND_FAMILY_BLUES
+#define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES
+#define t1_blend_force_bold T1_BLEND_FORCE_BOLD
+#define t1_blend_max T1_BLEND_MAX
/* maximum number of Multiple Masters designs, as defined in the spec */
@@ -223,8 +223,8 @@
} PS_DesignMapRec, *PS_DesignMap;
- /* backwards-compatible definition */
- typedef PS_DesignMapRec T1_DesignMap;
+ /* backwards-compatible definition */
+ typedef PS_DesignMapRec T1_DesignMap;
typedef struct PS_BlendRec_
@@ -247,8 +247,8 @@
} PS_BlendRec, *PS_Blend;
- /* backwards-compatible definition */
- typedef PS_BlendRec T1_Blend;
+ /* backwards-compatible definition */
+ typedef PS_BlendRec T1_Blend;
typedef struct CID_FaceDictRec_
@@ -272,8 +272,8 @@
} CID_FaceDictRec, *CID_FaceDict;
- /* backwards-compatible definition */
- typedef CID_FaceDictRec CID_FontDict;
+ /* backwards-compatible definition */
+ typedef CID_FaceDictRec CID_FontDict;
typedef struct CID_FaceInfoRec_
@@ -293,7 +293,6 @@
FT_Int num_xuid;
FT_ULong xuid[16];
-
FT_ULong cidmap_offset;
FT_Int fd_bytes;
FT_Int gd_bytes;
@@ -313,11 +312,11 @@
/* CID_Info */
/* */
/* <Description> */
- /* this type is equivalent to @CID_FaceInfoRec but has been deprecated */
- /* it is kept to maintain source compatibility between various */
- /* versions of FreeType */
+ /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */
+ /* kept to maintain source compatibility between various versions of */
+ /* FreeType. */
/* */
- typedef CID_FaceInfoRec CID_Info;
+ typedef CID_FaceInfoRec CID_Info;
/* */
--- a/src/autohint/ahangles.c
+++ b/src/autohint/ahangles.c
@@ -5,7 +5,7 @@
/* A routine used to compute vector angles with limited accuracy */
/* and very high speed (body). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
--- a/src/autohint/ahangles.h
+++ b/src/autohint/ahangles.h
@@ -5,7 +5,7 @@
/* A routine used to compute vector angles with limited accuracy */
/* and very high speed (specification). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -4,7 +4,7 @@
/* */
/* Routines used to compute global metrics automatically (body). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
--- a/src/autohint/ahglobal.h
+++ b/src/autohint/ahglobal.h
@@ -5,7 +5,7 @@
/* Routines used to compute global metrics automatically */
/* (specification). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -37,7 +37,8 @@
/* compute global metrics automatically */
- FT_LOCAL( FT_Error ) ah_hinter_compute_globals( AH_Hinter* hinter );
+ FT_LOCAL( FT_Error )
+ ah_hinter_compute_globals( AH_Hinter* hinter );
FT_END_HEADER
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -5,7 +5,7 @@
/* Routines used to load and analyze a given glyph before hinting */
/* (body). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -38,6 +38,7 @@
AH_Edge* edge_limit;
AH_Segment* segments;
FT_Int dimension;
+
edges = outline->horz_edges;
edge_limit = edges + outline->num_hedges;
--- a/src/autohint/ahglyph.h
+++ b/src/autohint/ahglyph.h
@@ -5,7 +5,7 @@
/* Routines used to load and analyze a given glyph before hinting */
/* (specification). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -4,7 +4,7 @@
/* */
/* Glyph hinter (body). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -1068,13 +1068,13 @@
goto Exit;
FT_MEM_COPY( gloader->current.extra_points, slot->outline.points,
- slot->outline.n_points * sizeof ( FT_Vector ) );
+ slot->outline.n_points * sizeof ( FT_Vector ) );
FT_MEM_COPY( gloader->current.outline.contours, slot->outline.contours,
- slot->outline.n_contours * sizeof ( short ) );
+ slot->outline.n_contours * sizeof ( short ) );
FT_MEM_COPY( gloader->current.outline.tags, slot->outline.tags,
- slot->outline.n_points * sizeof ( char ) );
+ slot->outline.n_points * sizeof ( char ) );
gloader->current.outline.n_points = slot->outline.n_points;
gloader->current.outline.n_contours = slot->outline.n_contours;
@@ -1139,8 +1139,8 @@
case ft_glyph_format_composite:
{
- FT_UInt nn, num_subglyphs = slot->num_subglyphs;
- FT_UInt num_base_subgs, start_point;
+ FT_UInt nn, num_subglyphs = slot->num_subglyphs;
+ FT_UInt num_base_subgs, start_point;
FT_SubGlyph subglyph;
@@ -1152,7 +1152,7 @@
goto Exit;
FT_MEM_COPY( gloader->current.subglyphs, slot->subglyphs,
- num_subglyphs * sizeof ( FT_SubGlyph ) );
+ num_subglyphs * sizeof ( FT_SubGlyph ) );
gloader->current.num_subglyphs = num_subglyphs;
num_base_subgs = gloader->base.num_subglyphs;
--- a/src/autohint/ahhint.h
+++ b/src/autohint/ahhint.h
@@ -4,7 +4,7 @@
/* */
/* Glyph hinter (declaration). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
--- a/src/autohint/ahloader.h
+++ b/src/autohint/ahloader.h
@@ -4,7 +4,7 @@
/* */
/* Glyph loader for the auto-hinting module (declaration only). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -21,13 +21,8 @@
/*************************************************************************/
/* */
- /* This defines the AH_GlyphLoader type in two different ways: */
- /* */
- /* - If the module is compiled within FreeType 2, the type is simply a */
- /* typedef to FT_GlyphLoader. */
- /* */
- /* - If the module is compiled as a standalone object, AH_GlyphLoader */
- /* has its own implementation. */
+ /* This defines the AH_GlyphLoader type; it is simply a typedef to */
+ /* FT_GlyphLoader. */
/* */
/*************************************************************************/
--- a/src/autohint/ahmodule.c
+++ b/src/autohint/ahmodule.c
@@ -4,7 +4,7 @@
/* */
/* Auto-hinting module implementation (declaration). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -25,7 +25,7 @@
#ifdef DEBUG_HINTER
- extern AH_Hinter* ah_debug_hinter = NULL;
+ extern AH_Hinter* ah_debug_hinter = NULL;
extern FT_Bool ah_debug_disable_horz = 0;
extern FT_Bool ah_debug_disable_vert = 0;
#endif
@@ -42,6 +42,7 @@
ft_autohinter_init( FT_AutoHinter module )
{
FT_Error error;
+
error = ah_hinter_new( module->root.library, &module->hinter );
#ifdef DEBUG_HINTER
--- a/src/autohint/ahoptim.c
+++ b/src/autohint/ahoptim.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auto hinting outline optimization (body). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -32,11 +32,11 @@
#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H /* for FT_ALLOC_ARRAY() and FT_FREE() */
+#include FT_INTERNAL_OBJECTS_H /* for FT_ALLOC_ARRAY() and FT_FREE() */
#include "ahoptim.h"
- /* define this macro to use brute force optimisation -- this is slow, */
+ /* define this macro to use brute force optimization -- this is slow, */
/* but a good way to perfect the distortion function `by hand' through */
/* tweaking */
#define AH_BRUTE_FORCE
@@ -64,6 +64,7 @@
#include <string.h>
#define FLOAT( x ) ( (float)( (x) / 64.0 ) )
+
static void
optim_log( const char* fmt, ... )
--- a/src/autohint/ahtypes.h
+++ b/src/autohint/ahtypes.h
@@ -5,7 +5,7 @@
/* General types and definitions for the auto-hint module */
/* (specification only). */
/* */
-/* Copyright 2000-2001 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -207,7 +207,7 @@
/* */
/* prev :: The previous point in same contour. */
/* */
- struct AH_Point
+ struct AH_Point
{
AH_Flags flags; /* point flags used by hinter */
FT_Pos ox, oy;
@@ -420,14 +420,14 @@
/* */
typedef struct AH_Globals_
{
- FT_Int num_widths;
- FT_Int num_heights;
+ FT_Int num_widths;
+ FT_Int num_heights;
- FT_Pos widths [AH_MAX_WIDTHS];
- FT_Pos heights[AH_MAX_HEIGHTS];
+ FT_Pos widths [AH_MAX_WIDTHS];
+ FT_Pos heights[AH_MAX_HEIGHTS];
- FT_Pos blue_refs [ah_blue_max];
- FT_Pos blue_shoots[ah_blue_max];
+ FT_Pos blue_refs [ah_blue_max];
+ FT_Pos blue_shoots[ah_blue_max];
} AH_Globals;
@@ -488,14 +488,15 @@
} AH_Hinter;
-#ifdef DEBUG_HINTER
- extern AH_Hinter* ah_debug_hinter;
- extern FT_Bool ah_debug_disable_horz;
- extern FT_Bool ah_debug_disable_vert;
+#ifdef DEBUG_HINTER
+ extern AH_Hinter* ah_debug_hinter;
+ extern FT_Bool ah_debug_disable_horz;
+ extern FT_Bool ah_debug_disable_vert;
#else
-# define ah_debug_disable_horz 0
-# define ah_debug_disable_vert 0
-#endif /* DEBUG_HINTER */
+#define ah_debug_disable_horz 0
+#define ah_debug_disable_vert 0
+#endif /* DEBUG_HINTER */
+
FT_END_HEADER
--- a/src/autohint/descrip.mms
+++ b/src/autohint/descrip.mms
@@ -3,7 +3,7 @@
#
-# Copyright 2001 Catharon Productions Inc.
+# Copyright 2001, 2002 Catharon Productions Inc.
#
# This file is part of the Catharon Typography Project and shall only
# be used, modified, and distributed under the terms of the Catharon
--- a/src/autohint/rules.mk
+++ b/src/autohint/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2000 Catharon Productions Inc.
+# Copyright 2000, 2001 Catharon Productions Inc.
# Author: David Turner
#
# This file is part of the Catharon Typography Project and shall only
--- a/src/base/Jamfile
+++ b/src/base/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/base Jamfile (c) 2001 David Turner
+# FreeType 2 src/base Jamfile (c) 2001, 2002 David Turner
#
SubDir FT2_TOP src base ;
--- a/src/base/ftapi.c
+++ b/src/base/ftapi.c
@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
-/* ftobjs.c */
+/* ftapi.c */
/* */
-/* The FreeType private base classes (body). */
+/* The FreeType compatibility functions (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TABLES_H
#include FT_OUTLINE_H
+
/*************************************************************************/
/*************************************************************************/
--- a/src/base/ftbase.c
+++ b/src/base/ftbase.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component (body only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,5 +29,6 @@
#include "ftgloadr.c"
#include "ftobjs.c"
#include "ftnames.c"
+
/* END */
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/base/ftdbgmem.c
+++ b/src/base/ftdbgmem.c
@@ -4,7 +4,7 @@
/* */
/* Memory debugger (body). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -43,15 +43,15 @@
FT_Byte* address;
FT_Long size; /* < 0 if the block was freed */
- const char* alloc_file_name;
+ const char* alloc_file_name;
FT_Long alloc_line_no;
- const char* free_file_name;
+ const char* free_file_name;
FT_Long free_line_no;
FT_MemNode link;
- } FT_MemNodeRec;
+ } FT_MemNodeRec;
typedef struct FT_MemTableRec_
@@ -64,16 +64,16 @@
FT_ULong alloc_current;
FT_ULong alloc_max;
- const char* file_name;
+ const char* file_name;
FT_Long line_no;
FT_Memory memory;
- FT_Pointer memory_user;
+ FT_Pointer memory_user;
FT_Alloc_Func alloc;
FT_Free_Func free;
FT_Realloc_Func realloc;
- } FT_MemTableRec;
+ } FT_MemTableRec;
#define FT_MEM_SIZE_MIN 7
@@ -270,7 +270,7 @@
table = NULL;
}
- Exit:
+ Exit:
return table;
}
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -1,3 +1,21 @@
+/***************************************************************************/
+/* */
+/* ftgloadr.c */
+/* */
+/* The FreeType glyph loader (body). */
+/* */
+/* Copyright 2002 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
#include <ft2build.h>
#include FT_INTERNAL_GLYPH_LOADER_H
#include FT_INTERNAL_MEMORY_H
@@ -5,6 +23,7 @@
#undef FT_COMPONENT
#define FT_COMPONENT trace_gloader
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -46,11 +65,11 @@
/* create a new glyph loader */
FT_BASE_DEF( FT_Error )
- FT_GlyphLoader_New( FT_Memory memory,
- FT_GlyphLoader *aloader )
+ FT_GlyphLoader_New( FT_Memory memory,
+ FT_GlyphLoader *aloader )
{
- FT_GlyphLoader loader;
- FT_Error error;
+ FT_GlyphLoader loader;
+ FT_Error error;
if ( !FT_NEW( loader ) )
@@ -64,7 +83,7 @@
/* rewind the glyph loader - reset counters to 0 */
FT_BASE_DEF( void )
- FT_GlyphLoader_Rewind( FT_GlyphLoader loader )
+ FT_GlyphLoader_Rewind( FT_GlyphLoader loader )
{
FT_GlyphLoad base = &loader->base;
FT_GlyphLoad current = &loader->current;
@@ -81,7 +100,7 @@
/* reset the glyph loader, frees all allocated tables */
/* and starts from zero */
FT_BASE_DEF( void )
- FT_GlyphLoader_Reset( FT_GlyphLoader loader )
+ FT_GlyphLoader_Reset( FT_GlyphLoader loader )
{
FT_Memory memory = loader->memory;
@@ -102,7 +121,7 @@
/* delete a glyph loader */
FT_BASE_DEF( void )
- FT_GlyphLoader_Done( FT_GlyphLoader loader )
+ FT_GlyphLoader_Done( FT_GlyphLoader loader )
{
if ( loader )
{
@@ -117,7 +136,7 @@
/* re-adjust the `current' outline fields */
static void
- FT_GlyphLoader_Adjust_Points( FT_GlyphLoader loader )
+ FT_GlyphLoader_Adjust_Points( FT_GlyphLoader loader )
{
FT_Outline* base = &loader->base.outline;
FT_Outline* current = &loader->current.outline;
@@ -135,7 +154,7 @@
FT_BASE_DEF( FT_Error )
- FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader )
+ FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader )
{
FT_Error error;
FT_Memory memory = loader->memory;
@@ -152,7 +171,7 @@
/* re-adjust the `current' subglyphs field */
static void
- FT_GlyphLoader_Adjust_Subglyphs( FT_GlyphLoader loader )
+ FT_GlyphLoader_Adjust_Subglyphs( FT_GlyphLoader loader )
{
FT_GlyphLoad base = &loader->base;
FT_GlyphLoad current = &loader->current;
@@ -167,9 +186,9 @@
/* DOESN'T change the number of points within the loader! */
/* */
FT_BASE_DEF( FT_Error )
- FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
- FT_UInt n_points,
- FT_UInt n_contours )
+ FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
+ FT_UInt n_points,
+ FT_UInt n_contours )
{
FT_Memory memory = loader->memory;
FT_Error error = FT_Err_Ok;
@@ -190,11 +209,11 @@
if ( FT_RENEW_ARRAY( base->points, old_max, new_max ) ||
FT_RENEW_ARRAY( base->tags, old_max, new_max ) )
- goto Exit;
+ goto Exit;
if ( loader->use_extra &&
FT_RENEW_ARRAY( loader->base.extra_points, old_max, new_max ) )
- goto Exit;
+ goto Exit;
adjust = 1;
loader->max_points = new_max;
@@ -227,12 +246,12 @@
/* NOT change the number of subglyphs within the loader! */
/* */
FT_BASE_DEF( FT_Error )
- FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
- FT_UInt n_subs )
+ FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
+ FT_UInt n_subs )
{
- FT_Memory memory = loader->memory;
- FT_Error error = FT_Err_Ok;
- FT_UInt new_max, old_max;
+ FT_Memory memory = loader->memory;
+ FT_Error error = FT_Err_Ok;
+ FT_UInt new_max, old_max;
FT_GlyphLoad base = &loader->base;
FT_GlyphLoad current = &loader->current;
@@ -258,7 +277,7 @@
/* prepare loader for the addition of a new glyph on top of the base one */
FT_BASE_DEF( void )
- FT_GlyphLoader_Prepare( FT_GlyphLoader loader )
+ FT_GlyphLoader_Prepare( FT_GlyphLoader loader )
{
FT_GlyphLoad current = &loader->current;
@@ -274,14 +293,14 @@
/* add current glyph to the base image - and prepare for another */
FT_BASE_DEF( void )
- FT_GlyphLoader_Add( FT_GlyphLoader loader )
+ FT_GlyphLoader_Add( FT_GlyphLoader loader )
{
- FT_GlyphLoad base = &loader->base;
- FT_GlyphLoad current = &loader->current;
+ FT_GlyphLoad base = &loader->base;
+ FT_GlyphLoad current = &loader->current;
- FT_UInt n_curr_contours = current->outline.n_contours;
- FT_UInt n_base_points = base->outline.n_points;
- FT_UInt n;
+ FT_UInt n_curr_contours = current->outline.n_contours;
+ FT_UInt n_base_points = base->outline.n_points;
+ FT_UInt n;
base->outline.n_points =
@@ -302,8 +321,8 @@
FT_BASE_DEF( FT_Error )
- FT_GlyphLoader_CopyPoints( FT_GlyphLoader target,
- FT_GlyphLoader source )
+ FT_GlyphLoader_CopyPoints( FT_GlyphLoader target,
+ FT_GlyphLoader source )
{
FT_Error error;
FT_UInt num_points = source->base.outline.n_points;
@@ -318,16 +337,16 @@
FT_MEM_COPY( out->points, in->points,
- num_points * sizeof ( FT_Vector ) );
+ num_points * sizeof ( FT_Vector ) );
FT_MEM_COPY( out->tags, in->tags,
- num_points * sizeof ( char ) );
+ num_points * sizeof ( char ) );
FT_MEM_COPY( out->contours, in->contours,
- num_contours * sizeof ( short ) );
+ num_contours * sizeof ( short ) );
/* do we need to copy the extra points? */
if ( target->use_extra && source->use_extra )
FT_MEM_COPY( target->base.extra_points, source->base.extra_points,
- num_points * sizeof ( FT_Vector ) );
+ num_points * sizeof ( FT_Vector ) );
out->n_points = (short)num_points;
out->n_contours = (short)num_contours;
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType initialization layer (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/base/ftlist.c
+++ b/src/base/ftlist.c
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -4,7 +4,7 @@
/* */
/* Mac FOND support. Written by [email protected]. */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/base/ftnames.c
+++ b/src/base/ftnames.c
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,6 +28,7 @@
#include <string.h> /* for strcmp() */
#include <setjmp.h> /* for setjmp() and longjmp() */
+
FT_BASE_DEF( void )
ft_validator_init( FT_Validator valid,
const FT_Byte* base,
@@ -46,10 +47,12 @@
{
int result;
+
result = setjmp( valid->jump_buffer );
return result;
}
+
FT_BASE_DEF( void )
ft_validator_error( FT_Validator valid,
FT_Error error )
@@ -72,8 +75,8 @@
/*************************************************************************/
- /* create a new input stream from a FT_Open_Args structure */
- /* */
+ /* create a new input stream from a FT_Open_Args structure */
+ /* */
static FT_Error
ft_input_stream_new( FT_Library library,
FT_Open_Args* args,
@@ -92,6 +95,7 @@
*astream = 0;
memory = library->memory;
+
if ( FT_NEW( stream ) )
goto Exit;
@@ -101,8 +105,8 @@
{
/* create a memory-based stream */
FT_Stream_OpenMemory( stream,
- (const FT_Byte*)args->memory_base,
- args->memory_size );
+ (const FT_Byte*)args->memory_base,
+ args->memory_size );
}
else if ( args->flags & ft_open_pathname )
{
@@ -134,7 +138,6 @@
}
-
static void
ft_input_stream_free( FT_Stream stream,
FT_Int external )
@@ -143,6 +146,7 @@
{
FT_Memory memory = stream->memory;
+
FT_Stream_Close( stream );
if ( !external )
@@ -172,7 +176,7 @@
ft_glyphslot_init( FT_GlyphSlot slot )
{
FT_Driver driver = slot->face->driver;
- FT_Driver_Class clazz = driver->clazz;
+ FT_Driver_Class clazz = driver->clazz;
FT_Memory memory = driver->root.memory;
FT_Error error = FT_Err_Ok;
FT_Slot_Internal internal;
@@ -232,7 +236,7 @@
ft_glyphslot_done( FT_GlyphSlot slot )
{
FT_Driver driver = slot->face->driver;
- FT_Driver_Class clazz = driver->clazz;
+ FT_Driver_Class clazz = driver->clazz;
FT_Memory memory = driver->root.memory;
@@ -262,7 +266,7 @@
{
FT_Error error;
FT_Driver driver;
- FT_Driver_Class clazz;
+ FT_Driver_Class clazz;
FT_Memory memory;
FT_GlyphSlot slot;
@@ -305,10 +309,10 @@
{
if ( slot )
{
- FT_Driver driver = slot->face->driver;
- FT_Memory memory = driver->root.memory;
- FT_GlyphSlot* parent;
- FT_GlyphSlot cur;
+ FT_Driver driver = slot->face->driver;
+ FT_Memory memory = driver->root.memory;
+ FT_GlyphSlot* parent;
+ FT_GlyphSlot cur;
/* Remove slot from its parent face's list */
@@ -497,6 +501,7 @@
FT_UInt EM = face->units_per_EM;
FT_Size_Metrics* metrics = &face->size->metrics;
+
slot->linearHoriAdvance = FT_MulDiv( slot->linearHoriAdvance,
(FT_Long)metrics->x_ppem << 16, EM );
@@ -596,12 +601,12 @@
if ( face->autohint.finalizer )
face->autohint.finalizer( face->autohint.data );
- /* Discard glyph slots for this face */
+ /* Discard glyph slots for this face. */
/* Beware! FT_Done_GlyphSlot() changes the field `face->glyph' */
while ( face->glyph )
FT_Done_GlyphSlot( face->glyph );
- /* Discard all sizes for this face */
+ /* discard all sizes for this face */
FT_List_Finalize( &face->sizes_list,
(FT_List_Destructor)destroy_size,
memory,
@@ -608,7 +613,7 @@
driver );
face->size = 0;
- /* Now discard client data */
+ /* now discard client data */
if ( face->generic.finalizer )
face->generic.finalizer( face );
@@ -618,10 +623,12 @@
{
FT_Int n;
+
for ( n = 0; n < face->num_charmaps; n++ )
{
FT_CMap cmap = FT_CMAP( face->charmaps[n] );
+
FT_CMap_Done( cmap );
face->charmaps[n] = NULL;
@@ -639,7 +646,8 @@
clazz->done_face( face );
/* close the stream for this face if needed */
- ft_input_stream_free( face->stream,
+ ft_input_stream_free(
+ face->stream,
( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
face->stream = 0;
@@ -1066,13 +1074,13 @@
FT_New_Size( FT_Face face,
FT_Size *asize )
{
- FT_Error error;
- FT_Memory memory;
- FT_Driver driver;
+ FT_Error error;
+ FT_Memory memory;
+ FT_Driver driver;
FT_Driver_Class clazz;
- FT_Size size = 0;
- FT_ListNode node = 0;
+ FT_Size size = 0;
+ FT_ListNode node = 0;
if ( !face )
@@ -1200,7 +1208,7 @@
{
FT_Error error = FT_Err_Ok;
FT_Driver driver;
- FT_Driver_Class clazz;
+ FT_Driver_Class clazz;
FT_Size_Metrics* metrics;
FT_Long dim_x, dim_y;
@@ -1269,7 +1277,7 @@
{
FT_Error error = FT_Err_Ok;
FT_Driver driver;
- FT_Driver_Class clazz;
+ FT_Driver_Class clazz;
FT_Size_Metrics* metrics = &face->size->metrics;
@@ -1435,6 +1443,7 @@
FT_Face face = cmap->charmap.face;
FT_Memory memory = FT_FACE_MEMORY(face);
+
if ( clazz->done )
clazz->done( cmap );
@@ -1454,6 +1463,7 @@
FT_Memory memory;
FT_CMap cmap;
+
if ( clazz == NULL || charmap == NULL || charmap->face == NULL )
return FT_Err_Invalid_Argument;
@@ -1468,7 +1478,7 @@
if ( clazz->init )
{
error = clazz->init( cmap, init_data );
- if (error)
+ if ( error )
goto Fail;
}
@@ -1478,7 +1488,7 @@
face->num_charmaps+1 ) )
goto Fail;
- face->charmaps[ face->num_charmaps++ ] = (FT_CharMap) cmap;
+ face->charmaps[face->num_charmaps++] = (FT_CharMap)cmap;
}
Exit:
@@ -1509,6 +1519,7 @@
{
FT_CMap cmap = FT_CMAP( face->charmap );
+
result = cmap->clazz->char_index( cmap, charcode );
}
return result;
@@ -1516,8 +1527,6 @@
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-
FT_EXPORT_DEF( FT_UInt )
FT_Get_Char_Index( FT_Face face,
FT_ULong charcode )
@@ -1543,9 +1552,10 @@
FT_Get_First_Char( FT_Face face,
FT_UInt *agindex )
{
- FT_ULong result = 0;
- FT_UInt gindex = 0;
+ FT_ULong result = 0;
+ FT_UInt gindex = 0;
+
if ( face && face->charmap )
{
gindex = FT_Get_Char_Index( face, 0 );
@@ -1569,8 +1579,8 @@
FT_ULong charcode,
FT_UInt *agindex )
{
- FT_ULong result = 0;
- FT_UInt gindex = 0;
+ FT_ULong result = 0;
+ FT_UInt gindex = 0;
if ( face && face->charmap )
@@ -1578,6 +1588,7 @@
FT_UInt32 code = (FT_UInt32)charcode;
FT_CMap cmap = FT_CMAP( face->charmap );
+
gindex = cmap->clazz->char_next( cmap, &code );
result = ( gindex == 0 ) ? 0 : code;
}
@@ -1673,8 +1684,8 @@
FT_HAS_GLYPH_NAMES( face ) )
{
/* now, lookup for glyph name */
- FT_Driver driver = face->driver;
- FT_Module_Class* clazz = FT_MODULE_CLASS( driver );
+ FT_Driver driver = face->driver;
+ FT_Module_Class* clazz = FT_MODULE_CLASS( driver );
if ( clazz->get_interface )
@@ -1707,7 +1718,7 @@
result = face->internal->postscript_name;
if ( !result )
{
- /* now, lookup for glyph name */
+ /* now, look up glyph name */
FT_Driver driver = face->driver;
FT_Module_Class* clazz = FT_MODULE_CLASS( driver );
@@ -1792,8 +1803,8 @@
FT_Glyph_Format format,
FT_ListNode* node )
{
- FT_ListNode cur;
- FT_Renderer result = 0;
+ FT_ListNode cur;
+ FT_Renderer result = 0;
if ( !library )
@@ -1938,7 +1949,7 @@
{
/* test for valid `library' delayed to FT_Lookup_Renderer() */
- return FT_Lookup_Renderer( library, format, 0 );
+ return FT_Lookup_Renderer( library, format, 0 );
}
@@ -2055,7 +2066,7 @@
FT_Render_Glyph( FT_GlyphSlot slot,
FT_UInt render_mode )
{
- FT_Library library;
+ FT_Library library;
if ( !slot )
@@ -2205,7 +2216,7 @@
if ( FT_MODULE_IS_DRIVER( module ) )
{
/* allocate glyph loader if needed */
- FT_Driver driver = FT_DRIVER( module );
+ FT_Driver driver = FT_DRIVER( module );
driver->clazz = (FT_Driver_Class)module->clazz;
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -4,7 +4,7 @@
/* */
/* FreeType outline management (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -358,13 +358,13 @@
return FT_Err_Invalid_Argument;
FT_MEM_COPY( target->points, source->points,
- source->n_points * sizeof ( FT_Vector ) );
+ source->n_points * sizeof ( FT_Vector ) );
FT_MEM_COPY( target->tags, source->tags,
- source->n_points * sizeof ( FT_Byte ) );
+ source->n_points * sizeof ( FT_Byte ) );
FT_MEM_COPY( target->contours, source->contours,
- source->n_contours * sizeof ( FT_Short ) );
+ source->n_contours * sizeof ( FT_Short ) );
/* copy all flags, except the `ft_outline_owner' one */
is_owner = target->flags & ft_outline_owner;
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -4,7 +4,7 @@
/* */
/* I/O stream support (body). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -69,8 +69,8 @@
{
if ( stream->read( stream, pos, 0, 0 ) )
{
- FT_ERROR(( "%s: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
- "FT_Stream_Seek", pos, stream->size ));
+ FT_ERROR(( "FT_Stream_Seek: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
+ pos, stream->size ));
error = FT_Err_Invalid_Stream_Operation;
}
@@ -78,8 +78,8 @@
/* note that seeking to the first position after the file is valid */
else if ( pos > stream->size )
{
- FT_ERROR(( "%s: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
- "FT_Stream_Seek", pos, stream->size ));
+ FT_ERROR(( "FT_Stream_Seek: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
+ pos, stream->size ));
error = FT_Err_Invalid_Stream_Operation;
}
@@ -124,8 +124,8 @@
if ( pos >= stream->size )
{
- FT_ERROR(( "%s: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
- "FT_Stream_ReadAt", pos, stream->size ));
+ FT_ERROR(( "FT_Stream_ReadAt: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
+ pos, stream->size ));
return FT_Err_Invalid_Stream_Operation;
}
@@ -145,8 +145,9 @@
if ( read_bytes < count )
{
- FT_ERROR(( "%s: invalid read; expected %lu bytes, got %lu\n",
- "FT_Stream_ReadAt", count, read_bytes ));
+ FT_ERROR(( "FT_Stream_ReadAt:" ));
+ FT_ERROR(( " invalid read; expected %lu bytes, got %lu\n",
+ count, read_bytes ));
error = FT_Err_Invalid_Stream_Operation;
}
@@ -263,7 +264,7 @@
/* */
/* In this case, the loader code handles the 0-length table */
/* gracefully; however, stream.cursor is really set to 0 by the */
- /* FT_Stream_EnterFrame() call, and this is not an error. */
+ /* FT_Stream_EnterFrame() call, and this is not an error. */
/* */
FT_ASSERT( stream );
@@ -416,8 +417,8 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "%s: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
- "FT_Stream_ReadChar", stream->pos, stream->size ));
+ FT_ERROR(( "FT_Stream_ReadChar: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
+ stream->pos, stream->size ));
return 0;
}
@@ -509,7 +510,7 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "FT_Stream_ReadShort:" ));
+ FT_ERROR(( "FT_Stream_ReadShortLE:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -556,8 +557,9 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "%s: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
- "FT_Stream_ReadOffset", stream->pos, stream->size ));
+ FT_ERROR(( "FT_Stream_ReadOffset:" ));
+ FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
+ stream->pos, stream->size ));
return 0;
}
@@ -567,7 +569,7 @@
FT_Stream_ReadLong( FT_Stream stream,
FT_Error* error )
{
- FT_Byte reads[4];
+ FT_Byte reads[4];
FT_Byte* p = 0;
FT_Long result = 0;
@@ -601,8 +603,8 @@
return result;
Fail:
- FT_ERROR(( "%s: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
- "FT_Stream_ReadLong", stream->pos, stream->size ));
+ FT_ERROR(( "FT_Stream_ReadLong: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
+ stream->pos, stream->size ));
*error = FT_Err_Invalid_Stream_Operation;
return 0;
@@ -647,7 +649,7 @@
return result;
Fail:
- FT_ERROR(( "FT_Stream_ReadLong:" ));
+ FT_ERROR(( "FT_Stream_ReadLongLE:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
*error = FT_Err_Invalid_Stream_Operation;
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -1,3 +1,21 @@
+/***************************************************************************/
+/* */
+/* ftutil.c */
+/* */
+/* FreeType utility file for memory and list management (body). */
+/* */
+/* Copyright 2002 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_MEMORY_H
@@ -309,3 +327,4 @@
}
+/* END */
--- a/src/base/rules.mk
+++ b/src/base/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,