Commit 265121667601378b322d85b37ac6321a521e687e

henry 2002-11-29T08:13:55

Got rid of Close() and improved som error handling

diff --git a/include/FTFont.h b/include/FTFont.h
index 8167691..5dba96b 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -74,11 +74,6 @@ class FTGL_EXPORT FTFont
         bool Attach( const char* filename);
 
         /**
-         * Disposes of the font
-         */
-        void Close();
-        
-        /**
          * Set the char size for the current face.
          *
          * @param size      the face size in points (1/72 inch)
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 9f53253..80da315 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -18,7 +18,7 @@ FTFont::FTFont()
 
 FTFont::~FTFont()
 {
-    Close();
+    delete glyphList;
 }
 
 
@@ -30,7 +30,7 @@ bool FTFont::Open( const char* fontname, bool p)
     {
         FT_Face* ftFace = face.Face();      
         numGlyphs = (*ftFace)->num_glyphs;
-        
+        err = 0;
         return true;
     }
     else
@@ -66,12 +66,6 @@ bool FTFont::Attach( const char* filename)
 }
 
 
-void FTFont::Close()
-{
-    delete glyphList;
-}
-
-
 bool FTFont::FaceSize( const unsigned int size, const unsigned int res )
 {
     charSize = face.Size( size, res);
@@ -118,8 +112,9 @@ bool FTFont::MakeGlyphList()
 
 bool FTFont::CharMap( FT_Encoding encoding)
 {
-    err = face.CharMap( encoding);
-    return !err;
+    bool result = face.CharMap( encoding);
+    err = face.Error();
+    return result;
 }