Commit 2c1645a5b94e653b0f72006cd7b104ff15f1a203

henry 2003-01-10T03:25:53

Trying to add table support

diff --git a/include/FTFace.h b/include/FTFace.h
index 74bd703..4f91464 100755
--- a/include/FTFace.h
+++ b/include/FTFace.h
@@ -67,6 +67,10 @@ class FTGL_EXPORT FTFace
          */
         void Close();
         
+        
+        void* FontTable( unsigned int tableName) const;
+        
+        
         /**
          * Sets the char size for the current face.
          *
@@ -126,6 +130,11 @@ class FTGL_EXPORT FTFace
         
     private:
         /**
+         * The Freetype face
+         */
+        FT_Face* ftFace;
+
+        /**
          * The size object associated with this face
          */
         FTSize  charSize;
@@ -136,11 +145,6 @@ class FTGL_EXPORT FTFace
         FTCharmap* charMap;
 
         /**
-         * The Freetype face
-         */
-        FT_Face* ftFace;
-
-        /**
          * Temporary variable to hold a glyph
          */
         FT_Glyph ftGlyph;
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index e291eae..06dcd53 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -3,6 +3,8 @@
 #include    "FTCharmap.h"
 
 
+#include FT_TRUETYPE_TABLES_H
+
 FTFace::FTFace( const char* filename)
 :   charMap(0),
     numGlyphs(0),
@@ -87,6 +89,13 @@ void FTFace::Close()
 }
 
 
+void* FTFace::FontTable( unsigned int tableName) const
+{
+//    return FT_Get_Sfnt_Table( *ftFace, tableName);
+    return 0;
+}
+
+
 const FTSize& FTFace::Size( const unsigned int size, const unsigned int res)
 {
     charSize.CharSize( ftFace, size, res, res);
diff --git a/test/FTFace-Test.cpp b/test/FTFace-Test.cpp
index 69159d5..6c8251e 100755
--- a/test/FTFace-Test.cpp
+++ b/test/FTFace-Test.cpp
@@ -14,6 +14,7 @@ class FTFaceTest : public CppUnit::TestCase
         CPPUNIT_TEST( testOpenFaceFromMemory);
         CPPUNIT_TEST( testAttachFile);
         CPPUNIT_TEST( testAttachMemoryData);
+        CPPUNIT_TEST( testGetFontTable);
         CPPUNIT_TEST( testGlyphCount);
         CPPUNIT_TEST( testSetFontSize);
         CPPUNIT_TEST( testUnitPerEMSquare);
@@ -73,6 +74,13 @@ class FTFaceTest : public CppUnit::TestCase
         }
         
         
+        void testGetFontTable()
+        {
+            CPPUNIT_ASSERT( !testFace->FontTable( 'xxxx'));
+            CPPUNIT_ASSERT( testFace->FontTable( 'hmtx'));
+        }
+        
+        
         void testGlyphCount()
         {
             CPPUNIT_ASSERT( testFace->GlyphCount() == 14099);