Commit f3f1bf409483b23799cacd294b96008f56606489

henry 2003-06-03T02:50:08

Removed FTCharmap member and associated methods

diff --git a/include/FTFace.h b/include/FTFace.h
index 4f91464..bb15768 100755
--- a/include/FTFace.h
+++ b/include/FTFace.h
@@ -10,8 +10,6 @@
 #include "FTPoint.h"
 #include "FTSize.h"
 
-class FTCharmap;
-
 /**
  * FTFace class provides an abstraction layer for the Freetype Face.
  *
@@ -66,6 +64,8 @@ class FTGL_EXPORT FTFace
          * Disposes of the face
          */
         void Close();
+
+        FT_Face* Face() const { return ftFace;}
         
         
         void* FontTable( unsigned int tableName) const;
@@ -85,27 +85,8 @@ class FTGL_EXPORT FTFace
 
         unsigned int UnitsPerEM() const;
 
-        /**
-         * Sets the character map for the face.
-         *
-         * This doesn't guarantee that the size was set correctly. Clients
-         * should check errors.
-         *
-         * @param encoding      the Freetype encoding symbol. See above.
-         * @return              <code>true</code> if charmap was valid
-         *                      and set correctly
-         */
-        bool CharMap( FT_Encoding encoding);
-
-        /**
-         *  Get the glyph index of the input character.
-         *
-         * @param index The character code of the requested glyph in the
-         *              current encoding eg apple roman.
-         * @return      The glyph index for the character.
-         */
-        unsigned int CharIndex( unsigned int index ) const;
-
+//        FTCharmap* CharMap() const { return charMap;}
+        
         /**
          * Gets the kerning vector between two glyphs
          */
@@ -140,11 +121,6 @@ class FTGL_EXPORT FTFace
         FTSize  charSize;
         
         /**
-         * The Character Map object associated with this face
-         */
-        FTCharmap* charMap;
-
-        /**
          * Temporary variable to hold a glyph
          */
         FT_Glyph ftGlyph;
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 42f7d58..c106062 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -1,13 +1,10 @@
 #include    "FTFace.h"
 #include    "FTLibrary.h"
-#include    "FTCharmap.h"
-
 
 #include FT_TRUETYPE_TABLES_H
 
 FTFace::FTFace( const char* filename)
-:   charMap(0),
-    numGlyphs(0),
+:   numGlyphs(0),
     err(0)
 {
     const FT_Long DEFAULT_FACE_INDEX = 0;
@@ -22,15 +19,13 @@ FTFace::FTFace( const char* filename)
     }
     else
     {
-        charMap = new FTCharmap( *ftFace);
         numGlyphs = (*ftFace)->num_glyphs;
     }
 }
 
 
 FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
-:   charMap(0),
-    numGlyphs(0),
+:   numGlyphs(0),
     err(0)
 {
     const FT_Long DEFAULT_FACE_INDEX = 0;
@@ -45,7 +40,6 @@ FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
     }
     else
     {
-        charMap = new FTCharmap( *ftFace);
         numGlyphs = (*ftFace)->num_glyphs;
     }
 }
@@ -53,7 +47,6 @@ FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
 
 FTFace::~FTFace()
 {
-    delete charMap;
     Close();
 }
 
@@ -105,26 +98,12 @@ const FTSize& FTFace::Size( const unsigned int size, const unsigned int res)
 }
 
 
-bool FTFace::CharMap( FT_Encoding encoding)
-{
-    bool result = charMap->CharMap( encoding);
-    err = charMap->Error();
-    return result;
-}
-
-
 unsigned int FTFace::UnitsPerEM() const
 {
     return (*ftFace)->units_per_EM;
 }
 
 
-unsigned int FTFace::CharIndex( unsigned int index) const
-{
-    return charMap->CharIndex( index);
-}
-
-
 FTPoint FTFace::KernAdvance( unsigned int index1, unsigned int index2)
 {
     float x, y;
@@ -164,5 +143,3 @@ FT_Glyph* FTFace::Glyph( unsigned int index, FT_Int load_flags)
     return &ftGlyph;
 }
 
-
-