shithub: freetype+ttf2subf

Download patch

ref: e1d5dd78f4a75697a2584deac4af71dd21939f6a
parent: 61bd4b9dd1713faf57e738b3ca5e728f87e7e912
author: Werner Lemberg <[email protected]>
date: Wed Jun 7 00:48:12 EDT 2000

Moved all *errors.h header files to include/freetype/internal for
consistency.

Removed unused error message.

git/fs: mount .git/fs: mount/attach disallowed
--- /dev/null
+++ b/include/freetype/internal/t1errors.h
@@ -1,0 +1,72 @@
+/*******************************************************************
+ *
+ *  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
+
+  /************************ 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_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 */
--- /dev/null
+++ b/include/freetype/internal/t2errors.h
@@ -1,0 +1,126 @@
+/***************************************************************************/
+/*                                                                         */
+/*  t2errors.h                                                             */
+/*                                                                         */
+/*    OpenType 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 T2ERRORS_H
+#define T2ERRORS_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  T2_Err_Ok                       FT_Err_Ok
+
+  /* High level API errors. */
+
+#define  T2_Err_Invalid_File_Format      FT_Err_Invalid_File_Format
+#define  T2_Err_Invalid_Argument         FT_Err_Invalid_Argument
+#define  T2_Err_Invalid_Driver_Handle    FT_Err_Invalid_Driver_Handle
+#define  T2_Err_Invalid_Face_Handle      FT_Err_Invalid_Face_Handle
+#define  T2_Err_Invalid_Instance_Handle  FT_Err_Invalid_Size_Handle
+#define  T2_Err_Invalid_Glyph_Handle     FT_Err_Invalid_Slot_Handle
+#define  T2_Err_Invalid_CharMap_Handle   FT_Err_Invalid_CharMap_Handle
+#define  T2_Err_Invalid_Glyph_Index      FT_Err_Invalid_Glyph_Index
+
+#define  T2_Err_Unimplemented_Feature    FT_Err_Unimplemented_Feature
+#define  T2_Err_Unavailable_Outline      FT_Err_Unavailable_Outline
+#define  T2_Err_Unavailable_Bitmap       FT_Err_Unavailable_Bitmap
+#define  T2_Err_Unavailable_Pixmap       FT_Err_Unavailable_Pixmap
+#define  T2_Err_File_Is_Not_Collection   FT_Err_File_Is_Not_Collection
+
+#define  T2_Err_Invalid_Engine           FT_Err_Invalid_Driver_Handle
+
+  /* Internal errors. */
+
+#define  T2_Err_Out_Of_Memory            FT_Err_Out_Of_Memory
+#define  T2_Err_Unlisted_Object          FT_Err_Unlisted_Object
+
+  /* General glyph outline errors. */
+
+#define  T2_Err_Too_Many_Points          FT_Err_Too_Many_Points
+#define  T2_Err_Too_Many_Contours        FT_Err_Too_Many_Contours
+#define  T2_Err_Too_Many_Ins             FT_Err_Too_Many_Hints
+#define  T2_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 T2_Err_Invalid_Opcode           0x400
+#define T2_Err_Too_Few_Arguments        0x401
+#define T2_Err_Stack_Overflow           0x402
+#define T2_Err_Code_Overflow            0x403
+#define T2_Err_Bad_Argument             0x404
+#define T2_Err_Divide_By_Zero           0x405
+#define T2_Err_Storage_Overflow         0x406
+#define T2_Err_Cvt_Overflow             0x407
+#define T2_Err_Invalid_Reference        0x408
+#define T2_Err_Invalid_Distance         0x409
+#define T2_Err_Interpolate_Twilight     0x40A
+#define T2_Err_Debug_OpCode             0x40B
+#define T2_Err_ENDF_In_Exec_Stream      0x40C
+#define T2_Err_Out_Of_CodeRanges        0x40D
+#define T2_Err_Nested_DEFS              0x40E
+#define T2_Err_Invalid_CodeRange        0x40F
+#define T2_Err_Invalid_Displacement     0x410
+#define T2_Err_Execution_Too_Long       0x411
+
+#define T2_Err_Too_Many_Instruction_Defs  0x412
+#define T2_Err_Too_Many_Function_Defs     0x412
+
+  /* Other TrueType specific error codes. */
+
+#define T2_Err_Table_Missing            0x420
+#define T2_Err_Too_Many_Extensions      0x421
+#define T2_Err_Extensions_Unsupported   0x422
+#define T2_Err_Invalid_Extension_Id     0x423
+
+#define T2_Err_No_Vertical_Data         0x424
+
+#define T2_Err_Max_Profile_Missing      0x430
+#define T2_Err_Header_Table_Missing     0x431
+#define T2_Err_Horiz_Header_Missing     0x432
+#define T2_Err_Locations_Missing        0x433
+#define T2_Err_Name_Table_Missing       0x434
+#define T2_Err_CMap_Table_Missing       0x435
+#define T2_Err_Hmtx_Table_Missing       0x436
+#define T2_Err_OS2_Table_Missing        0x437
+#define T2_Err_Post_Table_Missing       0x438
+
+#define T2_Err_Invalid_Horiz_Metrics    0x440
+#define T2_Err_Invalid_CharMap_Format   0x441
+#define T2_Err_Invalid_PPem             0x442
+#define T2_Err_Invalid_Vert_Metrics     0x443
+
+#define T2_Err_Could_Not_Find_Context   0x450
+
+#endif /* FTERRID_H */
+
+
+/* END */
--- 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
--- a/src/cff/t2driver.h
+++ b/src/cff/t2driver.h
@@ -22,7 +22,7 @@
 #include <freetype/internal/ftdriver.h>
 #include <freetype/ttnameid.h>
 #include <t2objs.h>
-#include <t2errors.h>
+#include <freetype/internal/t2errors.h>
 
 
   FT_EXPORT_VAR(const FT_DriverInterface)  cff_driver_interface;
--- a/src/cff/t2errors.h
+++ /dev/null
@@ -1,126 +1,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  t2errors.h                                                             */
-/*                                                                         */
-/*    OpenType 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 T2ERRORS_H
-#define T2ERRORS_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  T2_Err_Ok                       FT_Err_Ok
-
-  /* High level API errors. */
-
-#define  T2_Err_Invalid_File_Format      FT_Err_Invalid_File_Format
-#define  T2_Err_Invalid_Argument         FT_Err_Invalid_Argument
-#define  T2_Err_Invalid_Driver_Handle    FT_Err_Invalid_Driver_Handle
-#define  T2_Err_Invalid_Face_Handle      FT_Err_Invalid_Face_Handle
-#define  T2_Err_Invalid_Instance_Handle  FT_Err_Invalid_Size_Handle
-#define  T2_Err_Invalid_Glyph_Handle     FT_Err_Invalid_Slot_Handle
-#define  T2_Err_Invalid_CharMap_Handle   FT_Err_Invalid_CharMap_Handle
-#define  T2_Err_Invalid_Glyph_Index      FT_Err_Invalid_Glyph_Index
-
-#define  T2_Err_Unimplemented_Feature    FT_Err_Unimplemented_Feature
-#define  T2_Err_Unavailable_Outline      FT_Err_Unavailable_Outline
-#define  T2_Err_Unavailable_Bitmap       FT_Err_Unavailable_Bitmap
-#define  T2_Err_Unavailable_Pixmap       FT_Err_Unavailable_Pixmap
-#define  T2_Err_File_Is_Not_Collection   FT_Err_File_Is_Not_Collection
-
-#define  T2_Err_Invalid_Engine           FT_Err_Invalid_Driver_Handle
-
-  /* Internal errors. */
-
-#define  T2_Err_Out_Of_Memory            FT_Err_Out_Of_Memory
-#define  T2_Err_Unlisted_Object          FT_Err_Unlisted_Object
-
-  /* General glyph outline errors. */
-
-#define  T2_Err_Too_Many_Points          FT_Err_Too_Many_Points
-#define  T2_Err_Too_Many_Contours        FT_Err_Too_Many_Contours
-#define  T2_Err_Too_Many_Ins             FT_Err_Too_Many_Hints
-#define  T2_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 T2_Err_Invalid_Opcode           0x400
-#define T2_Err_Too_Few_Arguments        0x401
-#define T2_Err_Stack_Overflow           0x402
-#define T2_Err_Code_Overflow            0x403
-#define T2_Err_Bad_Argument             0x404
-#define T2_Err_Divide_By_Zero           0x405
-#define T2_Err_Storage_Overflow         0x406
-#define T2_Err_Cvt_Overflow             0x407
-#define T2_Err_Invalid_Reference        0x408
-#define T2_Err_Invalid_Distance         0x409
-#define T2_Err_Interpolate_Twilight     0x40A
-#define T2_Err_Debug_OpCode             0x40B
-#define T2_Err_ENDF_In_Exec_Stream      0x40C
-#define T2_Err_Out_Of_CodeRanges        0x40D
-#define T2_Err_Nested_DEFS              0x40E
-#define T2_Err_Invalid_CodeRange        0x40F
-#define T2_Err_Invalid_Displacement     0x410
-#define T2_Err_Execution_Too_Long       0x411
-
-#define T2_Err_Too_Many_Instruction_Defs  0x412
-#define T2_Err_Too_Many_Function_Defs     0x412
-
-  /* Other TrueType specific error codes. */
-
-#define T2_Err_Table_Missing            0x420
-#define T2_Err_Too_Many_Extensions      0x421
-#define T2_Err_Extensions_Unsupported   0x422
-#define T2_Err_Invalid_Extension_Id     0x423
-
-#define T2_Err_No_Vertical_Data         0x424
-
-#define T2_Err_Max_Profile_Missing      0x430
-#define T2_Err_Header_Table_Missing     0x431
-#define T2_Err_Horiz_Header_Missing     0x432
-#define T2_Err_Locations_Missing        0x433
-#define T2_Err_Name_Table_Missing       0x434
-#define T2_Err_CMap_Table_Missing       0x435
-#define T2_Err_Hmtx_Table_Missing       0x436
-#define T2_Err_OS2_Table_Missing        0x437
-#define T2_Err_Post_Table_Missing       0x438
-
-#define T2_Err_Invalid_Horiz_Metrics    0x440
-#define T2_Err_Invalid_CharMap_Format   0x441
-#define T2_Err_Invalid_PPem             0x442
-#define T2_Err_Invalid_Vert_Metrics     0x443
-
-#define T2_Err_Could_Not_Find_Context   0x450
-
-#endif /* FTERRID_H */
-
-
-/* END */
--- a/src/cff/t2load.c
+++ b/src/cff/t2load.c
@@ -25,7 +25,7 @@
 #include <freetype/tttags.h>
 #include <t2load.h>
 #include <t2parse.h>
-#include <t2errors.h>
+#include <freetype/internal/t2errors.h>
 
 #undef  FT_COMPONENT
 #define FT_COMPONENT  trace_ttload
--- a/src/cff/t2objs.c
+++ b/src/cff/t2objs.c
@@ -27,7 +27,7 @@
 #include <t2objs.h>
 
 #include <t2load.h>
-#include <t2errors.h>
+#include <freetype/internal/t2errors.h>
 
 /* required by tracing mode */
 #undef   FT_COMPONENT
--- a/src/cff/t2objs.h
+++ b/src/cff/t2objs.h
@@ -22,7 +22,7 @@
 
 #include <freetype/internal/ftobjs.h>
 #include <freetype/internal/t2types.h>
-#include <t2errors.h>
+#include <freetype/internal/t2errors.h>
 
 
 #ifdef __cplusplus
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -60,7 +60,7 @@
 #include <freetype/ftmm.h>
 
 #include <freetype/internal/t1types.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 #include <cidload.h>
 #include <stdio.h>
 
--- a/src/cid/cidobjs.h
+++ b/src/cid/cidobjs.h
@@ -20,7 +20,7 @@
 
 #include <freetype/internal/ftobjs.h>
 #include <freetype/config/ftconfig.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 #include <freetype/internal/t1types.h>
 
 #ifdef __cplusplus
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -32,7 +32,7 @@
 #include <freetype/internal/ftcalc.h>
 #include <freetype/internal/ftobjs.h>
 #include <freetype/internal/ftstream.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 #include <cidparse.h>
 
 #undef FT_COMPONENT
--- a/src/cid/cidriver.h
+++ b/src/cid/cidriver.h
@@ -19,7 +19,7 @@
 #define T1DRIVER_H
 
 #include <cidobjs.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 
   FT_EXPORT_VAR(const  FT_DriverInterface)  t1cid_driver_interface;
 
--- a/src/cid/rules.mk
+++ b/src/cid/rules.mk
@@ -48,8 +48,7 @@
 
 # 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)
 
--- a/src/cid/t1errors.h
+++ /dev/null
@@ -1,75 +1,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 <freetype/fterrors.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 */
--- 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
--- 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:
--- 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
@@ -95,7 +95,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
--- a/src/truetype/ttdriver.h
+++ b/src/truetype/ttdriver.h
@@ -22,7 +22,7 @@
 #include <freetype/internal/ftdriver.h>
 #include <freetype/ttnameid.h>
 #include <ttobjs.h>
-#include <tterrors.h>
+#include <freetype/internal/tterrors.h>
 
 
   FT_EXPORT_VAR(const FT_DriverInterface)  tt_driver_interface;
--- a/src/truetype/tterrors.h
+++ /dev/null
@@ -1,126 +1,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 */
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -21,7 +21,7 @@
 #include <freetype/ftsystem.h>
 
 #include <ttobjs.h>
-#include <tterrors.h>
+#include <freetype/internal/tterrors.h>
 #include <ttinterp.h>
 
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -27,7 +27,7 @@
 #include <ttobjs.h>
 
 #include <ttpload.h>
-#include <tterrors.h>
+#include <freetype/internal/tterrors.h>
 
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #include <ttinterp.h>
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -22,7 +22,7 @@
 
 #include <freetype/internal/ftobjs.h>
 #include <freetype/internal/tttypes.h>
-#include <tterrors.h>
+#include <freetype/internal/tterrors.h>
 
 
 #ifdef __cplusplus
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -22,7 +22,7 @@
 #include <freetype/tttags.h>
 
 #include <ttpload.h>
-#include <tterrors.h>
+#include <freetype/internal/tterrors.h>
 
 #undef  FT_COMPONENT
 #define FT_COMPONENT  trace_ttload
--- a/src/type1/rules.mk
+++ b/src/type1/rules.mk
@@ -108,8 +108,7 @@
 
 # Type1 driver headers
 #
-T1_DRV_H := $(T1_DIR_)t1errors.h    \
-            $(T1SHARED_H)           \
+T1_DRV_H := $(T1SHARED_H)           \
             $(T1_DRV_SRC:%.c=%.h)
 
 
--- a/src/type1/t1driver.h
+++ b/src/type1/t1driver.h
@@ -19,7 +19,7 @@
 #define T1DRIVER_H
 
 #include <t1objs.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 
   FT_EXPORT_VAR(const  FT_DriverInterface)  t1_driver_interface;
 
--- a/src/type1/t1errors.h
+++ /dev/null
@@ -1,77 +1,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 */
--- a/src/type1/t1objs.h
+++ b/src/type1/t1objs.h
@@ -22,7 +22,7 @@
 #include <freetype/internal/ftobjs.h>
 #include <freetype/internal/t1types.h>
 
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 
 #ifdef __cplusplus
   extern "C" {
--- a/src/type1z/rules.mk
+++ b/src/type1z/rules.mk
@@ -48,8 +48,7 @@
 
 # Type1 driver headers
 #
-T1Z_DRV_H := $(T1Z_DIR_)t1errors.h  \
-             $(T1SHARED_H)          \
+T1Z_DRV_H := $(T1SHARED_H)          \
              $(T1Z_DRV_SRC:%.c=%.h)
 
 
--- a/src/type1z/t1driver.h
+++ b/src/type1z/t1driver.h
@@ -19,7 +19,7 @@
 #define T1DRIVER_H
 
 #include <t1objs.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 
   FT_EXPORT_VAR(const  FT_DriverInterface)  t1z_driver_interface;
 
--- a/src/type1z/t1errors.h
+++ /dev/null
@@ -1,75 +1,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 <freetype/fterrors.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 */
--- a/src/type1z/t1load.c
+++ b/src/type1z/t1load.c
@@ -64,7 +64,7 @@
 #include <freetype/ftmm.h>
 
 #include <freetype/internal/t1types.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 #include <t1load.h>
 #include <stdio.h>
 
--- a/src/type1z/t1objs.h
+++ b/src/type1z/t1objs.h
@@ -20,7 +20,7 @@
 
 #include <freetype/internal/ftobjs.h>
 #include <freetype/config/ftconfig.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 #include <freetype/internal/t1types.h>
 
 #ifdef __cplusplus
--- a/src/type1z/t1parse.c
+++ b/src/type1z/t1parse.c
@@ -32,7 +32,7 @@
 #include <freetype/internal/ftcalc.h>
 #include <freetype/internal/ftobjs.h>
 #include <freetype/internal/ftstream.h>
-#include <t1errors.h>
+#include <freetype/internal/t1errors.h>
 #include <t1parse.h>
 
 #undef FT_COMPONENT