Commit 7033612a86c33a5841c8c91ec9bea8ba232ddfe8

henry 2002-12-20T22:17:06

Removed maekGlyphList function and changes for FTFace

diff --git a/include/FTFont.h b/include/FTFont.h
index 560d46e..de8ca59 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -4,8 +4,8 @@
 #include <ft2build.h>
 #include FT_FREETYPE_H
 
-#include "FTGL.h"
 #include "FTFace.h"
+#include "FTGL.h"
 
 class FTGlyphContainer;
 class FTGlyph;
@@ -182,46 +182,21 @@ class FTGL_EXPORT FTFont
         inline virtual FTGlyph* MakeGlyph( unsigned int g) = 0;
         
         /**
-         * Construct the internal glyph cache.
-         *
-         * This a list of glyphs processed for openGL Rendering NOT
-         * freetype glyphs.
-         *
-         * @return  <code>true</code> on success.
-         */
-        virtual bool MakeGlyphList();
-        
-        /**
          * Current face object
          */
         FTFace face;
         
         /**
-         * Number of faces in this font
-         */
-        unsigned int numFaces;
-        
-        /**
          * Current size object
          */
         FTSize charSize;
 
         /**
-         * An object that holds a list of glyphs
-         */
-        FTGlyphContainer* glyphList;
-        
-        /**
-         * Current pen or cursor position;
-         */
-        FTPoint pen;
-        
-        /**
          * Current error code. Zero means no error.
          */
         FT_Error err;
         
-    private:
+    private:        
         /**
          * Get the advance width for a character.
          * This function does an implicit conversion on it's arguments.
@@ -246,6 +221,15 @@ class FTGL_EXPORT FTFont
          */
         inline void CheckGlyph( const unsigned int chr);
 
+        /**
+         * An object that holds a list of glyphs
+         */
+        FTGlyphContainer* glyphList;
+        
+        /**
+         * Current pen or cursor position;
+         */
+        FTPoint pen;
 };
 
 
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index ae2197e..59bedbb 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -5,32 +5,18 @@
 
 
 FTFont::FTFont( const char* fontname)
-:   numFaces(0),
+:   face( fontname),
     glyphList(0)
 {
-    if( face.Open( fontname))
-    {
-        err = 0;
-    }
-    else
-    {
-        err = face.Error();
-    }
+    err = face.Error();
 }
 
 
 FTFont::FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
-:   numFaces(0),
+:   face( pBufferBytes, bufferSizeInBytes),
     glyphList(0)
 {
-    if( face.Open( pBufferBytes, bufferSizeInBytes ))
-    {
-        err = 0;
-    }
-    else
-    {
-        err = face.Error();
-    }
+    err = face.Error();
 }
 
 
@@ -70,8 +56,7 @@ bool FTFont::FaceSize( const unsigned int size, const unsigned int res )
     }
     
     glyphList = new FTGlyphContainer( &face);
-    
-    return MakeGlyphList();
+    return true;
 }
 
 
@@ -81,12 +66,6 @@ unsigned int FTFont::FaceSize() const
 }
 
 
-bool FTFont::MakeGlyphList()
-{
-    return true;
-}
-
-
 bool FTFont::CharMap( FT_Encoding encoding)
 {
     bool result = face.CharMap( encoding);