Tidied up the error stuff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
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;
}