Commit f97bb6a25ed5ecde247359d805759eb6fd687dae

henry 2001-08-07T21:32:07

Tidied up the error stuff

diff --git a/src/FTGLBitmapFont.cpp b/src/FTGLBitmapFont.cpp
index 53a5d6a..51e1ee9 100755
--- a/src/FTGLBitmapFont.cpp
+++ b/src/FTGLBitmapFont.cpp
@@ -22,26 +22,25 @@ bool FTGLBitmapFont::MakeGlyphList()
 	FT_Face* ftFace = face.Face();
 	long glyphIndex;
 	
+	numGlyphs = 256; // FIXME hack
+	
 	for( int c = 0; c < numGlyphs; ++c)
 	{
 		glyphIndex = FT_Get_Char_Index( *ftFace, c );
 		
 		err = FT_Load_Glyph( *ftFace, glyphIndex, FT_LOAD_DEFAULT);
-		if( err)
-		{}
 
 		FT_Glyph ftGlyph;
 		
 		err = FT_Get_Glyph( (*ftFace)->glyph, &ftGlyph);
-		if( err)
-		{}
 
 //		FT_HAS_VERTICAL(face)
 
 		tempGlyph = new FTBitmapGlyph( ftGlyph, glyphIndex);
 		glyphList->Add( tempGlyph);
-		
 	}
+	
+	return !err;
 }
 
 
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index 7a73bf8..3afe9e5 100755
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -20,7 +20,8 @@ bool FTGLOutlineFont::MakeGlyphList()
 {
 	int glyphIndex;
 	
-	numGlyphs = 127;
+	numGlyphs = 127; // FIXME hack
+	
 	for( int n = 0; n < numGlyphs; ++n)
 	{
 		FT_Face* ftFace = face.Face();
@@ -28,18 +29,16 @@ bool FTGLOutlineFont::MakeGlyphList()
 		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);
 	}
+	
+	return !err;
 }
 
 
diff --git a/src/FTGLPixmapFont.cpp b/src/FTGLPixmapFont.cpp
index 23c91fc..e222b8c 100755
--- a/src/FTGLPixmapFont.cpp
+++ b/src/FTGLPixmapFont.cpp
@@ -22,26 +22,25 @@ bool FTGLPixmapFont::MakeGlyphList()
 	FT_Face* ftFace = face.Face();
 	long glyphIndex;
 	
+	numGlyphs = 256; // FIXME hack
+	
 	for( int c = 0; c < numGlyphs; ++c)
 	{
 		glyphIndex = FT_Get_Char_Index( *ftFace, c );
 		
 		err = FT_Load_Glyph( *ftFace, glyphIndex, FT_LOAD_DEFAULT);
-		if( err)
-		{ }
 
 		FT_Glyph ftGlyph;
 		
 		err = FT_Get_Glyph( (*ftFace)->glyph, &ftGlyph);
-		if( err)
-		{}
 
 //		FT_HAS_VERTICAL(face)
 
 		tempGlyph = new FTPixmapGlyph( ftGlyph, glyphIndex);
 		glyphList->Add( tempGlyph);
-		
 	}
+	
+	return !err;
 }
 
 
diff --git a/src/FTGLPolygonFont.cpp b/src/FTGLPolygonFont.cpp
index 7ad070a..f4459c0 100755
--- a/src/FTGLPolygonFont.cpp
+++ b/src/FTGLPolygonFont.cpp
@@ -19,23 +19,21 @@ bool FTGLPolygonFont::MakeGlyphList()
 	FT_Face* ftFace = face.Face();
 	int glyphIndex;
 	
-	// FIXME
-	numGlyphs = 127;
+	numGlyphs = 127; // FIXME hack
+	
 	for( int n = 0; n < numGlyphs; ++n)
 	{
 		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 FTPolyGlyph( ftGlyph, glyphIndex);
 		glyphList->Add( tempGlyph);
 	}
+	
+	return !err;
 }