diff --git a/src/cid/t1errors.h b/include/freetype/internal/t1errors.h similarity index 96% rename from src/cid/t1errors.h rename to include/freetype/internal/t1errors.h index a799115a8..ce2bac4fb 100644 --- a/src/cid/t1errors.h +++ b/include/freetype/internal/t1errors.h @@ -18,8 +18,6 @@ #ifndef T1ERRORS_H #define T1ERRORS_H -#include - /************************ error codes declaration **************/ /* The error codes are grouped in 'classes' used to indicate the */ @@ -45,7 +43,6 @@ #define T1_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature #define T1_Err_Unavailable_Outline FT_Err_Unavailable_Outline #define T1_Err_Unavailable_Bitmap FT_Err_Unavailable_Bitmap -#define T1_Err_Unavailable_Pixmap FT_Err_Unavailable_Pixmap #define T1_Err_File_Is_Not_Collection FT_Err_File_Is_Not_Collection #define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle diff --git a/src/cff/t2errors.h b/include/freetype/internal/t2errors.h similarity index 100% rename from src/cff/t2errors.h rename to include/freetype/internal/t2errors.h diff --git a/include/freetype/internal/tterrors.h b/include/freetype/internal/tterrors.h index 81bcbde0c..4cb90d630 100644 --- a/include/freetype/internal/tterrors.h +++ b/include/freetype/internal/tterrors.h @@ -49,7 +49,6 @@ #define TT_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature #define TT_Err_Unavailable_Outline FT_Err_Unavailable_Outline #define TT_Err_Unavailable_Bitmap FT_Err_Unavailable_Bitmap -#define TT_Err_Unavailable_Pixmap FT_Err_Unavailable_Pixmap #define TT_Err_File_Is_Not_Collection FT_Err_File_Is_Not_Collection #define TT_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle diff --git a/src/cff/t2driver.h b/src/cff/t2driver.h index 129096ec8..7aaf111ed 100644 --- a/src/cff/t2driver.h +++ b/src/cff/t2driver.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include FT_EXPORT_VAR(const FT_DriverInterface) cff_driver_interface; diff --git a/src/cff/t2load.c b/src/cff/t2load.c index f98173fd3..bc411f08e 100644 --- a/src/cff/t2load.c +++ b/src/cff/t2load.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #undef FT_COMPONENT #define FT_COMPONENT trace_ttload diff --git a/src/cff/t2objs.c b/src/cff/t2objs.c index 61cc856c4..5a99f5fe7 100644 --- a/src/cff/t2objs.c +++ b/src/cff/t2objs.c @@ -27,7 +27,7 @@ #include #include -#include +#include /* required by tracing mode */ #undef FT_COMPONENT diff --git a/src/cff/t2objs.h b/src/cff/t2objs.h index aed60fc05..73a212fe6 100644 --- a/src/cff/t2objs.h +++ b/src/cff/t2objs.h @@ -22,7 +22,7 @@ #include #include -#include +#include #ifdef __cplusplus diff --git a/src/cid/cidload.c b/src/cid/cidload.c index 3ed7c62a5..df23e5db0 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/src/cid/cidobjs.h b/src/cid/cidobjs.h index d31cb5a6d..464cd2b56 100644 --- a/src/cid/cidobjs.h +++ b/src/cid/cidobjs.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include #ifdef __cplusplus diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c index 1894d1564..54e8805d6 100644 --- a/src/cid/cidparse.c +++ b/src/cid/cidparse.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #undef FT_COMPONENT diff --git a/src/cid/cidriver.h b/src/cid/cidriver.h index 42c330891..25651a08f 100644 --- a/src/cid/cidriver.h +++ b/src/cid/cidriver.h @@ -19,7 +19,7 @@ #define T1DRIVER_H #include -#include +#include FT_EXPORT_VAR(const FT_DriverInterface) t1cid_driver_interface; diff --git a/src/cid/rules.mk b/src/cid/rules.mk index b08481a7d..cdfa653b6 100644 --- a/src/cid/rules.mk +++ b/src/cid/rules.mk @@ -48,8 +48,7 @@ CID_DRV_SRC := $(CID_DIR_)cidparse.c \ # Type1 driver headers # -CID_DRV_H := $(CID_DIR_)t1errors.h \ - $(CID_DIR_)cidtokens.h \ +CID_DRV_H := $(CID_DIR_)cidtokens.h \ $(T1SHARED_H) \ $(CID_DRV_SRC:%.c=%.h) diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk index 395aab1be..a059b9c16 100644 --- a/src/sfnt/rules.mk +++ b/src/sfnt/rules.mk @@ -6,7 +6,7 @@ # Copyright 1996-2000 by # David Turner, Robert Wilhelm, and Werner Lemberg. # -# This file is part of the FreeType project, and may only be used modified +# 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 diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index efb58313a..7b770c101 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -858,7 +858,7 @@ if ( range->index_format == 2 || range->index_format == 5 ) *metrics = range->metrics; else - return FT_Err_Invalid_File_Format; + return TT_Err_Invalid_File_Format; } Exit: diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk index bfb1f5efc..a12ef0391 100644 --- a/src/truetype/rules.mk +++ b/src/truetype/rules.mk @@ -1,5 +1,5 @@ # -# FreeType 2 PSNames driver configuration rules +# FreeType 2 TrueType driver configuration rules # @@ -13,7 +13,7 @@ # fully. -# Include the rules defined for the SFNT driver, which is heavily used +# Include the rules defined for the SFNT driver, which are heavily used # by the TrueType one. # include $(SRC_)sfnt/rules.mk @@ -97,7 +97,6 @@ $(TT_DRV_OBJ_S): $(BASE_H) $(TT_DRV_H) $(TT_DRV_SRC) $(TT_DRV_SRC_S) $(TT_COMPILE) $T$@ $(TT_DRV_SRC_S) - # driver - multiple objects # # All objects are recompiled if any of the header files is changed diff --git a/src/truetype/ttdriver.h b/src/truetype/ttdriver.h index 99701248e..faa00157b 100644 --- a/src/truetype/ttdriver.h +++ b/src/truetype/ttdriver.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include FT_EXPORT_VAR(const FT_DriverInterface) tt_driver_interface; diff --git a/src/truetype/tterrors.h b/src/truetype/tterrors.h deleted file mode 100644 index c8b272c62..000000000 --- a/src/truetype/tterrors.h +++ /dev/null @@ -1,126 +0,0 @@ -/***************************************************************************/ -/* */ -/* tterrors.h */ -/* */ -/* TrueType error ID definitions (specification only). */ -/* */ -/* Copyright 1996-1999 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. */ -/* */ -/***************************************************************************/ - - -#ifndef TTERRORS_H -#define TTERRORS_H - - /*************************************************************************/ - /* */ - /* Error codes declaration */ - /* */ - /* The error codes are grouped in `classes' used to indicate the `level' */ - /* at which the error happened. The class is given by an error code's */ - /* high byte. */ - /* */ - /*************************************************************************/ - - - /* Success is always 0. */ - -#define TT_Err_Ok FT_Err_Ok - - /* High level API errors. */ - -#define TT_Err_Invalid_File_Format FT_Err_Invalid_File_Format -#define TT_Err_Invalid_Argument FT_Err_Invalid_Argument -#define TT_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle -#define TT_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle -#define TT_Err_Invalid_Instance_Handle FT_Err_Invalid_Size_Handle -#define TT_Err_Invalid_Glyph_Handle FT_Err_Invalid_Slot_Handle -#define TT_Err_Invalid_CharMap_Handle FT_Err_Invalid_CharMap_Handle -#define TT_Err_Invalid_Glyph_Index FT_Err_Invalid_Glyph_Index - -#define TT_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature -#define TT_Err_Unavailable_Outline FT_Err_Unavailable_Outline -#define TT_Err_Unavailable_Bitmap FT_Err_Unavailable_Bitmap -#define TT_Err_Unavailable_Pixmap FT_Err_Unavailable_Pixmap -#define TT_Err_File_Is_Not_Collection FT_Err_File_Is_Not_Collection - -#define TT_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle - - /* Internal errors. */ - -#define TT_Err_Out_Of_Memory FT_Err_Out_Of_Memory -#define TT_Err_Unlisted_Object FT_Err_Unlisted_Object - - /* General glyph outline errors. */ - -#define TT_Err_Too_Many_Points FT_Err_Too_Many_Points -#define TT_Err_Too_Many_Contours FT_Err_Too_Many_Contours -#define TT_Err_Too_Many_Ins FT_Err_Too_Many_Hints -#define TT_Err_Invalid_Composite FT_Err_Invalid_Composite - - /* Bytecode interpreter error codes. */ - - /* These error codes are produced by the TrueType */ - /* bytecode interpreter. They usually indicate a */ - /* broken font file, a broken glyph within a font */ - /* file, or a bug in the interpreter! */ - -#define TT_Err_Invalid_Opcode 0x400 -#define TT_Err_Too_Few_Arguments 0x401 -#define TT_Err_Stack_Overflow 0x402 -#define TT_Err_Code_Overflow 0x403 -#define TT_Err_Bad_Argument 0x404 -#define TT_Err_Divide_By_Zero 0x405 -#define TT_Err_Storage_Overflow 0x406 -#define TT_Err_Cvt_Overflow 0x407 -#define TT_Err_Invalid_Reference 0x408 -#define TT_Err_Invalid_Distance 0x409 -#define TT_Err_Interpolate_Twilight 0x40A -#define TT_Err_Debug_OpCode 0x40B -#define TT_Err_ENDF_In_Exec_Stream 0x40C -#define TT_Err_Out_Of_CodeRanges 0x40D -#define TT_Err_Nested_DEFS 0x40E -#define TT_Err_Invalid_CodeRange 0x40F -#define TT_Err_Invalid_Displacement 0x410 -#define TT_Err_Execution_Too_Long 0x411 - -#define TT_Err_Too_Many_Instruction_Defs 0x412 -#define TT_Err_Too_Many_Function_Defs 0x412 - - /* Other TrueType specific error codes. */ - -#define TT_Err_Table_Missing 0x420 -#define TT_Err_Too_Many_Extensions 0x421 -#define TT_Err_Extensions_Unsupported 0x422 -#define TT_Err_Invalid_Extension_Id 0x423 - -#define TT_Err_No_Vertical_Data 0x424 - -#define TT_Err_Max_Profile_Missing 0x430 -#define TT_Err_Header_Table_Missing 0x431 -#define TT_Err_Horiz_Header_Missing 0x432 -#define TT_Err_Locations_Missing 0x433 -#define TT_Err_Name_Table_Missing 0x434 -#define TT_Err_CMap_Table_Missing 0x435 -#define TT_Err_Hmtx_Table_Missing 0x436 -#define TT_Err_OS2_Table_Missing 0x437 -#define TT_Err_Post_Table_Missing 0x438 - -#define TT_Err_Invalid_Horiz_Metrics 0x440 -#define TT_Err_Invalid_CharMap_Format 0x441 -#define TT_Err_Invalid_PPem 0x442 -#define TT_Err_Invalid_Vert_Metrics 0x443 - -#define TT_Err_Could_Not_Find_Context 0x450 - -#endif /* FTERRID_H */ - - -/* END */ diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index ce8b3aacb..9e53b5d6d 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index a3b97c086..e05cb53e5 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -27,7 +27,7 @@ #include #include -#include +#include #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #include diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h index 3bace3872..220e7069b 100644 --- a/src/truetype/ttobjs.h +++ b/src/truetype/ttobjs.h @@ -22,7 +22,7 @@ #include #include -#include +#include #ifdef __cplusplus diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c index e0fe0f5c5..e2b4e48fe 100644 --- a/src/truetype/ttpload.c +++ b/src/truetype/ttpload.c @@ -22,7 +22,7 @@ #include #include -#include +#include #undef FT_COMPONENT #define FT_COMPONENT trace_ttload diff --git a/src/type1/rules.mk b/src/type1/rules.mk index 368052390..d35997cd6 100644 --- a/src/type1/rules.mk +++ b/src/type1/rules.mk @@ -108,8 +108,7 @@ T1_DRV_SRC := $(T1_DIR_)t1objs.c \ # Type1 driver headers # -T1_DRV_H := $(T1_DIR_)t1errors.h \ - $(T1SHARED_H) \ +T1_DRV_H := $(T1SHARED_H) \ $(T1_DRV_SRC:%.c=%.h) diff --git a/src/type1/t1driver.h b/src/type1/t1driver.h index 2cad9bfe2..5cd362bcb 100644 --- a/src/type1/t1driver.h +++ b/src/type1/t1driver.h @@ -19,7 +19,7 @@ #define T1DRIVER_H #include -#include +#include FT_EXPORT_VAR(const FT_DriverInterface) t1_driver_interface; diff --git a/src/type1/t1errors.h b/src/type1/t1errors.h deleted file mode 100644 index 7984f546e..000000000 --- a/src/type1/t1errors.h +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************* - * - * t1errors.h - * - * Type1 Error ID definitions - * - * Copyright 1996-1998 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. - * - ******************************************************************/ - -#ifndef FREETYPE_H -#error "Don't include this file! Use t1driver.h instead." -#endif - -#ifndef T1ERRORS_H -#define T1ERRORS_H - - /************************ error codes declaration **************/ - - /* The error codes are grouped in 'classes' used to indicate the */ - /* 'level' at which the error happened. */ - /* The class is given by an error code's high byte. */ - - -/* ------------- Success is always 0 -------- */ - -#define T1_Err_Ok FT_Err_Ok - -/* ----------- high level API errors -------- */ - -#define T1_Err_Invalid_File_Format FT_Err_Invalid_File_Format -#define T1_Err_Invalid_Argument FT_Err_Invalid_Argument -#define T1_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle -#define T1_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle -#define T1_Err_Invalid_Size_Handle FT_Err_Invalid_Size_Handle -#define T1_Err_Invalid_Glyph_Handle FT_Err_Invalid_Slot_Handle -#define T1_Err_Invalid_CharMap_Handle FT_Err_Invalid_CharMap_Handle -#define T1_Err_Invalid_Glyph_Index FT_Err_Invalid_Glyph_Index - -#define T1_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature -#define T1_Err_Unavailable_Outline FT_Err_Unavailable_Outline -#define T1_Err_Unavailable_Bitmap FT_Err_Unavailable_Bitmap -#define T1_Err_Unavailable_Pixmap FT_Err_Unavailable_Pixmap -#define T1_Err_File_Is_Not_Collection FT_Err_File_Is_Not_Collection - -#define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle - -/* ------------- internal errors ------------ */ - -#define T1_Err_Out_Of_Memory FT_Err_Out_Of_Memory -#define T1_Err_Unlisted_Object FT_Err_Unlisted_Object - -/* ------------ general glyph outline errors ------ */ - -#define T1_Err_Too_Many_Points FT_Err_Too_Many_Points -#define T1_Err_Too_Many_Contours FT_Err_Too_Many_Contours -#define T1_Err_Too_Many_Hints FT_Err_Too_Many_Hints -#define T1_Err_Invalid_Composite FT_Err_Invalid_Composite -#define T1_Err_Too_Many_Edges FT_Err_Too_Many_Edges -#define T1_Err_Too_Many_Strokes FT_Err_Too_Many_Strokes - - -#define T1_Err_Syntax_Error FT_Err_Invalid_File_Format -#define T1_Err_Stack_Underflow FT_Err_Invalid_File_Format -#define T1_Err_Stack_Overflow FT_Err_Invalid_File_Format - -#endif /* TDERRORS_H */ - - -/* END */ diff --git a/src/type1/t1objs.h b/src/type1/t1objs.h index dd4220fb1..48c7ce1ce 100644 --- a/src/type1/t1objs.h +++ b/src/type1/t1objs.h @@ -22,7 +22,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/type1z/rules.mk b/src/type1z/rules.mk index 93d6072de..07903ca15 100644 --- a/src/type1z/rules.mk +++ b/src/type1z/rules.mk @@ -48,8 +48,7 @@ T1Z_DRV_SRC := $(T1Z_DIR_)t1parse.c \ # Type1 driver headers # -T1Z_DRV_H := $(T1Z_DIR_)t1errors.h \ - $(T1SHARED_H) \ +T1Z_DRV_H := $(T1SHARED_H) \ $(T1Z_DRV_SRC:%.c=%.h) diff --git a/src/type1z/t1driver.h b/src/type1z/t1driver.h index a998070b7..08d7a35f8 100644 --- a/src/type1z/t1driver.h +++ b/src/type1z/t1driver.h @@ -19,7 +19,7 @@ #define T1DRIVER_H #include -#include +#include FT_EXPORT_VAR(const FT_DriverInterface) t1z_driver_interface; diff --git a/src/type1z/t1errors.h b/src/type1z/t1errors.h deleted file mode 100644 index a799115a8..000000000 --- a/src/type1z/t1errors.h +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************* - * - * t1errors.h - * - * Type1 Error ID definitions - * - * Copyright 1996-1998 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. - * - ******************************************************************/ - -#ifndef T1ERRORS_H -#define T1ERRORS_H - -#include - - /************************ error codes declaration **************/ - - /* The error codes are grouped in 'classes' used to indicate the */ - /* 'level' at which the error happened. */ - /* The class is given by an error code's high byte. */ - - -/* ------------- Success is always 0 -------- */ - -#define T1_Err_Ok FT_Err_Ok - -/* ----------- high level API errors -------- */ - -#define T1_Err_Invalid_File_Format FT_Err_Invalid_File_Format -#define T1_Err_Invalid_Argument FT_Err_Invalid_Argument -#define T1_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle -#define T1_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle -#define T1_Err_Invalid_Size_Handle FT_Err_Invalid_Size_Handle -#define T1_Err_Invalid_Glyph_Handle FT_Err_Invalid_Slot_Handle -#define T1_Err_Invalid_CharMap_Handle FT_Err_Invalid_CharMap_Handle -#define T1_Err_Invalid_Glyph_Index FT_Err_Invalid_Glyph_Index - -#define T1_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature -#define T1_Err_Unavailable_Outline FT_Err_Unavailable_Outline -#define T1_Err_Unavailable_Bitmap FT_Err_Unavailable_Bitmap -#define T1_Err_Unavailable_Pixmap FT_Err_Unavailable_Pixmap -#define T1_Err_File_Is_Not_Collection FT_Err_File_Is_Not_Collection - -#define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle - -/* ------------- internal errors ------------ */ - -#define T1_Err_Out_Of_Memory FT_Err_Out_Of_Memory -#define T1_Err_Unlisted_Object FT_Err_Unlisted_Object - -/* ------------ general glyph outline errors ------ */ - -#define T1_Err_Too_Many_Points FT_Err_Too_Many_Points -#define T1_Err_Too_Many_Contours FT_Err_Too_Many_Contours -#define T1_Err_Too_Many_Hints FT_Err_Too_Many_Hints -#define T1_Err_Invalid_Composite FT_Err_Invalid_Composite -#define T1_Err_Too_Many_Edges FT_Err_Too_Many_Edges -#define T1_Err_Too_Many_Strokes FT_Err_Too_Many_Strokes - - -#define T1_Err_Syntax_Error FT_Err_Invalid_File_Format -#define T1_Err_Stack_Underflow FT_Err_Invalid_File_Format -#define T1_Err_Stack_Overflow FT_Err_Invalid_File_Format - -#endif /* TDERRORS_H */ - - -/* END */ diff --git a/src/type1z/t1load.c b/src/type1z/t1load.c index f1de8dc38..3adbc3128 100644 --- a/src/type1z/t1load.c +++ b/src/type1z/t1load.c @@ -64,7 +64,7 @@ #include #include -#include +#include #include #include diff --git a/src/type1z/t1objs.h b/src/type1z/t1objs.h index 7da67139e..0b1af90b0 100644 --- a/src/type1z/t1objs.h +++ b/src/type1z/t1objs.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include #ifdef __cplusplus diff --git a/src/type1z/t1parse.c b/src/type1z/t1parse.c index 27581062c..c2fc52c0d 100644 --- a/src/type1z/t1parse.c +++ b/src/type1z/t1parse.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #undef FT_COMPONENT