Tidied up the err 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
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 5f51765..875edd4 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -21,29 +21,21 @@ FTFace::~FTFace()
}
-bool FTFace::Open( const char* filename)
+bool FTFace::Open( const char* filename)
{
ftFace = new FT_Face;
err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, 0, ftFace);
-
- if( err == FT_Err_Unknown_File_Format)
+
+ if( err)
{
-// ... the font file could be opened and read, but it appears
-// ... that its font format is unsupported
delete ftFace;
ftFace = 0;
return false;
}
- else if( err)
+ else
{
-// ... another error code means that the font file could not
-// ... be opened or read, or simply that it is broken...
- delete ftFace;
- ftFace = 0;
- return false;
- }
-
- return true;
+ return true;
+ }
}
@@ -69,7 +61,7 @@ bool FTFace::CharMap( CHARMAP encoding )
}
-FT_Glyph FTFace::Glyph( int index )
+FT_Glyph FTFace::Glyph( int index )
{
//Insert your own code here.
@@ -77,7 +69,7 @@ FT_Glyph FTFace::Glyph( int index )
}
-FT_Vector FTFace::KernAdvance( int index1, int index2 )
+FT_Vector FTFace::KernAdvance( int index1, int index2 )
{
//Insert your own code here.