Commit 4e8f31aef7f12a0ef11c61a89d4b05543aa08cce

henry 2003-06-03T04:01:13

Now takes an FTGL face not a Freetype fac Fixed docs Added glyphIndex function

diff --git a/include/FTCharmap.h b/include/FTCharmap.h
index 7b511a6..1b1f568 100644
--- a/include/FTCharmap.h
+++ b/include/FTCharmap.h
@@ -23,13 +23,16 @@
  * @see "Freetype 2 Documentation" 
  *
  */
+
+class FTFace;
+
 class FTGL_EXPORT FTCharmap
 {
     public:
         /**
          * Constructor
          */
-        FTCharmap( FT_Face ftFace);
+        FTCharmap( FTFace* face);
 
         /**
          * Destructor
@@ -74,12 +77,13 @@ class FTGL_EXPORT FTCharmap
          *              current encoding eg apple roman.
          * @return      The glyph index for the character.
          */
-        unsigned int CharIndex( unsigned int index );
+        unsigned int CharIndex( unsigned int characterCode);
+        unsigned int GlyphIndex( unsigned int characterCode, unsigned int glyphIndex);
 
         /**
          * Queries for errors.
          *
-         * @return  The current error code.
+         * @return  The current error code. Zero means no error.
          */
         FT_Error Error() const { return err;}
         
@@ -103,7 +107,7 @@ class FTGL_EXPORT FTCharmap
         CharacterMap charMap;
         
         /**
-         * Current error code. Zero means no error.
+         * Current error code.
          */
         FT_Error err;
         
diff --git a/src/FTCharmap.cpp b/src/FTCharmap.cpp
index 04caddf..0530933 100644
--- a/src/FTCharmap.cpp
+++ b/src/FTCharmap.cpp
@@ -1,11 +1,12 @@
-#include    "FTCharmap.h"
+#include "FTFace.h"
+#include "FTCharmap.h"
 
 
-FTCharmap::FTCharmap( FT_Face face)
-:   ftFace( face),
+FTCharmap::FTCharmap( FTFace* face)
+:   ftFace( *(face->Face())),
     err(0)
 {
-    if( !face->charmap)
+    if( !ftFace->charmap)
     {
         err = FT_Set_Charmap( ftFace, ftFace->charmaps[0]);
     }