Commit fe2aca961d4d51f401f6b73d5f9a9de7edfdce1e

henry 2001-08-01T04:17:58

Updated for FTVectorGlyph

diff --git a/include/FTGLOutlineFont.h b/include/FTGLOutlineFont.h
index 33dbc96..181d43d 100755
--- a/include/FTGLOutlineFont.h
+++ b/include/FTGLOutlineFont.h
@@ -1,9 +1,13 @@
 #ifndef		__FTGLOutlineFont
 #define		__FTGLOutlineFont
+
 #include	"FTFont.h"
 
 #include "FTGL.h"
 
+
+class FTVectorGlyph;
+
 class	FTGLOutlineFont : public FTFont
 {
 	public:
@@ -11,11 +15,17 @@ class	FTGLOutlineFont : public FTFont
 		FTGLOutlineFont();
 		~FTGLOutlineFont();
 		
+//		bool render( const char* string);
+		
 		// attributes
 		
 	private:
 		// methods
 		bool MakeGlyphList();
 		
+		// attributes
+		FTVectorGlyph* tempGlyph;
+
+		
 };
 #endif
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index 7a31d65..4753055 100755
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -1,8 +1,10 @@
-// Code generated by Object Plant
+#include	"gl.h"
 
 #include	"FTGLOutlineFont.h"
 #include	"FTGlyphContainer.h"
 #include	"FTGL.h"
+#include	"FTVectorGlyph.h"
+
 
 
 FTGLOutlineFont::FTGLOutlineFont()
@@ -23,3 +25,39 @@ FTGLOutlineFont::~FTGLOutlineFont()
 //End of user code.         
 }
 
+
+//bool FTGLOutlineFont::render( const char* string)
+//{
+//
+//	glBegin( GL_LINE_LOOP);
+//		FTFont::render( string);
+//	glEnd();
+//}
+
+
+bool FTGLOutlineFont::MakeGlyphList()
+{
+	int glyphIndex;
+	
+	numGlyphs = 127;
+	
+	for( int n = 0; n < numGlyphs; ++n)
+	{
+		FT_Face* ftFace = face.Face();
+
+		glyphIndex = FT_Get_Char_Index( *ftFace, n);
+		
+		err = FT_Load_Glyph( *ftFace, glyphIndex, FT_LOAD_DEFAULT);
+		if( err)
+		{ }
+
+		FT_Glyph ftGlyph;
+		
+		err = FT_Get_Glyph( (*ftFace)->glyph, &ftGlyph);
+		if( err)
+		{}
+		
+		tempGlyph = new FTVectorGlyph( ftGlyph, glyphIndex);
+		glyphList->Add( tempGlyph);
+	}
+}