Commit a264b05c603478ac94fdc45256d073767de3db2a

henry 2001-08-05T21:37:18

Added FT_Error member and accessor function. Minor tidy ups

diff --git a/include/FTFace.h b/include/FTFace.h
index 5f08829..3c3c9fd 100755
--- a/include/FTFace.h
+++ b/include/FTFace.h
@@ -1,13 +1,14 @@
 #ifndef		__FTFace__
 #define		__FTFace__
 
+//#include "FTGL.h"
+
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 
 #include "FTSize.h"
 
-#include "FTGL.h"
 
 
 class	FTFace
@@ -24,13 +25,15 @@ class	FTFace
 		FT_Vector KernAdvance( int index1, int index2 );
 		FT_Face* Face() const { return ftFace;}
 		
+		FT_Error Error() const { return err;}
+		
 		// attributes
 		
 	private:
 		// methods
 		
 		// attributes
-//		FONTTYPE	fontType;
+		FT_Error err;
 		FTSize	charSize;
 		FT_Face* ftFace;
 		int	numCharMaps;
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 16d4b4d..5f51765 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -1,23 +1,15 @@
-#include	"assert.h"
-
 #include	"FTFace.h"
 #include	"FTLibrary.h"
 #include	"FTGL.h"
 
 
-// OPSignature:  FTFace:FTFace() 
 FTFace::FTFace()
 :	ftFace(0),
 	numCharMaps(0),
 	numGlyphs(0)
-{
-//Insert your own code here.
-
-//End of user code.         
-}
+{}
 
 
-// OPSignature:  FTFace:~FTFace() 
 FTFace::~FTFace()
 {
 	if( ftFace)
@@ -29,11 +21,10 @@ FTFace::~FTFace()
 }
 
 
-// OPSignature: bool FTFace:open( const char*:filename  FONTTYPE:fontType ) 
 bool	FTFace::Open( const char* filename)
 {
 	ftFace = new FT_Face;
-	FT_Error err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, 0, ftFace);
+	err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, 0, ftFace);
 	
 	if( err == FT_Err_Unknown_File_Format)
     {
@@ -56,14 +47,12 @@ bool	FTFace::Open( const char* filename)
 }
 
 
-// OPSignature: bool FTFace:open( const char*:filename  FONTTYPE:fontType ) 
 void FTFace::Close()
 {
 	FT_Done_Face( *ftFace);
 }
 
 
-// OPSignature: bool FTFace:SetSize( const int:size  const int:res ) 
 FTSize& FTFace::Size( const int size, const int res )
 {
 	charSize.CharSize( ftFace, size, res, res);
@@ -71,16 +60,15 @@ FTSize& FTFace::Size( const int size, const int res )
 }
 
 
-// OPSignature: void FTFace:SetCharMap( CHARMAP:encoding ) 
 bool FTFace::CharMap( CHARMAP encoding )
 {
 //Insert your own code here.
 
-//End of user code.         
+//End of user code.   
+	return false;     
 }
 
 
-// OPSignature: FT_Glyph FTFace:GetGlyph( int:index ) 
 FT_Glyph	FTFace::Glyph( int index )
 {
 //Insert your own code here.
@@ -89,7 +77,6 @@ FT_Glyph	FTFace::Glyph( int index )
 }
 
 
-// OPSignature: FT_Vector FTFace:GetKernAdvance( int:index1  int:index2 ) 
 FT_Vector	FTFace::KernAdvance( int index1, int index2 )
 {
 //Insert your own code here.