Commit efe527520a5f35be7a72bf4f7d97d02533b1705b

Werner Lemberg 2003-12-16T07:12:40

* include/freetype/internal/tttypes.h (TT_TableDirRec, TT_CMapDirRec, TT_CMapDirEntryRec, TT_CMap0, TT_CMap2SubHeaderRec, TT_CMap2Rec, TT_CMap4Segment, TT_CMap4Rec, TT_CMap6, TT_CMapGroupRec, TT_CMap8_12Rec, TT_CMap10Rec, TT_CharMap_Func, TT_CharNext_Func, TT_CMapTableRec, TT_CharMapRec): Removed. Obsolete. * src/cff/cffobjs.h (CFF_CharMapRec): Removed. Obsolete.

diff --git a/ChangeLog b/ChangeLog
index 896308f..dbd0423 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,14 @@
 	* src/sfnt/sfdriver.c: Don't include ttcmap.h.
 	(sfnt_interface): Updated.
 
+	* include/freetype/internal/tttypes.h (TT_TableDirRec,
+	TT_CMapDirRec, TT_CMapDirEntryRec, TT_CMap0, TT_CMap2SubHeaderRec,
+	TT_CMap2Rec, TT_CMap4Segment, TT_CMap4Rec, TT_CMap6,
+	TT_CMapGroupRec, TT_CMap8_12Rec, TT_CMap10Rec, TT_CharMap_Func,
+	TT_CharNext_Func, TT_CMapTableRec, TT_CharMapRec): Removed. 
+	Obsolete.
+	* src/cff/cffobjs.h (CFF_CharMapRec): Removed.  Obsolete.
+
 2003-12-15  Werner Lemberg  <wl@gnu.org>
 
 	* docs/CHANGES: Updated.
diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h
index 8de9a6b..95e3057 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -142,17 +142,6 @@ FT_BEGIN_HEADER
   /*************************************************************************/
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* This structure/class is defined here because it is common to the      */
-  /* 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 */
-  /* `ttobjs.h'.                                                           */
-  /*                                                                       */
-  /*************************************************************************/
-
   typedef struct T1_FaceRec_*   T1_Face;
   typedef struct CID_FaceRec_*  CID_Face;
 
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index a93bac1..1e451ac 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -108,41 +108,6 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    TT_TableDirRec                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure models a TrueType table directory.  It is used to   */
-  /*    access the various tables of the font face.                        */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    version       :: The version number; starts with 0x00010000.       */
-  /*                                                                       */
-  /*    numTables     :: The number of tables.                             */
-  /*                                                                       */
-  /*    searchRange   :: Unused.                                           */
-  /*                                                                       */
-  /*    entrySelector :: Unused.                                           */
-  /*                                                                       */
-  /*    rangeShift    :: Unused.                                           */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font opening.                   */
-  /*                                                                       */
-  typedef struct  TT_TableDirRec_
-  {
-    FT_Fixed   version;        /* should be 0x10000 */
-    FT_UShort  numTables;      /* number of tables  */
-
-    FT_UShort  searchRange;    /* These parameters are only used  */
-    FT_UShort  entrySelector;  /* for a dichotomy search in the   */
-    FT_UShort  rangeShift;     /* directory.  We ignore them.     */
-
-  } TT_TableDirRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
   /*    TT_TableRec                                                        */
   /*                                                                       */
   /* <Description>                                                         */
@@ -171,61 +136,6 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    TT_CMapDirRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure describes the directory of the `cmap' table,        */
-  /*    containing the font's character mappings table.                    */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    tableVersionNumber :: The version number.                          */
-  /*                                                                       */
-  /*    numCMaps           :: The number of charmaps in the font.          */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font loading.                   */
-  /*                                                                       */
-  typedef struct  TT_CMapDirRec_
-  {
-    FT_UShort  tableVersionNumber;
-    FT_UShort  numCMaps;
-
-  } TT_CMapDirRec, *TT_CMapDir;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_CMapDirEntryRec                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This structure describes a charmap in a TrueType font.             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    platformID :: An ID used to specify for which platform this        */
-  /*                  charmap is defined (FreeType manages all platforms). */
-  /*                                                                       */
-  /*    encodingID :: A platform-specific ID used to indicate which source */
-  /*                  encoding is used in this charmap.                    */
-  /*                                                                       */
-  /*    offset     :: The offset of the charmap relative to the start of   */
-  /*                  the `cmap' table.                                    */
-  /*                                                                       */
-  /* <Note>                                                                */
-  /*    This structure is only used during font loading.                   */
-  /*                                                                       */
-  typedef struct  TT_CMapDirEntryRec_
-  {
-    FT_UShort  platformID;
-    FT_UShort  platformEncodingID;
-    FT_Long    offset;
-
-  } TT_CMapDirEntryRec, *TT_CMapDirEntry;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
   /*    TT_LongMetricsRec                                                  */
   /*                                                                       */
   /* <Description>                                                         */
@@ -913,201 +823,6 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /***                                                                   ***/
   /***                                                                   ***/
-  /***                  TRUETYPE CHARMAPS SUPPORT                        ***/
-  /***                                                                   ***/
-  /***                                                                   ***/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /* format 0 */
-
-  typedef struct  TT_CMap0_
-  {
-    FT_ULong  language;       /* for Mac fonts (originally ushort) */
-
-    FT_Byte*  glyphIdArray;
-
-  } TT_CMap0Rec, *TT_CMap0;
-
-
-  /* format 2 */
-
-  typedef struct  TT_CMap2SubHeaderRec_
-  {
-    FT_UShort  firstCode;      /* first valid low byte         */
-    FT_UShort  entryCount;     /* number of valid low bytes    */
-    FT_Short   idDelta;        /* delta value to glyphIndex    */
-    FT_UShort  idRangeOffset;  /* offset from here to 1st code */
-
-  } TT_CMap2SubHeaderRec, *TT_CMap2SubHeader;
-
-
-  typedef struct  TT_CMap2Rec_
-  {
-    FT_ULong            language;     /* for Mac fonts (originally ushort) */
-
-    FT_UShort*          subHeaderKeys;  /* high byte mapping table     */
-                                        /* value = subHeader index * 8 */
-    TT_CMap2SubHeader   subHeaders;
-    FT_UShort*          glyphIdArray;
-    FT_UShort           numGlyphId;   /* control value */
-
-  } TT_CMap2Rec, *TT_CMap2;
-
-
-  /* format 4 */
-
-  typedef struct  TT_CMap4Segment_
-  {
-    FT_UShort  endCount;
-    FT_UShort  startCount;
-    FT_Short   idDelta;
-    FT_UShort  idRangeOffset;
-
-  } TT_CMap4SegmentRec, *TT_CMap4Segment;
-
-
-  typedef struct  TT_CMap4Rec_
-  {
-    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;
-
-    TT_CMap4Segment  segments;
-    FT_UShort*       glyphIdArray;
-    FT_UShort        numGlyphId;     /* control value */
-
-    TT_CMap4Segment  last_segment;   /* last used segment; this is a small  */
-                                     /* cache to potentially increase speed */
-  } TT_CMap4Rec, *TT_CMap4;
-
-
-  /* format 6 */
-
-  typedef struct  TT_CMap6_
-  {
-    FT_ULong    language;       /* for Mac fonts (originally ushort)     */
-
-    FT_UShort   firstCode;      /* first character code of subrange      */
-    FT_UShort   entryCount;     /* number of character codes in subrange */
-
-    FT_UShort*  glyphIdArray;
-
-  } TT_CMap6Rec, *TT_CMap6;
-
-
-  /* auxiliary table for format 8 and 12 */
-
-  typedef struct  TT_CMapGroupRec_
-  {
-    FT_ULong  startCharCode;
-    FT_ULong  endCharCode;
-    FT_ULong  startGlyphID;
-
-  } TT_CMapGroupRec, *TT_CMapGroup;
-
-
-  /* FreeType handles format 8 and 12 identically.  It is not necessary to
-     cover mixed 16bit and 32bit codes since FreeType always uses FT_ULong
-     for input character codes -- converting Unicode surrogates to 32bit
-     character codes must be done by the application.                      */
-
-  typedef struct  TT_CMap8_12Rec_
-  {
-    FT_ULong      language;        /* for Mac fonts */
-
-    FT_ULong      nGroups;
-    TT_CMapGroup  groups;
-
-    TT_CMapGroup  last_group;      /* last used group; this is a small    */
-                                   /* cache to potentially increase speed */
-  } TT_CMap8_12Rec, *TT_CMap8_12;
-
-
-  /* format 10 */
-
-  typedef struct  TT_CMap10Rec_
-  {
-    FT_ULong    language;           /* for Mac fonts */
-
-    FT_ULong    startCharCode;      /* first character covered */
-    FT_ULong    numChars;           /* number of characters covered */
-
-    FT_UShort*  glyphs;
-
-  } TT_CMap10Rec, *TT_CMap10;
-
-
-  typedef struct TT_CMapTableRec_*  TT_CMapTable;
-
-
-  typedef FT_UInt
-  (*TT_CharMap_Func)( TT_CMapTable  charmap,
-                      FT_ULong      char_code );
-
-  typedef FT_ULong
-  (*TT_CharNext_Func)( TT_CMapTable  charmap,
-                       FT_ULong      char_code );
-
-
-  /* charmap table */
-  typedef struct  TT_CMapTableRec_
-  {
-    FT_UShort  platformID;
-    FT_UShort  platformEncodingID;
-    FT_UShort  format;
-    FT_ULong   length;          /* must be ulong for formats 8, 10, and 12 */
-
-    FT_Bool    loaded;
-    FT_ULong   offset;
-
-    union
-    {
-      TT_CMap0Rec     cmap0;
-      TT_CMap2Rec     cmap2;
-      TT_CMap4Rec     cmap4;
-      TT_CMap6Rec     cmap6;
-      TT_CMap8_12Rec  cmap8_12;
-      TT_CMap10Rec    cmap10;
-    } c;
-
-    TT_CharMap_Func   get_index;
-    TT_CharNext_Func  get_next_char;
-
-  } TT_CMapTableRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    TT_CharMapRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The TrueType character map object type.                            */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    root :: The parent character map structure.                        */
-  /*                                                                       */
-  /*    cmap :: The used character map.                                    */
-  /*                                                                       */
-  typedef struct  TT_CharMapRec_
-  {
-    FT_CharMapRec    root;
-    TT_CMapTableRec  cmap;
-
-  } TT_CharMapRec;
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /***                                                                   ***/
-  /***                                                                   ***/
   /***                  ORIGINAL TT_FACE CLASS DEFINITION                ***/
   /***                                                                   ***/
   /***                                                                   ***/
@@ -1121,9 +836,8 @@ FT_BEGIN_HEADER
   /* This structure/class is defined here because it is common to the      */
   /* 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 in          */
-  /* `ttobjs.h'.                                                           */
+  /* Note, however, that the classes TT_Size and TT_GlyphSlot are not      */
+  /* shared between font drivers, and are thus defined in `ttobjs.h'.      */
   /*                                                                       */
   /*************************************************************************/
 
@@ -1145,17 +859,6 @@ FT_BEGIN_HEADER
   typedef struct TT_FaceRec_*  TT_Face;
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    TT_CharMap                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to a TrueType character mapping object.                   */
-  /*                                                                       */
-  typedef struct TT_CharMapRec_*  TT_CharMap;
-
-
   /* a function type used for the truetype bytecode interpreter hooks */
   typedef FT_Error
   (*TT_Interpreter)( void*  exec_context );
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 68ebeca..49d5665 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -89,15 +89,6 @@ FT_BEGIN_HEADER
   } CFF_Transform;
 
 
-  /* this is only used in the case of a pure CFF font with no charmap */
-  typedef struct  CFF_CharMapRec_
-  {
-    TT_CharMapRec  root;
-    PS_Unicodes    unicodes;
-
-  } CFF_CharMapRec, *CFF_CharMap;
-
-
   /***********************************************************************/
   /*                                                                     */
   /* TrueType driver class.                                              */